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
public static class RouteDataExtensions | |
{ | |
// Usage can be seen here: http://www.dvolve.org/2016/01/getting-route-data-in-asp-net-razor/ | |
public static bool Contains(this RouteData route, string action = null, string controller = null, string area = null, StringComparison comparison = StringComparison.CurrentCultureIgnoreCase) | |
{ | |
// Get the parts that we'll check. | |
var areaToCheck = route.DataTokens["Area"]; | |
var actionToCheck = route.Values.ContainsKey("Action") ? route.Values["Action"] : null; | |
var controllerToCheck = route.Values.ContainsKey("Controller") ? route.Values["Controller"] : null; |
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
using System; | |
using Xamarin.Forms.Platform.Android; | |
using Xamarin.Forms; | |
using Android.Graphics; | |
[assembly:ExportRenderer(typeof(Label), typeof(CustomFontLabelRenderer))] | |
namespace CustomXamFormsFont.Droid | |
{ | |
public class CustomFontLabelRenderer : LabelRenderer | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Foundation; | |
using UIKit; | |
namespace CustomXamFormsFont.iOS | |
{ | |
[Register("AppDelegate")] | |
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage Title="Login" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MyProject.LoginPage"> | |
<Grid Padding="20" HorizontalOptions="CenterAndExpand" AutomationId="LoginPageIdentifier"> | |
<Entry AutomationId="FullNameTextField" Keyboard="Text" Text="{Binding Fullname}" /> | |
<Entry AutomationId="EmailTextField" Keyboard="Email" Text="{Binding Email}" /> | |
<Button AutomationId="SignInButton" Text="Send" Command="{Binding LoginCommand}" /> | |
</Grid> | |
</ContentPage> |
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
public class LoginPage : BasePage | |
{ | |
readonly string SignInButton = "SignInButton"; | |
readonly string EmailField = "EmailTextField"; | |
readonly string FullNameField = "FullNameTextField"; | |
public LoginPage() : base("LoginPageIdentifier", "LoginPageIdentifier") | |
{ | |
} | |
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
void SetupTestCloud() | |
{ | |
// Code for starting up the Xamarin Test Cloud Agent | |
#if ENABLE_TEST_CLOUD | |
Xamarin.Calabash.Start(); | |
//Mapping AutomationId to iOS Labels | |
Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) => | |
{ | |
if (null != e.View.AutomationId) |
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
void SetupTestCloud() | |
{ | |
// Code for starting up the Xamarin Test Cloud Agent | |
#if ENABLE_TEST_CLOUD | |
Xamarin.Forms.Forms.ViewInitialized += (object sender, Xamarin.Forms.ViewInitializedEventArgs e) => { | |
if (!string.IsNullOrWhiteSpace(e.View.AutomationId)) | |
{ | |
e.NativeView.ContentDescription = e.View.AutomationId; | |
} | |
}; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> | |
<metadata> | |
<id>Rebex.2016-R2</id> | |
<version>1.0.1</version> | |
<title>Rebex 2016-R2</title> | |
<authors>Steven Thewissen</authors> | |
<owners>Rebex</owners> | |
<iconUrl>https://somefancything.com/rebex.png</iconUrl> | |
<requireLicenseAcceptance>false</requireLicenseAcceptance> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<packageSources> | |
<!-- remove any machine-wide sources with <clear/> --> | |
<clear /> | |
<!-- add a Team Services feed --> | |
<add key="MyFeed" value="https://myfeed.pkgs.visualstudio.com/DefaultCollection/_packaging/MyFeed/nuget/v3/index.json" /> | |
<!-- also get packages from the NuGet Gallery --> | |
<add key="nuget.org" value="https://www.nuget.org/api/v2/" /> | |
</packageSources> |
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
// Get your API Key @ https://console.developers.google.com/apis/api/youtube/ | |
const string ApiKey = "AIzaSyB2Hu4D97zOB8f410cwT2rCc6JnmwoLCAo"; | |
const string ChannelId = "{PUT YOUR API KEY HERE}"; | |
// Documentation @ https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.videos.list | |
string channelUrl = $"https://www.googleapis.com/youtube/v3/search?part=id&maxResults=20&channelId={ChannelId}&key={ApiKey}"; | |
string detailsUrl = "https://www.googleapis.com/youtube/v3/videos?part=snippet,statistics&key=" + ApiKey + "&id={0}"; |
OlderNewer