This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* http://applemusic.tumblr.com/ | |
*/ | |
/** Ultra Light */ | |
@font-face { | |
font-family: "San Francisco"; | |
font-weight: 100; | |
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff2"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"projects": [ "src", "test" ], | |
"sdk": { | |
"version": "1.0.0-beta8" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
todo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
todo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: CSharp | |
mono: | |
- latest | |
install: | |
- curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh | |
- dnvm upgrade | |
- dnu restore | |
script: | |
- dnx -p ./test/[testProjectName]/project.json test -parallel none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// don't use this code as-is in production scince ValidateSignature is false | |
app.Use(async (context, next) => | |
{ | |
var authType = IdentityOptions.ApplicationCookieAuthenticationType; | |
var authScheme = IdentityOptions.ApplicationCookieAuthenticationScheme; | |
if (context.Request.Path.ToString().ToLower() == "/token") | |
{ | |
// Generate Token | |
if (!context.Request.HasFormContentType || !context.Request.Form.ContainsKey("username") || !context.Request.Form.ContainsKey("password")) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"DefaultAdminUsername": "Administrator", | |
"DefaultAdminPassword": "12345", | |
"Data": { | |
"IdentityConnection": { | |
"Connectionstring": "Server=(localdb)\\mssqllocaldb;Database=IdentityMvc-2-20-15-3;Trusted_Connection=True;MultipleActiveResultSets=true" | |
} | |
}, | |
"Identity": { | |
"Password": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now that you have a model, you can use migrations to create a database for you. | |
Open a command prompt (Windows Key + R, type cmd, click OK) | |
Use the cd command to navigate to the project directory | |
Run dnvm use 1.0.0-beta8 | |
Run dnx ef migrations add MyFirstMigration to scaffold a migration to create the initial set of tables for your model. | |
Run dnx ef database update to apply the new migration to the database. Because your database doesn’t exist yet, it will be created for you before the migration is applied. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///<summary> | |
///Provides a property that we can bind view model properties to. Notice that the name of the property | |
///follows the pattern of the using the instance property name followed by the word Property. | |
//</summary> | |
public static BindableProperty LeftTitleProperty = | |
BindableProperty.Create<CustomHeaderBox, string>(ctrl => ctrl.LeftTitle, | |
defaultValue: string.Empty, | |
defaultBindingMode: BindingMode.TwoWay, | |
propertyChanging: (bindable, oldValue, newValue) => { | |
var ctrl = (CustomHeaderBox)bindable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static class TypeSwitch { | |
public class CaseInfo { | |
public bool IsDefault { get; set; } | |
public Type Target { get; set; } | |
public Action<object> Action { get; set; } | |
} | |
public static void Do(object source, params CaseInfo[] cases) { | |
var type = source.GetType(); | |
foreach (var entry in cases) { |
OlderNewer