vnext
Paul Schneider 6 years ago
parent e56547d25f
commit b93db116e1
7 changed files with 2506 additions and 43 deletions

@ -1,6 +1,6 @@
include versioning.mk
SUBDIRS=Yavsc Yavsc.Server Yavsc.Abstract cli
SUBDIRS=Yavsc Yavsc.Server Yavsc.Abstract cli test
all: deploy-pkgs
@ -36,6 +36,7 @@ undoLocalYavscNugetDeploy:
check: cli
make -C cli check
make -C test test
deploy-pkgs: Yavsc-deploy-pkg Yavsc.Server-deploy-pkg Yavsc.Abstract-deploy-pkg cli-deploy-pkg

@ -14,7 +14,7 @@
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -71,47 +71,6 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Include="IBaseTrackedEntity.cs" />
<Compile Include="IIdentified.cs" />
<Compile Include="ITitle.cs" />
<Compile Include="Billing\IAccountBalance.cs" />
<Compile Include="Billing\IBillable.cs" />
<Compile Include="Billing\IBillingImpacter.cs" />
<Compile Include="Billing\IBillItem.cs" />
<Compile Include="Billing\ICommandLine.cs" />
<Compile Include="Billing\IEstimate.cs" />
<Compile Include="Workflow\IRating.cs" />
<Compile Include="Blogspot\IBlog.cs" />
<Compile Include="Identity\IApplicationUser.cs" />
<Compile Include="Identity\UserInfo.cs" />
<Compile Include="Identity\Security\ICircleAuthorization.cs" />
<Compile Include="Identity\Security\ICircleAuthorized.cs" />
<Compile Include="IT\ICode.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Workflow\IActivity.cs" />
<Compile Include="Workflow\IBlackListed.cs" />
<Compile Include="Workflow\ICommandForm.cs" />
<Compile Include="Workflow\IContact.cs" />
<Compile Include="Workflow\ICoWorking.cs" />
<Compile Include="Workflow\IGoogleCloudMobileDeclaration.cs" />
<Compile Include="Workflow\ILocation.cs" />
<Compile Include="Workflow\IPerformerProfile.cs" />
<Compile Include="Workflow\IPosition.cs" />
<Compile Include="Workflow\ISpecializationSettings.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="MarkdownParser.y" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="project.json" />
<Content Include="Workflow\IQuery.cs" />
<Content Include="YavscLib.sln" />
</ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity;
namespace Yavsc.Server.Helpers
{
public static class PageHelpers
{
public static List<SelectListItem> CreateSelectListItems (this Type enumType, object selectedValue =null)
{
string selectedName = (selectedValue != null) ? enumType.GetEnumName(selectedValue) : null;
var items = new List<SelectListItem> ();
var names = enumType.GetEnumNames();
var values = enumType.GetEnumValues();
for (int index = 0; index < names.Length; index++)
{
var itemName = names[index];
items.Add(new SelectListItem() {
Value = values.GetValue(index).ToString(), Text = itemName, Selected = ( itemName == selectedName)
}) ;
}
var list = new SelectList(items);
return items;
}
public static List<SelectListItem> CreateSelectListItems<T> (this DbSet<T>data,
Func<T,string> dataField,
Func<T,string> displayField = null, object selectedValue =null) where T : class
{
if (displayField == null) displayField = dataField;
var items = new List<SelectListItem> ();
foreach (var dataItem in data)
{
var itemVal = dataField(dataItem);
var itemName = displayField(dataItem);
items.Add(new SelectListItem() {
Value = itemVal, Text = itemName, Selected = ( selectedValue?.Equals(itemVal) ?? false )
}) ;
}
return items;
}
}
}

@ -14,6 +14,7 @@
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/pazof/yavsc</RepositoryUrl>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>
</PropertyGroup>
<ItemGroup>

2434
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,16 @@
CONFIGURATION=Debug
BINTARGET=bin/$(CONFIGURATION)/dnx451/test.dll
project.lock.json: project.json
dnu restore
$(BINTARGET): project.lock.json
dnu build
all: $(BINTARGET)
test: $(BINTARGET)
dnx test
.PHONY: test

@ -20,6 +20,9 @@
},
{
"path": "OAuth.AspNet.Token"
},
{
"path": "test"
}
],
"settings": {

Loading…