content stringlengths 5 1.04M | avg_line_length float64 1.75 12.9k | max_line_length int64 2 244k | alphanum_fraction float64 0 0.98 | licenses list | repository_name stringlengths 7 92 | path stringlengths 3 249 | size int64 5 1.04M | lang stringclasses 2 values |
|---|---|---|---|---|---|---|---|---|
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Logging;
using rokWebsite.Models;
namespace rokWebsite.Areas.Identity.Pages.Account
{
[AllowAnonymous]
public class ExternalLoginModel : PageModel
{
private readonly SignInManager<User> _signInManager;
private readonly UserManager<User> _userManager;
private readonly IEmailSender _emailSender;
private readonly ILogger<ExternalLoginModel> _logger;
public ExternalLoginModel(
SignInManager<User> signInManager,
UserManager<User> userManager,
ILogger<ExternalLoginModel> logger,
IEmailSender emailSender)
{
_signInManager = signInManager;
_userManager = userManager;
_logger = logger;
_emailSender = emailSender;
}
[BindProperty]
public InputModel Input { get; set; }
public string ProviderDisplayName { get; set; }
public string ReturnUrl { get; set; }
[TempData]
public string ErrorMessage { get; set; }
public class InputModel
{
[Required]
[EmailAddress]
public string Email { get; set; }
}
public IActionResult OnGetAsync()
{
return RedirectToPage("./Login");
}
public IActionResult OnPost(string provider, string returnUrl = null)
{
// Request a redirect to the external login provider.
var redirectUrl = Url.Page("./ExternalLogin", pageHandler: "Callback", values: new { returnUrl });
var properties = _signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl);
return new ChallengeResult(provider, properties);
}
public async Task<IActionResult> OnGetCallbackAsync(string returnUrl = null, string remoteError = null)
{
returnUrl = returnUrl ?? Url.Content("~/");
if (remoteError != null)
{
ErrorMessage = $"Error from external provider: {remoteError}";
return RedirectToPage("./Login", new {ReturnUrl = returnUrl });
}
var info = await _signInManager.GetExternalLoginInfoAsync();
if (info == null)
{
ErrorMessage = "Error loading external login information.";
return RedirectToPage("./Login", new { ReturnUrl = returnUrl });
}
// Sign in the user with this external login provider if the user already has a login.
var result = await _signInManager.ExternalLoginSignInAsync(info.LoginProvider, info.ProviderKey, isPersistent: false, bypassTwoFactor : true);
if (result.Succeeded)
{
_logger.LogInformation("{Name} logged in with {LoginProvider} provider.", info.Principal.Identity.Name, info.LoginProvider);
return LocalRedirect(returnUrl);
}
if (result.IsLockedOut)
{
return RedirectToPage("./Lockout");
}
else
{
// If the user does not have an account, then ask the user to create an account.
ReturnUrl = returnUrl;
ProviderDisplayName = info.ProviderDisplayName;
if (info.Principal.HasClaim(c => c.Type == ClaimTypes.Email))
{
Input = new InputModel
{
Email = info.Principal.FindFirstValue(ClaimTypes.Email)
};
}
return Page();
}
}
public async Task<IActionResult> OnPostConfirmationAsync(string returnUrl = null)
{
returnUrl = returnUrl ?? Url.Content("~/");
// Get the information about the user from the external login provider
var info = await _signInManager.GetExternalLoginInfoAsync();
if (info == null)
{
ErrorMessage = "Error loading external login information during confirmation.";
return RedirectToPage("./Login", new { ReturnUrl = returnUrl });
}
if (ModelState.IsValid)
{
var user = new User { UserName = Input.Email, Email = Input.Email };
var result = await _userManager.CreateAsync(user);
if (result.Succeeded)
{
result = await _userManager.AddLoginAsync(user, info);
if (result.Succeeded)
{
_logger.LogInformation("User created an account using {Name} provider.", info.LoginProvider);
var userId = await _userManager.GetUserIdAsync(user);
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
code = WebEncoders.Base64UrlEncode(Encoding.UTF8.GetBytes(code));
var callbackUrl = Url.Page(
"/Account/ConfirmEmail",
pageHandler: null,
values: new { area = "Identity", userId = userId, code = code },
protocol: Request.Scheme);
await _emailSender.SendEmailAsync(Input.Email, "Confirm your email",
$"Please confirm your account by <a href='{HtmlEncoder.Default.Encode(callbackUrl)}'>clicking here</a>.");
// If account confirmation is required, we need to show the link if we don't have a real email sender
if (_userManager.Options.SignIn.RequireConfirmedAccount)
{
return RedirectToPage("./RegisterConfirmation", new { Email = Input.Email });
}
await _signInManager.SignInAsync(user, isPersistent: false, info.LoginProvider);
return LocalRedirect(returnUrl);
}
}
foreach (var error in result.Errors)
{
ModelState.AddModelError(string.Empty, error.Description);
}
}
ProviderDisplayName = info.ProviderDisplayName;
ReturnUrl = returnUrl;
return Page();
}
}
}
| 40.352941 | 154 | 0.573324 | [
"MIT"
] | behluluysal/asp-net-core-5-training | rokWebsite/Areas/Identity/Pages/Account/ExternalLogin.cshtml.cs | 6,862 | C# |
namespace Skeleton.Web.Documentation
{
using System.Linq;
using Common.Extensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Swagger;
using Swashbuckle.AspNetCore.SwaggerGen;
public class AuthResponsesOperationFilter : IOperationFilter
{
public void Apply(OpenApiOperation operation, OperationFilterContext context)
{
var authAttributes = context?.MethodInfo?.DeclaringType?.GetCustomAttributes(true)
.Union(context.MethodInfo?.GetCustomAttributes(true))
.OfType<AuthorizeAttribute>();
if (authAttributes.IsNotEmpty())
operation.Responses.Add("401", new OpenApiResponse { Description = "Unauthorized" });
}
}
}
| 35.043478 | 101 | 0.689826 | [
"MIT"
] | litichevskiydv/WebInfrastructure | src/Infrastructure/Web/Documentation/AuthResponsesOperationFilter.cs | 806 | C# |
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Roslyn.Test.Utilities;
using Xunit;
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Classification
{
public partial class TotalClassifierTests
{
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsParamTypeAndDefault()
{
TestInClass(@"void M(dynamic d = default(dynamic",
Keyword("void"),
Identifier("M"),
Punctuation.OpenParen,
Keyword("dynamic"),
Identifier("d"),
Operators.Equals,
Keyword("default"),
Punctuation.OpenParen,
Keyword("dynamic"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicExplicitConversion()
{
TestInMethod(@"dynamic d = (dynamic)a;",
Keyword("dynamic"),
Identifier("d"),
Operators.Equals,
Punctuation.OpenParen,
Keyword("dynamic"),
Punctuation.CloseParen,
Identifier("a"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicMethodCall()
{
TestInMethod(@"dynamic.Equals(1, 1);",
Identifier("dynamic"),
Operators.Dot,
Identifier("Equals"),
Punctuation.OpenParen,
Number("1"),
Punctuation.Comma,
Number("1"),
Punctuation.CloseParen,
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicNullable()
{
TestInMethod(@"dynamic? a",
Keyword("dynamic"),
Operators.QuestionMark,
Identifier("a"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsUsingAliasForClass()
{
Test(@"using dynamic = System.EventArgs;",
Keyword("using"),
Class("dynamic"),
Operators.Equals,
Identifier("System"),
Operators.Dot,
Class("EventArgs"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsUsingAliasForDelegate()
{
Test(@"using dynamic = System.Action;",
Keyword("using"),
Delegate("dynamic"),
Operators.Equals,
Identifier("System"),
Operators.Dot,
Delegate("Action"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsUsingAliasForStruct()
{
Test(@"using dynamic = System.DateTime;",
Keyword("using"),
Struct("dynamic"),
Operators.Equals,
Identifier("System"),
Operators.Dot,
Struct("DateTime"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsUsingAliasForEnum()
{
Test(@"using dynamic = System.DayOfWeek;",
Keyword("using"),
Enum("dynamic"),
Operators.Equals,
Identifier("System"),
Operators.Dot,
Enum("DayOfWeek"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsUsingAliasForInterface()
{
Test(@"using dynamic = System.IDisposable;",
Keyword("using"),
Interface("dynamic"),
Operators.Equals,
Identifier("System"),
Operators.Dot,
Interface("IDisposable"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsExternAlias()
{
Test(@"extern alias dynamic;
class C { dynamic::Foo a; }",
Keyword("extern"),
Keyword("alias"),
Identifier("dynamic"),
Punctuation.Semicolon,
Keyword("class"),
Class("C"),
Punctuation.OpenCurly,
Identifier("dynamic"),
Operators.Text("::"),
Identifier("Foo"),
Identifier("a"),
Punctuation.Semicolon,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsDelegateType()
{
Test(@"delegate void dynamic()",
Keyword("delegate"),
Keyword("void"),
Delegate("dynamic"),
Punctuation.OpenParen,
Punctuation.CloseParen);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsDelegateReturnTypeAndParam()
{
Test(@"delegate dynamic MyDelegate (dynamic d)",
Keyword("delegate"),
Keyword("dynamic"),
Delegate("MyDelegate"),
Punctuation.OpenParen,
Keyword("dynamic"),
Identifier("d"),
Punctuation.CloseParen);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsDelegateLocalVariable()
{
TestInMethod(@"Func<string> f = delegate { int dynamic = 10; return dynamic.ToString();};",
Identifier("Func"),
Punctuation.OpenAngle,
Keyword("string"),
Punctuation.CloseAngle,
Identifier("f"),
Operators.Equals,
Keyword("delegate"),
Punctuation.OpenCurly,
Keyword("int"),
Identifier("dynamic"),
Operators.Equals,
Number("10"),
Punctuation.Semicolon,
Keyword("return"),
Identifier("dynamic"),
Operators.Dot,
Identifier("ToString"),
Punctuation.OpenParen,
Punctuation.CloseParen,
Punctuation.Semicolon,
Punctuation.CloseCurly,
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsGenericTypeName()
{
Test(@"partial class dynamic<T> { } class C { dynamic<int> d; }",
Keyword("partial"),
Keyword("class"),
Class("dynamic"),
Punctuation.OpenAngle,
TypeParameter("T"),
Punctuation.CloseAngle,
Punctuation.OpenCurly,
Punctuation.CloseCurly,
Keyword("class"),
Class("C"),
Punctuation.OpenCurly,
Class("dynamic"),
Punctuation.OpenAngle,
Keyword("int"),
Punctuation.CloseAngle,
Identifier("d"),
Punctuation.Semicolon,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsGenericField()
{
Test(@"class A<T> { T dynamic; }",
Keyword("class"),
Class("A"),
Punctuation.OpenAngle,
TypeParameter("T"),
Punctuation.CloseAngle,
Punctuation.OpenCurly,
TypeParameter("T"),
Identifier("dynamic"),
Punctuation.Semicolon,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsIndexerTypeAndParameter()
{
TestInClass(@"dynamic this[dynamic i]",
Keyword("dynamic"),
Keyword("this"),
Punctuation.OpenBracket,
Keyword("dynamic"),
Identifier("i"),
Punctuation.CloseBracket);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsOperatorTypeAndParameter()
{
TestInClass(@"static dynamic operator +(dynamic d1)",
Keyword("static"),
Keyword("dynamic"),
Keyword("operator"),
Operators.Text("+"),
Punctuation.OpenParen,
Keyword("dynamic"),
Identifier("d1"),
Punctuation.CloseParen);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsOperatorName()
{
TestInClass(@"static explicit operator dynamic(dynamic s)",
Keyword("static"),
Keyword("explicit"),
Keyword("operator"),
Keyword("dynamic"),
Punctuation.OpenParen,
Keyword("dynamic"),
Identifier("s"),
Punctuation.CloseParen);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsPropertyTypeAndName()
{
TestInClass(@"dynamic dynamic { get; set; }",
Keyword("dynamic"),
Identifier("dynamic"),
Punctuation.OpenCurly,
Keyword("get"),
Punctuation.Semicolon,
Keyword("set"),
Punctuation.Semicolon,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsEventName()
{
TestInClass(@"event Action dynamic",
Keyword("event"),
Identifier("Action"),
Identifier("dynamic"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsLinqLocalVariable()
{
TestInMethod(@"var v = from dynamic in names",
Keyword("var"),
Identifier("v"),
Operators.Equals,
Keyword("from"),
Identifier("dynamic"),
Keyword("in"),
Identifier("names"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsAnonymousTypePropertyName()
{
TestInMethod(@"var v = from dynamic in names select new { dynamic = dynamic};",
Keyword("var"),
Identifier("v"),
Operators.Equals,
Keyword("from"),
Identifier("dynamic"),
Keyword("in"),
Identifier("names"),
Keyword("select"),
Keyword("new"),
Punctuation.OpenCurly,
Identifier("dynamic"),
Operators.Equals,
Identifier("dynamic"),
Punctuation.CloseCurly,
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsArgumentToLambdaExpression()
{
TestInMethod(@"var p = names.Select(dynamic => dynamic.Length);",
Keyword("var"),
Identifier("p"),
Operators.Equals,
Identifier("names"),
Operators.Dot,
Identifier("Select"),
Punctuation.OpenParen,
Identifier("dynamic"),
Operators.Text("=>"),
Identifier("dynamic"),
Operators.Dot,
Identifier("Length"),
Punctuation.CloseParen,
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsAnonymousMethodLocalVariable()
{
TestInMethod(@"D f = delegate { string dynamic = ""a""; return dynamic.Length; };",
Identifier("D"),
Identifier("f"),
Operators.Equals,
Keyword("delegate"),
Punctuation.OpenCurly,
Keyword("string"),
Identifier("dynamic"),
Operators.Equals,
String(@"""a"""),
Punctuation.Semicolon,
Keyword("return"),
Identifier("dynamic"),
Operators.Dot,
Identifier("Length"),
Punctuation.Semicolon,
Punctuation.CloseCurly,
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsMethodName()
{
TestInClass(@"dynamic dynamic () { }",
Keyword("dynamic"),
Identifier("dynamic"),
Punctuation.OpenParen,
Punctuation.CloseParen,
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsStaticMethodTypeAndParams()
{
TestInClass(@"static dynamic dynamic(params dynamic[] dynamic){}",
Keyword("static"),
Keyword("dynamic"),
Identifier("dynamic"),
Punctuation.OpenParen,
Keyword("params"),
Keyword("dynamic"),
Punctuation.OpenBracket,
Punctuation.CloseBracket,
Identifier("dynamic"),
Punctuation.CloseParen,
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicArraysInMethodSignature()
{
TestInClass(@"dynamic[] M(dynamic[] p, params dynamic[] pa) { }",
Keyword("dynamic"),
Punctuation.OpenBracket,
Punctuation.CloseBracket,
Identifier("M"),
Punctuation.OpenParen,
Keyword("dynamic"),
Punctuation.OpenBracket,
Punctuation.CloseBracket,
Identifier("p"),
Punctuation.Comma,
Keyword("params"),
Keyword("dynamic"),
Punctuation.OpenBracket,
Punctuation.CloseBracket,
Identifier("pa"),
Punctuation.CloseParen,
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicInPartialMethods()
{
TestInClass(@"partial void F(dynamic d); partial void F(dynamic d) { }",
Keyword("partial"),
Keyword("void"),
Identifier("F"),
Punctuation.OpenParen,
Keyword("dynamic"),
Identifier("d"),
Punctuation.CloseParen,
Punctuation.Semicolon,
Keyword("partial"),
Keyword("void"),
Identifier("F"),
Punctuation.OpenParen,
Keyword("dynamic"),
Identifier("d"),
Punctuation.CloseParen,
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicRefAndOutParameters()
{
TestInClass(@"void F(ref dynamic r, out dynamic o) { }",
Keyword("void"),
Identifier("F"),
Punctuation.OpenParen,
Keyword("ref"),
Keyword("dynamic"),
Identifier("r"),
Punctuation.Comma,
Keyword("out"),
Keyword("dynamic"),
Identifier("o"),
Punctuation.CloseParen,
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicInExtensionMethod()
{
TestInClass(@"dynamic F(this dynamic self, dynamic p) { }",
Keyword("dynamic"),
Identifier("F"),
Punctuation.OpenParen,
Keyword("this"),
Keyword("dynamic"),
Identifier("self"),
Punctuation.Comma,
Keyword("dynamic"),
Identifier("p"),
Punctuation.CloseParen,
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsBaseClass()
{
Test(@"class C : dynamic { }",
Keyword("class"),
Class("C"),
Punctuation.Colon,
Keyword("dynamic"),
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsGenericConstraint()
{
Test(@"class C<T> where T : dynamic { }",
Keyword("class"),
Class("C"),
Punctuation.OpenAngle,
TypeParameter("T"),
Punctuation.CloseAngle,
Keyword("where"),
TypeParameter("T"),
Punctuation.Colon,
Keyword("dynamic"),
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicSizeOf()
{
TestInClass(@"unsafe int M() { return sizeof(dynamic); }",
Keyword("unsafe"),
Keyword("int"),
Identifier("M"),
Punctuation.OpenParen,
Punctuation.CloseParen,
Punctuation.OpenCurly,
Keyword("return"),
Keyword("sizeof"),
Punctuation.OpenParen,
Keyword("dynamic"),
Punctuation.CloseParen,
Punctuation.Semicolon,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicTypeOf()
{
TestInMethod(@"typeof(dynamic)",
Keyword("typeof"),
Punctuation.OpenParen,
Keyword("dynamic"),
Punctuation.CloseParen);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsArrayName()
{
Test(@"int[] dynamic = { 1 };",
Keyword("int"),
Punctuation.OpenBracket,
Punctuation.CloseBracket,
Identifier("dynamic"),
Operators.Equals,
Punctuation.OpenCurly,
Number("1"),
Punctuation.CloseCurly,
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicInForeach()
{
TestInMethod(@"foreach (dynamic dynamic in dynamic",
Keyword("foreach"),
Punctuation.OpenParen,
Keyword("dynamic"),
Identifier("dynamic"),
Keyword("in"),
Identifier("dynamic"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicInUsing()
{
TestInMethod(@"using(dynamic d",
Keyword("using"),
Punctuation.OpenParen,
Keyword("dynamic"),
Identifier("d"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsLocalVariableName()
{
TestInMethod(@"dynamic dynamic;",
Keyword("dynamic"),
Identifier("dynamic"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsNamespaceName()
{
Test(@"namespace dynamic { }",
Keyword("namespace"),
Identifier("dynamic"),
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsClassName()
{
Test(@"class dynamic { }",
Keyword("class"),
Class("dynamic"),
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsConstructorDeclarationName()
{
Test(@"class dynamic { dynamic() { } }",
Keyword("class"),
Class("dynamic"),
Punctuation.OpenCurly,
Identifier("dynamic"),
Punctuation.OpenParen,
Punctuation.CloseParen,
Punctuation.OpenCurly,
Punctuation.CloseCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsNamespaceAlias()
{
TestInMethod(@"dynamic.FileInfo file;",
Identifier("dynamic"),
Operators.Dot,
Identifier("FileInfo"),
Identifier("file"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsGotoLabel()
{
TestInMethod(@"dynamic: int i = 0;
goto dynamic;",
Identifier("dynamic"),
Punctuation.Colon,
Keyword("int"),
Identifier("i"),
Operators.Equals,
Number("0"),
Punctuation.Semicolon,
Keyword("goto"),
Identifier("dynamic"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsEnumField()
{
TestInMethod(@"A a = A.dynamic;",
Identifier("A"),
Identifier("a"),
Operators.Equals,
Identifier("A"),
Operators.Dot,
Identifier("dynamic"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsEnumFieldDefinition()
{
Test(@"enum A { dynamic }",
Keyword("enum"),
Enum("A"),
Punctuation.OpenCurly,
Identifier("dynamic"),
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsEnumType()
{
Test(@"enum dynamic { }",
Keyword("enum"),
Enum("dynamic"),
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsGenericTypeParameter()
{
Test(@"class C<dynamic, T> where dynamic : T { dynamic d; }",
Keyword("class"),
Class("C"),
Punctuation.OpenAngle,
TypeParameter("dynamic"),
Punctuation.Comma,
TypeParameter("T"),
Punctuation.CloseAngle,
Keyword("where"),
TypeParameter("dynamic"),
Punctuation.Colon,
TypeParameter("T"),
Punctuation.OpenCurly,
TypeParameter("dynamic"),
Identifier("d"),
Punctuation.Semicolon,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsFieldType()
{
TestInClass(@"dynamic d",
Keyword("dynamic"),
Identifier("d"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsStaticFieldType()
{
TestInClass(@"static dynamic d",
Keyword("static"),
Keyword("dynamic"),
Identifier("d"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsLocalVariableType()
{
TestInMethod(@"dynamic d",
Keyword("dynamic"),
Identifier("d"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsArrayLocalVariableType()
{
TestInMethod(@"dynamic[] d",
Keyword("dynamic"),
Punctuation.OpenBracket,
Punctuation.CloseBracket,
Identifier("d"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsLambdaParameterType()
{
TestInMethod(@"var q = a.Where((dynamic d) => d == dynamic);",
Keyword("var"),
Identifier("q"),
Operators.Equals,
Identifier("a"),
Operators.Dot,
Identifier("Where"),
Punctuation.OpenParen,
Punctuation.OpenParen,
Keyword("dynamic"),
Identifier("d"),
Punctuation.CloseParen,
Operators.Text("=>"),
Identifier("d"),
Operators.Text("=="),
Identifier("dynamic"),
Punctuation.CloseParen,
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicArray()
{
TestInMethod(@"dynamic d = new dynamic[5];",
Keyword("dynamic"),
Identifier("d"),
Operators.Equals,
Keyword("new"),
Keyword("dynamic"),
Punctuation.OpenBracket,
Number("5"),
Punctuation.CloseBracket,
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicConstructor()
{
TestInMethod(@"dynamic d = new dynamic();",
Keyword("dynamic"),
Identifier("d"),
Operators.Equals,
Keyword("new"),
Keyword("dynamic"),
Punctuation.OpenParen,
Punctuation.CloseParen,
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAfterIs()
{
TestInMethod(@"if (a is dynamic)",
Keyword("if"),
Punctuation.OpenParen,
Identifier("a"),
Keyword("is"),
Keyword("dynamic"),
Punctuation.CloseParen);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAfterAs()
{
TestInMethod(@"a = a as dynamic",
Identifier("a"),
Operators.Equals,
Identifier("a"),
Keyword("as"),
Keyword("dynamic"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsGenericTypeArgument()
{
TestInMethod(@"List<dynamic> l = new List<dynamic>();",
Identifier("List"),
Punctuation.OpenAngle,
Keyword("dynamic"),
Punctuation.CloseAngle,
Identifier("l"),
Operators.Equals,
Keyword("new"),
Identifier("List"),
Punctuation.OpenAngle,
Keyword("dynamic"),
Punctuation.CloseAngle,
Punctuation.OpenParen,
Punctuation.CloseParen,
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsSecondGenericTypeArgument()
{
TestInMethod(@"KVP<string, dynamic> kvp;",
Identifier("KVP"),
Punctuation.OpenAngle,
Keyword("string"),
Punctuation.Comma,
Keyword("dynamic"),
Punctuation.CloseAngle,
Identifier("kvp"),
Punctuation.Semicolon);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsRegionLabel()
{
var code =
@"#region dynamic
#endregion";
Test(code,
PPKeyword("#"),
PPKeyword("region"),
PPText("dynamic"),
PPKeyword("#"),
PPKeyword("endregion"));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsInterfaceType()
{
Test(@"interface dynamic{}",
Keyword("interface"),
Interface("dynamic"),
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsStructType()
{
Test(@"struct dynamic { }",
Keyword("struct"),
Struct("dynamic"),
Punctuation.OpenCurly,
Punctuation.CloseCurly);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Classification)]
public void DynamicAsUndefinedGenericType()
{
TestInMethod(@"dynamic<int> d;",
Identifier("dynamic"),
Punctuation.OpenAngle,
Keyword("int"),
Punctuation.CloseAngle,
Identifier("d"),
Punctuation.Semicolon);
}
}
}
| 34.882159 | 161 | 0.497395 | [
"Apache-2.0"
] | AlessandroDelSole/Roslyn | src/EditorFeatures/CSharpTest/Classification/TotalClassifierTests_Dynamic.cs | 31,675 | C# |
using System;
using System.Linq;
using System.Windows.Forms;
using CruiseDAL.DataObjects;
using FSCruiser.Core;
using FSCruiser.Core.Models;
using System.Collections.Generic;
namespace FSCruiser.WinForms
{
public partial class CuttingUnitSelectView : UserControl
{
public IApplicationController Controller { get; set; }
public CuttingUnit SelectedUnit
{
get
{
var unitVM = _BS_CuttingUnits.Current as CuttingUnit;
if (unitVM != null && unitVM.Code != null)
{
return unitVM;
}
return null;
}
}
public CuttingUnitSelectView()
{
InitializeComponent();
}
public CuttingUnitSelectView(IApplicationController controller)
: this()
{
this.Controller = controller;
}
public IEnumerable<CuttingUnit> ReadCuttingUnits()
{
if (Controller.DataStore != null)
{
yield return new CuttingUnit();
foreach (var unit in Controller.DataStore.From<CuttingUnit>().Read())
{
yield return unit;
}
}
else
{
yield break;
}
}
public void HandleFileStateChanged()
{
_BS_CuttingUnits.DataSource = ReadCuttingUnits().ToArray();
_BS_CuttingUnits.MoveFirst();
}
private void _BS_CuttingUnits_CurrentChanged(object sender, EventArgs e)
{
var unit = SelectedUnit;
if (unit != null)
{
var strata = unit.DAL.From<StratumDO>()
.Join("CuttingUnitStratum", "USING (Stratum_CN)", "CUST")
.Where("CUST.CuttingUnit_CN = @p1")
.Query(unit.CuttingUnit_CN);
var strataDescriptions = (from StratumDO st in strata
select st.GetDescriptionShort()).ToArray();
this._strataLB.DataSource = strataDescriptions;
}
else
{
this._strataLB.DataSource = Enumerable.Empty<StratumDO>();
}
}
}
} | 28.317073 | 85 | 0.511197 | [
"CC0-1.0"
] | FMSC-Measurements/FScruiserV2 | Source/FSCruiserV2/WinForms/CuttingUnitSelectView.cs | 2,324 | C# |
using BulletSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TGC.Core.Mathematica;
using TGC.Group.Model.GameObjects;
using TGC.Group.Model.GameObjects.BulletObjects;
using TGC.Group.Model.GameObjects.BulletObjects.Plantas;
namespace TGC.Group.Model
{
public static class FactoryPlanta
{
public static Planta crearCanion(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
{
Planta canion = new Canion(posicion, logica, plataforma);
canion.body = FactoryBody.crearBodyPlanta(new TGCVector3(20, 15, 5), posicion);
canion.callback = new CollisionCallbackFloor(logica, canion);
logica.addBulletObject(canion);
return canion;
}
public static Planta crearCongelador(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
{
Planta congelador = new Congelador(posicion, logica, plataforma);
congelador.body = FactoryBody.crearBodyPlanta(new TGCVector3(20, 15, 5), posicion);
congelador.callback = new CollisionCallbackFloor(logica, congelador);
logica.addBulletObject(congelador);
return congelador;
}
public static Planta crearGirasol(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
{
Planta girasol = new Girasol(posicion, logica, plataforma);
girasol.body = FactoryBody.crearBodyPlanta(new TGCVector3(20, 15, 1), posicion);
girasol.callback = new CollisionCallbackFloor(logica, girasol);
logica.addBulletObject(girasol);
return girasol;
}
public static Planta crearChile(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
{
Planta chile = new Chile(posicion, logica, plataforma);
chile.body = FactoryBody.crearBodyPlanta(new TGCVector3(20, 15, 5), posicion);
chile.callback = new CollisionCallbackFloor(logica, chile);
logica.addBulletObject(chile);
return chile;
}
public static Planta crearMina(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
{
Planta mina = new Mina(posicion, logica, plataforma);
mina.body = FactoryBody.crearBodyPlanta(new TGCVector3(20, 15, 5), posicion);
mina.callback = new CollisionCallbackFloor(logica, mina);
logica.addBulletObject(mina);
return mina;
}
public static Planta crearNuez(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
{
Planta nuez = new Nuez(posicion, logica, plataforma);
nuez.body = FactoryBody.crearBodyPlanta(new TGCVector3(25, 15, 15), posicion);
nuez.callback = new CollisionCallbackFloor(logica, nuez);
logica.addBulletObject(nuez);
return nuez;
}
public static Planta crearSuperCanion(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
{
Planta superCanion = new SuperCanion(posicion, logica, plataforma);
superCanion.body = FactoryBody.crearBodyPlanta(new TGCVector3(20, 15, 5), posicion);
superCanion.callback = new CollisionCallbackFloor(logica, superCanion);
logica.addBulletObject(superCanion);
return superCanion;
}
}
}
| 40.920455 | 107 | 0.638711 | [
"MIT"
] | mariaguadalupeuvia/2018_2C_3572_Apocalipsis | TGC.Group/Model/Factorys/FactoryPlanta.cs | 3,603 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullable enable
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.ExceptionServices;
using Microsoft.AspNetCore.Hosting.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Hosting
{
/// <summary>
/// A builder for <see cref="IWebHost"/>
/// </summary>
public class WebHostBuilder : IWebHostBuilder
{
private readonly HostingEnvironment _hostingEnvironment;
private readonly IConfiguration _config;
private readonly WebHostBuilderContext _context;
private WebHostOptions? _options;
private bool _webHostBuilt;
private Action<WebHostBuilderContext, IServiceCollection>? _configureServices;
private Action<WebHostBuilderContext, IConfigurationBuilder>? _configureAppConfigurationBuilder;
/// <summary>
/// Initializes a new instance of the <see cref="WebHostBuilder"/> class.
/// </summary>
public WebHostBuilder()
{
_hostingEnvironment = new HostingEnvironment();
_config = new ConfigurationBuilder()
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();
if (string.IsNullOrEmpty(GetSetting(WebHostDefaults.EnvironmentKey)))
{
// Try adding legacy environment keys, never remove these.
UseSetting(WebHostDefaults.EnvironmentKey, Environment.GetEnvironmentVariable("Hosting:Environment")
?? Environment.GetEnvironmentVariable("ASPNET_ENV"));
}
if (string.IsNullOrEmpty(GetSetting(WebHostDefaults.ServerUrlsKey)))
{
// Try adding legacy url key, never remove this.
UseSetting(WebHostDefaults.ServerUrlsKey, Environment.GetEnvironmentVariable("ASPNETCORE_SERVER.URLS"));
}
_context = new WebHostBuilderContext
{
Configuration = _config
};
}
/// <summary>
/// Get the setting value from the configuration.
/// </summary>
/// <param name="key">The key of the setting to look up.</param>
/// <returns>The value the setting currently contains.</returns>
public string GetSetting(string key)
{
return _config[key];
}
/// <summary>
/// Add or replace a setting in the configuration.
/// </summary>
/// <param name="key">The key of the setting to add or replace.</param>
/// <param name="value">The value of the setting to add or replace.</param>
/// <returns>The <see cref="IWebHostBuilder"/>.</returns>
public IWebHostBuilder UseSetting(string key, string? value)
{
_config[key] = value;
return this;
}
/// <summary>
/// Adds a delegate for configuring additional services for the host or web application. This may be called
/// multiple times.
/// </summary>
/// <param name="configureServices">A delegate for configuring the <see cref="IServiceCollection"/>.</param>
/// <returns>The <see cref="IWebHostBuilder"/>.</returns>
public IWebHostBuilder ConfigureServices(Action<IServiceCollection> configureServices)
{
if (configureServices == null)
{
throw new ArgumentNullException(nameof(configureServices));
}
return ConfigureServices((_, services) => configureServices(services));
}
/// <summary>
/// Adds a delegate for configuring additional services for the host or web application. This may be called
/// multiple times.
/// </summary>
/// <param name="configureServices">A delegate for configuring the <see cref="IServiceCollection"/>.</param>
/// <returns>The <see cref="IWebHostBuilder"/>.</returns>
public IWebHostBuilder ConfigureServices(Action<WebHostBuilderContext, IServiceCollection> configureServices)
{
_configureServices += configureServices;
return this;
}
/// <summary>
/// Adds a delegate for configuring the <see cref="IConfigurationBuilder"/> that will construct an <see cref="IConfiguration"/>.
/// </summary>
/// <param name="configureDelegate">The delegate for configuring the <see cref="IConfigurationBuilder" /> that will be used to construct an <see cref="IConfiguration" />.</param>
/// <returns>The <see cref="IWebHostBuilder"/>.</returns>
/// <remarks>
/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="WebHostBuilderContext"/> are uninitialized at this stage.
/// The <see cref="IConfigurationBuilder"/> is pre-populated with the settings of the <see cref="IWebHostBuilder"/>.
/// </remarks>
public IWebHostBuilder ConfigureAppConfiguration(Action<WebHostBuilderContext, IConfigurationBuilder> configureDelegate)
{
_configureAppConfigurationBuilder += configureDelegate;
return this;
}
/// <summary>
/// Builds the required services and an <see cref="IWebHost"/> which hosts a web application.
/// </summary>
public IWebHost Build()
{
if (_webHostBuilt)
{
throw new InvalidOperationException(Resources.WebHostBuilder_SingleInstance);
}
_webHostBuilt = true;
var hostingServices = BuildCommonServices(out var hostingStartupErrors);
var applicationServices = hostingServices.Clone();
var hostingServiceProvider = GetProviderFromFactory(hostingServices);
if (!_options.SuppressStatusMessages)
{
// Warn about deprecated environment variables
if (Environment.GetEnvironmentVariable("Hosting:Environment") != null)
{
Console.WriteLine("The environment variable 'Hosting:Environment' is obsolete and has been replaced with 'ASPNETCORE_ENVIRONMENT'");
}
if (Environment.GetEnvironmentVariable("ASPNET_ENV") != null)
{
Console.WriteLine("The environment variable 'ASPNET_ENV' is obsolete and has been replaced with 'ASPNETCORE_ENVIRONMENT'");
}
if (Environment.GetEnvironmentVariable("ASPNETCORE_SERVER.URLS") != null)
{
Console.WriteLine("The environment variable 'ASPNETCORE_SERVER.URLS' is obsolete and has been replaced with 'ASPNETCORE_URLS'");
}
}
AddApplicationServices(applicationServices, hostingServiceProvider);
var host = new WebHost(
applicationServices,
hostingServiceProvider,
_options,
_config,
hostingStartupErrors);
try
{
host.Initialize();
// resolve configuration explicitly once to mark it as resolved within the
// service provider, ensuring it will be properly disposed with the provider
_ = host.Services.GetService<IConfiguration>();
var logger = host.Services.GetRequiredService<ILogger<WebHost>>();
// Warn about duplicate HostingStartupAssemblies
var assemblyNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
foreach (var assemblyName in _options.GetFinalHostingStartupAssemblies())
{
if (!assemblyNames.Add(assemblyName))
{
logger.LogWarning($"The assembly {assemblyName} was specified multiple times. Hosting startup assemblies should only be specified once.");
}
}
return host;
}
catch
{
// Dispose the host if there's a failure to initialize, this should dispose
// services that were constructed until the exception was thrown
host.Dispose();
throw;
}
IServiceProvider GetProviderFromFactory(IServiceCollection collection)
{
var provider = collection.BuildServiceProvider();
var factory = provider.GetService<IServiceProviderFactory<IServiceCollection>>();
if (factory != null && !(factory is DefaultServiceProviderFactory))
{
using (provider)
{
return factory.CreateServiceProvider(factory.CreateBuilder(collection));
}
}
return provider;
}
}
[MemberNotNull(nameof(_options))]
private IServiceCollection BuildCommonServices(out AggregateException? hostingStartupErrors)
{
hostingStartupErrors = null;
_options = new WebHostOptions(_config, Assembly.GetEntryAssembly()?.GetName().Name ?? string.Empty);
if (!_options.PreventHostingStartup)
{
var exceptions = new List<Exception>();
// Execute the hosting startup assemblies
foreach (var assemblyName in _options.GetFinalHostingStartupAssemblies().Distinct(StringComparer.OrdinalIgnoreCase))
{
try
{
var assembly = Assembly.Load(new AssemblyName(assemblyName));
foreach (var attribute in assembly.GetCustomAttributes<HostingStartupAttribute>())
{
var hostingStartup = (IHostingStartup)Activator.CreateInstance(attribute.HostingStartupType)!;
hostingStartup.Configure(this);
}
}
catch (Exception ex)
{
// Capture any errors that happen during startup
exceptions.Add(new InvalidOperationException($"Startup assembly {assemblyName} failed to execute. See the inner exception for more details.", ex));
}
}
if (exceptions.Count > 0)
{
hostingStartupErrors = new AggregateException(exceptions);
}
}
var contentRootPath = ResolveContentRootPath(_options.ContentRootPath, AppContext.BaseDirectory);
// Initialize the hosting environment
((IWebHostEnvironment)_hostingEnvironment).Initialize(contentRootPath, _options);
_context.HostingEnvironment = _hostingEnvironment;
var services = new ServiceCollection();
services.AddSingleton(_options);
services.AddSingleton<IWebHostEnvironment>(_hostingEnvironment);
services.AddSingleton<IHostEnvironment>(_hostingEnvironment);
#pragma warning disable CS0618 // Type or member is obsolete
services.AddSingleton<AspNetCore.Hosting.IHostingEnvironment>(_hostingEnvironment);
services.AddSingleton<Extensions.Hosting.IHostingEnvironment>(_hostingEnvironment);
#pragma warning restore CS0618 // Type or member is obsolete
services.AddSingleton(_context);
var builder = new ConfigurationBuilder()
.SetBasePath(_hostingEnvironment.ContentRootPath)
.AddConfiguration(_config, shouldDisposeConfiguration: true);
_configureAppConfigurationBuilder?.Invoke(_context, builder);
var configuration = builder.Build();
// register configuration as factory to make it dispose with the service provider
services.AddSingleton<IConfiguration>(_ => configuration);
_context.Configuration = configuration;
var listener = new DiagnosticListener("Microsoft.AspNetCore");
services.AddSingleton<DiagnosticListener>(listener);
services.AddSingleton<DiagnosticSource>(listener);
services.AddTransient<IApplicationBuilderFactory, ApplicationBuilderFactory>();
services.AddTransient<IHttpContextFactory, DefaultHttpContextFactory>();
services.AddScoped<IMiddlewareFactory, MiddlewareFactory>();
services.AddOptions();
services.AddLogging();
services.AddTransient<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
if (!string.IsNullOrEmpty(_options.StartupAssembly))
{
try
{
var startupType = StartupLoader.FindStartupType(_options.StartupAssembly, _hostingEnvironment.EnvironmentName);
if (typeof(IStartup).IsAssignableFrom(startupType))
{
services.AddSingleton(typeof(IStartup), startupType);
}
else
{
services.AddSingleton(typeof(IStartup), sp =>
{
var hostingEnvironment = sp.GetRequiredService<IHostEnvironment>();
var methods = StartupLoader.LoadMethods(sp, startupType, hostingEnvironment.EnvironmentName);
return new ConventionBasedStartup(methods);
});
}
}
catch (Exception ex)
{
var capture = ExceptionDispatchInfo.Capture(ex);
services.AddSingleton<IStartup>(_ =>
{
capture.Throw();
return null;
});
}
}
_configureServices?.Invoke(_context, services);
return services;
}
private void AddApplicationServices(IServiceCollection services, IServiceProvider hostingServiceProvider)
{
// We are forwarding services from hosting container so hosting container
// can still manage their lifetime (disposal) shared instances with application services.
// NOTE: This code overrides original services lifetime. Instances would always be singleton in
// application container.
var listener = hostingServiceProvider.GetService<DiagnosticListener>();
services.Replace(ServiceDescriptor.Singleton(typeof(DiagnosticListener), listener!));
services.Replace(ServiceDescriptor.Singleton(typeof(DiagnosticSource), listener!));
}
private string ResolveContentRootPath(string contentRootPath, string basePath)
{
if (string.IsNullOrEmpty(contentRootPath))
{
return basePath;
}
if (Path.IsPathRooted(contentRootPath))
{
return contentRootPath;
}
return Path.Combine(Path.GetFullPath(basePath), contentRootPath);
}
}
}
| 43.696379 | 186 | 0.606489 | [
"Apache-2.0"
] | 1kevgriff/aspnetcore | src/Hosting/Hosting/src/WebHostBuilder.cs | 15,687 | C# |
using System;
using System.Collections.Generic;
using System.Text;
using Discord.WebSocket;
using System.Threading.Tasks;
using Discord.Commands;
namespace Discord.Addons.Interactive
{
public interface ICriterion<in T>
{
Task<bool> JudgeAsync(SocketCommandContext sourceContext, T parameter);
}
}
| 21.266667 | 79 | 0.761755 | [
"ISC"
] | Anu6is/Discord.Addons.Interactive | Discord.Addons.Interactive/Criteria/ICriterion.cs | 321 | C# |
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Laraue.EfCoreTriggers.Common.TriggerBuilders.Base;
namespace Laraue.EfCoreTriggers.Common.TriggerBuilders.OnUpdate
{
public class OnUpdateTriggerCondition<TTriggerEntity> : TriggerCondition<TTriggerEntity>
where TTriggerEntity : class
{
public OnUpdateTriggerCondition(Expression<Func<TTriggerEntity, TTriggerEntity, bool>> condition)
: base(condition)
{
}
internal override Dictionary<string, ArgumentType> ConditionPrefixes => new()
{
[Condition.Parameters[0].Name] = ArgumentType.Old,
[Condition.Parameters[1].Name] = ArgumentType.New,
};
}
}
| 32.086957 | 105 | 0.700542 | [
"MIT"
] | Meberem/Laraue.EfCoreTriggers | src/Laraue.EfCoreTriggers.Common/TriggerBuilders/OnUpdate/OnUpdateTriggerCondition.cs | 740 | C# |
using ImproveX.Configuration.Ui;
namespace ImproveX.Web.Models.Layout
{
public class RightSideBarViewModel
{
public UiThemeInfo CurrentTheme { get; set; }
}
} | 19.888889 | 53 | 0.709497 | [
"MIT"
] | zchhaenngg/IWI | src/ImproveX.Web/Models/Layout/RightSideBarViewModel.cs | 179 | C# |
using InvertedTomato.TikLink.Records;
namespace InvertedTomato.TikLink.RecordHandlers {
public class LinkBridgeNat : SetRecordHandlerBase<BridgeNat> {
public LinkBridgeNat(Link link) : base(link) { }
}
}
| 27.75 | 66 | 0.743243 | [
"Apache-2.0"
] | invertedtomato/tiklink | Library/RecordHandlers/LinkBridgeNat.cs | 224 | C# |
using FubuDocs;
namespace FubuValidation.Docs.GettingStarted
{
public class UsingValidationAttributes : Topic
{
public UsingValidationAttributes() : base("Using validation attributes")
{
}
}
} | 19.166667 | 80 | 0.673913 | [
"Apache-2.0"
] | DovetailSoftware/fubuvalidation | src/FubuValidation.Docs/GettingStarted/UsingValidationAttributes.cs | 230 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Abmes.DataCollector.Vault.Configuration
{
public class StorageConfig
{
public string StorageType { get; set; }
public string LoginName { get; set; }
public string LoginSecret { get; set; }
public string Root { get; set; }
public StorageConfig()
{
// needed for deserialization
}
// constructor needed for json deserialization
public StorageConfig(string storageType, string loginName, string loginSecret, string root)
{
StorageType = storageType;
LoginName = loginName;
LoginSecret = loginSecret;
Root = root;
}
public string RootBase()
{
return Root?.Split('/', '\\').FirstOrDefault();
}
public string RootDir(char separator, bool includeTrailingSeparator)
{
var result = string.Join(separator, Root?.Split('/', '\\').Skip(1));
if (includeTrailingSeparator && (!string.IsNullOrEmpty(result)))
{
result = result + separator;
}
return result;
}
}
} | 28.086957 | 100 | 0.55031 | [
"MIT"
] | abmes/Abmes.DataCollector | Abmes.DataCollector.Vault.Common/Configuration/StorageConfig.cs | 1,294 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
namespace Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support
{
/// <summary>Argument completer implementation for CustomerResolutionCode.</summary>
[System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.CustomerResolutionCodeTypeConverter))]
public partial struct CustomerResolutionCode :
System.Management.Automation.IArgumentCompleter
{
/// <summary>
/// Implementations of this function are called by PowerShell to complete arguments.
/// </summary>
/// <param name="commandName">The name of the command that needs argument completion.</param>
/// <param name="parameterName">The name of the parameter that needs argument completion.</param>
/// <param name="wordToComplete">The (possibly empty) word being completed.</param>
/// <param name="commandAst">The command ast in case it is needed for completion.</param>
/// <param name="fakeBoundParameters">This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot
/// or will not attempt to evaluate an argument, in which case you may need to use commandAst.</param>
/// <returns>
/// A collection of completion results, most like with ResultType set to ParameterValue.
/// </returns>
public global::System.Collections.Generic.IEnumerable<global::System.Management.Automation.CompletionResult> CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters)
{
if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
{
yield return new global::System.Management.Automation.CompletionResult("None", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None");
}
if (global::System.String.IsNullOrEmpty(wordToComplete) || "MoveToCleanUpDevice".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
{
yield return new global::System.Management.Automation.CompletionResult("MoveToCleanUpDevice", "MoveToCleanUpDevice", global::System.Management.Automation.CompletionResultType.ParameterValue, "MoveToCleanUpDevice");
}
if (global::System.String.IsNullOrEmpty(wordToComplete) || "Resume".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
{
yield return new global::System.Management.Automation.CompletionResult("Resume", "Resume", global::System.Management.Automation.CompletionResultType.ParameterValue, "Resume");
}
}
}
} | 76.325581 | 373 | 0.724558 | [
"MIT"
] | Amrinder-Singh29/azure-powershell | src/DataBox/generated/api/Support/CustomerResolutionCode.Completer.cs | 3,240 | C# |
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="MainWindow.xaml.cs" company="PropertyTools">
// Copyright (c) 2014 PropertyTools contributors
// </copyright>
// <summary>
// Interaction logic for MainWindow.xaml
// </summary>
// --------------------------------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SimpleDemo
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.DataContext = new MainWindowViewModel();
}
}
} | 31.114286 | 121 | 0.522498 | [
"MIT"
] | JawadJaber/PropertyTools | Source/Examples/PropertyGrid/SimpleDemo/MainWindow.xaml.cs | 1,091 | C# |
// Copyright (c) 2017 Jan Pluskal
//
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
using Castle.MicroKernel.Registration;
using Netfox.Detective.Infrastructure;
namespace Netfox.SnooperYMSG.WPF.Infrastructure
{
public class SnooperYMSGWindsorInstaller : DetectiveIvestigationWindsorInstallerBase
{
public SnooperYMSGWindsorInstaller() : base(GetFromAssemblyDescriptorForAssemblisDeclaringTypes(new[] { typeof(SnooperYMSG), typeof(SnooperYMSGWindsorInstaller) })) { }
}
}
| 39.76 | 176 | 0.775654 | [
"Apache-2.0"
] | mvondracek/NetfoxDetective | Framework/Snoopers/SnooperYMSG.WPF/Infrastructure/SnooperYMSGWindsorInstaller.cs | 996 | C# |
namespace BlogSystem.Web.ViewModels.Account
{
using System.Collections.Generic;
using System.Web.Mvc;
public class SendCodeViewModel
{
public string SelectedProvider { get; set; }
public ICollection<SelectListItem> Providers { get; set; }
public string ReturnUrl { get; set; }
public bool RememberMe { get; set; }
}
} | 23.3125 | 66 | 0.659517 | [
"MIT"
] | csyntax/BlogSystem | src/BlogSystem.Web/ViewModels/Account/SendCodeViewModel.cs | 373 | C# |
using System;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace NDG.DataAccessModels.Repositories
{
public class CategoryRepository : Repository, ICategoryRepository
{
public System.Collections.Generic.IEnumerable<Category> GetAllCategories()
{
return _context.Category;
}
public Category GetCategoryByID(int id)
{
return _context.Category.FirstOrDefault(c => c.ID == id);
}
public System.Collections.Generic.IEnumerable<Question> GetCategoryQuestionsByCategoryID(int id)
{
return _context.Question.Where(q => q.CategoryID == id);
}
}
}
| 25.189189 | 105 | 0.667382 | [
"BSD-3-Clause"
] | nokiadatagathering/WP7-Official | NDG.DataAccessModels/Repositories/CategoryRepository.cs | 934 | C# |
namespace Microsoft.ML.Samples.Dynamic.Trainers.BinaryClassification
{
public class LightGbm
{
// This example requires installation of additional nuget package <a href="https://www.nuget.org/packages/Microsoft.ML.LightGBM/">Microsoft.ML.LightGBM</a>.
public static void Example()
{
// Creating the ML.Net IHostEnvironment object, needed for the pipeline.
var mlContext = new MLContext();
// Download and featurize the dataset.
var dataview = SamplesUtils.DatasetUtils.LoadFeaturizedAdultDataset(mlContext);
// Leave out 10% of data for testing.
var split = mlContext.BinaryClassification.TrainTestSplit(dataview, testFraction: 0.1);
// Create the Estimator.
var pipeline = mlContext.BinaryClassification.Trainers.LightGbm();
// Fit this Pipeline to the Training Data.
var model = pipeline.Fit(split.TrainSet);
// Evaluate how the model is doing on the test data.
var dataWithPredictions = model.Transform(split.TestSet);
var metrics = mlContext.BinaryClassification.Evaluate(dataWithPredictions);
SamplesUtils.ConsoleUtils.PrintMetrics(metrics);
// Expected output:
// Accuracy: 0.88
// AUC: 0.93
// F1 Score: 0.71
// Negative Precision: 0.90
// Negative Recall: 0.94
// Positive Precision: 0.76
// Positive Recall: 0.66
}
}
} | 39.923077 | 164 | 0.614644 | [
"MIT"
] | oguzhanszr/machinelearning | docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/LightGbm.cs | 1,559 | C# |
namespace CompanyDiscounts.Models
{
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using System.Security.Claims;
using System.Threading.Tasks;
public class User : IdentityUser
{
public ClaimsIdentity GenerateUserIdentity(UserManager<User> manager)
{
// Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
var userIdentity = manager.CreateIdentity(this, DefaultAuthenticationTypes.ApplicationCookie);
// Add custom user claims here
return userIdentity;
}
public Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<User> manager)
{
return Task.FromResult(this.GenerateUserIdentity(manager));
}
}
}
| 33.24 | 119 | 0.699158 | [
"MIT"
] | mvivancheva9/CompanyDiscounts | CompanyDiscounts/CompanyDiscounts.Models/User.cs | 833 | C# |
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
// Ported from um/WinUser.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.
using System;
using System.Runtime.CompilerServices;
namespace TerraFX.Interop
{
public partial struct MENUBARINFO
{
[NativeTypeName("DWORD")]
public uint cbSize;
public RECT rcBar;
[NativeTypeName("HMENU")]
public IntPtr hMenu;
[NativeTypeName("HWND")]
public IntPtr hwndMenu;
public int _bitfield;
[NativeTypeName("BOOL : 1")]
public int fBarFocused
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return _bitfield & 0x1;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
set
{
_bitfield = (_bitfield & ~0x1) | (value & 0x1);
}
}
[NativeTypeName("BOOL : 1")]
public int fFocused
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return (_bitfield >> 1) & 0x1;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
set
{
_bitfield = (_bitfield & ~(0x1 << 1)) | ((value & 0x1) << 1);
}
}
[NativeTypeName("BOOL : 30")]
public int fUnused
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return (_bitfield >> 2) & 0x3FFFFFFF;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
set
{
_bitfield = (_bitfield & ~(0x3FFFFFFF << 2)) | ((value & 0x3FFFFFFF) << 2);
}
}
}
}
| 26.026667 | 145 | 0.526127 | [
"MIT"
] | Perksey/terrafx.interop.windows | sources/Interop/Windows/um/WinUser/MENUBARINFO.cs | 1,954 | C# |
using System;
using System.Net;
using WebApi.Api.User.request;
using WebApi.Api.User.response;
namespace WebApi.Api.User
{
class ReadUserController : AbstractController<ReadUserRequest, ReadUserResponse>
{
public ReadUserController(HttpListenerRequest req, HttpListenerResponse res, string reqBody) : base(req, res, reqBody)
{
}
protected override void CreateResponse()
{
this.resObj.UserId = "1";
this.resObj.UserName = "田中太郎";
this.resObj.Age = 25;
this.resObj.Gender = 0;
}
protected override void ExecuteCore()
{
log.Debug("UserId=" + this.reqObj.UserId);
}
}
}
| 25.5 | 126 | 0.612045 | [
"MIT"
] | yunbow/CSharp-WebAPI | WebApi/Api/User/ReadUserController.cs | 724 | C# |
using Android.App;
using Android.Widget;
using Android.OS;
using System.Threading.Tasks;
namespace AsyncSample
{
[Activity(Label = "AsyncSample", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
FindViewById<Button>(Resource.Id.button1).Click += async (sender, e) =>
{
await Task.Delay(3000).ConfigureAwait(false);
RunOnUiThread(() =>
{
FindViewById<TextView>(Resource.Id.textView1).Text = "after the delay";
});
};
}
}
}
| 22.324324 | 91 | 0.560533 | [
"MIT"
] | CNinnovation/XamarinAug2017 | AsyncSample/AsyncSample/MainActivity.cs | 828 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Portions derived from React Native:
// Copyright (c) 2015-present, Facebook, Inc.
// Licensed under the MIT License.
using Facebook.Yoga;
using Newtonsoft.Json.Linq;
using ReactNative.Reflection;
using ReactNative.UIManager;
using ReactNative.UIManager.Annotations;
using ReactNative.Views.Text;
using System;
#if WINDOWS_UWP
using Windows.Foundation;
using Windows.UI.Text;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;
#else
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
#endif
namespace ReactNative.Views.TextInput
{
/// <summary>
/// This extension of <see cref="LayoutShadowNode"/> is responsible for
/// measuring the layout for Native <see cref="TextBox"/>.
/// </summary>
public class ReactTextInputShadowNode : LayoutShadowNode
{
private const int Unset = -1;
private const int DefaultBorderWidth = 2;
private static readonly float[] s_defaultPaddings =
{
10f,
3f,
6f,
5f,
};
private bool _multiline;
private bool _autoGrow;
private int _letterSpacing;
private int _numberOfLines;
private double _fontSize = Unset;
private double _lineHeight;
private double? _maxHeight;
private FontStyle? _fontStyle;
private FontWeight? _fontWeight;
#if WINDOWS_UWP
private TextAlignment _textAlignment = TextAlignment.DetectFromContent;
#else
private TextAlignment _textAlignment = TextAlignment.Left;
#endif
private string _fontFamily;
private string _text;
private int _jsEventCount = Unset;
/// <summary>
/// Instantiates the <see cref="ReactTextInputShadowNode"/>.
/// </summary>
public ReactTextInputShadowNode()
{
SetDefaultPadding(EdgeSpacing.Left, s_defaultPaddings[0]);
SetDefaultPadding(EdgeSpacing.Top, s_defaultPaddings[1]);
SetDefaultPadding(EdgeSpacing.Right, s_defaultPaddings[2]);
SetDefaultPadding(EdgeSpacing.Bottom, s_defaultPaddings[3]);
SetBorder(EdgeSpacing.All, DefaultBorderWidth);
MeasureFunction = (node, width, widthMode, height, heightMode) =>
MeasureTextInput(this, node, width, widthMode, height, heightMode);
}
/// <summary>
/// Sets the text for the node.
/// </summary>
/// <param name="text">The text.</param>
[ReactProp("text")]
public void SetText(string text)
{
_text = text ?? "";
MarkUpdated();
}
/// <summary>
/// Sets the font size for the node.
/// </summary>
/// <param name="fontSize">The font size.</param>
[ReactProp(ViewProps.FontSize, DefaultDouble = Unset)]
public void SetFontSize(double fontSize)
{
if (_fontSize != fontSize)
{
_fontSize = fontSize;
MarkUpdated();
}
}
/// <summary>
/// Sets the font family for the node.
/// </summary>
/// <param name="fontFamily">The font family.</param>
[ReactProp(ViewProps.FontFamily)]
public void SetFontFamily(string fontFamily)
{
if (_fontFamily != fontFamily)
{
_fontFamily = fontFamily;
MarkUpdated();
}
}
/// <summary>
/// Sets the font weight for the node.
/// </summary>
/// <param name="fontWeightValue">The font weight string.</param>
[ReactProp(ViewProps.FontWeight)]
public void SetFontWeight(string fontWeightValue)
{
var fontWeight = FontStyleHelpers.ParseFontWeight(fontWeightValue);
if (_fontWeight.HasValue != fontWeight.HasValue ||
(_fontWeight.HasValue && fontWeight.HasValue &&
#if WINDOWS_UWP
_fontWeight.Value.Weight != fontWeight.Value.Weight))
#else
_fontWeight.Value.ToOpenTypeWeight() != fontWeight.Value.ToOpenTypeWeight()))
#endif
{
_fontWeight = fontWeight;
MarkUpdated();
}
}
/// <summary>
/// Sets the font style for the node.
/// </summary>
/// <param name="fontStyleValue">The font style string.</param>
[ReactProp(ViewProps.FontStyle)]
public void SetFontStyle(string fontStyleValue)
{
var fontStyle = EnumHelpers.ParseNullable<FontStyle>(fontStyleValue);
if (_fontStyle != fontStyle)
{
_fontStyle = fontStyle;
MarkUpdated();
}
}
/// <summary>
/// Sets the letter spacing for the node.
/// </summary>
/// <param name="letterSpacing">The letter spacing.</param>
[ReactProp(ViewProps.LetterSpacing)]
public void SetLetterSpacing(int letterSpacing)
{
var spacing = 50*letterSpacing; // TODO: Find exact multiplier (50) to match iOS
if (_letterSpacing != spacing)
{
_letterSpacing = spacing;
MarkUpdated();
}
}
/// <summary>
/// Sets the line height.
/// </summary>
/// <param name="lineHeight">The line height.</param>
[ReactProp(ViewProps.LineHeight)]
public void SetLineHeight(double lineHeight)
{
if (_lineHeight != lineHeight)
{
_lineHeight = lineHeight;
MarkUpdated();
}
}
/// <summary>
/// Sets the max height.
/// </summary>
/// <param name="maxHeight">The max height.</param>
[ReactProp(ViewProps.MaxHeight)]
public override void SetMaxHeight(JValue maxHeight)
{
var maxHeightValue = maxHeight.Value<double?>();
if (_maxHeight != maxHeightValue)
{
_maxHeight = maxHeightValue;
MarkUpdated();
}
}
/// <summary>
/// Sets the maximum number of lines.
/// </summary>
/// <param name="numberOfLines">Max number of lines.</param>
[ReactProp(ViewProps.NumberOfLines)]
public void SetNumberOfLines(int numberOfLines)
{
if (_numberOfLines != numberOfLines)
{
_numberOfLines = numberOfLines;
MarkUpdated();
}
}
/// <summary>
/// Sets whether to enable multiline input on the text input.
/// </summary>
/// <param name="multiline">The multiline flag.</param>
[ReactProp("multiline")]
public void SetMultiline(bool multiline)
{
if (_multiline != multiline)
{
_multiline = multiline;
MarkUpdated();
}
}
/// <summary>
/// Sets whether to enable auto-grow on the text input.
/// </summary>
/// <param name="autoGrow">The auto-grow flag.</param>
[ReactProp("autoGrow")]
public void SetAutoGrow(bool autoGrow)
{
if (_autoGrow != autoGrow)
{
_autoGrow = autoGrow;
if (!_autoGrow)
{
MarkUpdated();
}
}
}
/// <summary>
/// Sets the text alignment.
/// </summary>
/// <param name="textAlign">The text alignment string.</param>
[ReactProp(ViewProps.TextAlign)]
public void SetTextAlign(string textAlign)
{
var textAlignment = textAlign == "auto" || textAlign == null ?
#if WINDOWS_UWP
TextAlignment.DetectFromContent :
#else
TextAlignment.Left :
#endif
EnumHelpers.Parse<TextAlignment>(textAlign);
if (_textAlignment != textAlignment)
{
_textAlignment = textAlignment;
MarkUpdated();
}
}
/// <summary>
/// Set the most recent event count in JavaScript.
/// </summary>
/// <param name="mostRecentEventCount">The event count.</param>
[ReactProp("mostRecentEventCount")]
public void SetMostRecentEventCount(int mostRecentEventCount)
{
_jsEventCount = mostRecentEventCount;
}
/// <summary>
/// Called to aggregate the current text and event counter.
/// </summary>
/// <param name="uiViewOperationQueue">The UI operation queue.</param>
public override void OnCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue)
{
base.OnCollectExtraUpdates(uiViewOperationQueue);
var computedPadding = GetComputedPadding();
if (computedPadding != null)
{
uiViewOperationQueue.EnqueueUpdateExtraData(ReactTag, computedPadding);
}
if (_jsEventCount != Unset)
{
uiViewOperationQueue.EnqueueUpdateExtraData(ReactTag, Tuple.Create(_jsEventCount, _text));
}
}
/// <summary>
/// Sets the paddings of the shadow node.
/// </summary>
/// <param name="index">The spacing type index.</param>
/// <param name="padding">The padding value.</param>
public override void SetPaddings(int index, JValue padding)
{
MarkUpdated();
base.SetPaddings(index, padding);
}
/// <summary>
/// Marks a node as updated.
/// </summary>
protected override void MarkUpdated()
{
base.MarkUpdated();
dirty();
}
private float[] GetComputedPadding()
{
return new[]
{
GetPadding(YogaEdge.Left),
GetPadding(YogaEdge.Top),
GetPadding(YogaEdge.Right),
GetPadding(YogaEdge.Bottom),
};
}
private static YogaSize MeasureTextInput(ReactTextInputShadowNode textInputNode, YogaNode node, float width, YogaMeasureMode widthMode, float height, YogaMeasureMode heightMode)
{
var normalizedWidth = Math.Max(0,
(YogaConstants.IsUndefined(width) ? double.PositiveInfinity : width));
var normalizedHeight = Math.Max(0,
(YogaConstants.IsUndefined(height) ? double.PositiveInfinity : height));
var normalizedText = string.IsNullOrEmpty(textInputNode._text) ? " " : textInputNode._text;
var textBlock = new TextBlock
{
Text = normalizedText,
TextWrapping = textInputNode._multiline ? TextWrapping.Wrap : TextWrapping.NoWrap,
};
ApplyStyles(textInputNode, textBlock);
textBlock.Measure(new Size(normalizedWidth, normalizedHeight));
return MeasureOutput.Make(
(float)Math.Ceiling(width),
(float)Math.Ceiling(textBlock.ActualHeight));
}
private static void ApplyStyles(ReactTextInputShadowNode textNode, TextBlock textBlock)
{
if (textNode._fontSize != Unset)
{
var fontSize = textNode._fontSize;
textBlock.FontSize = fontSize;
}
if (textNode._fontStyle.HasValue)
{
var fontStyle = textNode._fontStyle.Value;
textBlock.FontStyle = fontStyle;
}
if (textNode._fontWeight.HasValue)
{
var fontWeight = textNode._fontWeight.Value;
textBlock.FontWeight = fontWeight;
}
if (textNode._fontFamily != null)
{
var fontFamily = new FontFamily(textNode._fontFamily);
textBlock.FontFamily = fontFamily;
}
if (textNode._maxHeight.HasValue)
{
textBlock.MaxHeight = textNode._maxHeight.Value;
}
}
}
}
| 31.858247 | 185 | 0.556994 | [
"MIT"
] | 05340836108/react-native-windows | current/ReactWindows/ReactNative.Shared/Views/TextInput/ReactTextInputShadowNode.cs | 12,361 | C# |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the lightsail-2016-11-28.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.Lightsail.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.Lightsail.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetInstanceState Request Marshaller
/// </summary>
public class GetInstanceStateRequestMarshaller : IMarshaller<IRequest, GetInstanceStateRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetInstanceStateRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetInstanceStateRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Lightsail");
string target = "Lightsail_20161128.GetInstanceState";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-11-28";
request.HttpMethod = "POST";
request.ResourcePath = "/";
request.MarshallerVersion = 2;
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetInstanceName())
{
context.Writer.WritePropertyName("instanceName");
context.Writer.Write(publicRequest.InstanceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetInstanceStateRequestMarshaller _instance = new GetInstanceStateRequestMarshaller();
internal static GetInstanceStateRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetInstanceStateRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 35.304762 | 147 | 0.631778 | [
"Apache-2.0"
] | PureKrome/aws-sdk-net | sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/GetInstanceStateRequestMarshaller.cs | 3,707 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.EntityFrameworkCore.TestModels
{
public class CrossStoreContext : DbContext
{
public CrossStoreContext(DbContextOptions options)
: base(options)
{
}
public virtual DbSet<SimpleEntity> SimpleEntities { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder
.Entity<SimpleEntity>(eb =>
{
eb.Property(typeof(string), SimpleEntity.ShadowPartitionIdName);
eb.ToTable("RelationalSimpleEntity"); // TODO: specify schema when #948 is fixed
eb.Property(typeof(string), SimpleEntity.ShadowPropertyName);
eb.HasKey(e => e.Id);
});
}
public static void RemoveAllEntities(CrossStoreContext context)
=> context.SimpleEntities.RemoveRange(context.SimpleEntities);
}
}
| 36.242424 | 111 | 0.612876 | [
"Apache-2.0"
] | vadzimpm/EntityFramework | test/EFCore.CrossStore.FunctionalTests/TestModels/CrossStoreContext.cs | 1,196 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Newtonsoft.Json;
using Serilog.Events;
using Serilog.Parsing;
using Xunit;
namespace Redbox.Serilog.Stackdriver.Tests
{
public class StackdriverFormatterTests
{
private static readonly DateTimeOffset DateTimeOffset = DateTimeOffset.Now;
[Fact]
public void Test_StackdriverFormatter_Format()
{
var propertyName = "greeting";
var propertyValue = "hello";
var logEvent = new LogEvent(DateTimeOffset, LogEventLevel.Debug, new Exception(),
new MessageTemplate("{greeting}",
new MessageTemplateToken[] { new PropertyToken(propertyName, propertyValue, "l") }),
new LogEventProperty[0]);
using var writer = new StringWriter();
new StackdriverJsonFormatter().Format(logEvent, writer);
var logDict = GetLogLineAsDictionary(writer.ToString());
AssertValidLogLine(logDict);
Assert.True(logDict["message"] == propertyValue);
}
[Fact]
public void Test_StackdrvierFormatter_FormatLong()
{
// Creates a large string > 200kb
var token = new TextToken(new string('*', 51200));
var logEvent = new LogEvent(DateTimeOffset, LogEventLevel.Debug,
new Exception(), new MessageTemplate("{0}", new MessageTemplateToken[] { token }),
new LogEventProperty[0]);
using var writer = new StringWriter();
new StackdriverJsonFormatter().Format(logEvent, writer);
var lines = SplitLogLogs(writer.ToString());
// The log created was longer than Stackdriver's soft limit of 256 bytes
// This means the json will be spread out onto two lines, breaking search
// In this scenario the library should add an additional log event informing
// the user of this issue
Assert.True(lines.Length == 2);
// Validate each line is valid json
var ourLogLineDict = GetLogLineAsDictionary(lines[0]);
AssertValidLogLine(ourLogLineDict);
var errorLogLineDict = GetLogLineAsDictionary(lines[1]);
AssertValidLogLine(errorLogLineDict, hasException: false);
}
private string[] SplitLogLogs(string logLines)
{
return logLines.Split("\n").Where(l => !string.IsNullOrWhiteSpace(l)).ToArray();
}
/// <summary>
/// Gets a log line in json format as a dictionary of string pairs
/// </summary>
/// <param name="log"></param>
/// <returns></returns>
private Dictionary<string, string> GetLogLineAsDictionary(string log)
{
return JsonConvert.DeserializeObject<Dictionary<string, string>>(log);
}
/// <summary>
/// Asserts required fields in log output are set and have valid values
/// </summary>
/// <param name="logDict"></param>
/// <param name="hasException"></param>
private void AssertValidLogLine(Dictionary<string, string> logDict,
bool hasException = true)
{
Assert.True(logDict.ContainsKey("message"));
Assert.NotEmpty(logDict["message"]);
Assert.True(logDict.ContainsKey("timestamp"));
var timestamp = DateTimeOffset.UtcDateTime.ToString("O");
Assert.Equal(logDict["timestamp"], timestamp);
Assert.True(logDict.ContainsKey("fingerprint"));
Assert.NotEmpty(logDict["fingerprint"]);
Assert.True(logDict.ContainsKey("severity"));
Assert.NotEmpty(logDict["severity"]);
Assert.True(logDict.ContainsKey(("MessageTemplate")));
Assert.NotEmpty(logDict["MessageTemplate"]);
if (hasException)
{
Assert.True(logDict.ContainsKey("exception"));
Assert.NotEmpty(logDict["exception"]);
}
}
}
}
| 40.443396 | 106 | 0.578027 | [
"Apache-2.0"
] | alteredego/stackdriver-serilog | src/Redbox.Serilog.Stackdriver.Tests/StackdriverFormatterTests.cs | 4,287 | C# |
namespace Task03_ConvertWindowsDirToTree
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
public class Startup
{
private const string DirectoryName = @"c:\windows";
private const string SearchPattern = @"*.*";
public static void Main(string[] args)
{
var tree = TraverseDirectoryTree(new DirectoryInfo(DirectoryName));
var size = CalculateSizeWithDfs(tree);
Console.WriteLine("Size of folder {0} is {1} bytes", DirectoryName, size);
}
public static MyDirectory TraverseDirectoryTree(DirectoryInfo root)
{
FileInfo[] files = null;
DirectoryInfo[] directories = null;
var myDirectory = new MyDirectory(root.Name);
try
{
files = root.GetFiles(SearchPattern);
}
catch (UnauthorizedAccessException e)
{
Console.WriteLine(e.Message);
}
if (files != null)
{
foreach (var fi in files)
{
myDirectory.Files.Add(new MyFile() { Name = fi.Name, Size = fi.Length});
}
}
try
{
directories = root.GetDirectories();
}
catch (UnauthorizedAccessException e)
{
Console.WriteLine(e.Message);
}
if (directories != null)
{
foreach (var di in directories)
{
myDirectory.ChildFolders.Add(TraverseDirectoryTree(di));
}
}
return myDirectory;
}
private static double CalculateSizeWithDfs(MyDirectory root)
{
return root.Files.Sum(x => x.Size) + root.ChildFolders.Sum(dir => CalculateSizeWithDfs(dir));
}
}
}
| 28.228571 | 105 | 0.505567 | [
"MIT"
] | atanas-georgiev/TelerikAcademy | 12.Data-Structures-and-Algorithms/Homeworks/03. Trees-and-Traversals/Task03-ConvertWindowsDirToTree/Startup.cs | 1,978 | C# |
#region BSD Licence
/* Copyright (c) 2013-2014, Doxense SAS
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Doxense nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#endregion
namespace FoundationDB.Client.Core
{
using JetBrains.Annotations;
using System;
using System.Threading;
using System.Threading.Tasks;
/// <summary>Basic API for FoundationDB transactions</summary>
public interface IFdbTransactionHandler : IDisposable
{
/// <summary>Returns the estimated payload size of the transaction (including keys and values)</summary>
int Size { get; }
/// <summary>Checks if this transaction handler is closed</summary>
bool IsClosed { get; }
/// <summary>Default isolation Level of this transaction handler</summary>
FdbIsolationLevel IsolationLevel { get; }
/// <summary>Set an option on this transaction</summary>
/// <param name="option">Option to set</param>
/// <param name="data">Parameter value (or Slice.Nil for parameterless options)</param>
void SetOption(FdbTransactionOption option, Slice data);
/// <summary>Returns this transaction snapshot read version.</summary>
Task<long> GetReadVersionAsync(CancellationToken cancellationToken);
/// <summary>Retrieves the database version number at which a given transaction was committed.</summary>
/// <remarks>CommitAsync() must have been called on this transaction and the resulting task must have completed successfully before this function is callged, or the behavior is undefined.
/// Read-only transactions do not modify the database when committed and will have a committed version of -1.
/// Keep in mind that a transaction which reads keys and then sets them to their current values may be optimized to a read-only transaction.
/// </remarks>
long GetCommittedVersion();
/// <summary>Sets the snapshot read version used by a transaction. This is not needed in simple cases.</summary>
/// <param name="version">Read version to use in this transaction</param>
/// <remarks>
/// If the given version is too old, subsequent reads will fail with error_code_past_version; if it is too new, subsequent reads may be delayed indefinitely and/or fail with error_code_future_version.
/// If any of Get*() methods have been called on this transaction already, the result is undefined.
/// </remarks>
void SetReadVersion(long version);
/// <summary>Reads a get from the database</summary>
/// <param name="key">Key to read</param>
/// <param name="snapshot">Set to true for snapshot reads</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<Slice> GetAsync(Slice key, bool snapshot, CancellationToken cancellationToken);
/// <summary>Reads several values from the database snapshot represented by the current transaction</summary>
/// <param name="keys">Keys to be looked up in the database</param>
/// <param name="snapshot">Set to true for snapshot reads</param>
/// <param name="cancellationToken">Token used to cancel the operation from the outside</param>
/// <returns>Task that will return an array of values, or an exception. Each item in the array will contain the value of the key at the same index in <paramref name="keys"/>, or Slice.Nil if that key does not exist.</returns>
Task<Slice[]> GetValuesAsync([NotNull] Slice[] keys, bool snapshot, CancellationToken cancellationToken);
/// <summary>Resolves a key selector against the keys in the database snapshot represented by the current transaction.</summary>
/// <param name="selector">Key selector to resolve</param>
/// <param name="snapshot">Set to true for snapshot reads</param>
/// <param name="cancellationToken">Token used to cancel the operation from the outside</param>
/// <returns>Task that will return the key matching the selector, or an exception</returns>
Task<Slice> GetKeyAsync(FdbKeySelector selector, bool snapshot, CancellationToken cancellationToken);
/// <summary>Resolves several key selectors against the keys in the database snapshot represented by the current transaction.</summary>
/// <param name="selectors">Key selectors to resolve</param>
/// <param name="snapshot">Set to true for snapshot reads</param>
/// <param name="cancellationToken">Token used to cancel the operation from the outside</param>
/// <returns>Task that will return an array of keys matching the selectors, or an exception</returns>
Task<Slice[]> GetKeysAsync([NotNull] FdbKeySelector[] selectors, bool snapshot, CancellationToken cancellationToken);
/// <summary>Reads all key-value pairs in the database snapshot represented by transaction (potentially limited by Limit, TargetBytes, or Mode) which have a key lexicographically greater than or equal to the key resolved by the begin key selector and lexicographically less than the key resolved by the end key selector.</summary>
/// <param name="beginInclusive">key selector defining the beginning of the range</param>
/// <param name="endExclusive">key selector defining the end of the range</param>
/// <param name="options">Optionnal query options (Limit, TargetBytes, Mode, Reverse, ...)</param>
/// <param name="iteration">If streaming mode is FdbStreamingMode.Iterator, this parameter should start at 1 and be incremented by 1 for each successive call while reading this range. In all other cases it is ignored.</param>
/// <param name="snapshot">Set to true for snapshot reads</param>
/// <param name="cancellationToken">Token used to cancel the operation from the outside</param>
/// <returns></returns>
Task<FdbRangeChunk> GetRangeAsync(FdbKeySelector beginInclusive, FdbKeySelector endExclusive, [NotNull] FdbRangeOptions options, int iteration, bool snapshot, CancellationToken cancellationToken);
/// <summary>Returns a list of public network addresses as strings, one for each of the storage servers responsible for storing <paramref name="key"/> and its associated value</summary>
/// <param name="key">Name of the key whose location is to be queried.</param>
/// <param name="cancellationToken">Token used to cancel the operation from the outside</param>
/// <returns>Task that will return an array of strings, or an exception</returns>
Task<string[]> GetAddressesForKeyAsync(Slice key, CancellationToken cancellationToken);
/// <summary>Modify the database snapshot represented by transaction to change the given key to have the given value. If the given key was not previously present in the database it is inserted.
/// The modification affects the actual database only if transaction is later committed with CommitAsync().
/// </summary>
/// <param name="key">Name of the key to be inserted into the database.</param>
/// <param name="value">Value to be inserted into the database.</param>
void Set(Slice key, Slice value);
/// <summary>Modify the database snapshot represented by this transaction to perform the operation indicated by <paramref name="mutation"/> with operand <paramref name="param"/> to the value stored by the given key.</summary>
/// <param name="key">Name of the key whose value is to be mutated.</param>
/// <param name="param">Parameter with which the atomic operation will mutate the value associated with key_name.</param>
/// <param name="mutation">Type of mutation that should be performed on the key</param>
void Atomic(Slice key, Slice param, FdbMutationType mutation);
/// <summary>Modify the database snapshot represented by this transaction to remove the given key from the database. If the key was not previously present in the database, there is no effect.</summary>
/// <param name="key">Name of the key to be removed from the database.</param>
void Clear(Slice key);
/// <summary>Modify the database snapshot represented by this transaction to remove all keys (if any) which are lexicographically greater than or equal to the given begin key and lexicographically less than the given end_key.
/// Sets and clears affect the actual database only if transaction is later committed with CommitAsync().
/// </summary>
/// <param name="beginKeyInclusive">Name of the key specifying the beginning of the range to clear.</param>
/// <param name="endKeyExclusive">Name of the key specifying the end of the range to clear.</param>
void ClearRange(Slice beginKeyInclusive, Slice endKeyExclusive);
/// <summary>Adds a conflict range to a transaction without performing the associated read or write.</summary>
/// <param name="beginKeyInclusive">Key specifying the beginning of the conflict range. The key is included</param>
/// <param name="endKeyExclusive">Key specifying the end of the conflict range. The key is excluded</param>
/// <param name="type">One of the FDBConflictRangeType values indicating what type of conflict range is being set.</param>
void AddConflictRange(Slice beginKeyInclusive, Slice endKeyExclusive, FdbConflictRangeType type);
/// <summary>Watch a key for any change in the database.</summary>
/// <param name="key">Key to watch</param>
/// <param name="cancellationToken">CancellationToken used to abort the watch if the caller doesn't want to wait anymore. Note that you can manually cancel the watch by calling Cancel() on the returned FdbWatch instance</param>
/// <returns>FdbWatch that can be awaited and will complete when the key has changed in the database, or cancellation occurs. You can call Cancel() at any time if you are not interested in watching the key anymore. You MUST always call Dispose() if the watch completes or is cancelled, to ensure that resources are released properly.</returns>
/// <remarks>You can directly await an FdbWatch, or obtain a Task<Slice> by reading the <see cref="FdbWatch.Task"/> property.</remarks>
FdbWatch Watch(Slice key, CancellationToken cancellationToken);
/// <summary>Attempts to commit the sets and clears previously applied to the database snapshot represented by this transaction to the actual database.
/// The commit may or may not succeed – in particular, if a conflicting transaction previously committed, then the commit must fail in order to preserve transactional isolation.
/// If the commit does succeed, the transaction is durably committed to the database and all subsequently started transactions will observe its effects.
/// </summary>
/// <param name="cancellationToken">Token used to cancel the operation from the outside</param>
/// <returns>Task that succeeds if the transaction was comitted successfully, or fails if the transaction failed to commit.</returns>
/// <remarks>As with other client/server databases, in some failure scenarios a client may be unable to determine whether a transaction succeeded. In these cases, CommitAsync() will throw CommitUnknownResult error. The OnErrorAsync() function treats this error as retryable, so retry loops that don’t check for CommitUnknownResult could execute the transaction twice. In these cases, you must consider the idempotence of the transaction.</remarks>
Task CommitAsync(CancellationToken cancellationToken);
/// <summary>Implements the recommended retry and backoff behavior for a transaction.
/// This function knows which of the error codes generated by other query functions represent temporary error conditions and which represent application errors that should be handled by the application.
/// It also implements an exponential backoff strategy to avoid swamping the database cluster with excessive retries when there is a high level of conflict between transactions.
/// </summary>
/// <param name="code">FdbError code thrown by the previous command</param>
/// <param name="cancellationToken">Token used to cancel the operation from the outside</param>
/// <returns>Returns a task that completes if the operation can be safely retried, or that rethrows the original exception if the operation is not retryable.</returns>
Task OnErrorAsync(FdbError code, CancellationToken cancellationToken);
/// <summary>Reset transaction to its initial state.</summary>
/// <remarks>This is similar to disposing the transaction and recreating a new one. The only state that persists through a transaction reset is that which is related to the backoff logic used by OnErrorAsync()</remarks>
void Reset();
/// <summary>Cancels the transaction. All pending or future uses of the transaction will return a TransactionCancelled error code. The transaction can be used again after it is reset.</summary>
void Cancel();
}
}
| 77.195531 | 449 | 0.767043 | [
"BSD-3-Clause"
] | BedeGaming/foundationdb-dotnet-client | FoundationDB.Client/Core/IFdbTransactionHandler.cs | 13,824 | C# |
// This file is auto-generated, don't edit it. Thanks.
using System;
using System.Collections.Generic;
using System.IO;
using Tea;
namespace AlibabaCloud.SDK.Dingtalkvillage_1_0.Models
{
public class ListDeptSimpleUsersResponseBody : TeaModel {
[NameInMap("hasMore")]
[Validation(Required=false)]
public bool? HasMore { get; set; }
[NameInMap("nextCursor")]
[Validation(Required=false)]
public long? NextCursor { get; set; }
[NameInMap("totalCount")]
[Validation(Required=false)]
public long? TotalCount { get; set; }
/// <summary>
/// 用户列表
/// </summary>
[NameInMap("userList")]
[Validation(Required=false)]
public List<ListDeptSimpleUsersResponseBodyUserList> UserList { get; set; }
public class ListDeptSimpleUsersResponseBodyUserList : TeaModel {
/// <summary>
/// 用户ID
/// </summary>
[NameInMap("userId")]
[Validation(Required=false)]
public string UserId { get; set; }
/// <summary>
/// 用户姓名
/// </summary>
[NameInMap("name")]
[Validation(Required=false)]
public string Name { get; set; }
}
}
}
| 25.98 | 83 | 0.56351 | [
"Apache-2.0"
] | aliyun/dingtalk-sdk | dingtalk/csharp/core/village_1_0/Models/ListDeptSimpleUsersResponseBody.cs | 1,319 | C# |
namespace demoFirstApp.Authorization.Roles
{
public static class StaticRoleNames
{
public static class Host
{
public const string Admin = "Admin";
}
public static class Tenants
{
public const string Admin = "Admin";
}
}
}
| 19.1875 | 48 | 0.553746 | [
"MIT"
] | MatiasDevop/abp-netcore | aspnet-core/src/demoFirstApp.Core/Authorization/Roles/StaticRoleNames.cs | 307 | C# |
namespace Goui.Html {
public class Iframe : Element
{
public string Source
{
get => GetStringAttribute ("src", null);
set => SetAttributeProperty ("src", value);
}
public Iframe ()
: base ("iframe")
{
}
}
}
| 19.0625 | 55 | 0.459016 | [
"MIT"
] | KevinGliewe/Goui | Goui/Html/Iframe.cs | 307 | C# |
//
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
using System;
using System.ComponentModel.Composition;
using DotNetNuke.Entities.Icons;
using DotNetNuke.ExtensionPoints;
using DotNetNuke.UI.Modules;
namespace DotNetNuke.Modules.DigitalAssets.Components.ExtensionPoint.ToolBarButton
{
[Export(typeof(IToolBarButtonExtensionPoint))]
[ExportMetadata("Module", "DigitalAssets")]
[ExportMetadata("Name", "DigitalAssetsToolBarButton")]
[ExportMetadata("Group", "Main")]
[ExportMetadata("Priority", 1)]
public class GridViewToolBarButtonExtensionPoint : IToolBarButtonExtensionPoint
{
public string ButtonId
{
get { return "DigitalAssetsGridViewBtnId"; }
}
public string CssClass
{
get { return "DigitalAssetsGridView middleButton leftAligned"; }
}
public string Action
{
get { return @"dnnModule.digitalAssets.setView(""gridview"")"; }
}
public string AltText
{
get { return LocalizationHelper.GetString("GridViewToolBarButtonExtensionPoint.AltText"); }
}
public bool ShowText
{
get { return false; }
}
public bool ShowIcon
{
get { return true; }
}
public string Text
{
get { return LocalizationHelper.GetString("GridViewToolBarButtonExtensionPoint.Text"); }
}
public string Icon
{
get { return IconController.IconURL("ListView", "16x16", "Gray"); }
}
public int Order
{
get { return 3; }
}
public bool Enabled
{
get { return true; }
}
public ModuleInstanceContext ModuleContext { get; set; }
}
}
| 25.959459 | 103 | 0.608537 | [
"MIT"
] | CMarius94/Dnn.Platform | DNN Platform/Modules/DigitalAssets/Components/ExtensionPoint/ToolBarButton/GridViewToolBarButtonExtensionPoint.cs | 1,923 | C# |
// Copyright 2020 Energinet DataHub A/S
//
// Licensed under the Apache License, Version 2.0 (the "License2");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using Google.Protobuf;
namespace Energinet.DataHub.MarketRoles.Infrastructure.Transport.Protobuf
{
/// <summary>
/// Parser for protobuf
/// </summary>
public abstract class ProtobufParser
{
/// <summary>
/// Create an <see cref="IMessage"/> from a payload
/// </summary>
/// <param name="data">payload containing the <see cref="IMessage"/></param>
/// <returns>Message from the payload</returns>
public abstract IMessage Parse(byte[] data);
}
}
| 35 | 84 | 0.6875 | [
"Apache-2.0"
] | Energinet-DataHub/geh-market-roles | source/Energinet.DataHub.MarketRoles.Infrastructure/Transport/Protobuf/ProtobufParser.cs | 1,122 | C# |
using UnityEditor;
namespace NaughtyAttributes.Editor
{
[PropertyDrawer(typeof(SliderAttribute))]
public class SliderPropertyDrawer : PropertyDrawer
{
public override void DrawProperty(SerializedProperty property)
{
EditorDrawUtility.DrawHeader(property);
SliderAttribute sliderAttribute = PropertyUtility.GetAttribute<SliderAttribute>(property);
if (property.propertyType == SerializedPropertyType.Integer)
{
EditorGUILayout.IntSlider(property, (int)sliderAttribute.MinValue, (int)sliderAttribute.MaxValue);
}
else if (property.propertyType == SerializedPropertyType.Float)
{
EditorGUILayout.Slider(property, sliderAttribute.MinValue, sliderAttribute.MaxValue);
}
else
{
string warning = sliderAttribute.GetType().Name + " can be used only on int or float fields";
EditorDrawUtility.DrawHelpBox(warning, MessageType.Warning, context: PropertyUtility.GetTargetObject(property));
EditorDrawUtility.DrawPropertyField(property);
}
}
}
}
| 37.1875 | 128 | 0.652101 | [
"MIT"
] | 517752548/UnityFramework | GameFrameWork/ThirdParty/NaughtyAttributes/Scripts/Editor/PropertyDrawers/SliderPropertyDrawer.cs | 1,190 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PointInTheFigure")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("PointInTheFigure")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("955af33c-d300-4dd1-9403-c44cc7af134f")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 38.459459 | 84 | 0.749824 | [
"MIT"
] | MomchilSt/SoftUni | 01-Programming-Basics/C# Basics/Exercises/04. Complex Conditional Statements/PointInTheFigure/Properties/AssemblyInfo.cs | 1,426 | C# |
using System;
using System.Runtime.InteropServices;
namespace Dapplo.Windows.Com
{
/// <summary>
/// Enables objects and their containers to dispatch commands to each other. For example, an object's toolbars may contain buttons for commands such as Print, Print Preview, Save, New, and Zoom.
/// <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms683797(v=vs.85).aspx">IOleCommandTarget interface</a>
/// </summary>
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(true)]
[Guid("B722BCCB-4E68-101B-A2BC-00AA00404770")]
public interface IOleCommandTarget
{
/// <summary>
/// Queries the object for the status of one or more commands generated by user interface events.
/// </summary>
/// <param name="pguidCmdGroup">The unique identifier of the command group; can be NULL to specify the standard group.</param>
/// <param name="cCmds">The number of commands in the prgCmds array.</param>
/// <param name="prgCmds">A caller-allocated array of OLECMD structures that indicate the commands for which the caller needs status information. This method fills the cmdf member of each structure with values taken from the OLECMDF enumeration.</param>
/// <param name="pCmdText">A pointer to an OLECMDTEXT structure in which to return name and/or status information of a single command. This parameter can be NULL to indicate that the caller does not need this information.</param>
/// <returns>
/// This method returns S_OK on success. Other possible return values include the following.
/// E_FAIL
/// The operation failed.
///
/// E_UNEXPECTED
/// An unexpected error has occurred.
///
/// E_POINTER
/// The prgCmds argument is NULL.
///
/// OLECMDERR_E_UNKNOWNGROUP
/// The pguidCmdGroup parameter is not NULL but does not specify a recognized command group.
/// </returns>
[return: MarshalAs(UnmanagedType.I4)]
[PreserveSig]
int QueryStatus([In] [MarshalAs(UnmanagedType.LPStruct)] Guid pguidCmdGroup, int cCmds, IntPtr prgCmds, IntPtr pCmdText);
/// <summary>
/// Executes the specified command or displays help for the command.
/// </summary>
/// <param name="pguidCmdGroup">The unique identifier of the command group; can be NULL to specify the standard group.</param>
/// <param name="nCmdId">The command to be executed. This command must belong to the group specified with pguidCmdGroup.</param>
/// <param name="nCmdexecopt">Specifies how the object should execute the command. Possible values are taken from the OLECMDEXECOPT and OLECMDID_WINDOWSTATE_FLAG enumerations.</param>
/// <param name="pvaIn">A pointer to a VARIANTARG structure containing input arguments. This parameter can be NULL.</param>
/// <param name="pvaOut">Pointer to a VARIANTARG structure to receive command output. This parameter can be NULL.</param>
/// <returns>
/// This method returns S_OK on success. Other possible return values include the following.
/// OLECMDERR_E_UNKNOWNGROUP
/// The pguidCmdGroup parameter is not NULL but does not specify a recognized command group.
/// OLECMDERR_E_NOTSUPPORTED
/// The nCmdID parameter is not a valid command in the group identified by pguidCmdGroup.
/// OLECMDERR_E_DISABLED
/// The command identified by nCmdID is currently disabled and cannot be executed.
/// OLECMDERR_E_NOHELP
/// The caller has asked for help on the command identified by nCmdID, but no help is available.
/// OLECMDERR_E_CANCELED
/// The user canceled the execution of the command.
/// </returns>
[return: MarshalAs(UnmanagedType.I4)]
[PreserveSig]
int Exec([In] [MarshalAs(UnmanagedType.LPStruct)] Guid pguidCmdGroup, int nCmdId, int nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut);
}
} | 61.469697 | 261 | 0.686468 | [
"MIT"
] | dapplo/Dapplo.Windows | src/Dapplo.Windows.Com/IOleCommandTarget.cs | 4,059 | C# |
namespace JKang.EventSourcing.Persistence.DynamoDB
{
public class DynamoDBEventStoreOptions
{
public string TableName { get; set; }
}
} | 22.285714 | 51 | 0.698718 | [
"MIT"
] | Nacorpio/EventSourcing | src/JKang.EventSourcing.Persistence.DynamoDB/DynamoDBEventStoreOptions.cs | 158 | C# |
using System;
namespace RudderStack.Model
{
public class RudderOptions
{
public string AnonymousId { get; private set; }
public Dict Integrations { get; private set; }
public DateTime? Timestamp { get; private set; }
public RudderContext Context { get; private set; }
/// <summary>
/// Options object that allows the specification of a timestamp,
/// an anonymousId, a context, or target integrations.
/// </summary>
public RudderOptions ()
{
this.Integrations = new Dict ();
this.Context = new RudderContext ();
}
/// <summary>
/// Sets the anonymousId of the user. This is typically a cookie session id that identifies
/// a visitor before they have logged in.
/// </summary>
/// <returns>This Options object for chaining.</returns>
/// <param name="anonymousId">The visitor's anonymousId.</param>
public RudderOptions SetAnonymousId (string anonymousId)
{
this.AnonymousId = anonymousId;
return this;
}
/// <summary>
/// Sets the timestamp of when an analytics call occurred. The timestamp is primarily used for
/// historical imports or if this event happened in the past. The timestamp is not required,
/// and if it's not provided, our servers will timestamp the call as if it just happened.
/// </summary>
/// <returns>This Options object for chaining.</returns>
/// <param name="timestamp">The call's timestamp.</param>
public RudderOptions SetTimestamp (DateTime? timestamp)
{
this.Timestamp = timestamp;
return this;
}
/// <summary>
/// Sets the context of this analytics call. Context contains information about the environment
/// such as the app, the user agent, ip, etc ..
/// </summary>
/// <returns>This Options object for chaining.</returns>
/// <param name="context">The visitor's context.</param>
public RudderOptions SetContext (RudderContext context)
{
this.Context = context;
return this;
}
/// <summary>
/// Determines which integrations this messages goes to.
/// new Options()
/// .Integration("All", false)
/// .Integration("Mixpanel", true)
/// will send a message to only Mixpanel.
/// </summary>
/// <param name="integration">The integration name.</param>
/// <param name="enabled">If set to <c>true</c>, then the integration is enabled.</param>
public RudderOptions SetIntegration (string integration, bool enabled)
{
this.Integrations.Add (integration, enabled);
return this;
}
/// <summary>
/// Enable destination specific options for integration.
/// new Options()
/// .Integration("Vero", new Model.Dict() {
/// "tags", new Model.Dict() {
/// { "id", "235FAG" },
/// { "action", "add" },
/// { "values", new string[] {"warriors", "giants", "niners"} }
/// }
/// });
/// </summary>
/// <param name="integration">The integration name.</param>
/// <param name="value">Dict value</param>
public RudderOptions SetIntegration (string integration, Dict value)
{
this.Integrations.Add (integration, value);
return this;
}
}
}
| 38.147368 | 103 | 0.561258 | [
"MIT"
] | rudderlabs/rudder-sdk-.net | RudderAnalytics/Model/RudderOptions.cs | 3,624 | C# |
#region Copyright (c) 2007 Ryan Williams <drcforbin@gmail.com>
/// <copyright>
/// Copyright (c) 2007 Ryan Williams <drcforbin@gmail.com>
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/// THE SOFTWARE.
/// </copyright>
#endregion
using System;
using System.IO;
using System.Linq;
using Mono.Cecil;
using Xunit;
using Obfuscar;
namespace ObfuscarTests
{
public class CustomAttributeTests
{
public string BuildAndObfuscate()
{
var output = TestHelper.OutputPath;
var name = "AssemblyWithCustomAttr";
string xml = string.Format(
@"<?xml version='1.0'?>" +
@"<Obfuscator>" +
@"<Var name='InPath' value='{0}' />" +
@"<Var name='OutPath' value='{1}' />" +
@"<Var name='KeepPublicApi' value='false' />" +
@"<Var name='HidePrivateApi' value='true' />" +
@"<Module file='$(InPath){2}{3}.dll' />" +
@"</Obfuscator>", TestHelper.InputPath, output, Path.DirectorySeparatorChar, name);
TestHelper.BuildAndObfuscate(name, string.Empty, xml);
return Path.Combine(output, $"{name}.dll");
}
[Fact]
public void CheckClassHasAttribute()
{
var output = BuildAndObfuscate();
AssemblyDefinition assmDef = AssemblyDefinition.ReadAssembly(output);
Assert.Equal(3, assmDef.MainModule.Types.Count); // "Should contain only one type, and <Module>.");
bool found = false;
foreach (TypeDefinition typeDef in assmDef.MainModule.Types)
{
if (typeDef.Name == "<Module>" || typeDef.BaseType.Name == "Attribute")
continue;
else
found = true;
Assert.Single(typeDef.CustomAttributes); // "Type should have an attribute.");
CustomAttribute attr = typeDef.CustomAttributes[0];
Assert.Equal("System.Void A.a::.ctor(System.String)", attr.Constructor.ToString());
// "Type should have ObsoleteAttribute on it.");
Assert.Single(attr.ConstructorArguments); // "ObsoleteAttribute should have one parameter.");
Assert.Equal("test", attr.ConstructorArguments[0].Value);
// "ObsoleteAttribute param should have appropriate value.");
}
Assert.True(found, "Should have found non-<Module> type.");
}
[Fact]
public void CheckMethodHasAttribute()
{
var output = BuildAndObfuscate();
AssemblyDefinition assmDef = AssemblyDefinition.ReadAssembly(output);
bool found = false;
foreach (TypeDefinition typeDef in assmDef.MainModule.Types)
{
if (typeDef.Name == "<Module>" || typeDef.BaseType.Name == "Attribute")
continue;
else
found = true;
Assert.Equal(2, typeDef.Methods.Count); // "Type is expected to have a single member.");
MethodDefinition methodDef = typeDef.Methods.First(item => item.Name != ".ctor");
CustomAttribute attr = methodDef.CustomAttributes[0];
Assert.Equal("System.Void A.a::.ctor(System.String)", attr.Constructor.ToString());
// "Type should have ObsoleteAttribute on it.");
Assert.Single(attr.ConstructorArguments); // "ObsoleteAttribute should have one parameter.");
Assert.Equal("test", attr.ConstructorArguments[0].Value);
// "ObsoleteAttribute param should have appropriate value.");
}
Assert.True(found, "Should have found non-<Module> type.");
}
[Fact]
public void TestInclude()
{
string xml = string.Format(
@"<?xml version='1.0'?>" +
@"<Obfuscator>" +
@"<Var name='InPath' value='{0}' />" +
@"<Var name='OutPath' value='{1}' />" +
@"<Var name='KeepPublicApi' value='false' />" +
@"<Var name='HidePrivateApi' value='true' />" +
@"<Include path='$(InPath){2}TestInclude.xml' />" +
@"<Module file='$(InPath){2}AssemblyWithCustomAttr.dll'>" +
@"<Include path='$(InPath){2}TestIncludeModule.xml' />" +
@"</Module>" +
@"</Obfuscator>", TestHelper.InputPath, TestHelper.OutputPath, Path.DirectorySeparatorChar);
Obfuscator obfuscator = Obfuscator.CreateFromXml(xml);
}
}
}
| 41.764706 | 111 | 0.588908 | [
"MIT"
] | ALEHACKsp/obfuscar | Tests/CustomAttributeTests.cs | 5,680 | C# |
using System.Collections.Generic;
using System.Net;
using Aspose.Pdf.Cloud.Sdk.Model;
using System.IO;
using System;
using Aspose.Pdf.Cloud.Sdk.Api;
using System.Collections;
namespace Aspose.Pdf.Cloud.Sdk.Example
{
public class ImportExportExamples
{
protected void UploadFile(string sourcePath, string serverFileName)
{
using (var file = System.IO.File.OpenRead(Path.Combine("", sourcePath)))
{
var response = api.UploadFile(Path.Combine("", serverFileName), file);
}
}
private const string Name = "PdfWithLinks.pdf";
PdfApi api = new PdfApi("XXXXXXX", "XXXXXXX");
string FolderName = "";
public void GetExportFieldsFromPdfToXmlInStorageExample()
{
//ExStart: GetExportFieldsFromPdfToXmlInStorageExample
const string name = "FormData.pdf";
UploadFile(name, name);
var response = api.GetExportFieldsFromPdfToXmlInStorage(name, folder: FolderName);
Console.WriteLine(response);
//ExEnd: GetExportFieldsFromPdfToXmlInStorageExample
}
public void GetExportFieldsFromPdfToFdfInStorageExample()
{
//ExStart: GetExportFieldsFromPdfToFdfInStorageExample
const string name = "FormData.pdf";
UploadFile(name, name);
var response = api.GetExportFieldsFromPdfToFdfInStorage(name, folder: FolderName);
Console.WriteLine(response);
//ExEnd: GetExportFieldsFromPdfToFdfInStorageExample
}
public void GetExportFieldsFromPdfToXfdfInStorageExample()
{
//ExStart: GetExportFieldsFromPdfToXfdfInStorageExample
const string name = "FormData.pdf";
UploadFile(name, name);
var response = api.GetExportFieldsFromPdfToXfdfInStorage(name, folder: FolderName);
Console.WriteLine(response);
//ExEnd: GetExportFieldsFromPdfToXfdfInStorageExample
}
public void PutExportFieldsFromPdfToXmlInStorageExample()
{
//ExStart: PutExportFieldsFromPdfToXmlInStorageExample
const string name = "FormData.pdf";
UploadFile(name, name);
string outPath = Path.Combine(FolderName, "exportData.xml");
var response = api.PutExportFieldsFromPdfToXmlInStorage(name, outPath, folder: FolderName);
Console.WriteLine(response);
//ExEnd: PutExportFieldsFromPdfToXmlInStorageExample
}
public void PutExportFieldsFromPdfToFdfInStorageExample()
{
//ExStart: PutExportFieldsFromPdfToFdfInStorageExample
const string name = "FormData.pdf";
UploadFile(name, name);
string outPath = Path.Combine(FolderName, "exportData.fdf");
var response = api.PutExportFieldsFromPdfToFdfInStorage(name, outPath, folder: FolderName);
Console.WriteLine(response);
//ExEnd: PutExportFieldsFromPdfToFdfInStorageExample
}
public void PutExportFieldsFromPdfToXfdfInStorageExample()
{
//ExStart: PutExportFieldsFromPdfToXfdfInStorageExample
const string name = "FormData.pdf";
UploadFile(name, name);
string outPath = Path.Combine(FolderName, "exportData.xfdf");
var response = api.PutExportFieldsFromPdfToXfdfInStorage(name, outPath, folder: FolderName);
Console.WriteLine(response);
//ExEnd: PutExportFieldsFromPdfToXfdfInStorageExample
}
public void GetImportFieldsFromFdfInStorageExample()
{
//ExStart: GetImportFieldsFromFdfInStorageExample
const string name = "FormData.pdf";
UploadFile(name, name);
const string fdfFileName = "FormData.fdf";
UploadFile(fdfFileName, fdfFileName);
string fdfFilePath = Path.Combine(FolderName, fdfFileName);
var response = api.GetImportFieldsFromFdfInStorage(name, fdfFilePath, folder: FolderName);
Console.WriteLine(response);
//ExEnd: GetImportFieldsFromFdfInStorageExample
}
public void GetImportFieldsFromXfdfInStorageExample()
{
//ExStart: GetImportFieldsFromXfdfInStorageExample
const string name = "FormDataXfdf_in.pdf";
UploadFile(name, name);
const string fdfxFileName = "FormDataXfdf_in.xfdf";
UploadFile(fdfxFileName, fdfxFileName);
string fdfxFilePath = Path.Combine(FolderName, fdfxFileName);
var response = api.GetImportFieldsFromXfdfInStorage(name, fdfxFilePath, folder: FolderName);
Console.WriteLine(response);
//ExEnd: GetImportFieldsFromXfdfInStorageExample
}
public void GetImportFieldsFromXmlInStorageExample()
{
//ExStart: GetImportFieldsFromXmlInStorageExample
const string name = "FormDataXfa_in.pdf";
UploadFile(name, name);
const string xmlFileName = "FormDataXfa_in.xml";
UploadFile(xmlFileName, xmlFileName);
string xmlFilePath = Path.Combine(FolderName, xmlFileName);
var response = api.GetImportFieldsFromXmlInStorage(name, xmlFilePath, folder: FolderName);
Console.WriteLine(response);
//ExEnd: GetImportFieldsFromXmlInStorageExample
}
public void PutImportFieldsFromFdfInStorageExample()
{
//ExStart: PutImportFieldsFromFdfInStorageExample
const string name = "FormData.pdf";
UploadFile(name, name);
const string fdfFileName = "FormData.fdf";
UploadFile(fdfFileName, fdfFileName);
string fdfFilePath = Path.Combine(FolderName, fdfFileName);
var response = api.PutImportFieldsFromFdfInStorage(name, fdfFilePath, folder: FolderName);
Console.WriteLine(response);
//ExEnd: PutImportFieldsFromFdfInStorageExample
}
public void PutImportFieldsFromXfdfInStorageExample()
{
//ExStart: PutImportFieldsFromXfdfInStorageExample
const string name = "FormDataXfdf_in.pdf";
UploadFile(name, name);
const string fdfxFileName = "FormDataXfdf_in.xfdf";
UploadFile(fdfxFileName, fdfxFileName);
string fdfxFilePath = Path.Combine(FolderName, fdfxFileName);
var response = api.PutImportFieldsFromXfdfInStorage(name, fdfxFilePath, folder: FolderName);
Console.WriteLine(response);
//ExEnd: PutImportFieldsFromXfdfInStorageExample
}
public void PutImportFieldsFromXmlInStorageExample()
{
//ExStart: PutImportFieldsFromXmlInStorageExample
const string name = "FormDataXfa_in.pdf";
UploadFile(name, name);
const string xmlFileName = "FormDataXfa_in.xml";
UploadFile(xmlFileName, xmlFileName);
string xmlFilePath = Path.Combine(FolderName, xmlFileName);
var response = api.PutImportFieldsFromXmlInStorage(name, xmlFilePath, folder: FolderName);
Console.WriteLine(response);
//ExEnd: PutImportFieldsFromXmlInStorageExample
}
public void PostImportFieldsFromFdfExample()
{
//ExStart: PostImportFieldsFromFdfExample
const string name = "FormData.pdf";
UploadFile(name, name);
const string fdfFileName = "FormData.fdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", fdfFileName)))
{
var response = api.PostImportFieldsFromFdf(name, folder: FolderName, fdfData: stream);
Console.WriteLine(response);
}
//ExEnd: PostImportFieldsFromFdfExample
}
public void PostImportFieldsFromXfdfExample()
{
//ExStart: PostImportFieldsFromXfdfExample
const string name = "FormDataXfdf_in.pdf";
UploadFile(name, name);
const string fdfxFileName = "FormDataXfdf_in.xfdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", fdfxFileName)))
{
var response = api.PostImportFieldsFromXfdf(name, folder: FolderName, xfdfData: stream);
Console.WriteLine(response);
}
//ExEnd: PostImportFieldsFromXfdfExample
}
public void PostImportFieldsFromXmlExample()
{
//ExStart: PostImportFieldsFromXmlExample
const string name = "FormDataXfa_in.pdf";
UploadFile(name, name);
const string xmlFileName = "FormDataXfa_in.xml";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", xmlFileName)))
{
var response = api.PostImportFieldsFromXml(name, folder: FolderName, xmlData: stream);
Console.WriteLine(response);
}
//ExEnd: PostImportFieldsFromXmlExample
}
}
} | 35.555133 | 104 | 0.626457 | [
"MIT"
] | aspose-pdf-cloud/aspose-pdf-cloud-dotnet | Examples/ImportExportExamples.cs | 9,351 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using NLog;
using Revo.Core.Core;
using Revo.Core.Events;
namespace Revo.Infrastructure.Events.Async
{
public class AsyncEventWorker : IAsyncEventWorker
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private readonly IAsyncEventQueueManager asyncEventQueueManager;
private readonly IServiceLocator serviceLocator;
public AsyncEventWorker(IAsyncEventQueueManager asyncEventQueueManager,
IServiceLocator serviceLocator)
{
this.asyncEventQueueManager = asyncEventQueueManager;
this.serviceLocator = serviceLocator;
}
public async Task RunQueueBacklogAsync(string queueName)
{
IAsyncEventQueueState queue = await asyncEventQueueManager.GetQueueStateAsync(queueName);
if (queue == null)
{
return;
}
IReadOnlyCollection<IAsyncEventQueueRecord> records = await asyncEventQueueManager.GetQueueEventsAsync(queueName);
if (records.Count == 0)
{
return;
}
bool processOnlyNonsequential = false;
var nonSequential = records.Where(x => x.SequenceNumber == null).ToList();
var sequential = records.Where(x => x.SequenceNumber != null).ToList();
long? firstSequenceNumber = sequential.FirstOrDefault()?.SequenceNumber; //records should always arrive in order, but possibly with gaps in sequence
long? lastSequenceNumber = sequential.LastOrDefault()?.SequenceNumber;
Logger.Trace($"Read {records.Count} async events from queue '{queueName}', last sequence number {lastSequenceNumber}");
if (firstSequenceNumber != null
&& queue.LastSequenceNumberProcessed != null
&& (queue.LastSequenceNumberProcessed != firstSequenceNumber.Value - 1
|| queue.LastSequenceNumberProcessed.Value + sequential.Count != lastSequenceNumber))
{
bool anyNonsequential = nonSequential.Any();
if (anyNonsequential)
{
Logger.Debug($"Processing only non-sequential async events in '{queueName}' queue: missing some events in sequence at #{queue.LastSequenceNumberProcessed.Value + 1}");
processOnlyNonsequential = true;
}
else
{
string error = $"Skipping processing of '{queueName}' async event queue: missing events in sequence at #{queue.LastSequenceNumberProcessed.Value + 1}";
Logger.Warn(error);
throw new AsyncEventProcessingSequenceException(error, queue.LastSequenceNumberProcessed.Value + 1);
}
}
if (nonSequential.Count > 0)
{
await ProcessEventsAsync(nonSequential, queueName);
}
if (!processOnlyNonsequential)
{
if (sequential.Count > 0)
{
await ProcessEventsAsync(sequential, queueName);
}
}
if (processOnlyNonsequential)
{
throw new AsyncEventProcessingSequenceException(
$"Processed only non-sequential async events in '{queueName}' queue: missing some events in sequence at #{queue.LastSequenceNumberProcessed.Value + 1}",
queue.LastSequenceNumberProcessed.Value + 1);
}
}
private async Task ProcessEventsAsync(IReadOnlyCollection<IAsyncEventQueueRecord> records, string queueName)
{
HashSet<IAsyncEventListener> usedListeners = new HashSet<IAsyncEventListener>();
List<IAsyncEventQueueRecord> processedEvents = new List<IAsyncEventQueueRecord>();
foreach (var record in records)
{
Type listenerType = typeof(IAsyncEventListener<>).MakeGenericType(record.EventMessage.Event.GetType());
var handleAsyncMethod = listenerType.GetMethod(nameof(IAsyncEventListener<IEvent>.HandleAsync));
IEnumerable<IAsyncEventListener> listeners = serviceLocator.GetAll(listenerType).Cast<IAsyncEventListener>();
foreach (IAsyncEventListener listener in listeners)
{
IAsyncEventSequencer sequencer = listener.EventSequencer;
IEnumerable<EventSequencing> sequences = sequencer.GetEventSequencing(record.EventMessage);
if (sequences.Any(x => x.SequenceName == queueName))
{
try
{
await (Task)handleAsyncMethod.Invoke(listener, new object[] { record.EventMessage, queueName });
usedListeners.Add(listener);
}
catch (Exception e)
{
string error = $"Failed processing of an async event {record.EventMessage.GetType().FullName} (ID: {record.EventId}) in queue '{queueName}' with listener {listener.GetType().FullName}";
Logger.Error(e, error);
throw new AsyncEventProcessingException(error, e);
}
}
}
processedEvents.Add(record);
}
foreach (IAsyncEventListener listener in usedListeners)
{
try
{
await listener.OnFinishedEventQueueAsync(queueName);
}
catch (Exception e)
{
string error = $"Failed to finish processing of an async event queue '{queueName}' with listener {listener.GetType().FullName}";
Logger.Error(e, error);
throw new AsyncEventProcessingException(error, e);
}
}
foreach (var processedEvent in processedEvents)
{
await asyncEventQueueManager.DequeueEventAsync(processedEvent.Id);
}
await asyncEventQueueManager.CommitAsync();
}
}
}
| 43.530612 | 213 | 0.582904 | [
"MIT"
] | Zev-OwitGlobal/Revo | Revo.Infrastructure/Events/Async/AsyncEventWorker.cs | 6,401 | C# |
/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the athena-2017-05-18.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Athena.Model
{
/// <summary>
/// A piece of data (a field in the table).
/// </summary>
public partial class Datum
{
private string _varCharValue;
/// <summary>
/// Gets and sets the property VarCharValue.
/// <para>
/// The value of the datum.
/// </para>
/// </summary>
public string VarCharValue
{
get { return this._varCharValue; }
set { this._varCharValue = value; }
}
// Check to see if VarCharValue property is set
internal bool IsSetVarCharValue()
{
return this._varCharValue != null;
}
}
} | 27.910714 | 104 | 0.644914 | [
"Apache-2.0"
] | Bio2hazard/aws-sdk-net | sdk/src/Services/Athena/Generated/Model/Datum.cs | 1,563 | C# |
/******************************************************************************
* Copyright (C) Leap Motion, Inc. 2011-2017. *
* Leap Motion proprietary and confidential. *
* *
* Use subject to the terms of the Leap Motion SDK Agreement available at *
* https://developer.leapmotion.com/sdk_agreement, or another agreement *
* between Leap Motion and you, your company or other organization. *
******************************************************************************/
using Leap.Unity;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace Leap.Unity.Interaction {
[CanEditMultipleObjects]
[CustomEditor(typeof(Anchor))]
public class AnchorEditor : CustomEditorBase<Anchor> {
protected override void OnEnable() {
base.OnEnable();
deferProperty("_eventTable");
specifyCustomDrawer("_eventTable", drawEventTable);
}
private EnumEventTableEditor _tableEditor;
private void drawEventTable(SerializedProperty property) {
if (_tableEditor == null) {
_tableEditor = new EnumEventTableEditor(property, typeof(Anchor.EventType));
}
_tableEditor.DoGuiLayout();
}
}
}
| 34.268293 | 85 | 0.53879 | [
"MIT"
] | sayakbiswas/hackriddle-2017 | Assets/LeapMotion/Modules/InteractionEngine/Scripts/UI/Anchors/Editor/AnchorEditor.cs | 1,405 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jitter;
using Microsoft.Xna.Framework;
using Jitter.Collision.Shapes;
using Jitter.Dynamics;
using Jitter.LinearMath;
using Microsoft.Xna.Framework.Graphics;
using Jitter.Collision;
using JitterDemo.PhysicsObjects;
using JitterDemo.Vehicle;
namespace JitterDemo.Scenes
{
public class SoftBodyJenga: JitterDemo// : Scene
{
public JitterDemo Demo;
SoftBody softBodyTorus;
SoftBody softBodyCloth;
public SoftBodyJenga(JitterDemo demo)//: base(demo)
{
Demo = demo;
}
private void RemoveDuplicateVertices(List<TriangleVertexIndices> indices,
List<JVector> vertices)
{
Dictionary<JVector, int> unique = new Dictionary<JVector, int>(vertices.Count);
Stack<int> tbr = new Stack<int>(vertices.Count / 3);
// get all unique vertices and their indices
for (int i = 0; i < vertices.Count; i++)
{
if (!unique.ContainsKey(vertices[i]))
unique.Add(vertices[i], unique.Count);
else tbr.Push(i);
}
// reconnect indices
for (int i = 0; i < indices.Count; i++)
{
TriangleVertexIndices tvi = indices[i];
tvi.I0 = unique[vertices[tvi.I0]];
tvi.I1 = unique[vertices[tvi.I1]];
tvi.I2 = unique[vertices[tvi.I2]];
indices[i] = tvi;
}
// remove duplicate vertices
while (tbr.Count > 0) vertices.RemoveAt(tbr.Pop());
unique.Clear();
}
public void Build() //override
{
AddGround();
for (int i = 0; i < 15; i++)
{
bool even = (i % 2 == 0);
for (int e = 0; e < 3; e++)
{
JVector size = (even) ? new JVector(1, 1, 3) : new JVector(3, 1, 1);
RigidBody body = new RigidBody(new BoxShape(size));
body.Position = new JVector(3.0f + (even ? e : 1.0f), i + 0.5f, -5.0f + (even ? 1.0f : e));
Demo.World.AddBody(body);
}
}
/*Model model = this.Demo.Content.Load<Model>("Model/torus");
List<TriangleVertexIndices> indices = new List<TriangleVertexIndices>();
List<JVector> vertices = new List<JVector>();
ConvexHullObject.ExtractData(vertices, indices, model);
RemoveDuplicateVertices(indices, vertices);
softBodyTorus = new SoftBody(indices, vertices);
softBodyTorus.Translate(new JVector(10, 5, 0));
softBodyTorus.Pressure = 50.0f;
softBodyTorus.SetSpringValues(0.2f, 0.005f);
//softBodyTorus.SelfCollision = true; ;
softBodyTorus.Material.KineticFriction = 0.9f;
softBodyTorus.Material.StaticFriction = 0.95f;
Demo.World.AddBody(softBodyTorus);*/
softBodyCloth = new SoftBody(20,20,0.4f);
// ##### Uncomment for selfcollision, all 3 lines
//cloth.SelfCollision = true;
//cloth.TriangleExpansion = 0.05f;
//cloth.VertexExpansion = 0.05f;
softBodyCloth.Translate(new JVector(0, 10, 10));
softBodyCloth.Material.KineticFriction = 0.9f;
softBodyCloth.Material.StaticFriction = 0.95f;
softBodyCloth.VertexBodies[0].IsStatic = true;
softBodyCloth.VertexBodies[380].IsStatic = true;
softBodyCloth.VertexBodies[19].IsStatic = true;
softBodyCloth.VertexBodies[399].IsStatic = true;
softBodyCloth.SetSpringValues(SoftBody.SpringType.EdgeSpring, 0.1f, 0.01f);
softBodyCloth.SetSpringValues(SoftBody.SpringType.ShearSpring, 0.1f, 0.03f);
softBodyCloth.SetSpringValues(SoftBody.SpringType.BendSpring, 0.1f, 0.03f);
// ###### Uncomment here for a better visualization
//Demo.Components.Add(new ClothObject(Demo, cloth));
Demo.World.AddBody(softBodyCloth);
}
/*public override void Draw(GameTime gameTime, Matrix view, Matrix projection, int eye) ///override
{
//softBodyCloth.dra
base.Draw(gameTime, view, projection, eye);
}*/
private DebugDrawer debugDrawer = null;
private QuadDrawer quadDrawer = null;
protected RigidBody ground = null;
protected CarObject car = null;
public void AddGround()
{
ground = new RigidBody(new BoxShape(new JVector(200, 20, 200)));
ground.Position = new JVector(0, -10, 0);
ground.Tag = BodyTag.DontDrawMe;
ground.IsStatic = true;
Demo.World.AddBody(ground);
//ground.Restitution = 1.0f;
ground.Material.KineticFriction = 0.0f;
quadDrawer = new QuadDrawer(Demo, 100);
Demo.Components.Add(quadDrawer);
//debugDrawer = Demo.DebugDrawer;
}
public void RemoveGround()
{
Demo.World.RemoveBody(ground);
Demo.Components.Remove(quadDrawer);
quadDrawer.Dispose();
}
public CarObject AddCar(JVector position)
{
car = new CarObject(Demo);
this.Demo.Components.Add(car);
car.carBody.Position = position;
return car;
}
public void RemoveCar()
{
Demo.World.RemoveBody(car.carBody);
Demo.Components.Remove(quadDrawer);
Demo.Components.Remove(car);
}
public void Draw(GameTime gameTime, Matrix view, Matrix projection, int eye) //virtual
{
//Demo.GraphicsDevice.BlendState = BlendState.Opaque;
//Demo.GraphicsDevice.DepthStencilState = DepthStencilState.Default;
if (quadDrawer != null)
{
//Demo.GraphicsDevice.BlendState = BlendState.Opaque;
//Demo.GraphicsDevice.DepthStencilState = DepthStencilState.Default;
quadDrawer.Draw(gameTime, view, projection);
}
//else
//{
// quadDrawer = new QuadDrawer(Demo, 100);
//}
//base.Draw(gameTime);
/*if (debugDrawer != null)
{
//Demo.GraphicsDevice.BlendState = BlendState.Opaque;
//Demo.GraphicsDevice.DepthStencilState = DepthStencilState.Default;
debugDrawer.Draw(gameTime, view, projection);
}*/
//else
//{
// debugDrawer = Demo.DebugDrawer;
//}
if (Demo.Display != null)
{
Demo.Display.Draw(gameTime, view, projection, eye);
}
//base.Draw(gameTime); //, view, projection, eye
}
}
} | 32.555556 | 111 | 0.554892 | [
"MIT"
] | ninekorn/SCCoreSystemsMono | SCCoreSystemsMono/SCCoreSystemsMono/Scenes/SoftBodyJengaNOSCENE.cs | 7,034 | C# |
/*
* MX Platform API
*
* The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
*
* The version of the OpenAPI document: 0.1.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = MX.Platform.CSharp.Client.OpenAPIDateConverter;
namespace MX.Platform.CSharp.Model
{
/// <summary>
/// WidgetResponse
/// </summary>
[DataContract(Name = "WidgetResponse")]
public partial class WidgetResponse : IEquatable<WidgetResponse>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="WidgetResponse" /> class.
/// </summary>
/// <param name="type">type.</param>
/// <param name="url">url.</param>
/// <param name="userId">userId.</param>
public WidgetResponse(string type = default(string), string url = default(string), string userId = default(string))
{
this.Type = type;
this.Url = url;
this.UserId = userId;
}
/// <summary>
/// Gets or Sets Type
/// </summary>
[DataMember(Name = "type", EmitDefaultValue = true)]
public string Type { get; set; }
/// <summary>
/// Gets or Sets Url
/// </summary>
[DataMember(Name = "url", EmitDefaultValue = true)]
public string Url { get; set; }
/// <summary>
/// Gets or Sets UserId
/// </summary>
[DataMember(Name = "user_id", EmitDefaultValue = true)]
public string UserId { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class WidgetResponse {\n");
sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append(" Url: ").Append(Url).Append("\n");
sb.Append(" UserId: ").Append(UserId).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as WidgetResponse);
}
/// <summary>
/// Returns true if WidgetResponse instances are equal
/// </summary>
/// <param name="input">Instance of WidgetResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(WidgetResponse input)
{
if (input == null)
{
return false;
}
return
(
this.Type == input.Type ||
(this.Type != null &&
this.Type.Equals(input.Type))
) &&
(
this.Url == input.Url ||
(this.Url != null &&
this.Url.Equals(input.Url))
) &&
(
this.UserId == input.UserId ||
(this.UserId != null &&
this.UserId.Equals(input.UserId))
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Type != null)
{
hashCode = (hashCode * 59) + this.Type.GetHashCode();
}
if (this.Url != null)
{
hashCode = (hashCode * 59) + this.Url.GetHashCode();
}
if (this.UserId != null)
{
hashCode = (hashCode * 59) + this.UserId.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
{
yield break;
}
}
}
| 33.212121 | 227 | 0.536496 | [
"MIT"
] | mxenabled/mx-platform-csharp | src/MX.Platform.CSharp/Model/WidgetResponse.cs | 5,480 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// O código foi gerado por uma ferramenta.
// Versão de Tempo de Execução:4.0.30319.42000
//
// As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
// o código for gerado novamente.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ex1041")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ex1041")]
[assembly: System.Reflection.AssemblyTitleAttribute("ex1041")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Gerado pela classe WriteCodeFragment do MSBuild.
| 41.833333 | 90 | 0.65239 | [
"MIT"
] | silviafrigatto/csharp-exercises | ex1041/ex1041/obj/Debug/netcoreapp3.1/ex1041.AssemblyInfo.cs | 1,013 | C# |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#region Using directives
#endregion
namespace Microsoft.Management.Infrastructure.CimCmdlets
{
/// <summary>
/// <para>
/// Write result object to ps pipeline
/// </para>
/// </summary>
internal sealed class CimWriteResultObject : CimBaseAction
{
/// <summary>
/// Constructor.
/// </summary>
public CimWriteResultObject(object result, XOperationContextBase theContext)
{
this.result = result;
this.Context = theContext;
}
/// <summary>
/// <para>
/// Write result object to ps pipeline
/// </para>
/// </summary>
/// <param name="cmdlet"></param>
public override void Execute(CmdletOperationBase cmdlet)
{
ValidationHelper.ValidateNoNullArgument(cmdlet, "cmdlet");
cmdlet.WriteObject(result, this.Context);
}
#region members
/// <summary>
/// Result object.
/// </summary>
internal object Result
{
get
{
return result;
}
}
private readonly object result;
#endregion
}
}
| 23.62963 | 84 | 0.538401 | [
"MIT"
] | AWESOME-S-MINDSET/PowerShell | src/Microsoft.Management.Infrastructure.CimCmdlets/CimWriteResultObject.cs | 1,276 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Diagnostics;
using System.Dynamic.Utils;
using System.Reflection;
using System.Runtime.CompilerServices;
namespace System.Linq.Expressions.Interpreter
{
internal sealed class CreateDelegateInstruction : Instruction
{
private readonly LightDelegateCreator _creator;
internal CreateDelegateInstruction(LightDelegateCreator delegateCreator)
{
_creator = delegateCreator;
}
public override int ConsumedStack => _creator.Interpreter.ClosureSize;
public override int ProducedStack => 1;
public override string InstructionName => "CreateDelegate";
public override int Run(InterpretedFrame frame)
{
IStrongBox[] closure;
if (ConsumedStack > 0)
{
closure = new IStrongBox[ConsumedStack];
for (int i = closure.Length - 1; i >= 0; i--)
{
closure[i] = (IStrongBox)frame.Pop();
}
}
else
{
closure = null;
}
Delegate d = _creator.CreateDelegate(closure);
frame.Push(d);
return 1;
}
}
internal sealed class TypeIsInstruction : Instruction
{
private readonly Type _type;
internal TypeIsInstruction(Type type)
{
_type = type;
}
public override int ConsumedStack => 1;
public override int ProducedStack => 1;
public override string InstructionName => "TypeIs";
public override int Run(InterpretedFrame frame)
{
frame.Push(_type.IsInstanceOfType(frame.Pop()));
return 1;
}
public override string ToString() => "TypeIs " + _type.ToString();
}
internal sealed class TypeAsInstruction : Instruction
{
private readonly Type _type;
internal TypeAsInstruction(Type type)
{
_type = type;
}
public override int ConsumedStack => 1;
public override int ProducedStack => 1;
public override string InstructionName => "TypeAs";
public override int Run(InterpretedFrame frame)
{
object value = frame.Pop();
if (_type.IsInstanceOfType(value))
{
frame.Push(value);
}
else
{
frame.Push(null);
}
return 1;
}
public override string ToString() => "TypeAs " + _type.ToString();
}
internal sealed class TypeEqualsInstruction : Instruction
{
public static readonly TypeEqualsInstruction Instance = new TypeEqualsInstruction();
public override int ConsumedStack => 2;
public override int ProducedStack => 1;
public override string InstructionName => "TypeEquals";
private TypeEqualsInstruction() { }
public override int Run(InterpretedFrame frame)
{
object type = frame.Pop();
object obj = frame.Pop();
frame.Push((object)obj?.GetType() == type);
return 1;
}
}
internal sealed class NullableTypeEqualsInstruction : Instruction
{
public static readonly NullableTypeEqualsInstruction Instance = new NullableTypeEqualsInstruction();
public override int ConsumedStack => 2;
public override int ProducedStack => 1;
public override string InstructionName => "NullableTypeEquals";
private NullableTypeEqualsInstruction() { }
public override int Run(InterpretedFrame frame)
{
object type = frame.Pop();
object obj = frame.Pop();
frame.Push((object)obj?.GetType() == type);
return 1;
}
}
internal abstract class NullableMethodCallInstruction : Instruction
{
private static NullableMethodCallInstruction s_hasValue, s_value, s_equals, s_getHashCode, s_getValueOrDefault1, s_toString;
public override int ConsumedStack => 1;
public override int ProducedStack => 1;
public override string InstructionName => "NullableMethod";
private NullableMethodCallInstruction() { }
private sealed class HasValue : NullableMethodCallInstruction
{
public override int Run(InterpretedFrame frame)
{
object obj = frame.Pop();
frame.Push(obj != null);
return 1;
}
}
private sealed class GetValue : NullableMethodCallInstruction
{
public override int Run(InterpretedFrame frame)
{
if (frame.Peek() == null)
{
frame.Pop();
throw new InvalidOperationException();
}
return 1;
}
}
private sealed class GetValueOrDefault : NullableMethodCallInstruction
{
private readonly Type defaultValueType;
public GetValueOrDefault(MethodInfo mi)
{
defaultValueType = mi.ReturnType;
}
public override int Run(InterpretedFrame frame)
{
if (frame.Peek() == null)
{
frame.Pop();
frame.Push(Activator.CreateInstance(defaultValueType));
}
return 1;
}
}
private sealed class GetValueOrDefault1 : NullableMethodCallInstruction
{
public override int ConsumedStack => 2;
public override int Run(InterpretedFrame frame)
{
object dflt = frame.Pop();
object obj = frame.Pop();
frame.Push(obj ?? dflt);
return 1;
}
}
private sealed class EqualsClass : NullableMethodCallInstruction
{
public override int ConsumedStack => 2;
public override int Run(InterpretedFrame frame)
{
object other = frame.Pop();
object obj = frame.Pop();
if (obj == null)
{
frame.Push(other == null);
}
else if (other == null)
{
frame.Push(Utils.BoxedFalse);
}
else
{
frame.Push(obj.Equals(other));
}
return 1;
}
}
private sealed class ToStringClass : NullableMethodCallInstruction
{
public override int Run(InterpretedFrame frame)
{
object obj = frame.Pop();
if (obj == null)
{
frame.Push("");
}
else
{
frame.Push(obj.ToString());
}
return 1;
}
}
private sealed class GetHashCodeClass : NullableMethodCallInstruction
{
public override int Run(InterpretedFrame frame)
{
object obj = frame.Pop();
if (obj == null)
{
frame.Push(0);
}
else
{
frame.Push(obj.GetHashCode());
}
return 1;
}
}
public static Instruction Create(string method, int argCount, MethodInfo mi)
{
switch (method)
{
case "get_HasValue": return s_hasValue ?? (s_hasValue = new HasValue());
case "get_Value": return s_value ?? (s_value = new GetValue());
case "Equals": return s_equals ?? (s_equals = new EqualsClass());
case "GetHashCode": return s_getHashCode ?? (s_getHashCode = new GetHashCodeClass());
case "GetValueOrDefault":
if (argCount == 0)
{
return new GetValueOrDefault(mi);
}
else
{
return s_getValueOrDefault1 ?? (s_getValueOrDefault1 = new GetValueOrDefault1());
}
case "ToString": return s_toString ?? (s_toString = new ToStringClass());
default:
// System.Nullable doesn't have other instance methods
throw ContractUtils.Unreachable;
}
}
public static Instruction CreateGetValue()
{
return s_value ?? (s_value = new GetValue());
}
}
internal abstract class CastInstruction : Instruction
{
private static CastInstruction s_Boolean, s_Byte, s_Char, s_DateTime, s_Decimal, s_Double, s_Int16, s_Int32, s_Int64, s_SByte, s_Single, s_String, s_UInt16, s_UInt32, s_UInt64;
public override int ConsumedStack => 1;
public override int ProducedStack => 1;
public override string InstructionName => "Cast";
private sealed class CastInstructionT<T> : CastInstruction
{
public override int Run(InterpretedFrame frame)
{
object value = frame.Pop();
frame.Push((T)value);
return 1;
}
}
private abstract class CastInstructionNoT : CastInstruction
{
private readonly Type _t;
protected CastInstructionNoT(Type t)
{
_t = t;
}
public new static CastInstruction Create(Type t)
{
if (t.GetTypeInfo().IsValueType && !t.IsNullableType())
{
return new Value(t);
}
else
{
return new Ref(t);
}
}
public override int Run(InterpretedFrame frame)
{
object value = frame.Pop();
if (value != null)
{
Type valueType = value.GetType();
if (!valueType.HasReferenceConversionTo(_t) &&
!valueType.HasIdentityPrimitiveOrNullableConversionTo(_t))
{
throw new InvalidCastException();
}
if (!_t.IsAssignableFrom(valueType))
{
throw new InvalidCastException();
}
frame.Push(value);
}
else
{
ConvertNull(frame);
}
return 1;
}
protected abstract void ConvertNull(InterpretedFrame frame);
private sealed class Ref : CastInstructionNoT
{
public Ref(Type t)
: base(t)
{
}
protected override void ConvertNull(InterpretedFrame frame)
{
frame.Push(null);
}
}
private sealed class Value : CastInstructionNoT
{
public Value(Type t)
: base(t)
{
}
protected override void ConvertNull(InterpretedFrame frame)
{
throw new NullReferenceException();
}
}
}
public static Instruction Create(Type t)
{
Debug.Assert(!t.GetTypeInfo().IsEnum);
switch (t.GetTypeCode())
{
case TypeCode.Boolean: return s_Boolean ?? (s_Boolean = new CastInstructionT<bool>());
case TypeCode.Byte: return s_Byte ?? (s_Byte = new CastInstructionT<byte>());
case TypeCode.Char: return s_Char ?? (s_Char = new CastInstructionT<char>());
case TypeCode.DateTime: return s_DateTime ?? (s_DateTime = new CastInstructionT<DateTime>());
case TypeCode.Decimal: return s_Decimal ?? (s_Decimal = new CastInstructionT<decimal>());
case TypeCode.Double: return s_Double ?? (s_Double = new CastInstructionT<double>());
case TypeCode.Int16: return s_Int16 ?? (s_Int16 = new CastInstructionT<short>());
case TypeCode.Int32: return s_Int32 ?? (s_Int32 = new CastInstructionT<int>());
case TypeCode.Int64: return s_Int64 ?? (s_Int64 = new CastInstructionT<long>());
case TypeCode.SByte: return s_SByte ?? (s_SByte = new CastInstructionT<sbyte>());
case TypeCode.Single: return s_Single ?? (s_Single = new CastInstructionT<float>());
case TypeCode.String: return s_String ?? (s_String = new CastInstructionT<string>());
case TypeCode.UInt16: return s_UInt16 ?? (s_UInt16 = new CastInstructionT<ushort>());
case TypeCode.UInt32: return s_UInt32 ?? (s_UInt32 = new CastInstructionT<uint>());
case TypeCode.UInt64: return s_UInt64 ?? (s_UInt64 = new CastInstructionT<ulong>());
}
return CastInstructionNoT.Create(t);
}
}
internal sealed class CastToEnumInstruction : CastInstruction
{
private readonly Type _t;
public CastToEnumInstruction(Type t)
{
Debug.Assert(t.GetTypeInfo().IsEnum);
_t = t;
}
public override int Run(InterpretedFrame frame)
{
object from = frame.Pop();
Debug.Assert(
new[]
{
TypeCode.Empty, TypeCode.Int32, TypeCode.SByte, TypeCode.Int16, TypeCode.Int64, TypeCode.UInt32,
TypeCode.Byte, TypeCode.UInt16, TypeCode.UInt64, TypeCode.Char, TypeCode.Boolean
}.Contains(Convert.GetTypeCode(from)));
frame.Push(from == null ? null : Enum.ToObject(_t, from));
return 1;
}
}
internal sealed class CastReferenceToEnumInstruction : CastInstruction
{
private readonly Type _t;
public CastReferenceToEnumInstruction(Type t)
{
Debug.Assert(t.GetTypeInfo().IsEnum);
_t = t;
}
public override int Run(InterpretedFrame frame)
{
object from = frame.Pop();
Debug.Assert(from != null);
Type underlying = Enum.GetUnderlyingType(_t);
// If from is neither a T nor a type assignable to T (viz. an T-backed enum)
// this will cause an InvalidCastException, which is what this operation should
// throw in this case.
switch (underlying.GetTypeCode())
{
case TypeCode.Int32:
frame.Push(Enum.ToObject(_t, (int)from));
break;
case TypeCode.Int64:
frame.Push(Enum.ToObject(_t, (long)from));
break;
case TypeCode.UInt32:
frame.Push(Enum.ToObject(_t, (uint)from));
break;
case TypeCode.UInt64:
frame.Push(Enum.ToObject(_t, (ulong)from));
break;
case TypeCode.Byte:
frame.Push(Enum.ToObject(_t, (byte)from));
break;
case TypeCode.SByte:
frame.Push(Enum.ToObject(_t, (sbyte)from));
break;
case TypeCode.Int16:
frame.Push(Enum.ToObject(_t, (short)from));
break;
case TypeCode.UInt16:
frame.Push(Enum.ToObject(_t, (ushort)from));
break;
case TypeCode.Char:
// Disallowed in C#, but allowed in CIL
frame.Push(Enum.ToObject(_t, (char)from));
break;
default:
// Only remaining possible type.
// Disallowed in C#, but allowed in CIL
Debug.Assert(underlying == typeof(bool));
frame.Push(Enum.ToObject(_t, (bool)from));
break;
}
return 1;
}
}
internal sealed class QuoteInstruction : Instruction
{
private readonly Expression _operand;
private readonly Dictionary<ParameterExpression, LocalVariable> _hoistedVariables;
public QuoteInstruction(Expression operand, Dictionary<ParameterExpression, LocalVariable> hoistedVariables)
{
_operand = operand;
_hoistedVariables = hoistedVariables;
}
public override int ConsumedStack => 0;
public override int ProducedStack => 1;
public override string InstructionName => "Quote";
public override int Run(InterpretedFrame frame)
{
Expression operand = _operand;
if (_hoistedVariables != null)
{
operand = new ExpressionQuoter(_hoistedVariables, frame).Visit(operand);
}
frame.Push(operand);
return 1;
}
// Modifies a quoted Expression instance by changing hoisted variables and
// parameters into hoisted local references. The variable's StrongBox is
// burned as a constant, and all hoisted variables/parameters are rewritten
// as indexing expressions.
//
// The behavior of Quote is intended to be like C# and VB expression quoting
private sealed class ExpressionQuoter : ExpressionVisitor
{
private readonly Dictionary<ParameterExpression, LocalVariable> _variables;
private readonly InterpretedFrame _frame;
// A stack of variables that are defined in nested scopes. We search
// this first when resolving a variable in case a nested scope shadows
// one of our variable instances.
private readonly Stack<HashSet<ParameterExpression>> _shadowedVars = new Stack<HashSet<ParameterExpression>>();
internal ExpressionQuoter(Dictionary<ParameterExpression, LocalVariable> hoistedVariables, InterpretedFrame frame)
{
_variables = hoistedVariables;
_frame = frame;
}
protected internal override Expression VisitLambda<T>(Expression<T> node)
{
if (node.ParameterCount > 0)
{
var parameters = new HashSet<ParameterExpression>();
for (int i = 0, n = node.ParameterCount; i < n; i++)
{
parameters.Add(node.GetParameter(i));
}
_shadowedVars.Push(parameters);
}
Expression b = Visit(node.Body);
if (node.ParameterCount > 0)
{
_shadowedVars.Pop();
}
if (b == node.Body)
{
return node;
}
return node.Rewrite(b, parameters: null);
}
protected internal override Expression VisitBlock(BlockExpression node)
{
if (node.Variables.Count > 0)
{
_shadowedVars.Push(new HashSet<ParameterExpression>(node.Variables));
}
Expression[] b = ExpressionVisitorUtils.VisitBlockExpressions(this, node);
if (node.Variables.Count > 0)
{
_shadowedVars.Pop();
}
if (b == null)
{
return node;
}
return node.Rewrite(node.Variables, b);
}
protected override CatchBlock VisitCatchBlock(CatchBlock node)
{
if (node.Variable != null)
{
_shadowedVars.Push(new HashSet<ParameterExpression> { node.Variable });
}
Expression b = Visit(node.Body);
Expression f = Visit(node.Filter);
if (node.Variable != null)
{
_shadowedVars.Pop();
}
if (b == node.Body && f == node.Filter)
{
return node;
}
return Expression.MakeCatchBlock(node.Test, node.Variable, b, f);
}
protected internal override Expression VisitRuntimeVariables(RuntimeVariablesExpression node)
{
int count = node.Variables.Count;
var boxes = new List<IStrongBox>();
var vars = new List<ParameterExpression>();
var indexes = new int[count];
for (int i = 0; i < count; i++)
{
IStrongBox box = GetBox(node.Variables[i]);
if (box == null)
{
indexes[i] = vars.Count;
vars.Add(node.Variables[i]);
}
else
{
indexes[i] = -1 - boxes.Count;
boxes.Add(box);
}
}
// No variables were rewritten. Just return the original node.
if (boxes.Count == 0)
{
return node;
}
ConstantExpression boxesConst = Expression.Constant(new RuntimeOps.RuntimeVariables(boxes.ToArray()), typeof(IRuntimeVariables));
// All of them were rewritten. Just return the array as a constant
if (vars.Count == 0)
{
return boxesConst;
}
// Otherwise, we need to return an object that merges them.
return Expression.Invoke(
Expression.Constant(new Func<IRuntimeVariables, IRuntimeVariables, int[], IRuntimeVariables>(MergeRuntimeVariables)),
Expression.RuntimeVariables(new TrueReadOnlyCollection<ParameterExpression>(vars.ToArray())),
boxesConst,
Expression.Constant(indexes)
);
}
private static IRuntimeVariables MergeRuntimeVariables(IRuntimeVariables first, IRuntimeVariables second, int[] indexes)
{
return new RuntimeOps.MergedRuntimeVariables(first, second, indexes);
}
protected internal override Expression VisitParameter(ParameterExpression node)
{
IStrongBox box = GetBox(node);
if (box == null)
{
return node;
}
return Expression.Convert(Expression.Field(Expression.Constant(box), "Value"), node.Type);
}
private IStrongBox GetBox(ParameterExpression variable)
{
LocalVariable var;
if (_variables.TryGetValue(variable, out var))
{
if (var.InClosure)
{
return _frame.Closure[var.Index];
}
else
{
return (IStrongBox)_frame.Data[var.Index];
}
}
return null;
}
}
}
}
| 34.885174 | 184 | 0.510395 | [
"MIT"
] | FrancisFYK/corefx | src/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/TypeOperations.cs | 24,001 | C# |
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
// Template Source: Templates\CSharp\Requests\EntityCollectionPage.cs.tt
namespace Microsoft.Graph
{
using System;
/// <summary>
/// The type ManagedDeviceMobileAppConfigurationAssignmentsCollectionPage.
/// </summary>
public partial class ManagedDeviceMobileAppConfigurationAssignmentsCollectionPage : CollectionPage<ManagedDeviceMobileAppConfigurationAssignment>, IManagedDeviceMobileAppConfigurationAssignmentsCollectionPage
{
/// <summary>
/// Gets the next page <see cref="IManagedDeviceMobileAppConfigurationAssignmentsCollectionRequest"/> instance.
/// </summary>
public IManagedDeviceMobileAppConfigurationAssignmentsCollectionRequest NextPageRequest { get; private set; }
/// <summary>
/// Initializes the NextPageRequest property.
/// </summary>
public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString)
{
if (!string.IsNullOrEmpty(nextPageLinkString))
{
this.NextPageRequest = new ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequest(
nextPageLinkString,
client,
null);
}
}
}
}
| 43.5 | 212 | 0.629159 | [
"MIT"
] | AzureMentor/msgraph-sdk-dotnet | src/Microsoft.Graph/Requests/Generated/ManagedDeviceMobileAppConfigurationAssignmentsCollectionPage.cs | 1,653 | C# |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.Applications.Events;
namespace Microsoft.Quantum.Telemetry.Commands
{
public class LogEventCommand : CommandBase
{
public LogEventCommand(EventProperties? eventProperties = null)
: base(CommandType.LogEvent, eventProperties ?? new EventProperties())
{
}
public new EventProperties Args
{
get => (EventProperties)base.Args!;
}
public override bool Equals(object? obj)
{
if (obj is LogEventCommand logEventCommand)
{
if ((logEventCommand.Args.Name != this.Args.Name)
|| (logEventCommand.Args.PiiProperties.Count != this.Args.PiiProperties.Count)
|| (logEventCommand.Args.Properties.Count != this.Args.Properties.Count))
{
return false;
}
foreach (var property in this.Args.Properties)
{
var isPii = this.Args.PiiProperties.ContainsKey(property.Key);
if (!logEventCommand.Args.Properties.TryGetValue(property.Key, out var value)
|| !object.Equals(value, property.Value)
|| (isPii && !logEventCommand.Args.PiiProperties.ContainsKey(property.Key)))
{
return false;
}
}
return true;
}
return false;
}
public override int GetHashCode() =>
this.CommandType.GetHashCode() ^ this.Args.Name.GetHashCode();
public override void Process(ICommandProcessor server) =>
server.ProcessCommand(this);
}
}
| 32.836364 | 100 | 0.549834 | [
"MIT"
] | ScriptBox99/qsharp-compiler | src/Telemetry/Library/Commands/LogEventCommand.cs | 1,806 | C# |
using System;
using System.Collections.Generic;
/// <summary>
/// https://leetcode.com/explore/learn/card/data-structure-tree/17/solve-problems-recursively/537/
/// </summary>
namespace Amazon.Core.LeetCode.Explore.BinaryTree.PathSum
{
class Main
{
public static void Run()
{
var rootNodeA = new TreeNode(5)
{
left = new TreeNode(4)
{
left = new TreeNode(11)
{
left = new TreeNode(7),
right = new TreeNode(2)
},
},
right = new TreeNode(8)
{
left = new TreeNode(13),
right = new TreeNode(4)
{
right = new TreeNode(1)
}
}
};
var rootNodeB = new TreeNode(1)
{
left = new TreeNode(2)
};
var rootNodeC = new TreeNode(1);
var solution = new Solution();
var hasPathSum = solution.HasPathSum(rootNodeA, 22);
Console.WriteLine(hasPathSum);
hasPathSum = solution.HasPathSum(rootNodeB, 1);
Console.WriteLine(hasPathSum);
hasPathSum = solution.HasPathSum(rootNodeC, 1);
Console.WriteLine(hasPathSum);
Console.ReadKey();
}
}
public class Solution
{
bool hasPathSum = false;
int sum = 0;
public bool HasPathSum(TreeNode root, int sum)
{
this.hasPathSum = false;
this.sum = sum;
Visit(root);
return hasPathSum;
}
private void Visit(TreeNode node, int currentSum = 0)
{
if (node == null || hasPathSum) return;
currentSum += node.val;
if (node.left == null & node.right == null && currentSum == sum)
hasPathSum = true;
Visit(node.left, currentSum);
Visit(node.right, currentSum);
}
}
public class TreeNode
{
public int val;
public TreeNode left;
public TreeNode right;
public TreeNode(int x) { val = x; }
}
}
| 25.466667 | 98 | 0.470332 | [
"MIT"
] | coni2k/Amazon | Amazon.Core/LeetCode/Explore/BinaryTree/PathSum.cs | 2,294 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Microsoft.MixedReality.WorldLocking.Core
{
/// <summary>
/// Fragment class is a container for attachment points in the same WorldLocking Fragment.
/// It manages their update and adjustment, including merging in the attachment points from
/// another fragment.
/// </summary>
public class Fragment
{
private readonly FragmentId fragmentId;
private readonly List<AttachmentPoint> attachmentList = new List<AttachmentPoint>();
private AdjustStateDelegate updateStateAllAttachments;
public FragmentId FragmentId { get { return fragmentId; } }
public AttachmentPointStateType State { get; private set; }
public Fragment(FragmentId fragmentId)
{
this.fragmentId = fragmentId;
}
/// <summary>
/// Add an existing attachment point to this fragment.
/// </summary>
/// <remarks>
/// The attachment point might currently belong to another fragment, if
/// it is being moved from the other to this.
/// Since this is only used internally, it operates directly on an AttachmentPoint
/// rather than an interface to avoid an unnecessary downcast.
/// </remarks>
/// <param name="attachPoint"></param>
public void AddAttachmentPoint(AttachmentPoint attachPoint)
{
if (attachPoint != null)
{
if (attachPoint.StateHandler != null)
{
updateStateAllAttachments += attachPoint.StateHandler;
}
attachPoint.HandleStateChange(State);
attachmentList.Add(attachPoint);
}
}
/// <summary>
/// Notify system attachment point is no longer needed. See <see cref="IAttachmentPointManager.ReleaseAttachmentPoint"/>
/// </summary>
/// <param name="attachmentPoint"></param>
public void ReleaseAttachmentPoint(IAttachmentPoint attachmentPoint)
{
AttachmentPoint attachPoint = attachmentPoint as AttachmentPoint;
if (attachPoint != null)
{
if (attachPoint.StateHandler != null)
{
updateStateAllAttachments -= attachPoint.StateHandler;
}
attachPoint.HandleStateChange(AttachmentPointStateType.Released);
attachmentList.Remove(attachPoint);
}
else
{
Debug.LogError("On release, IAttachmentPoint isn't AttachmentPoint");
}
}
/// <summary>
/// Release all resources for this fragment.
/// </summary>
public void ReleaseAll()
{
updateStateAllAttachments = null;
attachmentList.Clear();
}
/// <summary>
/// Absorb the contents of another fragment, emptying it.
/// </summary>
/// <param name="other">The fragment to lose all its contents to this.</param>
public void AbsorbOtherFragment(Fragment other)
{
Debug.Assert(other != this, $"Trying to merge to and from the same fragment {FragmentId}");
int otherCount = other.attachmentList.Count;
for (int i = 0; i < otherCount; ++i)
{
AttachmentPoint att = other.attachmentList[i];
att.Set(FragmentId, att.CachedPosition, att.AnchorId, att.LocationFromAnchor);
if (att.StateHandler != null)
{
updateStateAllAttachments += att.StateHandler;
}
att.HandleStateChange(State);
attachmentList.Add(att);
}
other.ReleaseAll();
}
/// <summary>
/// Absorb the contents of another fragment, emptying it, and applying an adjustment transform.
/// </summary>
/// <param name="other">The fragment to lose all its contents to this.</param>
/// <param name="adjustment">Pose adjustment to apply to contents of other on transition.</param>
public void AbsorbOtherFragment(Fragment other, Pose adjustment)
{
Debug.Assert(other != this, $"Trying to merge to and from the same fragment {FragmentId}");
int otherCount = other.attachmentList.Count;
for (int i = 0; i < otherCount; ++i)
{
AttachmentPoint att = other.attachmentList[i];
att.Set(FragmentId, att.CachedPosition, att.AnchorId, att.LocationFromAnchor);
att.HandlePoseAdjustment(adjustment);
if (att.StateHandler != null)
{
updateStateAllAttachments += att.StateHandler;
}
att.HandleStateChange(State);
attachmentList.Add(att);
}
other.ReleaseAll();
}
/// <summary>
/// Set the state of the contents of this fragment.
/// </summary>
/// <param name="attachmentState">New state</param>
public void UpdateState(AttachmentPointStateType attachmentState)
{
if (State != attachmentState)
{
State = attachmentState;
updateStateAllAttachments?.Invoke(attachmentState);
}
}
/// <summary>
/// Run through all attachment points, get their adjustments from the plugin and apply them.
/// </summary>
/// <remarks>
/// This must be called between plugin.Refreeze() and plugin.RefreezeFinish().
/// </remarks>
public void AdjustAll(Plugin plugin)
{
int count = attachmentList.Count;
for (int i = 0; i < count; ++i)
{
AttachmentPoint attach = attachmentList[i];
AnchorId newAnchorId;
Vector3 newLocationFromAnchor;
Pose adjustment;
if (plugin.ComputeAttachmentPointAdjustment(attach.AnchorId, attach.LocationFromAnchor,
out newAnchorId, out newLocationFromAnchor, out adjustment))
{
attach.Set(FragmentId, attach.CachedPosition, newAnchorId, newLocationFromAnchor);
attach.HandlePoseAdjustment(adjustment);
}
else
{
Debug.Log($"No adjustment during refreeze for {attach.AnchorId.ToString()}");
}
}
}
}
}
| 37.994413 | 128 | 0.57271 | [
"MIT"
] | Bhaskers-Blu-Org2/MixedReality-WorldLockingTools-Unity | Assets/WorldLocking.Core/Scripts/Fragment.cs | 6,803 | C# |
namespace Bum.EventGrid.Subscriptions.Annotations
{
public class WebhookSubscriptionAttribute : SubscriptionAttribute
{
/// <summary>
/// The fully qualified webhook url. For azure functions it should be https://function host/runtime/webhooks/eventgrid?functionname=name of the function
/// </summary>
public string Endpoint { get; set; }
}
} | 38.7 | 160 | 0.69509 | [
"MIT"
] | Badabum/Bum.EventGrid.Subscriptions | Bum.EventGrid.Subscriptions.Annotations/WebhookSubscriptionAttribute.cs | 389 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YuGiOh.Bot.Models;
namespace YuGiOh.Bot.Services.Interfaces
{
public interface IGuildConfigDbService
{
Task<GuildConfig> GetGuildConfigAsync(ulong id);
Task InsertGuildConfigAsync(GuildConfig guildConfig);
Task UpdateGuildConfigAsync(GuildConfig guildConfig);
Task<bool> GuildConfigDoesExistAsync(ulong id);
}
}
| 24.1 | 61 | 0.755187 | [
"MIT"
] | MeLikeChoco/YuGiOhBot | YuGiOh.Bot/Services/Interfaces/IGuildConfigDbService.cs | 484 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// O código foi gerado por uma ferramenta.
// Versão de Tempo de Execução:4.0.30319.42000
//
// As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
// o código for gerado novamente.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("BibliotecaGames")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("BibliotecaGames")]
[assembly: System.Reflection.AssemblyTitleAttribute("BibliotecaGames")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Gerado pela classe WriteCodeFragment do MSBuild.
| 42.958333 | 90 | 0.661494 | [
"Apache-2.0"
] | MateusGonc/Primeiro-AspNet | BibliotecaGames/obj/Debug/netcoreapp3.1/BibliotecaGames.AssemblyInfo.cs | 1,040 | C# |
using JetBrains.Annotations;
namespace Lykke.Bil2.Client.BlocksReader.Services
{
/// <summary>
/// Factory of the blockchain integration blocks reader API instance for the particular blockchain integration.
/// </summary>
[PublicAPI]
public interface IBlocksReaderApiFactory
{
/// <summary>
/// Creates the blockchain integration blocks reader API instance for the particular blockchain integration.
/// </summary>
IBlocksReaderApi Create(string integrationName);
}
}
| 31.176471 | 116 | 0.7 | [
"MIT"
] | LykkeCity/Lykke.Bil2.Sdk | src/Lykke.Bil2.Client.BlocksReader/Services/IBlocksReaderApiFactory.cs | 532 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.ComponentModel.Composition.Diagnostics;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using System.ComponentModel.Composition.ReflectionModel;
using System.Linq;
using System.Reflection;
using System.Threading;
using Microsoft.Internal;
namespace System.ComponentModel.Composition.AttributedModel
{
internal class AttributedPartCreationInfo : IReflectionPartCreationInfo
{
private readonly Type _type;
private readonly bool _ignoreConstructorImports = false;
private readonly ICompositionElement _origin;
private PartCreationPolicyAttribute _partCreationPolicy = null;
private ConstructorInfo _constructor;
private IEnumerable<ExportDefinition> _exports;
private IEnumerable<ImportDefinition> _imports;
private HashSet<string> _contractNamesOnNonInterfaces;
public AttributedPartCreationInfo(Type type, PartCreationPolicyAttribute partCreationPolicy, bool ignoreConstructorImports, ICompositionElement origin)
{
Assumes.NotNull(type);
_type = type;
_ignoreConstructorImports = ignoreConstructorImports;
_partCreationPolicy = partCreationPolicy;
_origin = origin;
}
public Type GetPartType()
{
return _type;
}
public Lazy<Type> GetLazyPartType()
{
return new Lazy<Type>(GetPartType, LazyThreadSafetyMode.PublicationOnly);
}
public ConstructorInfo GetConstructor()
{
if (_constructor == null && !_ignoreConstructorImports)
{
_constructor = SelectPartConstructor(_type);
}
return _constructor;
}
public IDictionary<string, object> GetMetadata()
{
return _type.GetPartMetadataForType(CreationPolicy);
}
public IEnumerable<ExportDefinition> GetExports()
{
DiscoverExportsAndImports();
return _exports;
}
public IEnumerable<ImportDefinition> GetImports()
{
DiscoverExportsAndImports();
return _imports;
}
public bool IsDisposalRequired
{
get
{
return typeof(IDisposable).IsAssignableFrom(GetPartType());
}
}
public bool IsIdentityComparison
{
get
{
return true;
}
}
public bool IsPartDiscoverable()
{
// The part should not be marked with the "NonDiscoverable"
if (_type.IsAttributeDefined<PartNotDiscoverableAttribute>())
{
CompositionTrace.DefinitionMarkedWithPartNotDiscoverableAttribute(_type);
return false;
}
// The part should have exports
if (!HasExports())
{
CompositionTrace.DefinitionContainsNoExports(_type);
return false;
}
// If the part is generic, all exports should have the same number of generic parameters
// (otherwise we have no way to specialize the part based on an export)
if (!AllExportsHaveMatchingArity())
{
// The function has already reported all violations via tracing
return false;
}
return true;
}
private bool HasExports()
{
return GetExportMembers(_type).Any() ||
GetInheritedExports(_type).Any();
}
private bool AllExportsHaveMatchingArity()
{
bool isArityMatched = true;
if (_type.ContainsGenericParameters)
{
int partGenericArity = _type.GetPureGenericArity();
// each member should have the same arity
foreach (MemberInfo member in GetExportMembers(_type).Concat(GetInheritedExports(_type)))
{
if (member.MemberType == MemberTypes.Method)
{
// open generics are unsupported on methods
if (((MethodInfo)member).ContainsGenericParameters)
{
isArityMatched = false;
CompositionTrace.DefinitionMismatchedExportArity(_type, member);
continue;
}
}
if (member.GetDefaultTypeFromMember().GetPureGenericArity() != partGenericArity)
{
isArityMatched = false;
CompositionTrace.DefinitionMismatchedExportArity(_type, member);
}
}
}
return isArityMatched;
}
string ICompositionElement.DisplayName
{
get { return GetDisplayName(); }
}
ICompositionElement ICompositionElement.Origin
{
get { return _origin; }
}
public override string ToString()
{
return GetDisplayName();
}
private string GetDisplayName()
{
return GetPartType().GetDisplayName();
}
private CreationPolicy CreationPolicy
{
get
{
if (_partCreationPolicy == null)
{
_partCreationPolicy = _type.GetFirstAttribute<PartCreationPolicyAttribute>() ?? PartCreationPolicyAttribute.Default;
}
return _partCreationPolicy.CreationPolicy;
}
}
private static ConstructorInfo SelectPartConstructor(Type type)
{
Assumes.NotNull(type);
if (type.IsAbstract)
{
return null;
}
// Only deal with non-static constructors
BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
ConstructorInfo[] constructors = type.GetConstructors(flags);
// Should likely only happen for static or abstract types
if (constructors.Length == 0)
{
return null;
}
// Optimize single default constructor.
if (constructors.Length == 1 && constructors[0].GetParameters().Length == 0)
{
return constructors[0];
}
// Select the marked constructor if there is exactly one marked
ConstructorInfo importingConstructor = null;
ConstructorInfo defaultConstructor = null;
foreach (ConstructorInfo constructor in constructors)
{
// an importing constructor found
if (constructor.IsAttributeDefined<ImportingConstructorAttribute>())
{
if (importingConstructor != null)
{
// more that one importing constructor - return null ot error out on creation
return null;
}
else
{
importingConstructor = constructor;
}
}
// otherwise if we havent seen the default constructor yet, check if this one is it
else if (defaultConstructor == null)
{
if (constructor.GetParameters().Length == 0)
{
defaultConstructor = constructor;
}
}
}
return importingConstructor ?? defaultConstructor;
}
private void DiscoverExportsAndImports()
{
// NOTE : in most cases both of these will be null or not null at the same time
// the only situation when that is not the case is when there was a failure during the previous discovery
// and one of them ended up not being set. In that case we will force the discovery again so that the same exception is thrown.
if ((_exports != null) && (_imports != null))
{
return;
}
_exports = GetExportDefinitions();
_imports = GetImportDefinitions();
}
private IEnumerable<ExportDefinition> GetExportDefinitions()
{
List<ExportDefinition> exports = new List<ExportDefinition>();
_contractNamesOnNonInterfaces = new HashSet<string>();
// GetExportMembers should only contain the type itself along with the members declared on it,
// it should not contain any base types, members on base types or interfaces on the type.
foreach (MemberInfo member in GetExportMembers(_type))
{
foreach (ExportAttribute exportAttribute in member.GetAttributes<ExportAttribute>())
{
AttributedExportDefinition attributedExportDefinition = CreateExportDefinition(member, exportAttribute);
if (exportAttribute.GetType() == CompositionServices.InheritedExportAttributeType)
{
// Any InheritedExports on the type itself are contributed during this pass
// and we need to do the book keeping for those.
if (!_contractNamesOnNonInterfaces.Contains(attributedExportDefinition.ContractName))
{
exports.Add(new ReflectionMemberExportDefinition(member.ToLazyMember(), attributedExportDefinition, this));
_contractNamesOnNonInterfaces.Add(attributedExportDefinition.ContractName);
}
}
else
{
exports.Add(new ReflectionMemberExportDefinition(member.ToLazyMember(), attributedExportDefinition, this));
}
}
}
// GetInheritedExports should only contain InheritedExports on base types or interfaces.
// The order of types returned here is important because it is used as a
// priority list of which InhertedExport to choose if multiple exists with
// the same contract name. Therefore ensure that we always return the types
// in the hiearchy from most derived to the lowest base type, followed
// by all the interfaces that this type implements.
foreach (Type type in GetInheritedExports(_type))
{
foreach (InheritedExportAttribute exportAttribute in type.GetAttributes<InheritedExportAttribute>())
{
AttributedExportDefinition attributedExportDefinition = CreateExportDefinition(type, exportAttribute);
if (!_contractNamesOnNonInterfaces.Contains(attributedExportDefinition.ContractName))
{
exports.Add(new ReflectionMemberExportDefinition(type.ToLazyMember(), attributedExportDefinition, this));
if (!type.IsInterface)
{
_contractNamesOnNonInterfaces.Add(attributedExportDefinition.ContractName);
}
}
}
}
_contractNamesOnNonInterfaces = null; // No need to hold this state around any longer
return exports;
}
private AttributedExportDefinition CreateExportDefinition(MemberInfo member, ExportAttribute exportAttribute)
{
string contractName = null;
Type typeIdentityType = null;
member.GetContractInfoFromExport(exportAttribute, out typeIdentityType, out contractName);
return new AttributedExportDefinition(this, member, exportAttribute, typeIdentityType, contractName);
}
private IEnumerable<MemberInfo> GetExportMembers(Type type)
{
BindingFlags flags = BindingFlags.DeclaredOnly | BindingFlags.Public |
BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static;
// If the type is abstract only find local static exports
if (type.IsAbstract)
{
flags &= ~BindingFlags.Instance;
}
else if (IsExport(type))
{
yield return type;
}
// Walk the fields
foreach (FieldInfo member in type.GetFields(flags))
{
if (IsExport(member))
{
yield return member;
}
}
// Walk the properties
foreach (PropertyInfo member in type.GetProperties(flags))
{
if (IsExport(member))
{
yield return member;
}
}
// Walk the methods
foreach (MethodInfo member in type.GetMethods(flags))
{
if (IsExport(member))
{
yield return member;
}
}
}
private IEnumerable<Type> GetInheritedExports(Type type)
{
// If the type is abstract we aren't interested in type level exports
if (type.IsAbstract)
{
yield break;
}
// The order of types returned here is important because it is used as a
// priority list of which InhertedExport to choose if multiple exists with
// the same contract name. Therefore ensure that we always return the types
// in the hiearchy from most derived to the lowest base type, followed
// by all the interfaces that this type implements.
Type currentType = type.BaseType;
if (currentType == null)
{
yield break;
}
// Stopping at object instead of null to help with performance. It is a noticable performance
// gain (~5%) if we don't have to try and pull the attributes we know don't exist on object.
// We also need the null check in case we're passed a type that doesn't live in the runtime context.
while (currentType != null && currentType.UnderlyingSystemType != CompositionServices.ObjectType)
{
if (IsInheritedExport(currentType))
{
yield return currentType;
}
currentType = currentType.BaseType;
}
foreach (Type iface in type.GetInterfaces())
{
if (IsInheritedExport(iface))
{
yield return iface;
}
}
}
private static bool IsExport(ICustomAttributeProvider attributeProvider)
{
return attributeProvider.IsAttributeDefined<ExportAttribute>(false);
}
private static bool IsInheritedExport(ICustomAttributeProvider attributedProvider)
{
return attributedProvider.IsAttributeDefined<InheritedExportAttribute>(false);
}
private IEnumerable<ImportDefinition> GetImportDefinitions()
{
List<ImportDefinition> imports = new List<ImportDefinition>();
foreach (MemberInfo member in GetImportMembers(_type))
{
ReflectionMemberImportDefinition importDefinition = AttributedModelDiscovery.CreateMemberImportDefinition(member, this);
imports.Add(importDefinition);
}
ConstructorInfo constructor = GetConstructor();
if (constructor != null)
{
foreach (ParameterInfo parameter in constructor.GetParameters())
{
ReflectionParameterImportDefinition importDefinition = AttributedModelDiscovery.CreateParameterImportDefinition(parameter, this);
imports.Add(importDefinition);
}
}
return imports;
}
private IEnumerable<MemberInfo> GetImportMembers(Type type)
{
if (type.IsAbstract)
{
yield break;
}
foreach (MemberInfo member in GetDeclaredOnlyImportMembers(type))
{
yield return member;
}
// Walk up the type chain until you hit object.
if (type.BaseType != null)
{
Type baseType = type.BaseType;
// Stopping at object instead of null to help with performance. It is a noticable performance
// gain (~5%) if we don't have to try and pull the attributes we know don't exist on object.
// We also need the null check in case we're passed a type that doesn't live in the runtime context.
while (baseType != null && baseType.UnderlyingSystemType != CompositionServices.ObjectType)
{
foreach (MemberInfo member in GetDeclaredOnlyImportMembers(baseType))
{
yield return member;
}
baseType = baseType.BaseType;
}
}
}
private IEnumerable<MemberInfo> GetDeclaredOnlyImportMembers(Type type)
{
BindingFlags flags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
// Walk the fields
foreach (FieldInfo member in type.GetFields(flags))
{
if (IsImport(member))
{
yield return member;
}
}
// Walk the properties
foreach (PropertyInfo member in type.GetProperties(flags))
{
if (IsImport(member))
{
yield return member;
}
}
}
private static bool IsImport(ICustomAttributeProvider attributeProvider)
{
return attributeProvider.IsAttributeDefined<IAttributedImport>(false);
}
}
}
| 36.903353 | 159 | 0.560502 | [
"MIT"
] | edenlee1212/corefx | src/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs | 18,710 | C# |
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Configuration;
using System.Linq;
using System.Text;
using System.IO;
using BarRaider.SdTools;
using Microsoft.Win32;
using p4ktest;
using TheUser = p4ktest.SC.TheUser;
//using SCJMapper_V2.Translation;
namespace SCJMapper_V2.SC
{
/// <summary>
/// Find the SC pathes and folders
/// </summary>
class SCPath
{
/// <summary>
/// Try to locate the launcher from Alpha 3.0.0 public - e.g. E:\G\StarCitizen\RSI Launcher
/// Alpha 3.6.0 PTU launcher 1.2.0 has the same entry (but PTU location changed)
/// </summary>
static private string SCLauncherDir6
{
get
{
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCLauncherDir6 - Entry");
RegistryKey localKey;
if (Environment.Is64BitOperatingSystem)
localKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
else
localKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32);
string scLauncher = localKey.OpenSubKey(@"SOFTWARE\81bfc699-f883-50c7-b674-2483b6baae23")
.GetValue("InstallLocation").ToString();
if (scLauncher != null)
{
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCLauncherDir6 - Found HKLM -InstallLocation");
if (Directory.Exists(scLauncher))
{
return scLauncher;
}
else
{
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCLauncherDir6 - directory does not exist: {0}", scLauncher);
return "";
}
}
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCLauncherDir6 - did not found HKLM - InstallLocation");
return "";
}
}
/// <summary>
/// Try to locate the launcher from Alpha 3.0.0 PTU - e.g. E:\G\StarCitizen\RSI PTU Launcher
/// </summary>
static private string SCLauncherDir5
{
get
{
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCLauncherDir5 - Entry");
RegistryKey localKey;
if (Environment.Is64BitOperatingSystem)
localKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
else
localKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32);
string scLauncher = localKey.OpenSubKey(@"SOFTWARE\94a6df8a-d3f9-558d-bb04-097c192530b9")
.GetValue("InstallLocation").ToString();
if (scLauncher != null)
{
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCLauncherDir5 - Found HKLM -InstallLocation (PTU)");
if (Directory.Exists(scLauncher))
{
return scLauncher;
}
else
{
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCLauncherDir5 - directory does not exist: {0}", scLauncher);
return "";
}
}
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCLauncherDir5 - did not found HKLM - InstallLocation");
return "";
}
}
/// <summary>
/// Returns the base SC install path from something like "E:\G\StarCitizen"
/// </summary>
static private string SCBasePath
{
get
{
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCBasePath - Entry");
string scp = "";
// start the registry search - sequence 5..1 to get the newest method first
scp = SCLauncherDir6; // 3.0 Public Launcher
#if DEBUG
//***************************************
//scp = ""; // TEST not found (COMMENT OUT FOR PRODUCTIVE BUILD)
//***************************************
#endif
if (!string.IsNullOrEmpty(scp))
{
scp = Path.GetDirectoryName(scp); // "E:\G\StarCitizen"
return scp;
}
scp = SCLauncherDir5; // 3.0 PTU Launcher
#if DEBUG
//***************************************
//scp = ""; // TEST not found (COMMENT OUT FOR PRODUCTIVE BUILD)
//***************************************
#endif
if (!string.IsNullOrEmpty(scp))
{
scp = Path.GetDirectoryName(scp); // "E:\G\StarCitizen"
return scp;
}
// nothing found
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCBasePath - cannot find any valid SC path");
// Issue a warning here to let the user know
//string issue = "SCBasePath - cannot find any valid SC path";
//string.Format( "Cannot find the SC Installation Path !!\nUse Settings to provide the path manually" );
return ""; // sorry did not found a thing..
} // get
}
/// <summary>
/// Returns the SC Client path
/// SC 3.0.0: search path like E:\G\StarCitizen\StarCitizen\LIVE
/// </summary>
static public string SCClientPath
{
get
{
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCClientPath - Entry");
string scp = SCBasePath;
#if DEBUG
//***************************************
// scp += "X"; // TEST not found (COMMENT OUT FOR PRODUCTIVE BUILD)
//***************************************
#endif
string issue = "";
if (string.IsNullOrEmpty(scp)) return ""; // no valid one can be found
// 20180321 New PTU 3.1 another change in setup path - Testing for PTU first
// 20190711 Lanuncher 1.2 - PTU has moved - change detection to find this one first.
if (TheUser.UsePTU)
{
if (Directory.Exists(Path.Combine(scp, @"StarCitizen\PTU")))
{
scp = Path.Combine(scp, @"StarCitizen\PTU");
}
else if (Directory.Exists(Path.Combine(scp, @"StarCitizenPTU\LIVE")))
{
// this would be old style
scp = Path.Combine(scp, @"StarCitizenPTU\LIVE");
}
}
else
{
// no PTU ..
scp = Path.Combine(scp, @"StarCitizen\LIVE");
}
if (Directory.Exists(scp)) return scp; // EXIT Success
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCClientPath - StarCitizen\\LIVE or PTU subfolder does not exist: {0}", scp);
// Issue a warning here to let the user know
issue = string.Format("SCClientPath - StarCitizen\\LIVE or PTU subfolder does not exist: {0}", scp);
Logger.Instance.LogMessage(TracingLevel.ERROR, $"{issue}");
//"Cannot find the SC Client Directory !!\n\nTried to look for:\n{0} \n\nPlease adjust the path in Settings\n"
// Issue a warning here to let the user know
return "";
}
}
/// <summary>
/// Returns the SC ClientData path
/// AC 3.0: E:\G\StarCitizen\StarCitizen\LIVE\USER
/// AC 3.13: E:\G\StarCitizen\StarCitizen\LIVE\USER\Client\0
/// </summary>
static public string SCClientUSERPath
{
get
{
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCClientUSERPath - Entry");
string scp = SCClientPath;
if (string.IsNullOrEmpty(scp)) return "";
//
string scpu = Path.Combine(scp, "USER", "Client", "0"); // 20210404 new path
if (!Directory.Exists(scpu))
{
scpu = Path.Combine(scp, "USER"); // 20210404 old path
}
#if DEBUG
//***************************************
// scp += "X"; // TEST not found (COMMENT OUT FOR PRODUCTIVE BUILD)
//***************************************
#endif
if (Directory.Exists(scpu)) return scpu;
//Logger.Instance.LogMessage(TracingLevel.DEBUG,@"SCClientUSERPath - StarCitizen\\LIVE\\USER[\Client\0] subfolder does not exist: {0}",scpu);
return "";
}
}
static public string SCClientProfilePath
{
get
{
if (File.Exists("appSettings.config") &&
ConfigurationManager.GetSection("appSettings") is NameValueCollection appSection)
{
if ((!string.IsNullOrEmpty(appSection["SCClientProfilePath"]) && !string.IsNullOrEmpty(Path.GetDirectoryName(appSection["SCClientProfilePath"]))))
{
return appSection["SCClientProfilePath"];
}
}
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCClientProfilePath - Entry");
string scp = SCClientUSERPath;
if (string.IsNullOrEmpty(scp)) return "";
//
scp = Path.Combine(scp, "Profiles", "default");
if (Directory.Exists(scp)) return scp;
//Logger.Instance.LogMessage(TracingLevel.DEBUG,@"SCClientProfilePath - StarCitizen\LIVE\USER\[Client\0\]Profiles\default subfolder does not exist: {0}",scp);
return "";
}
}
/// <summary>
/// Returns the SC Data.p4k file path
/// SC Alpha 3.0: E:\G\StarCitizen\StarCitizen\LIVE\Data.p4k (contains the binary XML now)
/// </summary>
static public string SCData_p4k
{
get
{
if (File.Exists("appSettings.config") &&
ConfigurationManager.GetSection("appSettings") is NameValueCollection appSection)
{
if ((!string.IsNullOrEmpty(appSection["SCData_p4k"]) && File.Exists(appSection["SCData_p4k"])))
{
return appSection["SCData_p4k"];
}
}
//Logger.Instance.LogMessage(TracingLevel.DEBUG,"SCDataXML_p4k - Entry");
string scp = SCClientPath;
if (string.IsNullOrEmpty(scp)) return "";
//
scp = Path.Combine(scp, "Data.p4k");
#if DEBUG
//***************************************
// scp += "X"; // TEST not found (COMMENT OUT FOR PRODUCTIVE BUILD)
//***************************************
#endif
if (File.Exists(scp)) return scp;
//Logger.Instance.LogMessage(TracingLevel.DEBUG,@"SCData_p4k - StarCitizen\LIVE or PTU\Data\Data.p4k file does not exist: {0}", scp);
return "";
}
}
}
}
| 39.083893 | 174 | 0.494462 | [
"MIT"
] | mhwlng/streamdeck-starcitizen | starcitizen/SC/SCPath.cs | 11,649 | C# |
//
// CGPDFPage.cs: Implements the managed CGPDFPage
//
// Authors: Mono Team
//
// Copyright 2009 Novell, Inc
// Copyright 2011-2014 Xamarin Inc
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
using XamCore.ObjCRuntime;
using XamCore.Foundation;
namespace XamCore.CoreGraphics {
// CGPDFPage.h
public partial class CGPDFPage : INativeObject, IDisposable {
internal IntPtr handle;
~CGPDFPage ()
{
Dispose (false);
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
public IntPtr Handle {
get { return handle; }
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static /* CGPDFPageRef */ IntPtr CGPDFPageRetain (/* CGPDFPageRef */ IntPtr page);
[DllImport (Constants.CoreGraphicsLibrary)]
extern static void CGPDFPageRelease (/* CGPDFPageRef */ IntPtr page);
protected virtual void Dispose (bool disposing)
{
if (handle != IntPtr.Zero){
CGPDFPageRelease (handle);
handle = IntPtr.Zero;
}
}
}
}
| 29.828571 | 91 | 0.729406 | [
"BSD-3-Clause"
] | Acidburn0zzz/xamarin-macios | src/CoreGraphics/CGPDFPage.cs | 2,088 | C# |
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Linq;
namespace LinqToDB.DataProvider.SapHana
{
using Common;
using Data;
using SchemaProvider;
class SapHanaOdbcSchemaProvider : SapHanaSchemaProvider
{
protected override List<DataTypeInfo> GetDataTypes(DataConnection dataConnection)
{
var dts = ((DbConnection)dataConnection.Connection).GetSchema("DataTypes");
var dt = dts.AsEnumerable()
.Where(x=> x["ProviderDbType"] != DBNull.Value)
.Select(t => new DataTypeInfo
{
TypeName = t.Field<string>("TypeName")!,
DataType = t.Field<string>("DataType")!,
CreateFormat = t.Field<string>("CreateFormat"),
CreateParameters = t.Field<string>("CreateParameters"),
ProviderDbType = Converter.ChangeTypeTo<int>(t["ProviderDbType"]),
}).ToList();
return dt.GroupBy(x => new {x.TypeName, x.ProviderDbType}).Select(y =>
{
var x = y.First();
if (x.CreateFormat == null)
{
x.CreateFormat = x.TypeName;
if (x.CreateParameters != null)
{
x.CreateFormat += string.Concat('(',
string.Join(", ",
Enumerable.Range(0, x.CreateParameters.Split(',').Length)
.Select(i => string.Concat('{', i, '}'))),
')');
}
}
return x;
}).ToList();
}
protected override IReadOnlyCollection<PrimaryKeyInfo> GetPrimaryKeys(DataConnection dataConnection,
IEnumerable<TableSchema> tables, GetSchemaOptions options)
{
return dataConnection.Query(rd =>
{
// IMPORTANT: reader calls must be ordered to support SequentialAccess
var schema = rd.GetString(0);
var tableName = rd.GetString(1);
var indexName = rd.GetString(2);
var constraint = rd.IsDBNull(3) ? null : rd.GetString(3);
if (constraint != "PRIMARY KEY")
return null;
var columnName = rd.GetString(4);
var position = rd.GetInt32(5);
return new PrimaryKeyInfo
{
TableID = string.Concat(schema, '.', tableName),
ColumnName = columnName,
Ordinal = position,
PrimaryKeyName = indexName
};
}, @"
SELECT
SCHEMA_NAME,
TABLE_NAME,
INDEX_NAME,
CONSTRAINT,
COLUMN_NAME,
POSITION
FROM INDEX_COLUMNS")
.Where(x => x != null).ToList()!;
}
}
}
| 28.104651 | 103 | 0.614812 | [
"MIT"
] | Kshitij-Kafle-123/linq2db | Source/LinqToDB/DataProvider/SapHana/SapHanaOdbcSchemaProvider.cs | 2,334 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Text;
using Xunit;
namespace SourceGenerators.Tests
{
internal static class RoslynTestUtils
{
/// <summary>
/// Creates a canonical Roslyn project for testing.
/// </summary>
/// <param name="references">Assembly references to include in the project.</param>
/// <param name="includeBaseReferences">Whether to include references to the BCL assemblies.</param>
public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true)
{
string corelib = Assembly.GetAssembly(typeof(object))!.Location;
string runtimeDir = Path.GetDirectoryName(corelib)!;
var refs = new List<MetadataReference>();
if (includeBaseReferences)
{
refs.Add(MetadataReference.CreateFromFile(corelib));
refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll")));
refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
}
if (references != null)
{
foreach (var r in references)
{
refs.Add(MetadataReference.CreateFromFile(r.Location));
}
}
return new AdhocWorkspace()
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create()))
.AddProject("Test", "test.dll", "C#")
.WithMetadataReferences(refs)
.WithCompilationOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithNullableContextOptions(NullableContextOptions.Enable));
}
public static Task CommitChanges(this Project proj, params string[] ignorables)
{
Assert.True(proj.Solution.Workspace.TryApplyChanges(proj.Solution));
return AssertNoDiagnostic(proj, ignorables);
}
public static async Task AssertNoDiagnostic(this Project proj, params string[] ignorables)
{
foreach (Document doc in proj.Documents)
{
SemanticModel? sm = await doc.GetSemanticModelAsync(CancellationToken.None).ConfigureAwait(false);
Assert.NotNull(sm);
foreach (Diagnostic d in sm!.GetDiagnostics())
{
bool ignore = ignorables.Any(ig => d.Id == ig);
Assert.True(ignore, d.ToString());
}
}
}
private static Project WithDocuments(this Project project, IEnumerable<string> sources, IEnumerable<string>? sourceNames = null)
{
int count = 0;
Project result = project;
if (sourceNames != null)
{
List<string> names = sourceNames.ToList();
foreach (string s in sources)
result = result.WithDocument(names[count++], s);
}
else
{
foreach (string s in sources)
result = result.WithDocument($"src-{count++}.cs", s);
}
return result;
}
public static Project WithDocument(this Project proj, string name, string text)
{
return proj.AddDocument(name, text).Project;
}
public static Document FindDocument(this Project proj, string name)
{
foreach (Document doc in proj.Documents)
{
if (doc.Name == name)
{
return doc;
}
}
throw new FileNotFoundException(name);
}
/// <summary>
/// Looks for /*N+*/ and /*-N*/ markers in a string and creates a TextSpan containing the enclosed text.
/// </summary>
public static TextSpan MakeSpan(string text, int spanNum)
{
int start = text.IndexOf($"/*{spanNum}+*/", StringComparison.Ordinal);
if (start < 0)
{
throw new ArgumentOutOfRangeException(nameof(spanNum));
}
start += 6;
int end = text.IndexOf($"/*-{spanNum}*/", StringComparison.Ordinal);
if (end < 0)
{
throw new ArgumentOutOfRangeException(nameof(spanNum));
}
end -= 1;
return new TextSpan(start, end - start);
}
/// <summary>
/// Runs a Roslyn generator over a set of source files.
/// </summary>
public static async Task<(ImmutableArray<Diagnostic>, ImmutableArray<GeneratedSourceResult>)> RunGenerator(
ISourceGenerator generator,
IEnumerable<Assembly>? references,
IEnumerable<string> sources,
AnalyzerConfigOptionsProvider? optionsProvider = null,
bool includeBaseReferences = true,
CancellationToken cancellationToken = default)
{
Project proj = CreateTestProject(references, includeBaseReferences);
proj = proj.WithDocuments(sources);
Assert.True(proj.Solution.Workspace.TryApplyChanges(proj.Solution));
Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
CSharpGeneratorDriver cgd = CSharpGeneratorDriver.Create(new[] { generator }, optionsProvider: optionsProvider);
GeneratorDriver gd = cgd.RunGenerators(comp!, cancellationToken);
GeneratorDriverRunResult r = gd.GetRunResult();
return (r.Results[0].Diagnostics, r.Results[0].GeneratedSources);
}
/// <summary>
/// Runs a Roslyn analyzer over a set of source files.
/// </summary>
public static async Task<IList<Diagnostic>> RunAnalyzer(
DiagnosticAnalyzer analyzer,
IEnumerable<Assembly> references,
IEnumerable<string> sources)
{
Project proj = CreateTestProject(references);
proj = proj.WithDocuments(sources);
await proj.CommitChanges().ConfigureAwait(false);
ImmutableArray<DiagnosticAnalyzer> analyzers = ImmutableArray.Create(analyzer);
Compilation? comp = await proj!.GetCompilationAsync().ConfigureAwait(false);
return await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false);
}
/// <summary>
/// Runs a Roslyn analyzer and fixer.
/// </summary>
public static async Task<IList<string>> RunAnalyzerAndFixer(
DiagnosticAnalyzer analyzer,
CodeFixProvider fixer,
IEnumerable<Assembly> references,
IEnumerable<string> sources,
IEnumerable<string>? sourceNames = null,
string? defaultNamespace = null,
string? extraFile = null)
{
Project proj = CreateTestProject(references);
int count = sources.Count();
proj = proj.WithDocuments(sources, sourceNames);
if (defaultNamespace != null)
{
proj = proj.WithDefaultNamespace(defaultNamespace);
}
await proj.CommitChanges().ConfigureAwait(false);
ImmutableArray<DiagnosticAnalyzer> analyzers = ImmutableArray.Create(analyzer);
while (true)
{
Compilation? comp = await proj!.GetCompilationAsync().ConfigureAwait(false);
ImmutableArray<Diagnostic> diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false);
if (diags.IsEmpty)
{
// no more diagnostics reported by the analyzers
break;
}
var actions = new List<CodeAction>();
foreach (Diagnostic d in diags)
{
Document? doc = proj.GetDocument(d.Location.SourceTree);
CodeFixContext context = new CodeFixContext(doc!, d, (action, _) => actions.Add(action), CancellationToken.None);
await fixer.RegisterCodeFixesAsync(context).ConfigureAwait(false);
}
if (actions.Count == 0)
{
// nothing to fix
break;
}
ImmutableArray<CodeActionOperation> operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false);
Solution solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Project? changedProj = solution.GetProject(proj.Id);
if (changedProj != proj)
{
proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false);
}
}
var results = new List<string>();
if (sourceNames != null)
{
List<string> l = sourceNames.ToList();
for (int i = 0; i < count; i++)
{
SourceText s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false);
results.Add(s.ToString().Replace("\r\n", "\n", StringComparison.Ordinal));
}
}
else
{
for (int i = 0; i < count; i++)
{
SourceText s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false);
results.Add(s.ToString().Replace("\r\n", "\n", StringComparison.Ordinal));
}
}
if (extraFile != null)
{
SourceText s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false);
results.Add(s.ToString().Replace("\r\n", "\n", StringComparison.Ordinal));
}
return results;
}
private static async Task<Project> RecreateProjectDocumentsAsync(Project project)
{
foreach (DocumentId documentId in project.DocumentIds)
{
Document? document = project.GetDocument(documentId);
document = await RecreateDocumentAsync(document!).ConfigureAwait(false);
project = document.Project;
}
return project;
}
private static async Task<Document> RecreateDocumentAsync(Document document)
{
SourceText newText = await document.GetTextAsync().ConfigureAwait(false);
return document.WithText(SourceText.From(newText.ToString(), newText.Encoding, newText.ChecksumAlgorithm));
}
}
}
| 38.622449 | 177 | 0.578864 | [
"MIT"
] | AerisG222/runtime | src/libraries/Common/tests/SourceGenerators/RoslynTestUtils.cs | 11,357 | C# |
using System;
using NetRuntimeSystem = System;
using System.ComponentModel;
using NetOffice.Attributes;
using NetOffice.MSComctlLibApi;
namespace NetOffice.MSComctlLibApi.Behind
{
/// <summary>
/// DispatchInterface IImageList
/// SupportByVersion MSComctlLib, 6
/// </summary>
[SupportByVersion("MSComctlLib", 6)]
[EntityType(EntityType.IsDispatchInterface), BaseType]
public class IImageList : COMObject, NetOffice.MSComctlLibApi.IImageList
{
#pragma warning disable
#region Type Information
/// <summary>
/// Contract Type
/// </summary>
[EditorBrowsable(EditorBrowsableState.Advanced), Browsable(false), Category("NetOffice"), CoreOverridden]
public override Type ContractType
{
get
{
if(null == _contractType)
_contractType = typeof(NetOffice.MSComctlLibApi.IImageList);
return _contractType;
}
}
private static Type _contractType;
/// <summary>
/// Instance Type
/// </summary>
[EditorBrowsable(EditorBrowsableState.Advanced), Browsable(false), Category("NetOffice"), CoreOverridden]
public override Type InstanceType
{
get
{
return LateBindingApiWrapperType;
}
}
private static Type _type;
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public static Type LateBindingApiWrapperType
{
get
{
if (null == _type)
_type = typeof(IImageList);
return _type;
}
}
#endregion
#region Ctor
/// <summary>
/// Stub Ctor, not indented to use
/// </summary>
public IImageList() : base()
{
}
#endregion
#region Properties
/// <summary>
/// SupportByVersion MSComctlLib 6
/// Get/Set
/// </summary>
[SupportByVersion("MSComctlLib", 6)]
public virtual Int16 ImageHeight
{
get
{
return InvokerService.InvokeInternal.ExecuteInt16PropertyGet(this, "ImageHeight");
}
set
{
InvokerService.InvokeInternal.ExecuteValuePropertySet(this, "ImageHeight", value);
}
}
/// <summary>
/// SupportByVersion MSComctlLib 6
/// Get/Set
/// </summary>
[SupportByVersion("MSComctlLib", 6)]
public virtual Int16 ImageWidth
{
get
{
return InvokerService.InvokeInternal.ExecuteInt16PropertyGet(this, "ImageWidth");
}
set
{
InvokerService.InvokeInternal.ExecuteValuePropertySet(this, "ImageWidth", value);
}
}
/// <summary>
/// SupportByVersion MSComctlLib 6
/// Get/Set
/// </summary>
[SupportByVersion("MSComctlLib", 6)]
public virtual Int32 MaskColor
{
get
{
return InvokerService.InvokeInternal.ExecuteInt32PropertyGet(this, "MaskColor");
}
set
{
InvokerService.InvokeInternal.ExecuteValuePropertySet(this, "MaskColor", value);
}
}
/// <summary>
/// SupportByVersion MSComctlLib 6
/// Get/Set
/// </summary>
[SupportByVersion("MSComctlLib", 6)]
public virtual bool UseMaskColor
{
get
{
return InvokerService.InvokeInternal.ExecuteBoolPropertyGet(this, "UseMaskColor");
}
set
{
InvokerService.InvokeInternal.ExecuteValuePropertySet(this, "UseMaskColor", value);
}
}
/// <summary>
/// SupportByVersion MSComctlLib 6
/// Get/Set
/// </summary>
[SupportByVersion("MSComctlLib", 6)]
[BaseResult]
public virtual NetOffice.MSComctlLibApi.IImages ListImages
{
get
{
return InvokerService.InvokeInternal.ExecuteBaseReferencePropertyGet<NetOffice.MSComctlLibApi.IImages>(this, "ListImages");
}
set
{
InvokerService.InvokeInternal.ExecuteReferencePropertySet(this, "ListImages", value);
}
}
/// <summary>
/// SupportByVersion MSComctlLib 6
/// Get/Set
/// </summary>
[SupportByVersion("MSComctlLib", 6)]
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public virtual Int32 hImageList
{
get
{
return InvokerService.InvokeInternal.ExecuteInt32PropertyGet(this, "hImageList");
}
set
{
InvokerService.InvokeInternal.ExecuteValuePropertySet(this, "hImageList", value);
}
}
/// <summary>
/// SupportByVersion MSComctlLib 6
/// Get/Set
/// </summary>
[SupportByVersion("MSComctlLib", 6)]
public virtual Int32 BackColor
{
get
{
return InvokerService.InvokeInternal.ExecuteInt32PropertyGet(this, "BackColor");
}
set
{
InvokerService.InvokeInternal.ExecuteValuePropertySet(this, "BackColor", value);
}
}
#endregion
#region Methods
/// <summary>
/// SupportByVersion MSComctlLib 6
/// </summary>
/// <param name="key1">object key1</param>
/// <param name="key2">object key2</param>
[SupportByVersion("MSComctlLib", 6), NativeResult]
public virtual stdole.Picture Overlay(object key1, object key2)
{
object[] paramsArray = Invoker.ValidateParamsArray(key1, key2);
object returnItem = Invoker.MethodReturn(this, "Overlay", paramsArray);
return returnItem as stdole.Picture;
}
/// <summary>
/// SupportByVersion MSComctlLib 6
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
[SupportByVersion("MSComctlLib", 6)]
public virtual void AboutBox()
{
InvokerService.InvokeInternal.ExecuteMethod(this, "AboutBox");
}
#endregion
#pragma warning restore
}
}
| 23.297414 | 127 | 0.662905 | [
"MIT"
] | igoreksiz/NetOffice | Source/MSComctlLib/Behind/DispatchInterfaces/IImageList.cs | 5,407 | C# |
#pragma warning disable 1591
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
[assembly: Android.Runtime.ResourceDesignerAttribute("XamarinFormsClase02_03.Droid.Resource", IsApplication=true)]
namespace XamarinFormsClase02_03.Droid
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
static Resource()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
public static void UpdateIdValues()
{
global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::XamarinFormsClase02_03.Droid.Resource.Attribute.actionBarSize;
}
public partial class Animation
{
// aapt resource value: 0x7f040000
public const int abc_fade_in = 2130968576;
// aapt resource value: 0x7f040001
public const int abc_fade_out = 2130968577;
// aapt resource value: 0x7f040002
public const int abc_grow_fade_in_from_bottom = 2130968578;
// aapt resource value: 0x7f040003
public const int abc_popup_enter = 2130968579;
// aapt resource value: 0x7f040004
public const int abc_popup_exit = 2130968580;
// aapt resource value: 0x7f040005
public const int abc_shrink_fade_out_from_bottom = 2130968581;
// aapt resource value: 0x7f040006
public const int abc_slide_in_bottom = 2130968582;
// aapt resource value: 0x7f040007
public const int abc_slide_in_top = 2130968583;
// aapt resource value: 0x7f040008
public const int abc_slide_out_bottom = 2130968584;
// aapt resource value: 0x7f040009
public const int abc_slide_out_top = 2130968585;
// aapt resource value: 0x7f04000a
public const int design_bottom_sheet_slide_in = 2130968586;
// aapt resource value: 0x7f04000b
public const int design_bottom_sheet_slide_out = 2130968587;
// aapt resource value: 0x7f04000c
public const int design_fab_in = 2130968588;
// aapt resource value: 0x7f04000d
public const int design_fab_out = 2130968589;
// aapt resource value: 0x7f04000e
public const int design_snackbar_in = 2130968590;
// aapt resource value: 0x7f04000f
public const int design_snackbar_out = 2130968591;
static Animation()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Animation()
{
}
}
public partial class Attribute
{
// aapt resource value: 0x7f010000
public const int MediaRouteControllerWindowBackground = 2130771968;
// aapt resource value: 0x7f0100a6
public const int actionBarDivider = 2130772134;
// aapt resource value: 0x7f0100a7
public const int actionBarItemBackground = 2130772135;
// aapt resource value: 0x7f0100a0
public const int actionBarPopupTheme = 2130772128;
// aapt resource value: 0x7f0100a5
public const int actionBarSize = 2130772133;
// aapt resource value: 0x7f0100a2
public const int actionBarSplitStyle = 2130772130;
// aapt resource value: 0x7f0100a1
public const int actionBarStyle = 2130772129;
// aapt resource value: 0x7f01009c
public const int actionBarTabBarStyle = 2130772124;
// aapt resource value: 0x7f01009b
public const int actionBarTabStyle = 2130772123;
// aapt resource value: 0x7f01009d
public const int actionBarTabTextStyle = 2130772125;
// aapt resource value: 0x7f0100a3
public const int actionBarTheme = 2130772131;
// aapt resource value: 0x7f0100a4
public const int actionBarWidgetTheme = 2130772132;
// aapt resource value: 0x7f0100c0
public const int actionButtonStyle = 2130772160;
// aapt resource value: 0x7f0100bc
public const int actionDropDownStyle = 2130772156;
// aapt resource value: 0x7f01010e
public const int actionLayout = 2130772238;
// aapt resource value: 0x7f0100a8
public const int actionMenuTextAppearance = 2130772136;
// aapt resource value: 0x7f0100a9
public const int actionMenuTextColor = 2130772137;
// aapt resource value: 0x7f0100ac
public const int actionModeBackground = 2130772140;
// aapt resource value: 0x7f0100ab
public const int actionModeCloseButtonStyle = 2130772139;
// aapt resource value: 0x7f0100ae
public const int actionModeCloseDrawable = 2130772142;
// aapt resource value: 0x7f0100b0
public const int actionModeCopyDrawable = 2130772144;
// aapt resource value: 0x7f0100af
public const int actionModeCutDrawable = 2130772143;
// aapt resource value: 0x7f0100b4
public const int actionModeFindDrawable = 2130772148;
// aapt resource value: 0x7f0100b1
public const int actionModePasteDrawable = 2130772145;
// aapt resource value: 0x7f0100b6
public const int actionModePopupWindowStyle = 2130772150;
// aapt resource value: 0x7f0100b2
public const int actionModeSelectAllDrawable = 2130772146;
// aapt resource value: 0x7f0100b3
public const int actionModeShareDrawable = 2130772147;
// aapt resource value: 0x7f0100ad
public const int actionModeSplitBackground = 2130772141;
// aapt resource value: 0x7f0100aa
public const int actionModeStyle = 2130772138;
// aapt resource value: 0x7f0100b5
public const int actionModeWebSearchDrawable = 2130772149;
// aapt resource value: 0x7f01009e
public const int actionOverflowButtonStyle = 2130772126;
// aapt resource value: 0x7f01009f
public const int actionOverflowMenuStyle = 2130772127;
// aapt resource value: 0x7f010110
public const int actionProviderClass = 2130772240;
// aapt resource value: 0x7f01010f
public const int actionViewClass = 2130772239;
// aapt resource value: 0x7f0100c8
public const int activityChooserViewStyle = 2130772168;
// aapt resource value: 0x7f0100eb
public const int alertDialogButtonGroupStyle = 2130772203;
// aapt resource value: 0x7f0100ec
public const int alertDialogCenterButtons = 2130772204;
// aapt resource value: 0x7f0100ea
public const int alertDialogStyle = 2130772202;
// aapt resource value: 0x7f0100ed
public const int alertDialogTheme = 2130772205;
// aapt resource value: 0x7f0100ff
public const int allowStacking = 2130772223;
// aapt resource value: 0x7f010106
public const int arrowHeadLength = 2130772230;
// aapt resource value: 0x7f010107
public const int arrowShaftLength = 2130772231;
// aapt resource value: 0x7f0100f2
public const int autoCompleteTextViewStyle = 2130772210;
// aapt resource value: 0x7f010077
public const int background = 2130772087;
// aapt resource value: 0x7f010079
public const int backgroundSplit = 2130772089;
// aapt resource value: 0x7f010078
public const int backgroundStacked = 2130772088;
// aapt resource value: 0x7f01013a
public const int backgroundTint = 2130772282;
// aapt resource value: 0x7f01013b
public const int backgroundTintMode = 2130772283;
// aapt resource value: 0x7f010108
public const int barLength = 2130772232;
// aapt resource value: 0x7f010026
public const int behavior_hideable = 2130772006;
// aapt resource value: 0x7f01004c
public const int behavior_overlapTop = 2130772044;
// aapt resource value: 0x7f010025
public const int behavior_peekHeight = 2130772005;
// aapt resource value: 0x7f010042
public const int borderWidth = 2130772034;
// aapt resource value: 0x7f0100c5
public const int borderlessButtonStyle = 2130772165;
// aapt resource value: 0x7f01003c
public const int bottomSheetDialogTheme = 2130772028;
// aapt resource value: 0x7f01003d
public const int bottomSheetStyle = 2130772029;
// aapt resource value: 0x7f0100c2
public const int buttonBarButtonStyle = 2130772162;
// aapt resource value: 0x7f0100f0
public const int buttonBarNegativeButtonStyle = 2130772208;
// aapt resource value: 0x7f0100f1
public const int buttonBarNeutralButtonStyle = 2130772209;
// aapt resource value: 0x7f0100ef
public const int buttonBarPositiveButtonStyle = 2130772207;
// aapt resource value: 0x7f0100c1
public const int buttonBarStyle = 2130772161;
// aapt resource value: 0x7f01008a
public const int buttonPanelSideLayout = 2130772106;
// aapt resource value: 0x7f0100f3
public const int buttonStyle = 2130772211;
// aapt resource value: 0x7f0100f4
public const int buttonStyleSmall = 2130772212;
// aapt resource value: 0x7f010100
public const int buttonTint = 2130772224;
// aapt resource value: 0x7f010101
public const int buttonTintMode = 2130772225;
// aapt resource value: 0x7f010017
public const int cardBackgroundColor = 2130771991;
// aapt resource value: 0x7f010018
public const int cardCornerRadius = 2130771992;
// aapt resource value: 0x7f010019
public const int cardElevation = 2130771993;
// aapt resource value: 0x7f01001a
public const int cardMaxElevation = 2130771994;
// aapt resource value: 0x7f01001c
public const int cardPreventCornerOverlap = 2130771996;
// aapt resource value: 0x7f01001b
public const int cardUseCompatPadding = 2130771995;
// aapt resource value: 0x7f0100f5
public const int checkboxStyle = 2130772213;
// aapt resource value: 0x7f0100f6
public const int checkedTextViewStyle = 2130772214;
// aapt resource value: 0x7f010118
public const int closeIcon = 2130772248;
// aapt resource value: 0x7f010087
public const int closeItemLayout = 2130772103;
// aapt resource value: 0x7f010131
public const int collapseContentDescription = 2130772273;
// aapt resource value: 0x7f010130
public const int collapseIcon = 2130772272;
// aapt resource value: 0x7f010033
public const int collapsedTitleGravity = 2130772019;
// aapt resource value: 0x7f01002f
public const int collapsedTitleTextAppearance = 2130772015;
// aapt resource value: 0x7f010102
public const int color = 2130772226;
// aapt resource value: 0x7f0100e3
public const int colorAccent = 2130772195;
// aapt resource value: 0x7f0100e7
public const int colorButtonNormal = 2130772199;
// aapt resource value: 0x7f0100e5
public const int colorControlActivated = 2130772197;
// aapt resource value: 0x7f0100e6
public const int colorControlHighlight = 2130772198;
// aapt resource value: 0x7f0100e4
public const int colorControlNormal = 2130772196;
// aapt resource value: 0x7f0100e1
public const int colorPrimary = 2130772193;
// aapt resource value: 0x7f0100e2
public const int colorPrimaryDark = 2130772194;
// aapt resource value: 0x7f0100e8
public const int colorSwitchThumbNormal = 2130772200;
// aapt resource value: 0x7f01011d
public const int commitIcon = 2130772253;
// aapt resource value: 0x7f010082
public const int contentInsetEnd = 2130772098;
// aapt resource value: 0x7f010083
public const int contentInsetLeft = 2130772099;
// aapt resource value: 0x7f010084
public const int contentInsetRight = 2130772100;
// aapt resource value: 0x7f010081
public const int contentInsetStart = 2130772097;
// aapt resource value: 0x7f01001d
public const int contentPadding = 2130771997;
// aapt resource value: 0x7f010021
public const int contentPaddingBottom = 2130772001;
// aapt resource value: 0x7f01001e
public const int contentPaddingLeft = 2130771998;
// aapt resource value: 0x7f01001f
public const int contentPaddingRight = 2130771999;
// aapt resource value: 0x7f010020
public const int contentPaddingTop = 2130772000;
// aapt resource value: 0x7f010030
public const int contentScrim = 2130772016;
// aapt resource value: 0x7f0100e9
public const int controlBackground = 2130772201;
// aapt resource value: 0x7f010062
public const int counterEnabled = 2130772066;
// aapt resource value: 0x7f010063
public const int counterMaxLength = 2130772067;
// aapt resource value: 0x7f010065
public const int counterOverflowTextAppearance = 2130772069;
// aapt resource value: 0x7f010064
public const int counterTextAppearance = 2130772068;
// aapt resource value: 0x7f01007a
public const int customNavigationLayout = 2130772090;
// aapt resource value: 0x7f010117
public const int defaultQueryHint = 2130772247;
// aapt resource value: 0x7f0100ba
public const int dialogPreferredPadding = 2130772154;
// aapt resource value: 0x7f0100b9
public const int dialogTheme = 2130772153;
// aapt resource value: 0x7f010070
public const int displayOptions = 2130772080;
// aapt resource value: 0x7f010076
public const int divider = 2130772086;
// aapt resource value: 0x7f0100c7
public const int dividerHorizontal = 2130772167;
// aapt resource value: 0x7f01010c
public const int dividerPadding = 2130772236;
// aapt resource value: 0x7f0100c6
public const int dividerVertical = 2130772166;
// aapt resource value: 0x7f010104
public const int drawableSize = 2130772228;
// aapt resource value: 0x7f01006b
public const int drawerArrowStyle = 2130772075;
// aapt resource value: 0x7f0100d9
public const int dropDownListViewStyle = 2130772185;
// aapt resource value: 0x7f0100bd
public const int dropdownListPreferredItemHeight = 2130772157;
// aapt resource value: 0x7f0100ce
public const int editTextBackground = 2130772174;
// aapt resource value: 0x7f0100cd
public const int editTextColor = 2130772173;
// aapt resource value: 0x7f0100f7
public const int editTextStyle = 2130772215;
// aapt resource value: 0x7f010085
public const int elevation = 2130772101;
// aapt resource value: 0x7f010060
public const int errorEnabled = 2130772064;
// aapt resource value: 0x7f010061
public const int errorTextAppearance = 2130772065;
// aapt resource value: 0x7f010089
public const int expandActivityOverflowButtonDrawable = 2130772105;
// aapt resource value: 0x7f010022
public const int expanded = 2130772002;
// aapt resource value: 0x7f010034
public const int expandedTitleGravity = 2130772020;
// aapt resource value: 0x7f010029
public const int expandedTitleMargin = 2130772009;
// aapt resource value: 0x7f01002d
public const int expandedTitleMarginBottom = 2130772013;
// aapt resource value: 0x7f01002c
public const int expandedTitleMarginEnd = 2130772012;
// aapt resource value: 0x7f01002a
public const int expandedTitleMarginStart = 2130772010;
// aapt resource value: 0x7f01002b
public const int expandedTitleMarginTop = 2130772011;
// aapt resource value: 0x7f01002e
public const int expandedTitleTextAppearance = 2130772014;
// aapt resource value: 0x7f010016
public const int externalRouteEnabledDrawable = 2130771990;
// aapt resource value: 0x7f010040
public const int fabSize = 2130772032;
// aapt resource value: 0x7f010044
public const int foregroundInsidePadding = 2130772036;
// aapt resource value: 0x7f010105
public const int gapBetweenBars = 2130772229;
// aapt resource value: 0x7f010119
public const int goIcon = 2130772249;
// aapt resource value: 0x7f01004a
public const int headerLayout = 2130772042;
// aapt resource value: 0x7f01006c
public const int height = 2130772076;
// aapt resource value: 0x7f010080
public const int hideOnContentScroll = 2130772096;
// aapt resource value: 0x7f010066
public const int hintAnimationEnabled = 2130772070;
// aapt resource value: 0x7f01005f
public const int hintEnabled = 2130772063;
// aapt resource value: 0x7f01005e
public const int hintTextAppearance = 2130772062;
// aapt resource value: 0x7f0100bf
public const int homeAsUpIndicator = 2130772159;
// aapt resource value: 0x7f01007b
public const int homeLayout = 2130772091;
// aapt resource value: 0x7f010074
public const int icon = 2130772084;
// aapt resource value: 0x7f010115
public const int iconifiedByDefault = 2130772245;
// aapt resource value: 0x7f0100cf
public const int imageButtonStyle = 2130772175;
// aapt resource value: 0x7f01007d
public const int indeterminateProgressStyle = 2130772093;
// aapt resource value: 0x7f010088
public const int initialActivityCount = 2130772104;
// aapt resource value: 0x7f01004b
public const int insetForeground = 2130772043;
// aapt resource value: 0x7f01006d
public const int isLightTheme = 2130772077;
// aapt resource value: 0x7f010048
public const int itemBackground = 2130772040;
// aapt resource value: 0x7f010046
public const int itemIconTint = 2130772038;
// aapt resource value: 0x7f01007f
public const int itemPadding = 2130772095;
// aapt resource value: 0x7f010049
public const int itemTextAppearance = 2130772041;
// aapt resource value: 0x7f010047
public const int itemTextColor = 2130772039;
// aapt resource value: 0x7f010036
public const int keylines = 2130772022;
// aapt resource value: 0x7f010114
public const int layout = 2130772244;
// aapt resource value: 0x7f010067
public const int layoutManager = 2130772071;
// aapt resource value: 0x7f010039
public const int layout_anchor = 2130772025;
// aapt resource value: 0x7f01003b
public const int layout_anchorGravity = 2130772027;
// aapt resource value: 0x7f010038
public const int layout_behavior = 2130772024;
// aapt resource value: 0x7f010027
public const int layout_collapseMode = 2130772007;
// aapt resource value: 0x7f010028
public const int layout_collapseParallaxMultiplier = 2130772008;
// aapt resource value: 0x7f01003a
public const int layout_keyline = 2130772026;
// aapt resource value: 0x7f010023
public const int layout_scrollFlags = 2130772003;
// aapt resource value: 0x7f010024
public const int layout_scrollInterpolator = 2130772004;
// aapt resource value: 0x7f0100e0
public const int listChoiceBackgroundIndicator = 2130772192;
// aapt resource value: 0x7f0100bb
public const int listDividerAlertDialog = 2130772155;
// aapt resource value: 0x7f01008e
public const int listItemLayout = 2130772110;
// aapt resource value: 0x7f01008b
public const int listLayout = 2130772107;
// aapt resource value: 0x7f0100da
public const int listPopupWindowStyle = 2130772186;
// aapt resource value: 0x7f0100d4
public const int listPreferredItemHeight = 2130772180;
// aapt resource value: 0x7f0100d6
public const int listPreferredItemHeightLarge = 2130772182;
// aapt resource value: 0x7f0100d5
public const int listPreferredItemHeightSmall = 2130772181;
// aapt resource value: 0x7f0100d7
public const int listPreferredItemPaddingLeft = 2130772183;
// aapt resource value: 0x7f0100d8
public const int listPreferredItemPaddingRight = 2130772184;
// aapt resource value: 0x7f010075
public const int logo = 2130772085;
// aapt resource value: 0x7f010134
public const int logoDescription = 2130772276;
// aapt resource value: 0x7f01004d
public const int maxActionInlineWidth = 2130772045;
// aapt resource value: 0x7f01012f
public const int maxButtonHeight = 2130772271;
// aapt resource value: 0x7f01010a
public const int measureWithLargestChild = 2130772234;
// aapt resource value: 0x7f010001
public const int mediaRouteAudioTrackDrawable = 2130771969;
// aapt resource value: 0x7f010002
public const int mediaRouteBluetoothIconDrawable = 2130771970;
// aapt resource value: 0x7f010003
public const int mediaRouteButtonStyle = 2130771971;
// aapt resource value: 0x7f010004
public const int mediaRouteCastDrawable = 2130771972;
// aapt resource value: 0x7f010005
public const int mediaRouteChooserPrimaryTextStyle = 2130771973;
// aapt resource value: 0x7f010006
public const int mediaRouteChooserSecondaryTextStyle = 2130771974;
// aapt resource value: 0x7f010007
public const int mediaRouteCloseDrawable = 2130771975;
// aapt resource value: 0x7f010008
public const int mediaRouteCollapseGroupDrawable = 2130771976;
// aapt resource value: 0x7f010009
public const int mediaRouteConnectingDrawable = 2130771977;
// aapt resource value: 0x7f01000a
public const int mediaRouteControllerPrimaryTextStyle = 2130771978;
// aapt resource value: 0x7f01000b
public const int mediaRouteControllerSecondaryTextStyle = 2130771979;
// aapt resource value: 0x7f01000c
public const int mediaRouteControllerTitleTextStyle = 2130771980;
// aapt resource value: 0x7f01000d
public const int mediaRouteDefaultIconDrawable = 2130771981;
// aapt resource value: 0x7f01000e
public const int mediaRouteExpandGroupDrawable = 2130771982;
// aapt resource value: 0x7f01000f
public const int mediaRouteOffDrawable = 2130771983;
// aapt resource value: 0x7f010010
public const int mediaRouteOnDrawable = 2130771984;
// aapt resource value: 0x7f010011
public const int mediaRoutePauseDrawable = 2130771985;
// aapt resource value: 0x7f010012
public const int mediaRoutePlayDrawable = 2130771986;
// aapt resource value: 0x7f010013
public const int mediaRouteSpeakerGroupIconDrawable = 2130771987;
// aapt resource value: 0x7f010014
public const int mediaRouteSpeakerIconDrawable = 2130771988;
// aapt resource value: 0x7f010015
public const int mediaRouteTvIconDrawable = 2130771989;
// aapt resource value: 0x7f010045
public const int menu = 2130772037;
// aapt resource value: 0x7f01008c
public const int multiChoiceItemLayout = 2130772108;
// aapt resource value: 0x7f010133
public const int navigationContentDescription = 2130772275;
// aapt resource value: 0x7f010132
public const int navigationIcon = 2130772274;
// aapt resource value: 0x7f01006f
public const int navigationMode = 2130772079;
// aapt resource value: 0x7f010112
public const int overlapAnchor = 2130772242;
// aapt resource value: 0x7f010138
public const int paddingEnd = 2130772280;
// aapt resource value: 0x7f010137
public const int paddingStart = 2130772279;
// aapt resource value: 0x7f0100dd
public const int panelBackground = 2130772189;
// aapt resource value: 0x7f0100df
public const int panelMenuListTheme = 2130772191;
// aapt resource value: 0x7f0100de
public const int panelMenuListWidth = 2130772190;
// aapt resource value: 0x7f0100cb
public const int popupMenuStyle = 2130772171;
// aapt resource value: 0x7f010086
public const int popupTheme = 2130772102;
// aapt resource value: 0x7f0100cc
public const int popupWindowStyle = 2130772172;
// aapt resource value: 0x7f010111
public const int preserveIconSpacing = 2130772241;
// aapt resource value: 0x7f010041
public const int pressedTranslationZ = 2130772033;
// aapt resource value: 0x7f01007e
public const int progressBarPadding = 2130772094;
// aapt resource value: 0x7f01007c
public const int progressBarStyle = 2130772092;
// aapt resource value: 0x7f01011f
public const int queryBackground = 2130772255;
// aapt resource value: 0x7f010116
public const int queryHint = 2130772246;
// aapt resource value: 0x7f0100f8
public const int radioButtonStyle = 2130772216;
// aapt resource value: 0x7f0100f9
public const int ratingBarStyle = 2130772217;
// aapt resource value: 0x7f0100fa
public const int ratingBarStyleIndicator = 2130772218;
// aapt resource value: 0x7f0100fb
public const int ratingBarStyleSmall = 2130772219;
// aapt resource value: 0x7f010069
public const int reverseLayout = 2130772073;
// aapt resource value: 0x7f01003f
public const int rippleColor = 2130772031;
// aapt resource value: 0x7f01011b
public const int searchHintIcon = 2130772251;
// aapt resource value: 0x7f01011a
public const int searchIcon = 2130772250;
// aapt resource value: 0x7f0100d3
public const int searchViewStyle = 2130772179;
// aapt resource value: 0x7f0100fc
public const int seekBarStyle = 2130772220;
// aapt resource value: 0x7f0100c3
public const int selectableItemBackground = 2130772163;
// aapt resource value: 0x7f0100c4
public const int selectableItemBackgroundBorderless = 2130772164;
// aapt resource value: 0x7f01010d
public const int showAsAction = 2130772237;
// aapt resource value: 0x7f01010b
public const int showDividers = 2130772235;
// aapt resource value: 0x7f010127
public const int showText = 2130772263;
// aapt resource value: 0x7f01008d
public const int singleChoiceItemLayout = 2130772109;
// aapt resource value: 0x7f010068
public const int spanCount = 2130772072;
// aapt resource value: 0x7f010103
public const int spinBars = 2130772227;
// aapt resource value: 0x7f0100be
public const int spinnerDropDownItemStyle = 2130772158;
// aapt resource value: 0x7f0100fd
public const int spinnerStyle = 2130772221;
// aapt resource value: 0x7f010126
public const int splitTrack = 2130772262;
// aapt resource value: 0x7f01008f
public const int srcCompat = 2130772111;
// aapt resource value: 0x7f01006a
public const int stackFromEnd = 2130772074;
// aapt resource value: 0x7f010113
public const int state_above_anchor = 2130772243;
// aapt resource value: 0x7f010037
public const int statusBarBackground = 2130772023;
// aapt resource value: 0x7f010031
public const int statusBarScrim = 2130772017;
// aapt resource value: 0x7f010120
public const int submitBackground = 2130772256;
// aapt resource value: 0x7f010071
public const int subtitle = 2130772081;
// aapt resource value: 0x7f010129
public const int subtitleTextAppearance = 2130772265;
// aapt resource value: 0x7f010136
public const int subtitleTextColor = 2130772278;
// aapt resource value: 0x7f010073
public const int subtitleTextStyle = 2130772083;
// aapt resource value: 0x7f01011e
public const int suggestionRowLayout = 2130772254;
// aapt resource value: 0x7f010124
public const int switchMinWidth = 2130772260;
// aapt resource value: 0x7f010125
public const int switchPadding = 2130772261;
// aapt resource value: 0x7f0100fe
public const int switchStyle = 2130772222;
// aapt resource value: 0x7f010123
public const int switchTextAppearance = 2130772259;
// aapt resource value: 0x7f010051
public const int tabBackground = 2130772049;
// aapt resource value: 0x7f010050
public const int tabContentStart = 2130772048;
// aapt resource value: 0x7f010053
public const int tabGravity = 2130772051;
// aapt resource value: 0x7f01004e
public const int tabIndicatorColor = 2130772046;
// aapt resource value: 0x7f01004f
public const int tabIndicatorHeight = 2130772047;
// aapt resource value: 0x7f010055
public const int tabMaxWidth = 2130772053;
// aapt resource value: 0x7f010054
public const int tabMinWidth = 2130772052;
// aapt resource value: 0x7f010052
public const int tabMode = 2130772050;
// aapt resource value: 0x7f01005d
public const int tabPadding = 2130772061;
// aapt resource value: 0x7f01005c
public const int tabPaddingBottom = 2130772060;
// aapt resource value: 0x7f01005b
public const int tabPaddingEnd = 2130772059;
// aapt resource value: 0x7f010059
public const int tabPaddingStart = 2130772057;
// aapt resource value: 0x7f01005a
public const int tabPaddingTop = 2130772058;
// aapt resource value: 0x7f010058
public const int tabSelectedTextColor = 2130772056;
// aapt resource value: 0x7f010056
public const int tabTextAppearance = 2130772054;
// aapt resource value: 0x7f010057
public const int tabTextColor = 2130772055;
// aapt resource value: 0x7f010090
public const int textAllCaps = 2130772112;
// aapt resource value: 0x7f0100b7
public const int textAppearanceLargePopupMenu = 2130772151;
// aapt resource value: 0x7f0100db
public const int textAppearanceListItem = 2130772187;
// aapt resource value: 0x7f0100dc
public const int textAppearanceListItemSmall = 2130772188;
// aapt resource value: 0x7f0100d1
public const int textAppearanceSearchResultSubtitle = 2130772177;
// aapt resource value: 0x7f0100d0
public const int textAppearanceSearchResultTitle = 2130772176;
// aapt resource value: 0x7f0100b8
public const int textAppearanceSmallPopupMenu = 2130772152;
// aapt resource value: 0x7f0100ee
public const int textColorAlertDialogListItem = 2130772206;
// aapt resource value: 0x7f01003e
public const int textColorError = 2130772030;
// aapt resource value: 0x7f0100d2
public const int textColorSearchUrl = 2130772178;
// aapt resource value: 0x7f010139
public const int theme = 2130772281;
// aapt resource value: 0x7f010109
public const int thickness = 2130772233;
// aapt resource value: 0x7f010122
public const int thumbTextPadding = 2130772258;
// aapt resource value: 0x7f01006e
public const int title = 2130772078;
// aapt resource value: 0x7f010035
public const int titleEnabled = 2130772021;
// aapt resource value: 0x7f01012e
public const int titleMarginBottom = 2130772270;
// aapt resource value: 0x7f01012c
public const int titleMarginEnd = 2130772268;
// aapt resource value: 0x7f01012b
public const int titleMarginStart = 2130772267;
// aapt resource value: 0x7f01012d
public const int titleMarginTop = 2130772269;
// aapt resource value: 0x7f01012a
public const int titleMargins = 2130772266;
// aapt resource value: 0x7f010128
public const int titleTextAppearance = 2130772264;
// aapt resource value: 0x7f010135
public const int titleTextColor = 2130772277;
// aapt resource value: 0x7f010072
public const int titleTextStyle = 2130772082;
// aapt resource value: 0x7f010032
public const int toolbarId = 2130772018;
// aapt resource value: 0x7f0100ca
public const int toolbarNavigationButtonStyle = 2130772170;
// aapt resource value: 0x7f0100c9
public const int toolbarStyle = 2130772169;
// aapt resource value: 0x7f010121
public const int track = 2130772257;
// aapt resource value: 0x7f010043
public const int useCompatPadding = 2130772035;
// aapt resource value: 0x7f01011c
public const int voiceIcon = 2130772252;
// aapt resource value: 0x7f010091
public const int windowActionBar = 2130772113;
// aapt resource value: 0x7f010093
public const int windowActionBarOverlay = 2130772115;
// aapt resource value: 0x7f010094
public const int windowActionModeOverlay = 2130772116;
// aapt resource value: 0x7f010098
public const int windowFixedHeightMajor = 2130772120;
// aapt resource value: 0x7f010096
public const int windowFixedHeightMinor = 2130772118;
// aapt resource value: 0x7f010095
public const int windowFixedWidthMajor = 2130772117;
// aapt resource value: 0x7f010097
public const int windowFixedWidthMinor = 2130772119;
// aapt resource value: 0x7f010099
public const int windowMinWidthMajor = 2130772121;
// aapt resource value: 0x7f01009a
public const int windowMinWidthMinor = 2130772122;
// aapt resource value: 0x7f010092
public const int windowNoTitle = 2130772114;
static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Attribute()
{
}
}
public partial class Boolean
{
// aapt resource value: 0x7f0c0003
public const int abc_action_bar_embed_tabs = 2131492867;
// aapt resource value: 0x7f0c0001
public const int abc_action_bar_embed_tabs_pre_jb = 2131492865;
// aapt resource value: 0x7f0c0004
public const int abc_action_bar_expanded_action_views_exclusive = 2131492868;
// aapt resource value: 0x7f0c0000
public const int abc_allow_stacked_button_bar = 2131492864;
// aapt resource value: 0x7f0c0005
public const int abc_config_actionMenuItemAllCaps = 2131492869;
// aapt resource value: 0x7f0c0002
public const int abc_config_allowActionMenuItemTextWithIcon = 2131492866;
// aapt resource value: 0x7f0c0006
public const int abc_config_closeDialogWhenTouchOutside = 2131492870;
// aapt resource value: 0x7f0c0007
public const int abc_config_showMenuShortcutsWhenKeyboardPresent = 2131492871;
static Boolean()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Boolean()
{
}
}
public partial class Color
{
// aapt resource value: 0x7f0a0048
public const int abc_background_cache_hint_selector_material_dark = 2131361864;
// aapt resource value: 0x7f0a0049
public const int abc_background_cache_hint_selector_material_light = 2131361865;
// aapt resource value: 0x7f0a004a
public const int abc_color_highlight_material = 2131361866;
// aapt resource value: 0x7f0a000e
public const int abc_input_method_navigation_guard = 2131361806;
// aapt resource value: 0x7f0a004b
public const int abc_primary_text_disable_only_material_dark = 2131361867;
// aapt resource value: 0x7f0a004c
public const int abc_primary_text_disable_only_material_light = 2131361868;
// aapt resource value: 0x7f0a004d
public const int abc_primary_text_material_dark = 2131361869;
// aapt resource value: 0x7f0a004e
public const int abc_primary_text_material_light = 2131361870;
// aapt resource value: 0x7f0a004f
public const int abc_search_url_text = 2131361871;
// aapt resource value: 0x7f0a000f
public const int abc_search_url_text_normal = 2131361807;
// aapt resource value: 0x7f0a0010
public const int abc_search_url_text_pressed = 2131361808;
// aapt resource value: 0x7f0a0011
public const int abc_search_url_text_selected = 2131361809;
// aapt resource value: 0x7f0a0050
public const int abc_secondary_text_material_dark = 2131361872;
// aapt resource value: 0x7f0a0051
public const int abc_secondary_text_material_light = 2131361873;
// aapt resource value: 0x7f0a0012
public const int accent_material_dark = 2131361810;
// aapt resource value: 0x7f0a0013
public const int accent_material_light = 2131361811;
// aapt resource value: 0x7f0a0014
public const int background_floating_material_dark = 2131361812;
// aapt resource value: 0x7f0a0015
public const int background_floating_material_light = 2131361813;
// aapt resource value: 0x7f0a0016
public const int background_material_dark = 2131361814;
// aapt resource value: 0x7f0a0017
public const int background_material_light = 2131361815;
// aapt resource value: 0x7f0a0018
public const int bright_foreground_disabled_material_dark = 2131361816;
// aapt resource value: 0x7f0a0019
public const int bright_foreground_disabled_material_light = 2131361817;
// aapt resource value: 0x7f0a001a
public const int bright_foreground_inverse_material_dark = 2131361818;
// aapt resource value: 0x7f0a001b
public const int bright_foreground_inverse_material_light = 2131361819;
// aapt resource value: 0x7f0a001c
public const int bright_foreground_material_dark = 2131361820;
// aapt resource value: 0x7f0a001d
public const int bright_foreground_material_light = 2131361821;
// aapt resource value: 0x7f0a001e
public const int button_material_dark = 2131361822;
// aapt resource value: 0x7f0a001f
public const int button_material_light = 2131361823;
// aapt resource value: 0x7f0a0000
public const int cardview_dark_background = 2131361792;
// aapt resource value: 0x7f0a0001
public const int cardview_light_background = 2131361793;
// aapt resource value: 0x7f0a0002
public const int cardview_shadow_end_color = 2131361794;
// aapt resource value: 0x7f0a0003
public const int cardview_shadow_start_color = 2131361795;
// aapt resource value: 0x7f0a0004
public const int design_fab_shadow_end_color = 2131361796;
// aapt resource value: 0x7f0a0005
public const int design_fab_shadow_mid_color = 2131361797;
// aapt resource value: 0x7f0a0006
public const int design_fab_shadow_start_color = 2131361798;
// aapt resource value: 0x7f0a0007
public const int design_fab_stroke_end_inner_color = 2131361799;
// aapt resource value: 0x7f0a0008
public const int design_fab_stroke_end_outer_color = 2131361800;
// aapt resource value: 0x7f0a0009
public const int design_fab_stroke_top_inner_color = 2131361801;
// aapt resource value: 0x7f0a000a
public const int design_fab_stroke_top_outer_color = 2131361802;
// aapt resource value: 0x7f0a000b
public const int design_snackbar_background_color = 2131361803;
// aapt resource value: 0x7f0a000c
public const int design_textinput_error_color_dark = 2131361804;
// aapt resource value: 0x7f0a000d
public const int design_textinput_error_color_light = 2131361805;
// aapt resource value: 0x7f0a0020
public const int dim_foreground_disabled_material_dark = 2131361824;
// aapt resource value: 0x7f0a0021
public const int dim_foreground_disabled_material_light = 2131361825;
// aapt resource value: 0x7f0a0022
public const int dim_foreground_material_dark = 2131361826;
// aapt resource value: 0x7f0a0023
public const int dim_foreground_material_light = 2131361827;
// aapt resource value: 0x7f0a0024
public const int foreground_material_dark = 2131361828;
// aapt resource value: 0x7f0a0025
public const int foreground_material_light = 2131361829;
// aapt resource value: 0x7f0a0026
public const int highlighted_text_material_dark = 2131361830;
// aapt resource value: 0x7f0a0027
public const int highlighted_text_material_light = 2131361831;
// aapt resource value: 0x7f0a0028
public const int hint_foreground_material_dark = 2131361832;
// aapt resource value: 0x7f0a0029
public const int hint_foreground_material_light = 2131361833;
// aapt resource value: 0x7f0a002a
public const int material_blue_grey_800 = 2131361834;
// aapt resource value: 0x7f0a002b
public const int material_blue_grey_900 = 2131361835;
// aapt resource value: 0x7f0a002c
public const int material_blue_grey_950 = 2131361836;
// aapt resource value: 0x7f0a002d
public const int material_deep_teal_200 = 2131361837;
// aapt resource value: 0x7f0a002e
public const int material_deep_teal_500 = 2131361838;
// aapt resource value: 0x7f0a002f
public const int material_grey_100 = 2131361839;
// aapt resource value: 0x7f0a0030
public const int material_grey_300 = 2131361840;
// aapt resource value: 0x7f0a0031
public const int material_grey_50 = 2131361841;
// aapt resource value: 0x7f0a0032
public const int material_grey_600 = 2131361842;
// aapt resource value: 0x7f0a0033
public const int material_grey_800 = 2131361843;
// aapt resource value: 0x7f0a0034
public const int material_grey_850 = 2131361844;
// aapt resource value: 0x7f0a0035
public const int material_grey_900 = 2131361845;
// aapt resource value: 0x7f0a0036
public const int primary_dark_material_dark = 2131361846;
// aapt resource value: 0x7f0a0037
public const int primary_dark_material_light = 2131361847;
// aapt resource value: 0x7f0a0038
public const int primary_material_dark = 2131361848;
// aapt resource value: 0x7f0a0039
public const int primary_material_light = 2131361849;
// aapt resource value: 0x7f0a003a
public const int primary_text_default_material_dark = 2131361850;
// aapt resource value: 0x7f0a003b
public const int primary_text_default_material_light = 2131361851;
// aapt resource value: 0x7f0a003c
public const int primary_text_disabled_material_dark = 2131361852;
// aapt resource value: 0x7f0a003d
public const int primary_text_disabled_material_light = 2131361853;
// aapt resource value: 0x7f0a003e
public const int ripple_material_dark = 2131361854;
// aapt resource value: 0x7f0a003f
public const int ripple_material_light = 2131361855;
// aapt resource value: 0x7f0a0040
public const int secondary_text_default_material_dark = 2131361856;
// aapt resource value: 0x7f0a0041
public const int secondary_text_default_material_light = 2131361857;
// aapt resource value: 0x7f0a0042
public const int secondary_text_disabled_material_dark = 2131361858;
// aapt resource value: 0x7f0a0043
public const int secondary_text_disabled_material_light = 2131361859;
// aapt resource value: 0x7f0a0044
public const int switch_thumb_disabled_material_dark = 2131361860;
// aapt resource value: 0x7f0a0045
public const int switch_thumb_disabled_material_light = 2131361861;
// aapt resource value: 0x7f0a0052
public const int switch_thumb_material_dark = 2131361874;
// aapt resource value: 0x7f0a0053
public const int switch_thumb_material_light = 2131361875;
// aapt resource value: 0x7f0a0046
public const int switch_thumb_normal_material_dark = 2131361862;
// aapt resource value: 0x7f0a0047
public const int switch_thumb_normal_material_light = 2131361863;
static Color()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Color()
{
}
}
public partial class Dimension
{
// aapt resource value: 0x7f070036
public const int abc_action_bar_content_inset_material = 2131165238;
// aapt resource value: 0x7f07002a
public const int abc_action_bar_default_height_material = 2131165226;
// aapt resource value: 0x7f070037
public const int abc_action_bar_default_padding_end_material = 2131165239;
// aapt resource value: 0x7f070038
public const int abc_action_bar_default_padding_start_material = 2131165240;
// aapt resource value: 0x7f07003a
public const int abc_action_bar_icon_vertical_padding_material = 2131165242;
// aapt resource value: 0x7f07003b
public const int abc_action_bar_overflow_padding_end_material = 2131165243;
// aapt resource value: 0x7f07003c
public const int abc_action_bar_overflow_padding_start_material = 2131165244;
// aapt resource value: 0x7f07002b
public const int abc_action_bar_progress_bar_size = 2131165227;
// aapt resource value: 0x7f07003d
public const int abc_action_bar_stacked_max_height = 2131165245;
// aapt resource value: 0x7f07003e
public const int abc_action_bar_stacked_tab_max_width = 2131165246;
// aapt resource value: 0x7f07003f
public const int abc_action_bar_subtitle_bottom_margin_material = 2131165247;
// aapt resource value: 0x7f070040
public const int abc_action_bar_subtitle_top_margin_material = 2131165248;
// aapt resource value: 0x7f070041
public const int abc_action_button_min_height_material = 2131165249;
// aapt resource value: 0x7f070042
public const int abc_action_button_min_width_material = 2131165250;
// aapt resource value: 0x7f070043
public const int abc_action_button_min_width_overflow_material = 2131165251;
// aapt resource value: 0x7f070029
public const int abc_alert_dialog_button_bar_height = 2131165225;
// aapt resource value: 0x7f070044
public const int abc_button_inset_horizontal_material = 2131165252;
// aapt resource value: 0x7f070045
public const int abc_button_inset_vertical_material = 2131165253;
// aapt resource value: 0x7f070046
public const int abc_button_padding_horizontal_material = 2131165254;
// aapt resource value: 0x7f070047
public const int abc_button_padding_vertical_material = 2131165255;
// aapt resource value: 0x7f07002e
public const int abc_config_prefDialogWidth = 2131165230;
// aapt resource value: 0x7f070048
public const int abc_control_corner_material = 2131165256;
// aapt resource value: 0x7f070049
public const int abc_control_inset_material = 2131165257;
// aapt resource value: 0x7f07004a
public const int abc_control_padding_material = 2131165258;
// aapt resource value: 0x7f07002f
public const int abc_dialog_fixed_height_major = 2131165231;
// aapt resource value: 0x7f070030
public const int abc_dialog_fixed_height_minor = 2131165232;
// aapt resource value: 0x7f070031
public const int abc_dialog_fixed_width_major = 2131165233;
// aapt resource value: 0x7f070032
public const int abc_dialog_fixed_width_minor = 2131165234;
// aapt resource value: 0x7f07004b
public const int abc_dialog_list_padding_vertical_material = 2131165259;
// aapt resource value: 0x7f070033
public const int abc_dialog_min_width_major = 2131165235;
// aapt resource value: 0x7f070034
public const int abc_dialog_min_width_minor = 2131165236;
// aapt resource value: 0x7f07004c
public const int abc_dialog_padding_material = 2131165260;
// aapt resource value: 0x7f07004d
public const int abc_dialog_padding_top_material = 2131165261;
// aapt resource value: 0x7f07004e
public const int abc_disabled_alpha_material_dark = 2131165262;
// aapt resource value: 0x7f07004f
public const int abc_disabled_alpha_material_light = 2131165263;
// aapt resource value: 0x7f070050
public const int abc_dropdownitem_icon_width = 2131165264;
// aapt resource value: 0x7f070051
public const int abc_dropdownitem_text_padding_left = 2131165265;
// aapt resource value: 0x7f070052
public const int abc_dropdownitem_text_padding_right = 2131165266;
// aapt resource value: 0x7f070053
public const int abc_edit_text_inset_bottom_material = 2131165267;
// aapt resource value: 0x7f070054
public const int abc_edit_text_inset_horizontal_material = 2131165268;
// aapt resource value: 0x7f070055
public const int abc_edit_text_inset_top_material = 2131165269;
// aapt resource value: 0x7f070056
public const int abc_floating_window_z = 2131165270;
// aapt resource value: 0x7f070057
public const int abc_list_item_padding_horizontal_material = 2131165271;
// aapt resource value: 0x7f070058
public const int abc_panel_menu_list_width = 2131165272;
// aapt resource value: 0x7f070059
public const int abc_search_view_preferred_width = 2131165273;
// aapt resource value: 0x7f070035
public const int abc_search_view_text_min_width = 2131165237;
// aapt resource value: 0x7f07005a
public const int abc_seekbar_track_background_height_material = 2131165274;
// aapt resource value: 0x7f07005b
public const int abc_seekbar_track_progress_height_material = 2131165275;
// aapt resource value: 0x7f07005c
public const int abc_select_dialog_padding_start_material = 2131165276;
// aapt resource value: 0x7f070039
public const int abc_switch_padding = 2131165241;
// aapt resource value: 0x7f07005d
public const int abc_text_size_body_1_material = 2131165277;
// aapt resource value: 0x7f07005e
public const int abc_text_size_body_2_material = 2131165278;
// aapt resource value: 0x7f07005f
public const int abc_text_size_button_material = 2131165279;
// aapt resource value: 0x7f070060
public const int abc_text_size_caption_material = 2131165280;
// aapt resource value: 0x7f070061
public const int abc_text_size_display_1_material = 2131165281;
// aapt resource value: 0x7f070062
public const int abc_text_size_display_2_material = 2131165282;
// aapt resource value: 0x7f070063
public const int abc_text_size_display_3_material = 2131165283;
// aapt resource value: 0x7f070064
public const int abc_text_size_display_4_material = 2131165284;
// aapt resource value: 0x7f070065
public const int abc_text_size_headline_material = 2131165285;
// aapt resource value: 0x7f070066
public const int abc_text_size_large_material = 2131165286;
// aapt resource value: 0x7f070067
public const int abc_text_size_medium_material = 2131165287;
// aapt resource value: 0x7f070068
public const int abc_text_size_menu_material = 2131165288;
// aapt resource value: 0x7f070069
public const int abc_text_size_small_material = 2131165289;
// aapt resource value: 0x7f07006a
public const int abc_text_size_subhead_material = 2131165290;
// aapt resource value: 0x7f07002c
public const int abc_text_size_subtitle_material_toolbar = 2131165228;
// aapt resource value: 0x7f07006b
public const int abc_text_size_title_material = 2131165291;
// aapt resource value: 0x7f07002d
public const int abc_text_size_title_material_toolbar = 2131165229;
// aapt resource value: 0x7f070006
public const int cardview_compat_inset_shadow = 2131165190;
// aapt resource value: 0x7f070007
public const int cardview_default_elevation = 2131165191;
// aapt resource value: 0x7f070008
public const int cardview_default_radius = 2131165192;
// aapt resource value: 0x7f070011
public const int design_appbar_elevation = 2131165201;
// aapt resource value: 0x7f070012
public const int design_bottom_sheet_modal_elevation = 2131165202;
// aapt resource value: 0x7f070013
public const int design_bottom_sheet_modal_peek_height = 2131165203;
// aapt resource value: 0x7f070014
public const int design_fab_border_width = 2131165204;
// aapt resource value: 0x7f070015
public const int design_fab_elevation = 2131165205;
// aapt resource value: 0x7f070016
public const int design_fab_image_size = 2131165206;
// aapt resource value: 0x7f070017
public const int design_fab_size_mini = 2131165207;
// aapt resource value: 0x7f070018
public const int design_fab_size_normal = 2131165208;
// aapt resource value: 0x7f070019
public const int design_fab_translation_z_pressed = 2131165209;
// aapt resource value: 0x7f07001a
public const int design_navigation_elevation = 2131165210;
// aapt resource value: 0x7f07001b
public const int design_navigation_icon_padding = 2131165211;
// aapt resource value: 0x7f07001c
public const int design_navigation_icon_size = 2131165212;
// aapt resource value: 0x7f070009
public const int design_navigation_max_width = 2131165193;
// aapt resource value: 0x7f07001d
public const int design_navigation_padding_bottom = 2131165213;
// aapt resource value: 0x7f07001e
public const int design_navigation_separator_vertical_padding = 2131165214;
// aapt resource value: 0x7f07000a
public const int design_snackbar_action_inline_max_width = 2131165194;
// aapt resource value: 0x7f07000b
public const int design_snackbar_background_corner_radius = 2131165195;
// aapt resource value: 0x7f07001f
public const int design_snackbar_elevation = 2131165215;
// aapt resource value: 0x7f07000c
public const int design_snackbar_extra_spacing_horizontal = 2131165196;
// aapt resource value: 0x7f07000d
public const int design_snackbar_max_width = 2131165197;
// aapt resource value: 0x7f07000e
public const int design_snackbar_min_width = 2131165198;
// aapt resource value: 0x7f070020
public const int design_snackbar_padding_horizontal = 2131165216;
// aapt resource value: 0x7f070021
public const int design_snackbar_padding_vertical = 2131165217;
// aapt resource value: 0x7f07000f
public const int design_snackbar_padding_vertical_2lines = 2131165199;
// aapt resource value: 0x7f070022
public const int design_snackbar_text_size = 2131165218;
// aapt resource value: 0x7f070023
public const int design_tab_max_width = 2131165219;
// aapt resource value: 0x7f070010
public const int design_tab_scrollable_min_width = 2131165200;
// aapt resource value: 0x7f070024
public const int design_tab_text_size = 2131165220;
// aapt resource value: 0x7f070025
public const int design_tab_text_size_2line = 2131165221;
// aapt resource value: 0x7f07006c
public const int disabled_alpha_material_dark = 2131165292;
// aapt resource value: 0x7f07006d
public const int disabled_alpha_material_light = 2131165293;
// aapt resource value: 0x7f07006e
public const int highlight_alpha_material_colored = 2131165294;
// aapt resource value: 0x7f07006f
public const int highlight_alpha_material_dark = 2131165295;
// aapt resource value: 0x7f070070
public const int highlight_alpha_material_light = 2131165296;
// aapt resource value: 0x7f070026
public const int item_touch_helper_max_drag_scroll_per_frame = 2131165222;
// aapt resource value: 0x7f070027
public const int item_touch_helper_swipe_escape_max_velocity = 2131165223;
// aapt resource value: 0x7f070028
public const int item_touch_helper_swipe_escape_velocity = 2131165224;
// aapt resource value: 0x7f070000
public const int mr_controller_volume_group_list_item_height = 2131165184;
// aapt resource value: 0x7f070001
public const int mr_controller_volume_group_list_item_icon_size = 2131165185;
// aapt resource value: 0x7f070002
public const int mr_controller_volume_group_list_max_height = 2131165186;
// aapt resource value: 0x7f070005
public const int mr_controller_volume_group_list_padding_top = 2131165189;
// aapt resource value: 0x7f070003
public const int mr_dialog_fixed_width_major = 2131165187;
// aapt resource value: 0x7f070004
public const int mr_dialog_fixed_width_minor = 2131165188;
// aapt resource value: 0x7f070071
public const int notification_large_icon_height = 2131165297;
// aapt resource value: 0x7f070072
public const int notification_large_icon_width = 2131165298;
// aapt resource value: 0x7f070073
public const int notification_subtext_size = 2131165299;
static Dimension()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Dimension()
{
}
}
public partial class Drawable
{
// aapt resource value: 0x7f020000
public const int abc_ab_share_pack_mtrl_alpha = 2130837504;
// aapt resource value: 0x7f020001
public const int abc_action_bar_item_background_material = 2130837505;
// aapt resource value: 0x7f020002
public const int abc_btn_borderless_material = 2130837506;
// aapt resource value: 0x7f020003
public const int abc_btn_check_material = 2130837507;
// aapt resource value: 0x7f020004
public const int abc_btn_check_to_on_mtrl_000 = 2130837508;
// aapt resource value: 0x7f020005
public const int abc_btn_check_to_on_mtrl_015 = 2130837509;
// aapt resource value: 0x7f020006
public const int abc_btn_colored_material = 2130837510;
// aapt resource value: 0x7f020007
public const int abc_btn_default_mtrl_shape = 2130837511;
// aapt resource value: 0x7f020008
public const int abc_btn_radio_material = 2130837512;
// aapt resource value: 0x7f020009
public const int abc_btn_radio_to_on_mtrl_000 = 2130837513;
// aapt resource value: 0x7f02000a
public const int abc_btn_radio_to_on_mtrl_015 = 2130837514;
// aapt resource value: 0x7f02000b
public const int abc_btn_rating_star_off_mtrl_alpha = 2130837515;
// aapt resource value: 0x7f02000c
public const int abc_btn_rating_star_on_mtrl_alpha = 2130837516;
// aapt resource value: 0x7f02000d
public const int abc_btn_switch_to_on_mtrl_00001 = 2130837517;
// aapt resource value: 0x7f02000e
public const int abc_btn_switch_to_on_mtrl_00012 = 2130837518;
// aapt resource value: 0x7f02000f
public const int abc_cab_background_internal_bg = 2130837519;
// aapt resource value: 0x7f020010
public const int abc_cab_background_top_material = 2130837520;
// aapt resource value: 0x7f020011
public const int abc_cab_background_top_mtrl_alpha = 2130837521;
// aapt resource value: 0x7f020012
public const int abc_control_background_material = 2130837522;
// aapt resource value: 0x7f020013
public const int abc_dialog_material_background_dark = 2130837523;
// aapt resource value: 0x7f020014
public const int abc_dialog_material_background_light = 2130837524;
// aapt resource value: 0x7f020015
public const int abc_edit_text_material = 2130837525;
// aapt resource value: 0x7f020016
public const int abc_ic_ab_back_mtrl_am_alpha = 2130837526;
// aapt resource value: 0x7f020017
public const int abc_ic_clear_mtrl_alpha = 2130837527;
// aapt resource value: 0x7f020018
public const int abc_ic_commit_search_api_mtrl_alpha = 2130837528;
// aapt resource value: 0x7f020019
public const int abc_ic_go_search_api_mtrl_alpha = 2130837529;
// aapt resource value: 0x7f02001a
public const int abc_ic_menu_copy_mtrl_am_alpha = 2130837530;
// aapt resource value: 0x7f02001b
public const int abc_ic_menu_cut_mtrl_alpha = 2130837531;
// aapt resource value: 0x7f02001c
public const int abc_ic_menu_moreoverflow_mtrl_alpha = 2130837532;
// aapt resource value: 0x7f02001d
public const int abc_ic_menu_paste_mtrl_am_alpha = 2130837533;
// aapt resource value: 0x7f02001e
public const int abc_ic_menu_selectall_mtrl_alpha = 2130837534;
// aapt resource value: 0x7f02001f
public const int abc_ic_menu_share_mtrl_alpha = 2130837535;
// aapt resource value: 0x7f020020
public const int abc_ic_search_api_mtrl_alpha = 2130837536;
// aapt resource value: 0x7f020021
public const int abc_ic_star_black_16dp = 2130837537;
// aapt resource value: 0x7f020022
public const int abc_ic_star_black_36dp = 2130837538;
// aapt resource value: 0x7f020023
public const int abc_ic_star_half_black_16dp = 2130837539;
// aapt resource value: 0x7f020024
public const int abc_ic_star_half_black_36dp = 2130837540;
// aapt resource value: 0x7f020025
public const int abc_ic_voice_search_api_mtrl_alpha = 2130837541;
// aapt resource value: 0x7f020026
public const int abc_item_background_holo_dark = 2130837542;
// aapt resource value: 0x7f020027
public const int abc_item_background_holo_light = 2130837543;
// aapt resource value: 0x7f020028
public const int abc_list_divider_mtrl_alpha = 2130837544;
// aapt resource value: 0x7f020029
public const int abc_list_focused_holo = 2130837545;
// aapt resource value: 0x7f02002a
public const int abc_list_longpressed_holo = 2130837546;
// aapt resource value: 0x7f02002b
public const int abc_list_pressed_holo_dark = 2130837547;
// aapt resource value: 0x7f02002c
public const int abc_list_pressed_holo_light = 2130837548;
// aapt resource value: 0x7f02002d
public const int abc_list_selector_background_transition_holo_dark = 2130837549;
// aapt resource value: 0x7f02002e
public const int abc_list_selector_background_transition_holo_light = 2130837550;
// aapt resource value: 0x7f02002f
public const int abc_list_selector_disabled_holo_dark = 2130837551;
// aapt resource value: 0x7f020030
public const int abc_list_selector_disabled_holo_light = 2130837552;
// aapt resource value: 0x7f020031
public const int abc_list_selector_holo_dark = 2130837553;
// aapt resource value: 0x7f020032
public const int abc_list_selector_holo_light = 2130837554;
// aapt resource value: 0x7f020033
public const int abc_menu_hardkey_panel_mtrl_mult = 2130837555;
// aapt resource value: 0x7f020034
public const int abc_popup_background_mtrl_mult = 2130837556;
// aapt resource value: 0x7f020035
public const int abc_ratingbar_full_material = 2130837557;
// aapt resource value: 0x7f020036
public const int abc_ratingbar_indicator_material = 2130837558;
// aapt resource value: 0x7f020037
public const int abc_ratingbar_small_material = 2130837559;
// aapt resource value: 0x7f020038
public const int abc_scrubber_control_off_mtrl_alpha = 2130837560;
// aapt resource value: 0x7f020039
public const int abc_scrubber_control_to_pressed_mtrl_000 = 2130837561;
// aapt resource value: 0x7f02003a
public const int abc_scrubber_control_to_pressed_mtrl_005 = 2130837562;
// aapt resource value: 0x7f02003b
public const int abc_scrubber_primary_mtrl_alpha = 2130837563;
// aapt resource value: 0x7f02003c
public const int abc_scrubber_track_mtrl_alpha = 2130837564;
// aapt resource value: 0x7f02003d
public const int abc_seekbar_thumb_material = 2130837565;
// aapt resource value: 0x7f02003e
public const int abc_seekbar_track_material = 2130837566;
// aapt resource value: 0x7f02003f
public const int abc_spinner_mtrl_am_alpha = 2130837567;
// aapt resource value: 0x7f020040
public const int abc_spinner_textfield_background_material = 2130837568;
// aapt resource value: 0x7f020041
public const int abc_switch_thumb_material = 2130837569;
// aapt resource value: 0x7f020042
public const int abc_switch_track_mtrl_alpha = 2130837570;
// aapt resource value: 0x7f020043
public const int abc_tab_indicator_material = 2130837571;
// aapt resource value: 0x7f020044
public const int abc_tab_indicator_mtrl_alpha = 2130837572;
// aapt resource value: 0x7f020045
public const int abc_text_cursor_material = 2130837573;
// aapt resource value: 0x7f020046
public const int abc_textfield_activated_mtrl_alpha = 2130837574;
// aapt resource value: 0x7f020047
public const int abc_textfield_default_mtrl_alpha = 2130837575;
// aapt resource value: 0x7f020048
public const int abc_textfield_search_activated_mtrl_alpha = 2130837576;
// aapt resource value: 0x7f020049
public const int abc_textfield_search_default_mtrl_alpha = 2130837577;
// aapt resource value: 0x7f02004a
public const int abc_textfield_search_material = 2130837578;
// aapt resource value: 0x7f02004b
public const int design_fab_background = 2130837579;
// aapt resource value: 0x7f02004c
public const int design_snackbar_background = 2130837580;
// aapt resource value: 0x7f02004d
public const int ic_audiotrack = 2130837581;
// aapt resource value: 0x7f02004e
public const int ic_audiotrack_light = 2130837582;
// aapt resource value: 0x7f02004f
public const int ic_bluetooth_grey = 2130837583;
// aapt resource value: 0x7f020050
public const int ic_bluetooth_white = 2130837584;
// aapt resource value: 0x7f020051
public const int ic_cast_dark = 2130837585;
// aapt resource value: 0x7f020052
public const int ic_cast_disabled_light = 2130837586;
// aapt resource value: 0x7f020053
public const int ic_cast_grey = 2130837587;
// aapt resource value: 0x7f020054
public const int ic_cast_light = 2130837588;
// aapt resource value: 0x7f020055
public const int ic_cast_off_light = 2130837589;
// aapt resource value: 0x7f020056
public const int ic_cast_on_0_light = 2130837590;
// aapt resource value: 0x7f020057
public const int ic_cast_on_1_light = 2130837591;
// aapt resource value: 0x7f020058
public const int ic_cast_on_2_light = 2130837592;
// aapt resource value: 0x7f020059
public const int ic_cast_on_light = 2130837593;
// aapt resource value: 0x7f02005a
public const int ic_cast_white = 2130837594;
// aapt resource value: 0x7f02005b
public const int ic_close_dark = 2130837595;
// aapt resource value: 0x7f02005c
public const int ic_close_light = 2130837596;
// aapt resource value: 0x7f02005d
public const int ic_collapse = 2130837597;
// aapt resource value: 0x7f02005e
public const int ic_collapse_00000 = 2130837598;
// aapt resource value: 0x7f02005f
public const int ic_collapse_00001 = 2130837599;
// aapt resource value: 0x7f020060
public const int ic_collapse_00002 = 2130837600;
// aapt resource value: 0x7f020061
public const int ic_collapse_00003 = 2130837601;
// aapt resource value: 0x7f020062
public const int ic_collapse_00004 = 2130837602;
// aapt resource value: 0x7f020063
public const int ic_collapse_00005 = 2130837603;
// aapt resource value: 0x7f020064
public const int ic_collapse_00006 = 2130837604;
// aapt resource value: 0x7f020065
public const int ic_collapse_00007 = 2130837605;
// aapt resource value: 0x7f020066
public const int ic_collapse_00008 = 2130837606;
// aapt resource value: 0x7f020067
public const int ic_collapse_00009 = 2130837607;
// aapt resource value: 0x7f020068
public const int ic_collapse_00010 = 2130837608;
// aapt resource value: 0x7f020069
public const int ic_collapse_00011 = 2130837609;
// aapt resource value: 0x7f02006a
public const int ic_collapse_00012 = 2130837610;
// aapt resource value: 0x7f02006b
public const int ic_collapse_00013 = 2130837611;
// aapt resource value: 0x7f02006c
public const int ic_collapse_00014 = 2130837612;
// aapt resource value: 0x7f02006d
public const int ic_collapse_00015 = 2130837613;
// aapt resource value: 0x7f02006e
public const int ic_expand = 2130837614;
// aapt resource value: 0x7f02006f
public const int ic_expand_00000 = 2130837615;
// aapt resource value: 0x7f020070
public const int ic_expand_00001 = 2130837616;
// aapt resource value: 0x7f020071
public const int ic_expand_00002 = 2130837617;
// aapt resource value: 0x7f020072
public const int ic_expand_00003 = 2130837618;
// aapt resource value: 0x7f020073
public const int ic_expand_00004 = 2130837619;
// aapt resource value: 0x7f020074
public const int ic_expand_00005 = 2130837620;
// aapt resource value: 0x7f020075
public const int ic_expand_00006 = 2130837621;
// aapt resource value: 0x7f020076
public const int ic_expand_00007 = 2130837622;
// aapt resource value: 0x7f020077
public const int ic_expand_00008 = 2130837623;
// aapt resource value: 0x7f020078
public const int ic_expand_00009 = 2130837624;
// aapt resource value: 0x7f020079
public const int ic_expand_00010 = 2130837625;
// aapt resource value: 0x7f02007a
public const int ic_expand_00011 = 2130837626;
// aapt resource value: 0x7f02007b
public const int ic_expand_00012 = 2130837627;
// aapt resource value: 0x7f02007c
public const int ic_expand_00013 = 2130837628;
// aapt resource value: 0x7f02007d
public const int ic_expand_00014 = 2130837629;
// aapt resource value: 0x7f02007e
public const int ic_expand_00015 = 2130837630;
// aapt resource value: 0x7f02007f
public const int ic_media_pause = 2130837631;
// aapt resource value: 0x7f020080
public const int ic_media_play = 2130837632;
// aapt resource value: 0x7f020081
public const int ic_media_route_disabled_mono_dark = 2130837633;
// aapt resource value: 0x7f020082
public const int ic_media_route_off_mono_dark = 2130837634;
// aapt resource value: 0x7f020083
public const int ic_media_route_on_0_mono_dark = 2130837635;
// aapt resource value: 0x7f020084
public const int ic_media_route_on_1_mono_dark = 2130837636;
// aapt resource value: 0x7f020085
public const int ic_media_route_on_2_mono_dark = 2130837637;
// aapt resource value: 0x7f020086
public const int ic_media_route_on_mono_dark = 2130837638;
// aapt resource value: 0x7f020087
public const int ic_pause_dark = 2130837639;
// aapt resource value: 0x7f020088
public const int ic_pause_light = 2130837640;
// aapt resource value: 0x7f020089
public const int ic_play_dark = 2130837641;
// aapt resource value: 0x7f02008a
public const int ic_play_light = 2130837642;
// aapt resource value: 0x7f02008b
public const int ic_speaker_dark = 2130837643;
// aapt resource value: 0x7f02008c
public const int ic_speaker_group_dark = 2130837644;
// aapt resource value: 0x7f02008d
public const int ic_speaker_group_light = 2130837645;
// aapt resource value: 0x7f02008e
public const int ic_speaker_light = 2130837646;
// aapt resource value: 0x7f02008f
public const int ic_tv_dark = 2130837647;
// aapt resource value: 0x7f020090
public const int ic_tv_light = 2130837648;
// aapt resource value: 0x7f020091
public const int icon = 2130837649;
// aapt resource value: 0x7f020092
public const int img_18194633_10155116910866605_6268378657792773710_n = 2130837650;
// aapt resource value: 0x7f020093
public const int mr_dialog_material_background_dark = 2130837651;
// aapt resource value: 0x7f020094
public const int mr_dialog_material_background_light = 2130837652;
// aapt resource value: 0x7f020095
public const int mr_ic_audiotrack_light = 2130837653;
// aapt resource value: 0x7f020096
public const int mr_ic_cast_dark = 2130837654;
// aapt resource value: 0x7f020097
public const int mr_ic_cast_light = 2130837655;
// aapt resource value: 0x7f020098
public const int mr_ic_close_dark = 2130837656;
// aapt resource value: 0x7f020099
public const int mr_ic_close_light = 2130837657;
// aapt resource value: 0x7f02009a
public const int mr_ic_media_route_connecting_mono_dark = 2130837658;
// aapt resource value: 0x7f02009b
public const int mr_ic_media_route_connecting_mono_light = 2130837659;
// aapt resource value: 0x7f02009c
public const int mr_ic_media_route_mono_dark = 2130837660;
// aapt resource value: 0x7f02009d
public const int mr_ic_media_route_mono_light = 2130837661;
// aapt resource value: 0x7f02009e
public const int mr_ic_pause_dark = 2130837662;
// aapt resource value: 0x7f02009f
public const int mr_ic_pause_light = 2130837663;
// aapt resource value: 0x7f0200a0
public const int mr_ic_play_dark = 2130837664;
// aapt resource value: 0x7f0200a1
public const int mr_ic_play_light = 2130837665;
// aapt resource value: 0x7f0200a2
public const int notification_template_icon_bg = 2130837666;
static Drawable()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Drawable()
{
}
}
public partial class Id
{
// aapt resource value: 0x7f0b008b
public const int action0 = 2131427467;
// aapt resource value: 0x7f0b005a
public const int action_bar = 2131427418;
// aapt resource value: 0x7f0b0002
public const int action_bar_activity_content = 2131427330;
// aapt resource value: 0x7f0b0059
public const int action_bar_container = 2131427417;
// aapt resource value: 0x7f0b0055
public const int action_bar_root = 2131427413;
// aapt resource value: 0x7f0b0003
public const int action_bar_spinner = 2131427331;
// aapt resource value: 0x7f0b003b
public const int action_bar_subtitle = 2131427387;
// aapt resource value: 0x7f0b003a
public const int action_bar_title = 2131427386;
// aapt resource value: 0x7f0b005b
public const int action_context_bar = 2131427419;
// aapt resource value: 0x7f0b008f
public const int action_divider = 2131427471;
// aapt resource value: 0x7f0b0004
public const int action_menu_divider = 2131427332;
// aapt resource value: 0x7f0b0005
public const int action_menu_presenter = 2131427333;
// aapt resource value: 0x7f0b0057
public const int action_mode_bar = 2131427415;
// aapt resource value: 0x7f0b0056
public const int action_mode_bar_stub = 2131427414;
// aapt resource value: 0x7f0b003c
public const int action_mode_close_button = 2131427388;
// aapt resource value: 0x7f0b003d
public const int activity_chooser_view_content = 2131427389;
// aapt resource value: 0x7f0b0049
public const int alertTitle = 2131427401;
// aapt resource value: 0x7f0b0035
public const int always = 2131427381;
// aapt resource value: 0x7f0b0033
public const int beginning = 2131427379;
// aapt resource value: 0x7f0b0013
public const int bottom = 2131427347;
// aapt resource value: 0x7f0b0044
public const int buttonPanel = 2131427396;
// aapt resource value: 0x7f0b008c
public const int cancel_action = 2131427468;
// aapt resource value: 0x7f0b0014
public const int center = 2131427348;
// aapt resource value: 0x7f0b0015
public const int center_horizontal = 2131427349;
// aapt resource value: 0x7f0b0016
public const int center_vertical = 2131427350;
// aapt resource value: 0x7f0b0052
public const int checkbox = 2131427410;
// aapt resource value: 0x7f0b0092
public const int chronometer = 2131427474;
// aapt resource value: 0x7f0b001d
public const int clip_horizontal = 2131427357;
// aapt resource value: 0x7f0b001e
public const int clip_vertical = 2131427358;
// aapt resource value: 0x7f0b0036
public const int collapseActionView = 2131427382;
// aapt resource value: 0x7f0b004a
public const int contentPanel = 2131427402;
// aapt resource value: 0x7f0b0050
public const int custom = 2131427408;
// aapt resource value: 0x7f0b004f
public const int customPanel = 2131427407;
// aapt resource value: 0x7f0b0058
public const int decor_content_parent = 2131427416;
// aapt resource value: 0x7f0b0040
public const int default_activity_button = 2131427392;
// aapt resource value: 0x7f0b006a
public const int design_bottom_sheet = 2131427434;
// aapt resource value: 0x7f0b0071
public const int design_menu_item_action_area = 2131427441;
// aapt resource value: 0x7f0b0070
public const int design_menu_item_action_area_stub = 2131427440;
// aapt resource value: 0x7f0b006f
public const int design_menu_item_text = 2131427439;
// aapt resource value: 0x7f0b006e
public const int design_navigation_view = 2131427438;
// aapt resource value: 0x7f0b0027
public const int disableHome = 2131427367;
// aapt resource value: 0x7f0b005c
public const int edit_query = 2131427420;
// aapt resource value: 0x7f0b0017
public const int end = 2131427351;
// aapt resource value: 0x7f0b0097
public const int end_padder = 2131427479;
// aapt resource value: 0x7f0b000b
public const int enterAlways = 2131427339;
// aapt resource value: 0x7f0b000c
public const int enterAlwaysCollapsed = 2131427340;
// aapt resource value: 0x7f0b000d
public const int exitUntilCollapsed = 2131427341;
// aapt resource value: 0x7f0b003e
public const int expand_activities_button = 2131427390;
// aapt resource value: 0x7f0b0051
public const int expanded_menu = 2131427409;
// aapt resource value: 0x7f0b001f
public const int fill = 2131427359;
// aapt resource value: 0x7f0b0020
public const int fill_horizontal = 2131427360;
// aapt resource value: 0x7f0b0018
public const int fill_vertical = 2131427352;
// aapt resource value: 0x7f0b0023
public const int @fixed = 2131427363;
// aapt resource value: 0x7f0b0006
public const int home = 2131427334;
// aapt resource value: 0x7f0b0028
public const int homeAsUp = 2131427368;
// aapt resource value: 0x7f0b0042
public const int icon = 2131427394;
// aapt resource value: 0x7f0b0037
public const int ifRoom = 2131427383;
// aapt resource value: 0x7f0b003f
public const int image = 2131427391;
// aapt resource value: 0x7f0b0096
public const int info = 2131427478;
// aapt resource value: 0x7f0b0001
public const int item_touch_helper_previous_elevation = 2131427329;
// aapt resource value: 0x7f0b0019
public const int left = 2131427353;
// aapt resource value: 0x7f0b0090
public const int line1 = 2131427472;
// aapt resource value: 0x7f0b0094
public const int line3 = 2131427476;
// aapt resource value: 0x7f0b0025
public const int listMode = 2131427365;
// aapt resource value: 0x7f0b0041
public const int list_item = 2131427393;
// aapt resource value: 0x7f0b008e
public const int media_actions = 2131427470;
// aapt resource value: 0x7f0b0034
public const int middle = 2131427380;
// aapt resource value: 0x7f0b0021
public const int mini = 2131427361;
// aapt resource value: 0x7f0b007d
public const int mr_art = 2131427453;
// aapt resource value: 0x7f0b0072
public const int mr_chooser_list = 2131427442;
// aapt resource value: 0x7f0b0075
public const int mr_chooser_route_desc = 2131427445;
// aapt resource value: 0x7f0b0073
public const int mr_chooser_route_icon = 2131427443;
// aapt resource value: 0x7f0b0074
public const int mr_chooser_route_name = 2131427444;
// aapt resource value: 0x7f0b007a
public const int mr_close = 2131427450;
// aapt resource value: 0x7f0b0080
public const int mr_control_divider = 2131427456;
// aapt resource value: 0x7f0b0086
public const int mr_control_play_pause = 2131427462;
// aapt resource value: 0x7f0b0089
public const int mr_control_subtitle = 2131427465;
// aapt resource value: 0x7f0b0088
public const int mr_control_title = 2131427464;
// aapt resource value: 0x7f0b0087
public const int mr_control_title_container = 2131427463;
// aapt resource value: 0x7f0b007b
public const int mr_custom_control = 2131427451;
// aapt resource value: 0x7f0b007c
public const int mr_default_control = 2131427452;
// aapt resource value: 0x7f0b0077
public const int mr_dialog_area = 2131427447;
// aapt resource value: 0x7f0b0076
public const int mr_expandable_area = 2131427446;
// aapt resource value: 0x7f0b008a
public const int mr_group_expand_collapse = 2131427466;
// aapt resource value: 0x7f0b007e
public const int mr_media_main_control = 2131427454;
// aapt resource value: 0x7f0b0079
public const int mr_name = 2131427449;
// aapt resource value: 0x7f0b007f
public const int mr_playback_control = 2131427455;
// aapt resource value: 0x7f0b0078
public const int mr_title_bar = 2131427448;
// aapt resource value: 0x7f0b0081
public const int mr_volume_control = 2131427457;
// aapt resource value: 0x7f0b0082
public const int mr_volume_group_list = 2131427458;
// aapt resource value: 0x7f0b0084
public const int mr_volume_item_icon = 2131427460;
// aapt resource value: 0x7f0b0085
public const int mr_volume_slider = 2131427461;
// aapt resource value: 0x7f0b002e
public const int multiply = 2131427374;
// aapt resource value: 0x7f0b006d
public const int navigation_header_container = 2131427437;
// aapt resource value: 0x7f0b0038
public const int never = 2131427384;
// aapt resource value: 0x7f0b0010
public const int none = 2131427344;
// aapt resource value: 0x7f0b0022
public const int normal = 2131427362;
// aapt resource value: 0x7f0b0011
public const int parallax = 2131427345;
// aapt resource value: 0x7f0b0046
public const int parentPanel = 2131427398;
// aapt resource value: 0x7f0b0012
public const int pin = 2131427346;
// aapt resource value: 0x7f0b0007
public const int progress_circular = 2131427335;
// aapt resource value: 0x7f0b0008
public const int progress_horizontal = 2131427336;
// aapt resource value: 0x7f0b0054
public const int radio = 2131427412;
// aapt resource value: 0x7f0b001a
public const int right = 2131427354;
// aapt resource value: 0x7f0b002f
public const int screen = 2131427375;
// aapt resource value: 0x7f0b000e
public const int scroll = 2131427342;
// aapt resource value: 0x7f0b004e
public const int scrollIndicatorDown = 2131427406;
// aapt resource value: 0x7f0b004b
public const int scrollIndicatorUp = 2131427403;
// aapt resource value: 0x7f0b004c
public const int scrollView = 2131427404;
// aapt resource value: 0x7f0b0024
public const int scrollable = 2131427364;
// aapt resource value: 0x7f0b005e
public const int search_badge = 2131427422;
// aapt resource value: 0x7f0b005d
public const int search_bar = 2131427421;
// aapt resource value: 0x7f0b005f
public const int search_button = 2131427423;
// aapt resource value: 0x7f0b0064
public const int search_close_btn = 2131427428;
// aapt resource value: 0x7f0b0060
public const int search_edit_frame = 2131427424;
// aapt resource value: 0x7f0b0066
public const int search_go_btn = 2131427430;
// aapt resource value: 0x7f0b0061
public const int search_mag_icon = 2131427425;
// aapt resource value: 0x7f0b0062
public const int search_plate = 2131427426;
// aapt resource value: 0x7f0b0063
public const int search_src_text = 2131427427;
// aapt resource value: 0x7f0b0067
public const int search_voice_btn = 2131427431;
// aapt resource value: 0x7f0b0068
public const int select_dialog_listview = 2131427432;
// aapt resource value: 0x7f0b0053
public const int shortcut = 2131427411;
// aapt resource value: 0x7f0b0029
public const int showCustom = 2131427369;
// aapt resource value: 0x7f0b002a
public const int showHome = 2131427370;
// aapt resource value: 0x7f0b002b
public const int showTitle = 2131427371;
// aapt resource value: 0x7f0b0098
public const int sliding_tabs = 2131427480;
// aapt resource value: 0x7f0b006c
public const int snackbar_action = 2131427436;
// aapt resource value: 0x7f0b006b
public const int snackbar_text = 2131427435;
// aapt resource value: 0x7f0b000f
public const int snap = 2131427343;
// aapt resource value: 0x7f0b0045
public const int spacer = 2131427397;
// aapt resource value: 0x7f0b0009
public const int split_action_bar = 2131427337;
// aapt resource value: 0x7f0b0030
public const int src_atop = 2131427376;
// aapt resource value: 0x7f0b0031
public const int src_in = 2131427377;
// aapt resource value: 0x7f0b0032
public const int src_over = 2131427378;
// aapt resource value: 0x7f0b001b
public const int start = 2131427355;
// aapt resource value: 0x7f0b008d
public const int status_bar_latest_event_content = 2131427469;
// aapt resource value: 0x7f0b0065
public const int submit_area = 2131427429;
// aapt resource value: 0x7f0b0026
public const int tabMode = 2131427366;
// aapt resource value: 0x7f0b0095
public const int text = 2131427477;
// aapt resource value: 0x7f0b0093
public const int text2 = 2131427475;
// aapt resource value: 0x7f0b004d
public const int textSpacerNoButtons = 2131427405;
// aapt resource value: 0x7f0b0091
public const int time = 2131427473;
// aapt resource value: 0x7f0b0043
public const int title = 2131427395;
// aapt resource value: 0x7f0b0048
public const int title_template = 2131427400;
// aapt resource value: 0x7f0b0099
public const int toolbar = 2131427481;
// aapt resource value: 0x7f0b001c
public const int top = 2131427356;
// aapt resource value: 0x7f0b0047
public const int topPanel = 2131427399;
// aapt resource value: 0x7f0b0069
public const int touch_outside = 2131427433;
// aapt resource value: 0x7f0b000a
public const int up = 2131427338;
// aapt resource value: 0x7f0b002c
public const int useLogo = 2131427372;
// aapt resource value: 0x7f0b0000
public const int view_offset_helper = 2131427328;
// aapt resource value: 0x7f0b0083
public const int volume_item_container = 2131427459;
// aapt resource value: 0x7f0b0039
public const int withText = 2131427385;
// aapt resource value: 0x7f0b002d
public const int wrap_content = 2131427373;
static Id()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Id()
{
}
}
public partial class Integer
{
// aapt resource value: 0x7f080006
public const int abc_config_activityDefaultDur = 2131230726;
// aapt resource value: 0x7f080007
public const int abc_config_activityShortDur = 2131230727;
// aapt resource value: 0x7f080005
public const int abc_max_action_buttons = 2131230725;
// aapt resource value: 0x7f080004
public const int bottom_sheet_slide_duration = 2131230724;
// aapt resource value: 0x7f080008
public const int cancel_button_image_alpha = 2131230728;
// aapt resource value: 0x7f080003
public const int design_snackbar_text_max_lines = 2131230723;
// aapt resource value: 0x7f080000
public const int mr_controller_volume_group_list_animation_duration_ms = 2131230720;
// aapt resource value: 0x7f080001
public const int mr_controller_volume_group_list_fade_in_duration_ms = 2131230721;
// aapt resource value: 0x7f080002
public const int mr_controller_volume_group_list_fade_out_duration_ms = 2131230722;
// aapt resource value: 0x7f080009
public const int status_bar_notification_info_maxnum = 2131230729;
static Integer()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Integer()
{
}
}
public partial class Interpolator
{
// aapt resource value: 0x7f050000
public const int mr_fast_out_slow_in = 2131034112;
// aapt resource value: 0x7f050001
public const int mr_linear_out_slow_in = 2131034113;
static Interpolator()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Interpolator()
{
}
}
public partial class Layout
{
// aapt resource value: 0x7f030000
public const int abc_action_bar_title_item = 2130903040;
// aapt resource value: 0x7f030001
public const int abc_action_bar_up_container = 2130903041;
// aapt resource value: 0x7f030002
public const int abc_action_bar_view_list_nav_layout = 2130903042;
// aapt resource value: 0x7f030003
public const int abc_action_menu_item_layout = 2130903043;
// aapt resource value: 0x7f030004
public const int abc_action_menu_layout = 2130903044;
// aapt resource value: 0x7f030005
public const int abc_action_mode_bar = 2130903045;
// aapt resource value: 0x7f030006
public const int abc_action_mode_close_item_material = 2130903046;
// aapt resource value: 0x7f030007
public const int abc_activity_chooser_view = 2130903047;
// aapt resource value: 0x7f030008
public const int abc_activity_chooser_view_list_item = 2130903048;
// aapt resource value: 0x7f030009
public const int abc_alert_dialog_button_bar_material = 2130903049;
// aapt resource value: 0x7f03000a
public const int abc_alert_dialog_material = 2130903050;
// aapt resource value: 0x7f03000b
public const int abc_dialog_title_material = 2130903051;
// aapt resource value: 0x7f03000c
public const int abc_expanded_menu_layout = 2130903052;
// aapt resource value: 0x7f03000d
public const int abc_list_menu_item_checkbox = 2130903053;
// aapt resource value: 0x7f03000e
public const int abc_list_menu_item_icon = 2130903054;
// aapt resource value: 0x7f03000f
public const int abc_list_menu_item_layout = 2130903055;
// aapt resource value: 0x7f030010
public const int abc_list_menu_item_radio = 2130903056;
// aapt resource value: 0x7f030011
public const int abc_popup_menu_item_layout = 2130903057;
// aapt resource value: 0x7f030012
public const int abc_screen_content_include = 2130903058;
// aapt resource value: 0x7f030013
public const int abc_screen_simple = 2130903059;
// aapt resource value: 0x7f030014
public const int abc_screen_simple_overlay_action_mode = 2130903060;
// aapt resource value: 0x7f030015
public const int abc_screen_toolbar = 2130903061;
// aapt resource value: 0x7f030016
public const int abc_search_dropdown_item_icons_2line = 2130903062;
// aapt resource value: 0x7f030017
public const int abc_search_view = 2130903063;
// aapt resource value: 0x7f030018
public const int abc_select_dialog_material = 2130903064;
// aapt resource value: 0x7f030019
public const int design_bottom_sheet_dialog = 2130903065;
// aapt resource value: 0x7f03001a
public const int design_layout_snackbar = 2130903066;
// aapt resource value: 0x7f03001b
public const int design_layout_snackbar_include = 2130903067;
// aapt resource value: 0x7f03001c
public const int design_layout_tab_icon = 2130903068;
// aapt resource value: 0x7f03001d
public const int design_layout_tab_text = 2130903069;
// aapt resource value: 0x7f03001e
public const int design_menu_item_action_area = 2130903070;
// aapt resource value: 0x7f03001f
public const int design_navigation_item = 2130903071;
// aapt resource value: 0x7f030020
public const int design_navigation_item_header = 2130903072;
// aapt resource value: 0x7f030021
public const int design_navigation_item_separator = 2130903073;
// aapt resource value: 0x7f030022
public const int design_navigation_item_subheader = 2130903074;
// aapt resource value: 0x7f030023
public const int design_navigation_menu = 2130903075;
// aapt resource value: 0x7f030024
public const int design_navigation_menu_item = 2130903076;
// aapt resource value: 0x7f030025
public const int mr_chooser_dialog = 2130903077;
// aapt resource value: 0x7f030026
public const int mr_chooser_list_item = 2130903078;
// aapt resource value: 0x7f030027
public const int mr_controller_material_dialog_b = 2130903079;
// aapt resource value: 0x7f030028
public const int mr_controller_volume_item = 2130903080;
// aapt resource value: 0x7f030029
public const int mr_playback_control = 2130903081;
// aapt resource value: 0x7f03002a
public const int mr_volume_control = 2130903082;
// aapt resource value: 0x7f03002b
public const int notification_media_action = 2130903083;
// aapt resource value: 0x7f03002c
public const int notification_media_cancel_action = 2130903084;
// aapt resource value: 0x7f03002d
public const int notification_template_big_media = 2130903085;
// aapt resource value: 0x7f03002e
public const int notification_template_big_media_narrow = 2130903086;
// aapt resource value: 0x7f03002f
public const int notification_template_lines = 2130903087;
// aapt resource value: 0x7f030030
public const int notification_template_media = 2130903088;
// aapt resource value: 0x7f030031
public const int notification_template_part_chronometer = 2130903089;
// aapt resource value: 0x7f030032
public const int notification_template_part_time = 2130903090;
// aapt resource value: 0x7f030033
public const int select_dialog_item_material = 2130903091;
// aapt resource value: 0x7f030034
public const int select_dialog_multichoice_material = 2130903092;
// aapt resource value: 0x7f030035
public const int select_dialog_singlechoice_material = 2130903093;
// aapt resource value: 0x7f030036
public const int support_simple_spinner_dropdown_item = 2130903094;
// aapt resource value: 0x7f030037
public const int Tabbar = 2130903095;
// aapt resource value: 0x7f030038
public const int Toolbar = 2130903096;
static Layout()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Layout()
{
}
}
public partial class String
{
// aapt resource value: 0x7f060012
public const int abc_action_bar_home_description = 2131099666;
// aapt resource value: 0x7f060013
public const int abc_action_bar_home_description_format = 2131099667;
// aapt resource value: 0x7f060014
public const int abc_action_bar_home_subtitle_description_format = 2131099668;
// aapt resource value: 0x7f060015
public const int abc_action_bar_up_description = 2131099669;
// aapt resource value: 0x7f060016
public const int abc_action_menu_overflow_description = 2131099670;
// aapt resource value: 0x7f060017
public const int abc_action_mode_done = 2131099671;
// aapt resource value: 0x7f060018
public const int abc_activity_chooser_view_see_all = 2131099672;
// aapt resource value: 0x7f060019
public const int abc_activitychooserview_choose_application = 2131099673;
// aapt resource value: 0x7f06001a
public const int abc_capital_off = 2131099674;
// aapt resource value: 0x7f06001b
public const int abc_capital_on = 2131099675;
// aapt resource value: 0x7f06001c
public const int abc_search_hint = 2131099676;
// aapt resource value: 0x7f06001d
public const int abc_searchview_description_clear = 2131099677;
// aapt resource value: 0x7f06001e
public const int abc_searchview_description_query = 2131099678;
// aapt resource value: 0x7f06001f
public const int abc_searchview_description_search = 2131099679;
// aapt resource value: 0x7f060020
public const int abc_searchview_description_submit = 2131099680;
// aapt resource value: 0x7f060021
public const int abc_searchview_description_voice = 2131099681;
// aapt resource value: 0x7f060022
public const int abc_shareactionprovider_share_with = 2131099682;
// aapt resource value: 0x7f060023
public const int abc_shareactionprovider_share_with_application = 2131099683;
// aapt resource value: 0x7f060024
public const int abc_toolbar_collapse_description = 2131099684;
// aapt resource value: 0x7f06000f
public const int appbar_scrolling_view_behavior = 2131099663;
// aapt resource value: 0x7f060010
public const int bottom_sheet_behavior = 2131099664;
// aapt resource value: 0x7f060011
public const int character_counter_pattern = 2131099665;
// aapt resource value: 0x7f060000
public const int mr_button_content_description = 2131099648;
// aapt resource value: 0x7f060001
public const int mr_chooser_searching = 2131099649;
// aapt resource value: 0x7f060002
public const int mr_chooser_title = 2131099650;
// aapt resource value: 0x7f060003
public const int mr_controller_casting_screen = 2131099651;
// aapt resource value: 0x7f060004
public const int mr_controller_close_description = 2131099652;
// aapt resource value: 0x7f060005
public const int mr_controller_collapse_group = 2131099653;
// aapt resource value: 0x7f060006
public const int mr_controller_disconnect = 2131099654;
// aapt resource value: 0x7f060007
public const int mr_controller_expand_group = 2131099655;
// aapt resource value: 0x7f060008
public const int mr_controller_no_info_available = 2131099656;
// aapt resource value: 0x7f060009
public const int mr_controller_no_media_selected = 2131099657;
// aapt resource value: 0x7f06000a
public const int mr_controller_pause = 2131099658;
// aapt resource value: 0x7f06000b
public const int mr_controller_play = 2131099659;
// aapt resource value: 0x7f06000c
public const int mr_controller_stop = 2131099660;
// aapt resource value: 0x7f06000d
public const int mr_system_route_name = 2131099661;
// aapt resource value: 0x7f06000e
public const int mr_user_route_category_name = 2131099662;
// aapt resource value: 0x7f060025
public const int status_bar_notification_info_overflow = 2131099685;
static String()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private String()
{
}
}
public partial class Style
{
// aapt resource value: 0x7f0900ba
public const int AlertDialog_AppCompat = 2131296442;
// aapt resource value: 0x7f0900bb
public const int AlertDialog_AppCompat_Light = 2131296443;
// aapt resource value: 0x7f0900bc
public const int Animation_AppCompat_Dialog = 2131296444;
// aapt resource value: 0x7f0900bd
public const int Animation_AppCompat_DropDownUp = 2131296445;
// aapt resource value: 0x7f09001c
public const int Animation_Design_BottomSheetDialog = 2131296284;
// aapt resource value: 0x7f090174
public const int AppCompatDialogStyle = 2131296628;
// aapt resource value: 0x7f0900be
public const int Base_AlertDialog_AppCompat = 2131296446;
// aapt resource value: 0x7f0900bf
public const int Base_AlertDialog_AppCompat_Light = 2131296447;
// aapt resource value: 0x7f0900c0
public const int Base_Animation_AppCompat_Dialog = 2131296448;
// aapt resource value: 0x7f0900c1
public const int Base_Animation_AppCompat_DropDownUp = 2131296449;
// aapt resource value: 0x7f090018
public const int Base_CardView = 2131296280;
// aapt resource value: 0x7f0900c2
public const int Base_DialogWindowTitle_AppCompat = 2131296450;
// aapt resource value: 0x7f0900c3
public const int Base_DialogWindowTitleBackground_AppCompat = 2131296451;
// aapt resource value: 0x7f09006a
public const int Base_TextAppearance_AppCompat = 2131296362;
// aapt resource value: 0x7f09006b
public const int Base_TextAppearance_AppCompat_Body1 = 2131296363;
// aapt resource value: 0x7f09006c
public const int Base_TextAppearance_AppCompat_Body2 = 2131296364;
// aapt resource value: 0x7f090054
public const int Base_TextAppearance_AppCompat_Button = 2131296340;
// aapt resource value: 0x7f09006d
public const int Base_TextAppearance_AppCompat_Caption = 2131296365;
// aapt resource value: 0x7f09006e
public const int Base_TextAppearance_AppCompat_Display1 = 2131296366;
// aapt resource value: 0x7f09006f
public const int Base_TextAppearance_AppCompat_Display2 = 2131296367;
// aapt resource value: 0x7f090070
public const int Base_TextAppearance_AppCompat_Display3 = 2131296368;
// aapt resource value: 0x7f090071
public const int Base_TextAppearance_AppCompat_Display4 = 2131296369;
// aapt resource value: 0x7f090072
public const int Base_TextAppearance_AppCompat_Headline = 2131296370;
// aapt resource value: 0x7f09003f
public const int Base_TextAppearance_AppCompat_Inverse = 2131296319;
// aapt resource value: 0x7f090073
public const int Base_TextAppearance_AppCompat_Large = 2131296371;
// aapt resource value: 0x7f090040
public const int Base_TextAppearance_AppCompat_Large_Inverse = 2131296320;
// aapt resource value: 0x7f090074
public const int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131296372;
// aapt resource value: 0x7f090075
public const int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131296373;
// aapt resource value: 0x7f090076
public const int Base_TextAppearance_AppCompat_Medium = 2131296374;
// aapt resource value: 0x7f090041
public const int Base_TextAppearance_AppCompat_Medium_Inverse = 2131296321;
// aapt resource value: 0x7f090077
public const int Base_TextAppearance_AppCompat_Menu = 2131296375;
// aapt resource value: 0x7f0900c4
public const int Base_TextAppearance_AppCompat_SearchResult = 2131296452;
// aapt resource value: 0x7f090078
public const int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 2131296376;
// aapt resource value: 0x7f090079
public const int Base_TextAppearance_AppCompat_SearchResult_Title = 2131296377;
// aapt resource value: 0x7f09007a
public const int Base_TextAppearance_AppCompat_Small = 2131296378;
// aapt resource value: 0x7f090042
public const int Base_TextAppearance_AppCompat_Small_Inverse = 2131296322;
// aapt resource value: 0x7f09007b
public const int Base_TextAppearance_AppCompat_Subhead = 2131296379;
// aapt resource value: 0x7f090043
public const int Base_TextAppearance_AppCompat_Subhead_Inverse = 2131296323;
// aapt resource value: 0x7f09007c
public const int Base_TextAppearance_AppCompat_Title = 2131296380;
// aapt resource value: 0x7f090044
public const int Base_TextAppearance_AppCompat_Title_Inverse = 2131296324;
// aapt resource value: 0x7f0900b3
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131296435;
// aapt resource value: 0x7f09007d
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131296381;
// aapt resource value: 0x7f09007e
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131296382;
// aapt resource value: 0x7f09007f
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 2131296383;
// aapt resource value: 0x7f090080
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131296384;
// aapt resource value: 0x7f090081
public const int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131296385;
// aapt resource value: 0x7f090082
public const int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 2131296386;
// aapt resource value: 0x7f090083
public const int Base_TextAppearance_AppCompat_Widget_Button = 2131296387;
// aapt resource value: 0x7f0900b4
public const int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 2131296436;
// aapt resource value: 0x7f0900c5
public const int Base_TextAppearance_AppCompat_Widget_DropDownItem = 2131296453;
// aapt resource value: 0x7f090084
public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131296388;
// aapt resource value: 0x7f090085
public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131296389;
// aapt resource value: 0x7f090086
public const int Base_TextAppearance_AppCompat_Widget_Switch = 2131296390;
// aapt resource value: 0x7f090087
public const int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131296391;
// aapt resource value: 0x7f0900c6
public const int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131296454;
// aapt resource value: 0x7f090088
public const int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131296392;
// aapt resource value: 0x7f090089
public const int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 2131296393;
// aapt resource value: 0x7f09008a
public const int Base_Theme_AppCompat = 2131296394;
// aapt resource value: 0x7f0900c7
public const int Base_Theme_AppCompat_CompactMenu = 2131296455;
// aapt resource value: 0x7f090045
public const int Base_Theme_AppCompat_Dialog = 2131296325;
// aapt resource value: 0x7f0900c8
public const int Base_Theme_AppCompat_Dialog_Alert = 2131296456;
// aapt resource value: 0x7f0900c9
public const int Base_Theme_AppCompat_Dialog_FixedSize = 2131296457;
// aapt resource value: 0x7f0900ca
public const int Base_Theme_AppCompat_Dialog_MinWidth = 2131296458;
// aapt resource value: 0x7f090035
public const int Base_Theme_AppCompat_DialogWhenLarge = 2131296309;
// aapt resource value: 0x7f09008b
public const int Base_Theme_AppCompat_Light = 2131296395;
// aapt resource value: 0x7f0900cb
public const int Base_Theme_AppCompat_Light_DarkActionBar = 2131296459;
// aapt resource value: 0x7f090046
public const int Base_Theme_AppCompat_Light_Dialog = 2131296326;
// aapt resource value: 0x7f0900cc
public const int Base_Theme_AppCompat_Light_Dialog_Alert = 2131296460;
// aapt resource value: 0x7f0900cd
public const int Base_Theme_AppCompat_Light_Dialog_FixedSize = 2131296461;
// aapt resource value: 0x7f0900ce
public const int Base_Theme_AppCompat_Light_Dialog_MinWidth = 2131296462;
// aapt resource value: 0x7f090036
public const int Base_Theme_AppCompat_Light_DialogWhenLarge = 2131296310;
// aapt resource value: 0x7f0900cf
public const int Base_ThemeOverlay_AppCompat = 2131296463;
// aapt resource value: 0x7f0900d0
public const int Base_ThemeOverlay_AppCompat_ActionBar = 2131296464;
// aapt resource value: 0x7f0900d1
public const int Base_ThemeOverlay_AppCompat_Dark = 2131296465;
// aapt resource value: 0x7f0900d2
public const int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 2131296466;
// aapt resource value: 0x7f0900d3
public const int Base_ThemeOverlay_AppCompat_Light = 2131296467;
// aapt resource value: 0x7f090047
public const int Base_V11_Theme_AppCompat_Dialog = 2131296327;
// aapt resource value: 0x7f090048
public const int Base_V11_Theme_AppCompat_Light_Dialog = 2131296328;
// aapt resource value: 0x7f090050
public const int Base_V12_Widget_AppCompat_AutoCompleteTextView = 2131296336;
// aapt resource value: 0x7f090051
public const int Base_V12_Widget_AppCompat_EditText = 2131296337;
// aapt resource value: 0x7f09008c
public const int Base_V21_Theme_AppCompat = 2131296396;
// aapt resource value: 0x7f09008d
public const int Base_V21_Theme_AppCompat_Dialog = 2131296397;
// aapt resource value: 0x7f09008e
public const int Base_V21_Theme_AppCompat_Light = 2131296398;
// aapt resource value: 0x7f09008f
public const int Base_V21_Theme_AppCompat_Light_Dialog = 2131296399;
// aapt resource value: 0x7f0900b1
public const int Base_V22_Theme_AppCompat = 2131296433;
// aapt resource value: 0x7f0900b2
public const int Base_V22_Theme_AppCompat_Light = 2131296434;
// aapt resource value: 0x7f0900b5
public const int Base_V23_Theme_AppCompat = 2131296437;
// aapt resource value: 0x7f0900b6
public const int Base_V23_Theme_AppCompat_Light = 2131296438;
// aapt resource value: 0x7f0900d4
public const int Base_V7_Theme_AppCompat = 2131296468;
// aapt resource value: 0x7f0900d5
public const int Base_V7_Theme_AppCompat_Dialog = 2131296469;
// aapt resource value: 0x7f0900d6
public const int Base_V7_Theme_AppCompat_Light = 2131296470;
// aapt resource value: 0x7f0900d7
public const int Base_V7_Theme_AppCompat_Light_Dialog = 2131296471;
// aapt resource value: 0x7f0900d8
public const int Base_V7_Widget_AppCompat_AutoCompleteTextView = 2131296472;
// aapt resource value: 0x7f0900d9
public const int Base_V7_Widget_AppCompat_EditText = 2131296473;
// aapt resource value: 0x7f0900da
public const int Base_Widget_AppCompat_ActionBar = 2131296474;
// aapt resource value: 0x7f0900db
public const int Base_Widget_AppCompat_ActionBar_Solid = 2131296475;
// aapt resource value: 0x7f0900dc
public const int Base_Widget_AppCompat_ActionBar_TabBar = 2131296476;
// aapt resource value: 0x7f090090
public const int Base_Widget_AppCompat_ActionBar_TabText = 2131296400;
// aapt resource value: 0x7f090091
public const int Base_Widget_AppCompat_ActionBar_TabView = 2131296401;
// aapt resource value: 0x7f090092
public const int Base_Widget_AppCompat_ActionButton = 2131296402;
// aapt resource value: 0x7f090093
public const int Base_Widget_AppCompat_ActionButton_CloseMode = 2131296403;
// aapt resource value: 0x7f090094
public const int Base_Widget_AppCompat_ActionButton_Overflow = 2131296404;
// aapt resource value: 0x7f0900dd
public const int Base_Widget_AppCompat_ActionMode = 2131296477;
// aapt resource value: 0x7f0900de
public const int Base_Widget_AppCompat_ActivityChooserView = 2131296478;
// aapt resource value: 0x7f090052
public const int Base_Widget_AppCompat_AutoCompleteTextView = 2131296338;
// aapt resource value: 0x7f090095
public const int Base_Widget_AppCompat_Button = 2131296405;
// aapt resource value: 0x7f090096
public const int Base_Widget_AppCompat_Button_Borderless = 2131296406;
// aapt resource value: 0x7f090097
public const int Base_Widget_AppCompat_Button_Borderless_Colored = 2131296407;
// aapt resource value: 0x7f0900df
public const int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131296479;
// aapt resource value: 0x7f0900b7
public const int Base_Widget_AppCompat_Button_Colored = 2131296439;
// aapt resource value: 0x7f090098
public const int Base_Widget_AppCompat_Button_Small = 2131296408;
// aapt resource value: 0x7f090099
public const int Base_Widget_AppCompat_ButtonBar = 2131296409;
// aapt resource value: 0x7f0900e0
public const int Base_Widget_AppCompat_ButtonBar_AlertDialog = 2131296480;
// aapt resource value: 0x7f09009a
public const int Base_Widget_AppCompat_CompoundButton_CheckBox = 2131296410;
// aapt resource value: 0x7f09009b
public const int Base_Widget_AppCompat_CompoundButton_RadioButton = 2131296411;
// aapt resource value: 0x7f0900e1
public const int Base_Widget_AppCompat_CompoundButton_Switch = 2131296481;
// aapt resource value: 0x7f090034
public const int Base_Widget_AppCompat_DrawerArrowToggle = 2131296308;
// aapt resource value: 0x7f0900e2
public const int Base_Widget_AppCompat_DrawerArrowToggle_Common = 2131296482;
// aapt resource value: 0x7f09009c
public const int Base_Widget_AppCompat_DropDownItem_Spinner = 2131296412;
// aapt resource value: 0x7f090053
public const int Base_Widget_AppCompat_EditText = 2131296339;
// aapt resource value: 0x7f09009d
public const int Base_Widget_AppCompat_ImageButton = 2131296413;
// aapt resource value: 0x7f0900e3
public const int Base_Widget_AppCompat_Light_ActionBar = 2131296483;
// aapt resource value: 0x7f0900e4
public const int Base_Widget_AppCompat_Light_ActionBar_Solid = 2131296484;
// aapt resource value: 0x7f0900e5
public const int Base_Widget_AppCompat_Light_ActionBar_TabBar = 2131296485;
// aapt resource value: 0x7f09009e
public const int Base_Widget_AppCompat_Light_ActionBar_TabText = 2131296414;
// aapt resource value: 0x7f09009f
public const int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131296415;
// aapt resource value: 0x7f0900a0
public const int Base_Widget_AppCompat_Light_ActionBar_TabView = 2131296416;
// aapt resource value: 0x7f0900a1
public const int Base_Widget_AppCompat_Light_PopupMenu = 2131296417;
// aapt resource value: 0x7f0900a2
public const int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 2131296418;
// aapt resource value: 0x7f0900a3
public const int Base_Widget_AppCompat_ListPopupWindow = 2131296419;
// aapt resource value: 0x7f0900a4
public const int Base_Widget_AppCompat_ListView = 2131296420;
// aapt resource value: 0x7f0900a5
public const int Base_Widget_AppCompat_ListView_DropDown = 2131296421;
// aapt resource value: 0x7f0900a6
public const int Base_Widget_AppCompat_ListView_Menu = 2131296422;
// aapt resource value: 0x7f0900a7
public const int Base_Widget_AppCompat_PopupMenu = 2131296423;
// aapt resource value: 0x7f0900a8
public const int Base_Widget_AppCompat_PopupMenu_Overflow = 2131296424;
// aapt resource value: 0x7f0900e6
public const int Base_Widget_AppCompat_PopupWindow = 2131296486;
// aapt resource value: 0x7f090049
public const int Base_Widget_AppCompat_ProgressBar = 2131296329;
// aapt resource value: 0x7f09004a
public const int Base_Widget_AppCompat_ProgressBar_Horizontal = 2131296330;
// aapt resource value: 0x7f0900a9
public const int Base_Widget_AppCompat_RatingBar = 2131296425;
// aapt resource value: 0x7f0900b8
public const int Base_Widget_AppCompat_RatingBar_Indicator = 2131296440;
// aapt resource value: 0x7f0900b9
public const int Base_Widget_AppCompat_RatingBar_Small = 2131296441;
// aapt resource value: 0x7f0900e7
public const int Base_Widget_AppCompat_SearchView = 2131296487;
// aapt resource value: 0x7f0900e8
public const int Base_Widget_AppCompat_SearchView_ActionBar = 2131296488;
// aapt resource value: 0x7f0900aa
public const int Base_Widget_AppCompat_SeekBar = 2131296426;
// aapt resource value: 0x7f0900ab
public const int Base_Widget_AppCompat_Spinner = 2131296427;
// aapt resource value: 0x7f090037
public const int Base_Widget_AppCompat_Spinner_Underlined = 2131296311;
// aapt resource value: 0x7f0900ac
public const int Base_Widget_AppCompat_TextView_SpinnerItem = 2131296428;
// aapt resource value: 0x7f0900e9
public const int Base_Widget_AppCompat_Toolbar = 2131296489;
// aapt resource value: 0x7f0900ad
public const int Base_Widget_AppCompat_Toolbar_Button_Navigation = 2131296429;
// aapt resource value: 0x7f09001d
public const int Base_Widget_Design_TabLayout = 2131296285;
// aapt resource value: 0x7f090017
public const int CardView = 2131296279;
// aapt resource value: 0x7f090019
public const int CardView_Dark = 2131296281;
// aapt resource value: 0x7f09001a
public const int CardView_Light = 2131296282;
// aapt resource value: 0x7f090172
public const int MyTheme = 2131296626;
// aapt resource value: 0x7f090173
public const int MyTheme_Base = 2131296627;
// aapt resource value: 0x7f09004b
public const int Platform_AppCompat = 2131296331;
// aapt resource value: 0x7f09004c
public const int Platform_AppCompat_Light = 2131296332;
// aapt resource value: 0x7f0900ae
public const int Platform_ThemeOverlay_AppCompat = 2131296430;
// aapt resource value: 0x7f0900af
public const int Platform_ThemeOverlay_AppCompat_Dark = 2131296431;
// aapt resource value: 0x7f0900b0
public const int Platform_ThemeOverlay_AppCompat_Light = 2131296432;
// aapt resource value: 0x7f09004d
public const int Platform_V11_AppCompat = 2131296333;
// aapt resource value: 0x7f09004e
public const int Platform_V11_AppCompat_Light = 2131296334;
// aapt resource value: 0x7f090055
public const int Platform_V14_AppCompat = 2131296341;
// aapt resource value: 0x7f090056
public const int Platform_V14_AppCompat_Light = 2131296342;
// aapt resource value: 0x7f09004f
public const int Platform_Widget_AppCompat_Spinner = 2131296335;
// aapt resource value: 0x7f09005c
public const int RtlOverlay_DialogWindowTitle_AppCompat = 2131296348;
// aapt resource value: 0x7f09005d
public const int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 2131296349;
// aapt resource value: 0x7f09005e
public const int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 2131296350;
// aapt resource value: 0x7f09005f
public const int RtlOverlay_Widget_AppCompat_PopupMenuItem = 2131296351;
// aapt resource value: 0x7f090060
public const int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 2131296352;
// aapt resource value: 0x7f090061
public const int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 2131296353;
// aapt resource value: 0x7f090062
public const int RtlOverlay_Widget_AppCompat_Search_DropDown = 2131296354;
// aapt resource value: 0x7f090063
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 2131296355;
// aapt resource value: 0x7f090064
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 2131296356;
// aapt resource value: 0x7f090065
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 2131296357;
// aapt resource value: 0x7f090066
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 2131296358;
// aapt resource value: 0x7f090067
public const int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 2131296359;
// aapt resource value: 0x7f090068
public const int RtlUnderlay_Widget_AppCompat_ActionButton = 2131296360;
// aapt resource value: 0x7f090069
public const int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 2131296361;
// aapt resource value: 0x7f0900ea
public const int TextAppearance_AppCompat = 2131296490;
// aapt resource value: 0x7f0900eb
public const int TextAppearance_AppCompat_Body1 = 2131296491;
// aapt resource value: 0x7f0900ec
public const int TextAppearance_AppCompat_Body2 = 2131296492;
// aapt resource value: 0x7f0900ed
public const int TextAppearance_AppCompat_Button = 2131296493;
// aapt resource value: 0x7f0900ee
public const int TextAppearance_AppCompat_Caption = 2131296494;
// aapt resource value: 0x7f0900ef
public const int TextAppearance_AppCompat_Display1 = 2131296495;
// aapt resource value: 0x7f0900f0
public const int TextAppearance_AppCompat_Display2 = 2131296496;
// aapt resource value: 0x7f0900f1
public const int TextAppearance_AppCompat_Display3 = 2131296497;
// aapt resource value: 0x7f0900f2
public const int TextAppearance_AppCompat_Display4 = 2131296498;
// aapt resource value: 0x7f0900f3
public const int TextAppearance_AppCompat_Headline = 2131296499;
// aapt resource value: 0x7f0900f4
public const int TextAppearance_AppCompat_Inverse = 2131296500;
// aapt resource value: 0x7f0900f5
public const int TextAppearance_AppCompat_Large = 2131296501;
// aapt resource value: 0x7f0900f6
public const int TextAppearance_AppCompat_Large_Inverse = 2131296502;
// aapt resource value: 0x7f0900f7
public const int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 2131296503;
// aapt resource value: 0x7f0900f8
public const int TextAppearance_AppCompat_Light_SearchResult_Title = 2131296504;
// aapt resource value: 0x7f0900f9
public const int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131296505;
// aapt resource value: 0x7f0900fa
public const int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131296506;
// aapt resource value: 0x7f0900fb
public const int TextAppearance_AppCompat_Medium = 2131296507;
// aapt resource value: 0x7f0900fc
public const int TextAppearance_AppCompat_Medium_Inverse = 2131296508;
// aapt resource value: 0x7f0900fd
public const int TextAppearance_AppCompat_Menu = 2131296509;
// aapt resource value: 0x7f0900fe
public const int TextAppearance_AppCompat_SearchResult_Subtitle = 2131296510;
// aapt resource value: 0x7f0900ff
public const int TextAppearance_AppCompat_SearchResult_Title = 2131296511;
// aapt resource value: 0x7f090100
public const int TextAppearance_AppCompat_Small = 2131296512;
// aapt resource value: 0x7f090101
public const int TextAppearance_AppCompat_Small_Inverse = 2131296513;
// aapt resource value: 0x7f090102
public const int TextAppearance_AppCompat_Subhead = 2131296514;
// aapt resource value: 0x7f090103
public const int TextAppearance_AppCompat_Subhead_Inverse = 2131296515;
// aapt resource value: 0x7f090104
public const int TextAppearance_AppCompat_Title = 2131296516;
// aapt resource value: 0x7f090105
public const int TextAppearance_AppCompat_Title_Inverse = 2131296517;
// aapt resource value: 0x7f090106
public const int TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131296518;
// aapt resource value: 0x7f090107
public const int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131296519;
// aapt resource value: 0x7f090108
public const int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131296520;
// aapt resource value: 0x7f090109
public const int TextAppearance_AppCompat_Widget_ActionBar_Title = 2131296521;
// aapt resource value: 0x7f09010a
public const int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131296522;
// aapt resource value: 0x7f09010b
public const int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131296523;
// aapt resource value: 0x7f09010c
public const int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 2131296524;
// aapt resource value: 0x7f09010d
public const int TextAppearance_AppCompat_Widget_ActionMode_Title = 2131296525;
// aapt resource value: 0x7f09010e
public const int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 2131296526;
// aapt resource value: 0x7f09010f
public const int TextAppearance_AppCompat_Widget_Button = 2131296527;
// aapt resource value: 0x7f090110
public const int TextAppearance_AppCompat_Widget_Button_Inverse = 2131296528;
// aapt resource value: 0x7f090111
public const int TextAppearance_AppCompat_Widget_DropDownItem = 2131296529;
// aapt resource value: 0x7f090112
public const int TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131296530;
// aapt resource value: 0x7f090113
public const int TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131296531;
// aapt resource value: 0x7f090114
public const int TextAppearance_AppCompat_Widget_Switch = 2131296532;
// aapt resource value: 0x7f090115
public const int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131296533;
// aapt resource value: 0x7f09001e
public const int TextAppearance_Design_CollapsingToolbar_Expanded = 2131296286;
// aapt resource value: 0x7f09001f
public const int TextAppearance_Design_Counter = 2131296287;
// aapt resource value: 0x7f090020
public const int TextAppearance_Design_Counter_Overflow = 2131296288;
// aapt resource value: 0x7f090021
public const int TextAppearance_Design_Error = 2131296289;
// aapt resource value: 0x7f090022
public const int TextAppearance_Design_Hint = 2131296290;
// aapt resource value: 0x7f090023
public const int TextAppearance_Design_Snackbar_Message = 2131296291;
// aapt resource value: 0x7f090024
public const int TextAppearance_Design_Tab = 2131296292;
// aapt resource value: 0x7f090057
public const int TextAppearance_StatusBar_EventContent = 2131296343;
// aapt resource value: 0x7f090058
public const int TextAppearance_StatusBar_EventContent_Info = 2131296344;
// aapt resource value: 0x7f090059
public const int TextAppearance_StatusBar_EventContent_Line2 = 2131296345;
// aapt resource value: 0x7f09005a
public const int TextAppearance_StatusBar_EventContent_Time = 2131296346;
// aapt resource value: 0x7f09005b
public const int TextAppearance_StatusBar_EventContent_Title = 2131296347;
// aapt resource value: 0x7f090116
public const int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131296534;
// aapt resource value: 0x7f090117
public const int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131296535;
// aapt resource value: 0x7f090118
public const int TextAppearance_Widget_AppCompat_Toolbar_Title = 2131296536;
// aapt resource value: 0x7f090119
public const int Theme_AppCompat = 2131296537;
// aapt resource value: 0x7f09011a
public const int Theme_AppCompat_CompactMenu = 2131296538;
// aapt resource value: 0x7f090038
public const int Theme_AppCompat_DayNight = 2131296312;
// aapt resource value: 0x7f090039
public const int Theme_AppCompat_DayNight_DarkActionBar = 2131296313;
// aapt resource value: 0x7f09003a
public const int Theme_AppCompat_DayNight_Dialog = 2131296314;
// aapt resource value: 0x7f09003b
public const int Theme_AppCompat_DayNight_Dialog_Alert = 2131296315;
// aapt resource value: 0x7f09003c
public const int Theme_AppCompat_DayNight_Dialog_MinWidth = 2131296316;
// aapt resource value: 0x7f09003d
public const int Theme_AppCompat_DayNight_DialogWhenLarge = 2131296317;
// aapt resource value: 0x7f09003e
public const int Theme_AppCompat_DayNight_NoActionBar = 2131296318;
// aapt resource value: 0x7f09011b
public const int Theme_AppCompat_Dialog = 2131296539;
// aapt resource value: 0x7f09011c
public const int Theme_AppCompat_Dialog_Alert = 2131296540;
// aapt resource value: 0x7f09011d
public const int Theme_AppCompat_Dialog_MinWidth = 2131296541;
// aapt resource value: 0x7f09011e
public const int Theme_AppCompat_DialogWhenLarge = 2131296542;
// aapt resource value: 0x7f09011f
public const int Theme_AppCompat_Light = 2131296543;
// aapt resource value: 0x7f090120
public const int Theme_AppCompat_Light_DarkActionBar = 2131296544;
// aapt resource value: 0x7f090121
public const int Theme_AppCompat_Light_Dialog = 2131296545;
// aapt resource value: 0x7f090122
public const int Theme_AppCompat_Light_Dialog_Alert = 2131296546;
// aapt resource value: 0x7f090123
public const int Theme_AppCompat_Light_Dialog_MinWidth = 2131296547;
// aapt resource value: 0x7f090124
public const int Theme_AppCompat_Light_DialogWhenLarge = 2131296548;
// aapt resource value: 0x7f090125
public const int Theme_AppCompat_Light_NoActionBar = 2131296549;
// aapt resource value: 0x7f090126
public const int Theme_AppCompat_NoActionBar = 2131296550;
// aapt resource value: 0x7f090025
public const int Theme_Design = 2131296293;
// aapt resource value: 0x7f090026
public const int Theme_Design_BottomSheetDialog = 2131296294;
// aapt resource value: 0x7f090027
public const int Theme_Design_Light = 2131296295;
// aapt resource value: 0x7f090028
public const int Theme_Design_Light_BottomSheetDialog = 2131296296;
// aapt resource value: 0x7f090029
public const int Theme_Design_Light_NoActionBar = 2131296297;
// aapt resource value: 0x7f09002a
public const int Theme_Design_NoActionBar = 2131296298;
// aapt resource value: 0x7f090000
public const int Theme_MediaRouter = 2131296256;
// aapt resource value: 0x7f090001
public const int Theme_MediaRouter_Light = 2131296257;
// aapt resource value: 0x7f090002
public const int Theme_MediaRouter_Light_DarkControlPanel = 2131296258;
// aapt resource value: 0x7f090003
public const int Theme_MediaRouter_LightControlPanel = 2131296259;
// aapt resource value: 0x7f090127
public const int ThemeOverlay_AppCompat = 2131296551;
// aapt resource value: 0x7f090128
public const int ThemeOverlay_AppCompat_ActionBar = 2131296552;
// aapt resource value: 0x7f090129
public const int ThemeOverlay_AppCompat_Dark = 2131296553;
// aapt resource value: 0x7f09012a
public const int ThemeOverlay_AppCompat_Dark_ActionBar = 2131296554;
// aapt resource value: 0x7f09012b
public const int ThemeOverlay_AppCompat_Light = 2131296555;
// aapt resource value: 0x7f09012c
public const int Widget_AppCompat_ActionBar = 2131296556;
// aapt resource value: 0x7f09012d
public const int Widget_AppCompat_ActionBar_Solid = 2131296557;
// aapt resource value: 0x7f09012e
public const int Widget_AppCompat_ActionBar_TabBar = 2131296558;
// aapt resource value: 0x7f09012f
public const int Widget_AppCompat_ActionBar_TabText = 2131296559;
// aapt resource value: 0x7f090130
public const int Widget_AppCompat_ActionBar_TabView = 2131296560;
// aapt resource value: 0x7f090131
public const int Widget_AppCompat_ActionButton = 2131296561;
// aapt resource value: 0x7f090132
public const int Widget_AppCompat_ActionButton_CloseMode = 2131296562;
// aapt resource value: 0x7f090133
public const int Widget_AppCompat_ActionButton_Overflow = 2131296563;
// aapt resource value: 0x7f090134
public const int Widget_AppCompat_ActionMode = 2131296564;
// aapt resource value: 0x7f090135
public const int Widget_AppCompat_ActivityChooserView = 2131296565;
// aapt resource value: 0x7f090136
public const int Widget_AppCompat_AutoCompleteTextView = 2131296566;
// aapt resource value: 0x7f090137
public const int Widget_AppCompat_Button = 2131296567;
// aapt resource value: 0x7f090138
public const int Widget_AppCompat_Button_Borderless = 2131296568;
// aapt resource value: 0x7f090139
public const int Widget_AppCompat_Button_Borderless_Colored = 2131296569;
// aapt resource value: 0x7f09013a
public const int Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131296570;
// aapt resource value: 0x7f09013b
public const int Widget_AppCompat_Button_Colored = 2131296571;
// aapt resource value: 0x7f09013c
public const int Widget_AppCompat_Button_Small = 2131296572;
// aapt resource value: 0x7f09013d
public const int Widget_AppCompat_ButtonBar = 2131296573;
// aapt resource value: 0x7f09013e
public const int Widget_AppCompat_ButtonBar_AlertDialog = 2131296574;
// aapt resource value: 0x7f09013f
public const int Widget_AppCompat_CompoundButton_CheckBox = 2131296575;
// aapt resource value: 0x7f090140
public const int Widget_AppCompat_CompoundButton_RadioButton = 2131296576;
// aapt resource value: 0x7f090141
public const int Widget_AppCompat_CompoundButton_Switch = 2131296577;
// aapt resource value: 0x7f090142
public const int Widget_AppCompat_DrawerArrowToggle = 2131296578;
// aapt resource value: 0x7f090143
public const int Widget_AppCompat_DropDownItem_Spinner = 2131296579;
// aapt resource value: 0x7f090144
public const int Widget_AppCompat_EditText = 2131296580;
// aapt resource value: 0x7f090145
public const int Widget_AppCompat_ImageButton = 2131296581;
// aapt resource value: 0x7f090146
public const int Widget_AppCompat_Light_ActionBar = 2131296582;
// aapt resource value: 0x7f090147
public const int Widget_AppCompat_Light_ActionBar_Solid = 2131296583;
// aapt resource value: 0x7f090148
public const int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 2131296584;
// aapt resource value: 0x7f090149
public const int Widget_AppCompat_Light_ActionBar_TabBar = 2131296585;
// aapt resource value: 0x7f09014a
public const int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 2131296586;
// aapt resource value: 0x7f09014b
public const int Widget_AppCompat_Light_ActionBar_TabText = 2131296587;
// aapt resource value: 0x7f09014c
public const int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131296588;
// aapt resource value: 0x7f09014d
public const int Widget_AppCompat_Light_ActionBar_TabView = 2131296589;
// aapt resource value: 0x7f09014e
public const int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 2131296590;
// aapt resource value: 0x7f09014f
public const int Widget_AppCompat_Light_ActionButton = 2131296591;
// aapt resource value: 0x7f090150
public const int Widget_AppCompat_Light_ActionButton_CloseMode = 2131296592;
// aapt resource value: 0x7f090151
public const int Widget_AppCompat_Light_ActionButton_Overflow = 2131296593;
// aapt resource value: 0x7f090152
public const int Widget_AppCompat_Light_ActionMode_Inverse = 2131296594;
// aapt resource value: 0x7f090153
public const int Widget_AppCompat_Light_ActivityChooserView = 2131296595;
// aapt resource value: 0x7f090154
public const int Widget_AppCompat_Light_AutoCompleteTextView = 2131296596;
// aapt resource value: 0x7f090155
public const int Widget_AppCompat_Light_DropDownItem_Spinner = 2131296597;
// aapt resource value: 0x7f090156
public const int Widget_AppCompat_Light_ListPopupWindow = 2131296598;
// aapt resource value: 0x7f090157
public const int Widget_AppCompat_Light_ListView_DropDown = 2131296599;
// aapt resource value: 0x7f090158
public const int Widget_AppCompat_Light_PopupMenu = 2131296600;
// aapt resource value: 0x7f090159
public const int Widget_AppCompat_Light_PopupMenu_Overflow = 2131296601;
// aapt resource value: 0x7f09015a
public const int Widget_AppCompat_Light_SearchView = 2131296602;
// aapt resource value: 0x7f09015b
public const int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 2131296603;
// aapt resource value: 0x7f09015c
public const int Widget_AppCompat_ListPopupWindow = 2131296604;
// aapt resource value: 0x7f09015d
public const int Widget_AppCompat_ListView = 2131296605;
// aapt resource value: 0x7f09015e
public const int Widget_AppCompat_ListView_DropDown = 2131296606;
// aapt resource value: 0x7f09015f
public const int Widget_AppCompat_ListView_Menu = 2131296607;
// aapt resource value: 0x7f090160
public const int Widget_AppCompat_PopupMenu = 2131296608;
// aapt resource value: 0x7f090161
public const int Widget_AppCompat_PopupMenu_Overflow = 2131296609;
// aapt resource value: 0x7f090162
public const int Widget_AppCompat_PopupWindow = 2131296610;
// aapt resource value: 0x7f090163
public const int Widget_AppCompat_ProgressBar = 2131296611;
// aapt resource value: 0x7f090164
public const int Widget_AppCompat_ProgressBar_Horizontal = 2131296612;
// aapt resource value: 0x7f090165
public const int Widget_AppCompat_RatingBar = 2131296613;
// aapt resource value: 0x7f090166
public const int Widget_AppCompat_RatingBar_Indicator = 2131296614;
// aapt resource value: 0x7f090167
public const int Widget_AppCompat_RatingBar_Small = 2131296615;
// aapt resource value: 0x7f090168
public const int Widget_AppCompat_SearchView = 2131296616;
// aapt resource value: 0x7f090169
public const int Widget_AppCompat_SearchView_ActionBar = 2131296617;
// aapt resource value: 0x7f09016a
public const int Widget_AppCompat_SeekBar = 2131296618;
// aapt resource value: 0x7f09016b
public const int Widget_AppCompat_Spinner = 2131296619;
// aapt resource value: 0x7f09016c
public const int Widget_AppCompat_Spinner_DropDown = 2131296620;
// aapt resource value: 0x7f09016d
public const int Widget_AppCompat_Spinner_DropDown_ActionBar = 2131296621;
// aapt resource value: 0x7f09016e
public const int Widget_AppCompat_Spinner_Underlined = 2131296622;
// aapt resource value: 0x7f09016f
public const int Widget_AppCompat_TextView_SpinnerItem = 2131296623;
// aapt resource value: 0x7f090170
public const int Widget_AppCompat_Toolbar = 2131296624;
// aapt resource value: 0x7f090171
public const int Widget_AppCompat_Toolbar_Button_Navigation = 2131296625;
// aapt resource value: 0x7f09002b
public const int Widget_Design_AppBarLayout = 2131296299;
// aapt resource value: 0x7f09002c
public const int Widget_Design_BottomSheet_Modal = 2131296300;
// aapt resource value: 0x7f09002d
public const int Widget_Design_CollapsingToolbar = 2131296301;
// aapt resource value: 0x7f09002e
public const int Widget_Design_CoordinatorLayout = 2131296302;
// aapt resource value: 0x7f09002f
public const int Widget_Design_FloatingActionButton = 2131296303;
// aapt resource value: 0x7f090030
public const int Widget_Design_NavigationView = 2131296304;
// aapt resource value: 0x7f090031
public const int Widget_Design_ScrimInsetsFrameLayout = 2131296305;
// aapt resource value: 0x7f090032
public const int Widget_Design_Snackbar = 2131296306;
// aapt resource value: 0x7f09001b
public const int Widget_Design_TabLayout = 2131296283;
// aapt resource value: 0x7f090033
public const int Widget_Design_TextInputLayout = 2131296307;
// aapt resource value: 0x7f090004
public const int Widget_MediaRouter_ChooserText = 2131296260;
// aapt resource value: 0x7f090005
public const int Widget_MediaRouter_ChooserText_Primary = 2131296261;
// aapt resource value: 0x7f090006
public const int Widget_MediaRouter_ChooserText_Primary_Dark = 2131296262;
// aapt resource value: 0x7f090007
public const int Widget_MediaRouter_ChooserText_Primary_Light = 2131296263;
// aapt resource value: 0x7f090008
public const int Widget_MediaRouter_ChooserText_Secondary = 2131296264;
// aapt resource value: 0x7f090009
public const int Widget_MediaRouter_ChooserText_Secondary_Dark = 2131296265;
// aapt resource value: 0x7f09000a
public const int Widget_MediaRouter_ChooserText_Secondary_Light = 2131296266;
// aapt resource value: 0x7f09000b
public const int Widget_MediaRouter_ControllerText = 2131296267;
// aapt resource value: 0x7f09000c
public const int Widget_MediaRouter_ControllerText_Primary = 2131296268;
// aapt resource value: 0x7f09000d
public const int Widget_MediaRouter_ControllerText_Primary_Dark = 2131296269;
// aapt resource value: 0x7f09000e
public const int Widget_MediaRouter_ControllerText_Primary_Light = 2131296270;
// aapt resource value: 0x7f09000f
public const int Widget_MediaRouter_ControllerText_Secondary = 2131296271;
// aapt resource value: 0x7f090010
public const int Widget_MediaRouter_ControllerText_Secondary_Dark = 2131296272;
// aapt resource value: 0x7f090011
public const int Widget_MediaRouter_ControllerText_Secondary_Light = 2131296273;
// aapt resource value: 0x7f090012
public const int Widget_MediaRouter_ControllerText_Title = 2131296274;
// aapt resource value: 0x7f090013
public const int Widget_MediaRouter_ControllerText_Title_Dark = 2131296275;
// aapt resource value: 0x7f090014
public const int Widget_MediaRouter_ControllerText_Title_Light = 2131296276;
// aapt resource value: 0x7f090015
public const int Widget_MediaRouter_Light_MediaRouteButton = 2131296277;
// aapt resource value: 0x7f090016
public const int Widget_MediaRouter_MediaRouteButton = 2131296278;
static Style()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Style()
{
}
}
public partial class Styleable
{
public static int[] ActionBar = new int[]
{
2130772076,
2130772078,
2130772079,
2130772080,
2130772081,
2130772082,
2130772083,
2130772084,
2130772085,
2130772086,
2130772087,
2130772088,
2130772089,
2130772090,
2130772091,
2130772092,
2130772093,
2130772094,
2130772095,
2130772096,
2130772097,
2130772098,
2130772099,
2130772100,
2130772101,
2130772102,
2130772159};
// aapt resource value: 10
public const int ActionBar_background = 10;
// aapt resource value: 12
public const int ActionBar_backgroundSplit = 12;
// aapt resource value: 11
public const int ActionBar_backgroundStacked = 11;
// aapt resource value: 21
public const int ActionBar_contentInsetEnd = 21;
// aapt resource value: 22
public const int ActionBar_contentInsetLeft = 22;
// aapt resource value: 23
public const int ActionBar_contentInsetRight = 23;
// aapt resource value: 20
public const int ActionBar_contentInsetStart = 20;
// aapt resource value: 13
public const int ActionBar_customNavigationLayout = 13;
// aapt resource value: 3
public const int ActionBar_displayOptions = 3;
// aapt resource value: 9
public const int ActionBar_divider = 9;
// aapt resource value: 24
public const int ActionBar_elevation = 24;
// aapt resource value: 0
public const int ActionBar_height = 0;
// aapt resource value: 19
public const int ActionBar_hideOnContentScroll = 19;
// aapt resource value: 26
public const int ActionBar_homeAsUpIndicator = 26;
// aapt resource value: 14
public const int ActionBar_homeLayout = 14;
// aapt resource value: 7
public const int ActionBar_icon = 7;
// aapt resource value: 16
public const int ActionBar_indeterminateProgressStyle = 16;
// aapt resource value: 18
public const int ActionBar_itemPadding = 18;
// aapt resource value: 8
public const int ActionBar_logo = 8;
// aapt resource value: 2
public const int ActionBar_navigationMode = 2;
// aapt resource value: 25
public const int ActionBar_popupTheme = 25;
// aapt resource value: 17
public const int ActionBar_progressBarPadding = 17;
// aapt resource value: 15
public const int ActionBar_progressBarStyle = 15;
// aapt resource value: 4
public const int ActionBar_subtitle = 4;
// aapt resource value: 6
public const int ActionBar_subtitleTextStyle = 6;
// aapt resource value: 1
public const int ActionBar_title = 1;
// aapt resource value: 5
public const int ActionBar_titleTextStyle = 5;
public static int[] ActionBarLayout = new int[]
{
16842931};
// aapt resource value: 0
public const int ActionBarLayout_android_layout_gravity = 0;
public static int[] ActionMenuItemView = new int[]
{
16843071};
// aapt resource value: 0
public const int ActionMenuItemView_android_minWidth = 0;
public static int[] ActionMenuView;
public static int[] ActionMode = new int[]
{
2130772076,
2130772082,
2130772083,
2130772087,
2130772089,
2130772103};
// aapt resource value: 3
public const int ActionMode_background = 3;
// aapt resource value: 4
public const int ActionMode_backgroundSplit = 4;
// aapt resource value: 5
public const int ActionMode_closeItemLayout = 5;
// aapt resource value: 0
public const int ActionMode_height = 0;
// aapt resource value: 2
public const int ActionMode_subtitleTextStyle = 2;
// aapt resource value: 1
public const int ActionMode_titleTextStyle = 1;
public static int[] ActivityChooserView = new int[]
{
2130772104,
2130772105};
// aapt resource value: 1
public const int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
// aapt resource value: 0
public const int ActivityChooserView_initialActivityCount = 0;
public static int[] AlertDialog = new int[]
{
16842994,
2130772106,
2130772107,
2130772108,
2130772109,
2130772110};
// aapt resource value: 0
public const int AlertDialog_android_layout = 0;
// aapt resource value: 1
public const int AlertDialog_buttonPanelSideLayout = 1;
// aapt resource value: 5
public const int AlertDialog_listItemLayout = 5;
// aapt resource value: 2
public const int AlertDialog_listLayout = 2;
// aapt resource value: 3
public const int AlertDialog_multiChoiceItemLayout = 3;
// aapt resource value: 4
public const int AlertDialog_singleChoiceItemLayout = 4;
public static int[] AppBarLayout = new int[]
{
16842964,
2130772002,
2130772101};
// aapt resource value: 0
public const int AppBarLayout_android_background = 0;
// aapt resource value: 2
public const int AppBarLayout_elevation = 2;
// aapt resource value: 1
public const int AppBarLayout_expanded = 1;
public static int[] AppBarLayout_LayoutParams = new int[]
{
2130772003,
2130772004};
// aapt resource value: 0
public const int AppBarLayout_LayoutParams_layout_scrollFlags = 0;
// aapt resource value: 1
public const int AppBarLayout_LayoutParams_layout_scrollInterpolator = 1;
public static int[] AppCompatImageView = new int[]
{
16843033,
2130772111};
// aapt resource value: 0
public const int AppCompatImageView_android_src = 0;
// aapt resource value: 1
public const int AppCompatImageView_srcCompat = 1;
public static int[] AppCompatTextView = new int[]
{
16842804,
2130772112};
// aapt resource value: 0
public const int AppCompatTextView_android_textAppearance = 0;
// aapt resource value: 1
public const int AppCompatTextView_textAllCaps = 1;
public static int[] AppCompatTheme = new int[]
{
16842839,
16842926,
2130772113,
2130772114,
2130772115,
2130772116,
2130772117,
2130772118,
2130772119,
2130772120,
2130772121,
2130772122,
2130772123,
2130772124,
2130772125,
2130772126,
2130772127,
2130772128,
2130772129,
2130772130,
2130772131,
2130772132,
2130772133,
2130772134,
2130772135,
2130772136,
2130772137,
2130772138,
2130772139,
2130772140,
2130772141,
2130772142,
2130772143,
2130772144,
2130772145,
2130772146,
2130772147,
2130772148,
2130772149,
2130772150,
2130772151,
2130772152,
2130772153,
2130772154,
2130772155,
2130772156,
2130772157,
2130772158,
2130772159,
2130772160,
2130772161,
2130772162,
2130772163,
2130772164,
2130772165,
2130772166,
2130772167,
2130772168,
2130772169,
2130772170,
2130772171,
2130772172,
2130772173,
2130772174,
2130772175,
2130772176,
2130772177,
2130772178,
2130772179,
2130772180,
2130772181,
2130772182,
2130772183,
2130772184,
2130772185,
2130772186,
2130772187,
2130772188,
2130772189,
2130772190,
2130772191,
2130772192,
2130772193,
2130772194,
2130772195,
2130772196,
2130772197,
2130772198,
2130772199,
2130772200,
2130772201,
2130772202,
2130772203,
2130772204,
2130772205,
2130772206,
2130772207,
2130772208,
2130772209,
2130772210,
2130772211,
2130772212,
2130772213,
2130772214,
2130772215,
2130772216,
2130772217,
2130772218,
2130772219,
2130772220,
2130772221,
2130772222};
// aapt resource value: 23
public const int AppCompatTheme_actionBarDivider = 23;
// aapt resource value: 24
public const int AppCompatTheme_actionBarItemBackground = 24;
// aapt resource value: 17
public const int AppCompatTheme_actionBarPopupTheme = 17;
// aapt resource value: 22
public const int AppCompatTheme_actionBarSize = 22;
// aapt resource value: 19
public const int AppCompatTheme_actionBarSplitStyle = 19;
// aapt resource value: 18
public const int AppCompatTheme_actionBarStyle = 18;
// aapt resource value: 13
public const int AppCompatTheme_actionBarTabBarStyle = 13;
// aapt resource value: 12
public const int AppCompatTheme_actionBarTabStyle = 12;
// aapt resource value: 14
public const int AppCompatTheme_actionBarTabTextStyle = 14;
// aapt resource value: 20
public const int AppCompatTheme_actionBarTheme = 20;
// aapt resource value: 21
public const int AppCompatTheme_actionBarWidgetTheme = 21;
// aapt resource value: 49
public const int AppCompatTheme_actionButtonStyle = 49;
// aapt resource value: 45
public const int AppCompatTheme_actionDropDownStyle = 45;
// aapt resource value: 25
public const int AppCompatTheme_actionMenuTextAppearance = 25;
// aapt resource value: 26
public const int AppCompatTheme_actionMenuTextColor = 26;
// aapt resource value: 29
public const int AppCompatTheme_actionModeBackground = 29;
// aapt resource value: 28
public const int AppCompatTheme_actionModeCloseButtonStyle = 28;
// aapt resource value: 31
public const int AppCompatTheme_actionModeCloseDrawable = 31;
// aapt resource value: 33
public const int AppCompatTheme_actionModeCopyDrawable = 33;
// aapt resource value: 32
public const int AppCompatTheme_actionModeCutDrawable = 32;
// aapt resource value: 37
public const int AppCompatTheme_actionModeFindDrawable = 37;
// aapt resource value: 34
public const int AppCompatTheme_actionModePasteDrawable = 34;
// aapt resource value: 39
public const int AppCompatTheme_actionModePopupWindowStyle = 39;
// aapt resource value: 35
public const int AppCompatTheme_actionModeSelectAllDrawable = 35;
// aapt resource value: 36
public const int AppCompatTheme_actionModeShareDrawable = 36;
// aapt resource value: 30
public const int AppCompatTheme_actionModeSplitBackground = 30;
// aapt resource value: 27
public const int AppCompatTheme_actionModeStyle = 27;
// aapt resource value: 38
public const int AppCompatTheme_actionModeWebSearchDrawable = 38;
// aapt resource value: 15
public const int AppCompatTheme_actionOverflowButtonStyle = 15;
// aapt resource value: 16
public const int AppCompatTheme_actionOverflowMenuStyle = 16;
// aapt resource value: 57
public const int AppCompatTheme_activityChooserViewStyle = 57;
// aapt resource value: 92
public const int AppCompatTheme_alertDialogButtonGroupStyle = 92;
// aapt resource value: 93
public const int AppCompatTheme_alertDialogCenterButtons = 93;
// aapt resource value: 91
public const int AppCompatTheme_alertDialogStyle = 91;
// aapt resource value: 94
public const int AppCompatTheme_alertDialogTheme = 94;
// aapt resource value: 1
public const int AppCompatTheme_android_windowAnimationStyle = 1;
// aapt resource value: 0
public const int AppCompatTheme_android_windowIsFloating = 0;
// aapt resource value: 99
public const int AppCompatTheme_autoCompleteTextViewStyle = 99;
// aapt resource value: 54
public const int AppCompatTheme_borderlessButtonStyle = 54;
// aapt resource value: 51
public const int AppCompatTheme_buttonBarButtonStyle = 51;
// aapt resource value: 97
public const int AppCompatTheme_buttonBarNegativeButtonStyle = 97;
// aapt resource value: 98
public const int AppCompatTheme_buttonBarNeutralButtonStyle = 98;
// aapt resource value: 96
public const int AppCompatTheme_buttonBarPositiveButtonStyle = 96;
// aapt resource value: 50
public const int AppCompatTheme_buttonBarStyle = 50;
// aapt resource value: 100
public const int AppCompatTheme_buttonStyle = 100;
// aapt resource value: 101
public const int AppCompatTheme_buttonStyleSmall = 101;
// aapt resource value: 102
public const int AppCompatTheme_checkboxStyle = 102;
// aapt resource value: 103
public const int AppCompatTheme_checkedTextViewStyle = 103;
// aapt resource value: 84
public const int AppCompatTheme_colorAccent = 84;
// aapt resource value: 88
public const int AppCompatTheme_colorButtonNormal = 88;
// aapt resource value: 86
public const int AppCompatTheme_colorControlActivated = 86;
// aapt resource value: 87
public const int AppCompatTheme_colorControlHighlight = 87;
// aapt resource value: 85
public const int AppCompatTheme_colorControlNormal = 85;
// aapt resource value: 82
public const int AppCompatTheme_colorPrimary = 82;
// aapt resource value: 83
public const int AppCompatTheme_colorPrimaryDark = 83;
// aapt resource value: 89
public const int AppCompatTheme_colorSwitchThumbNormal = 89;
// aapt resource value: 90
public const int AppCompatTheme_controlBackground = 90;
// aapt resource value: 43
public const int AppCompatTheme_dialogPreferredPadding = 43;
// aapt resource value: 42
public const int AppCompatTheme_dialogTheme = 42;
// aapt resource value: 56
public const int AppCompatTheme_dividerHorizontal = 56;
// aapt resource value: 55
public const int AppCompatTheme_dividerVertical = 55;
// aapt resource value: 74
public const int AppCompatTheme_dropDownListViewStyle = 74;
// aapt resource value: 46
public const int AppCompatTheme_dropdownListPreferredItemHeight = 46;
// aapt resource value: 63
public const int AppCompatTheme_editTextBackground = 63;
// aapt resource value: 62
public const int AppCompatTheme_editTextColor = 62;
// aapt resource value: 104
public const int AppCompatTheme_editTextStyle = 104;
// aapt resource value: 48
public const int AppCompatTheme_homeAsUpIndicator = 48;
// aapt resource value: 64
public const int AppCompatTheme_imageButtonStyle = 64;
// aapt resource value: 81
public const int AppCompatTheme_listChoiceBackgroundIndicator = 81;
// aapt resource value: 44
public const int AppCompatTheme_listDividerAlertDialog = 44;
// aapt resource value: 75
public const int AppCompatTheme_listPopupWindowStyle = 75;
// aapt resource value: 69
public const int AppCompatTheme_listPreferredItemHeight = 69;
// aapt resource value: 71
public const int AppCompatTheme_listPreferredItemHeightLarge = 71;
// aapt resource value: 70
public const int AppCompatTheme_listPreferredItemHeightSmall = 70;
// aapt resource value: 72
public const int AppCompatTheme_listPreferredItemPaddingLeft = 72;
// aapt resource value: 73
public const int AppCompatTheme_listPreferredItemPaddingRight = 73;
// aapt resource value: 78
public const int AppCompatTheme_panelBackground = 78;
// aapt resource value: 80
public const int AppCompatTheme_panelMenuListTheme = 80;
// aapt resource value: 79
public const int AppCompatTheme_panelMenuListWidth = 79;
// aapt resource value: 60
public const int AppCompatTheme_popupMenuStyle = 60;
// aapt resource value: 61
public const int AppCompatTheme_popupWindowStyle = 61;
// aapt resource value: 105
public const int AppCompatTheme_radioButtonStyle = 105;
// aapt resource value: 106
public const int AppCompatTheme_ratingBarStyle = 106;
// aapt resource value: 107
public const int AppCompatTheme_ratingBarStyleIndicator = 107;
// aapt resource value: 108
public const int AppCompatTheme_ratingBarStyleSmall = 108;
// aapt resource value: 68
public const int AppCompatTheme_searchViewStyle = 68;
// aapt resource value: 109
public const int AppCompatTheme_seekBarStyle = 109;
// aapt resource value: 52
public const int AppCompatTheme_selectableItemBackground = 52;
// aapt resource value: 53
public const int AppCompatTheme_selectableItemBackgroundBorderless = 53;
// aapt resource value: 47
public const int AppCompatTheme_spinnerDropDownItemStyle = 47;
// aapt resource value: 110
public const int AppCompatTheme_spinnerStyle = 110;
// aapt resource value: 111
public const int AppCompatTheme_switchStyle = 111;
// aapt resource value: 40
public const int AppCompatTheme_textAppearanceLargePopupMenu = 40;
// aapt resource value: 76
public const int AppCompatTheme_textAppearanceListItem = 76;
// aapt resource value: 77
public const int AppCompatTheme_textAppearanceListItemSmall = 77;
// aapt resource value: 66
public const int AppCompatTheme_textAppearanceSearchResultSubtitle = 66;
// aapt resource value: 65
public const int AppCompatTheme_textAppearanceSearchResultTitle = 65;
// aapt resource value: 41
public const int AppCompatTheme_textAppearanceSmallPopupMenu = 41;
// aapt resource value: 95
public const int AppCompatTheme_textColorAlertDialogListItem = 95;
// aapt resource value: 67
public const int AppCompatTheme_textColorSearchUrl = 67;
// aapt resource value: 59
public const int AppCompatTheme_toolbarNavigationButtonStyle = 59;
// aapt resource value: 58
public const int AppCompatTheme_toolbarStyle = 58;
// aapt resource value: 2
public const int AppCompatTheme_windowActionBar = 2;
// aapt resource value: 4
public const int AppCompatTheme_windowActionBarOverlay = 4;
// aapt resource value: 5
public const int AppCompatTheme_windowActionModeOverlay = 5;
// aapt resource value: 9
public const int AppCompatTheme_windowFixedHeightMajor = 9;
// aapt resource value: 7
public const int AppCompatTheme_windowFixedHeightMinor = 7;
// aapt resource value: 6
public const int AppCompatTheme_windowFixedWidthMajor = 6;
// aapt resource value: 8
public const int AppCompatTheme_windowFixedWidthMinor = 8;
// aapt resource value: 10
public const int AppCompatTheme_windowMinWidthMajor = 10;
// aapt resource value: 11
public const int AppCompatTheme_windowMinWidthMinor = 11;
// aapt resource value: 3
public const int AppCompatTheme_windowNoTitle = 3;
public static int[] BottomSheetBehavior_Params = new int[]
{
2130772005,
2130772006};
// aapt resource value: 1
public const int BottomSheetBehavior_Params_behavior_hideable = 1;
// aapt resource value: 0
public const int BottomSheetBehavior_Params_behavior_peekHeight = 0;
public static int[] ButtonBarLayout = new int[]
{
2130772223};
// aapt resource value: 0
public const int ButtonBarLayout_allowStacking = 0;
public static int[] CardView = new int[]
{
16843071,
16843072,
2130771991,
2130771992,
2130771993,
2130771994,
2130771995,
2130771996,
2130771997,
2130771998,
2130771999,
2130772000,
2130772001};
// aapt resource value: 1
public const int CardView_android_minHeight = 1;
// aapt resource value: 0
public const int CardView_android_minWidth = 0;
// aapt resource value: 2
public const int CardView_cardBackgroundColor = 2;
// aapt resource value: 3
public const int CardView_cardCornerRadius = 3;
// aapt resource value: 4
public const int CardView_cardElevation = 4;
// aapt resource value: 5
public const int CardView_cardMaxElevation = 5;
// aapt resource value: 7
public const int CardView_cardPreventCornerOverlap = 7;
// aapt resource value: 6
public const int CardView_cardUseCompatPadding = 6;
// aapt resource value: 8
public const int CardView_contentPadding = 8;
// aapt resource value: 12
public const int CardView_contentPaddingBottom = 12;
// aapt resource value: 9
public const int CardView_contentPaddingLeft = 9;
// aapt resource value: 10
public const int CardView_contentPaddingRight = 10;
// aapt resource value: 11
public const int CardView_contentPaddingTop = 11;
public static int[] CollapsingAppBarLayout_LayoutParams = new int[]
{
2130772007,
2130772008};
// aapt resource value: 0
public const int CollapsingAppBarLayout_LayoutParams_layout_collapseMode = 0;
// aapt resource value: 1
public const int CollapsingAppBarLayout_LayoutParams_layout_collapseParallaxMultiplier = 1;
public static int[] CollapsingToolbarLayout = new int[]
{
2130772009,
2130772010,
2130772011,
2130772012,
2130772013,
2130772014,
2130772015,
2130772016,
2130772017,
2130772018,
2130772019,
2130772020,
2130772021,
2130772078};
// aapt resource value: 10
public const int CollapsingToolbarLayout_collapsedTitleGravity = 10;
// aapt resource value: 6
public const int CollapsingToolbarLayout_collapsedTitleTextAppearance = 6;
// aapt resource value: 7
public const int CollapsingToolbarLayout_contentScrim = 7;
// aapt resource value: 11
public const int CollapsingToolbarLayout_expandedTitleGravity = 11;
// aapt resource value: 0
public const int CollapsingToolbarLayout_expandedTitleMargin = 0;
// aapt resource value: 4
public const int CollapsingToolbarLayout_expandedTitleMarginBottom = 4;
// aapt resource value: 3
public const int CollapsingToolbarLayout_expandedTitleMarginEnd = 3;
// aapt resource value: 1
public const int CollapsingToolbarLayout_expandedTitleMarginStart = 1;
// aapt resource value: 2
public const int CollapsingToolbarLayout_expandedTitleMarginTop = 2;
// aapt resource value: 5
public const int CollapsingToolbarLayout_expandedTitleTextAppearance = 5;
// aapt resource value: 8
public const int CollapsingToolbarLayout_statusBarScrim = 8;
// aapt resource value: 13
public const int CollapsingToolbarLayout_title = 13;
// aapt resource value: 12
public const int CollapsingToolbarLayout_titleEnabled = 12;
// aapt resource value: 9
public const int CollapsingToolbarLayout_toolbarId = 9;
public static int[] CompoundButton = new int[]
{
16843015,
2130772224,
2130772225};
// aapt resource value: 0
public const int CompoundButton_android_button = 0;
// aapt resource value: 1
public const int CompoundButton_buttonTint = 1;
// aapt resource value: 2
public const int CompoundButton_buttonTintMode = 2;
public static int[] CoordinatorLayout = new int[]
{
2130772022,
2130772023};
// aapt resource value: 0
public const int CoordinatorLayout_keylines = 0;
// aapt resource value: 1
public const int CoordinatorLayout_statusBarBackground = 1;
public static int[] CoordinatorLayout_LayoutParams = new int[]
{
16842931,
2130772024,
2130772025,
2130772026,
2130772027};
// aapt resource value: 0
public const int CoordinatorLayout_LayoutParams_android_layout_gravity = 0;
// aapt resource value: 2
public const int CoordinatorLayout_LayoutParams_layout_anchor = 2;
// aapt resource value: 4
public const int CoordinatorLayout_LayoutParams_layout_anchorGravity = 4;
// aapt resource value: 1
public const int CoordinatorLayout_LayoutParams_layout_behavior = 1;
// aapt resource value: 3
public const int CoordinatorLayout_LayoutParams_layout_keyline = 3;
public static int[] DesignTheme = new int[]
{
2130772028,
2130772029,
2130772030};
// aapt resource value: 0
public const int DesignTheme_bottomSheetDialogTheme = 0;
// aapt resource value: 1
public const int DesignTheme_bottomSheetStyle = 1;
// aapt resource value: 2
public const int DesignTheme_textColorError = 2;
public static int[] DrawerArrowToggle = new int[]
{
2130772226,
2130772227,
2130772228,
2130772229,
2130772230,
2130772231,
2130772232,
2130772233};
// aapt resource value: 4
public const int DrawerArrowToggle_arrowHeadLength = 4;
// aapt resource value: 5
public const int DrawerArrowToggle_arrowShaftLength = 5;
// aapt resource value: 6
public const int DrawerArrowToggle_barLength = 6;
// aapt resource value: 0
public const int DrawerArrowToggle_color = 0;
// aapt resource value: 2
public const int DrawerArrowToggle_drawableSize = 2;
// aapt resource value: 3
public const int DrawerArrowToggle_gapBetweenBars = 3;
// aapt resource value: 1
public const int DrawerArrowToggle_spinBars = 1;
// aapt resource value: 7
public const int DrawerArrowToggle_thickness = 7;
public static int[] FloatingActionButton = new int[]
{
2130772031,
2130772032,
2130772033,
2130772034,
2130772035,
2130772101,
2130772282,
2130772283};
// aapt resource value: 6
public const int FloatingActionButton_backgroundTint = 6;
// aapt resource value: 7
public const int FloatingActionButton_backgroundTintMode = 7;
// aapt resource value: 3
public const int FloatingActionButton_borderWidth = 3;
// aapt resource value: 5
public const int FloatingActionButton_elevation = 5;
// aapt resource value: 1
public const int FloatingActionButton_fabSize = 1;
// aapt resource value: 2
public const int FloatingActionButton_pressedTranslationZ = 2;
// aapt resource value: 0
public const int FloatingActionButton_rippleColor = 0;
// aapt resource value: 4
public const int FloatingActionButton_useCompatPadding = 4;
public static int[] ForegroundLinearLayout = new int[]
{
16843017,
16843264,
2130772036};
// aapt resource value: 0
public const int ForegroundLinearLayout_android_foreground = 0;
// aapt resource value: 1
public const int ForegroundLinearLayout_android_foregroundGravity = 1;
// aapt resource value: 2
public const int ForegroundLinearLayout_foregroundInsidePadding = 2;
public static int[] LinearLayoutCompat = new int[]
{
16842927,
16842948,
16843046,
16843047,
16843048,
2130772086,
2130772234,
2130772235,
2130772236};
// aapt resource value: 2
public const int LinearLayoutCompat_android_baselineAligned = 2;
// aapt resource value: 3
public const int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
// aapt resource value: 0
public const int LinearLayoutCompat_android_gravity = 0;
// aapt resource value: 1
public const int LinearLayoutCompat_android_orientation = 1;
// aapt resource value: 4
public const int LinearLayoutCompat_android_weightSum = 4;
// aapt resource value: 5
public const int LinearLayoutCompat_divider = 5;
// aapt resource value: 8
public const int LinearLayoutCompat_dividerPadding = 8;
// aapt resource value: 6
public const int LinearLayoutCompat_measureWithLargestChild = 6;
// aapt resource value: 7
public const int LinearLayoutCompat_showDividers = 7;
public static int[] LinearLayoutCompat_Layout = new int[]
{
16842931,
16842996,
16842997,
16843137};
// aapt resource value: 0
public const int LinearLayoutCompat_Layout_android_layout_gravity = 0;
// aapt resource value: 2
public const int LinearLayoutCompat_Layout_android_layout_height = 2;
// aapt resource value: 3
public const int LinearLayoutCompat_Layout_android_layout_weight = 3;
// aapt resource value: 1
public const int LinearLayoutCompat_Layout_android_layout_width = 1;
public static int[] ListPopupWindow = new int[]
{
16843436,
16843437};
// aapt resource value: 0
public const int ListPopupWindow_android_dropDownHorizontalOffset = 0;
// aapt resource value: 1
public const int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static int[] MediaRouteButton = new int[]
{
16843071,
16843072,
2130771990};
// aapt resource value: 1
public const int MediaRouteButton_android_minHeight = 1;
// aapt resource value: 0
public const int MediaRouteButton_android_minWidth = 0;
// aapt resource value: 2
public const int MediaRouteButton_externalRouteEnabledDrawable = 2;
public static int[] MenuGroup = new int[]
{
16842766,
16842960,
16843156,
16843230,
16843231,
16843232};
// aapt resource value: 5
public const int MenuGroup_android_checkableBehavior = 5;
// aapt resource value: 0
public const int MenuGroup_android_enabled = 0;
// aapt resource value: 1
public const int MenuGroup_android_id = 1;
// aapt resource value: 3
public const int MenuGroup_android_menuCategory = 3;
// aapt resource value: 4
public const int MenuGroup_android_orderInCategory = 4;
// aapt resource value: 2
public const int MenuGroup_android_visible = 2;
public static int[] MenuItem = new int[]
{
16842754,
16842766,
16842960,
16843014,
16843156,
16843230,
16843231,
16843233,
16843234,
16843235,
16843236,
16843237,
16843375,
2130772237,
2130772238,
2130772239,
2130772240};
// aapt resource value: 14
public const int MenuItem_actionLayout = 14;
// aapt resource value: 16
public const int MenuItem_actionProviderClass = 16;
// aapt resource value: 15
public const int MenuItem_actionViewClass = 15;
// aapt resource value: 9
public const int MenuItem_android_alphabeticShortcut = 9;
// aapt resource value: 11
public const int MenuItem_android_checkable = 11;
// aapt resource value: 3
public const int MenuItem_android_checked = 3;
// aapt resource value: 1
public const int MenuItem_android_enabled = 1;
// aapt resource value: 0
public const int MenuItem_android_icon = 0;
// aapt resource value: 2
public const int MenuItem_android_id = 2;
// aapt resource value: 5
public const int MenuItem_android_menuCategory = 5;
// aapt resource value: 10
public const int MenuItem_android_numericShortcut = 10;
// aapt resource value: 12
public const int MenuItem_android_onClick = 12;
// aapt resource value: 6
public const int MenuItem_android_orderInCategory = 6;
// aapt resource value: 7
public const int MenuItem_android_title = 7;
// aapt resource value: 8
public const int MenuItem_android_titleCondensed = 8;
// aapt resource value: 4
public const int MenuItem_android_visible = 4;
// aapt resource value: 13
public const int MenuItem_showAsAction = 13;
public static int[] MenuView = new int[]
{
16842926,
16843052,
16843053,
16843054,
16843055,
16843056,
16843057,
2130772241};
// aapt resource value: 4
public const int MenuView_android_headerBackground = 4;
// aapt resource value: 2
public const int MenuView_android_horizontalDivider = 2;
// aapt resource value: 5
public const int MenuView_android_itemBackground = 5;
// aapt resource value: 6
public const int MenuView_android_itemIconDisabledAlpha = 6;
// aapt resource value: 1
public const int MenuView_android_itemTextAppearance = 1;
// aapt resource value: 3
public const int MenuView_android_verticalDivider = 3;
// aapt resource value: 0
public const int MenuView_android_windowAnimationStyle = 0;
// aapt resource value: 7
public const int MenuView_preserveIconSpacing = 7;
public static int[] NavigationView = new int[]
{
16842964,
16842973,
16843039,
2130772037,
2130772038,
2130772039,
2130772040,
2130772041,
2130772042,
2130772101};
// aapt resource value: 0
public const int NavigationView_android_background = 0;
// aapt resource value: 1
public const int NavigationView_android_fitsSystemWindows = 1;
// aapt resource value: 2
public const int NavigationView_android_maxWidth = 2;
// aapt resource value: 9
public const int NavigationView_elevation = 9;
// aapt resource value: 8
public const int NavigationView_headerLayout = 8;
// aapt resource value: 6
public const int NavigationView_itemBackground = 6;
// aapt resource value: 4
public const int NavigationView_itemIconTint = 4;
// aapt resource value: 7
public const int NavigationView_itemTextAppearance = 7;
// aapt resource value: 5
public const int NavigationView_itemTextColor = 5;
// aapt resource value: 3
public const int NavigationView_menu = 3;
public static int[] PopupWindow = new int[]
{
16843126,
2130772242};
// aapt resource value: 0
public const int PopupWindow_android_popupBackground = 0;
// aapt resource value: 1
public const int PopupWindow_overlapAnchor = 1;
public static int[] PopupWindowBackgroundState = new int[]
{
2130772243};
// aapt resource value: 0
public const int PopupWindowBackgroundState_state_above_anchor = 0;
public static int[] RecyclerView = new int[]
{
16842948,
2130772071,
2130772072,
2130772073,
2130772074};
// aapt resource value: 0
public const int RecyclerView_android_orientation = 0;
// aapt resource value: 1
public const int RecyclerView_layoutManager = 1;
// aapt resource value: 3
public const int RecyclerView_reverseLayout = 3;
// aapt resource value: 2
public const int RecyclerView_spanCount = 2;
// aapt resource value: 4
public const int RecyclerView_stackFromEnd = 4;
public static int[] ScrimInsetsFrameLayout = new int[]
{
2130772043};
// aapt resource value: 0
public const int ScrimInsetsFrameLayout_insetForeground = 0;
public static int[] ScrollingViewBehavior_Params = new int[]
{
2130772044};
// aapt resource value: 0
public const int ScrollingViewBehavior_Params_behavior_overlapTop = 0;
public static int[] SearchView = new int[]
{
16842970,
16843039,
16843296,
16843364,
2130772244,
2130772245,
2130772246,
2130772247,
2130772248,
2130772249,
2130772250,
2130772251,
2130772252,
2130772253,
2130772254,
2130772255,
2130772256};
// aapt resource value: 0
public const int SearchView_android_focusable = 0;
// aapt resource value: 3
public const int SearchView_android_imeOptions = 3;
// aapt resource value: 2
public const int SearchView_android_inputType = 2;
// aapt resource value: 1
public const int SearchView_android_maxWidth = 1;
// aapt resource value: 8
public const int SearchView_closeIcon = 8;
// aapt resource value: 13
public const int SearchView_commitIcon = 13;
// aapt resource value: 7
public const int SearchView_defaultQueryHint = 7;
// aapt resource value: 9
public const int SearchView_goIcon = 9;
// aapt resource value: 5
public const int SearchView_iconifiedByDefault = 5;
// aapt resource value: 4
public const int SearchView_layout = 4;
// aapt resource value: 15
public const int SearchView_queryBackground = 15;
// aapt resource value: 6
public const int SearchView_queryHint = 6;
// aapt resource value: 11
public const int SearchView_searchHintIcon = 11;
// aapt resource value: 10
public const int SearchView_searchIcon = 10;
// aapt resource value: 16
public const int SearchView_submitBackground = 16;
// aapt resource value: 14
public const int SearchView_suggestionRowLayout = 14;
// aapt resource value: 12
public const int SearchView_voiceIcon = 12;
public static int[] SnackbarLayout = new int[]
{
16843039,
2130772045,
2130772101};
// aapt resource value: 0
public const int SnackbarLayout_android_maxWidth = 0;
// aapt resource value: 2
public const int SnackbarLayout_elevation = 2;
// aapt resource value: 1
public const int SnackbarLayout_maxActionInlineWidth = 1;
public static int[] Spinner = new int[]
{
16842930,
16843126,
16843131,
16843362,
2130772102};
// aapt resource value: 3
public const int Spinner_android_dropDownWidth = 3;
// aapt resource value: 0
public const int Spinner_android_entries = 0;
// aapt resource value: 1
public const int Spinner_android_popupBackground = 1;
// aapt resource value: 2
public const int Spinner_android_prompt = 2;
// aapt resource value: 4
public const int Spinner_popupTheme = 4;
public static int[] SwitchCompat = new int[]
{
16843044,
16843045,
16843074,
2130772257,
2130772258,
2130772259,
2130772260,
2130772261,
2130772262,
2130772263};
// aapt resource value: 1
public const int SwitchCompat_android_textOff = 1;
// aapt resource value: 0
public const int SwitchCompat_android_textOn = 0;
// aapt resource value: 2
public const int SwitchCompat_android_thumb = 2;
// aapt resource value: 9
public const int SwitchCompat_showText = 9;
// aapt resource value: 8
public const int SwitchCompat_splitTrack = 8;
// aapt resource value: 6
public const int SwitchCompat_switchMinWidth = 6;
// aapt resource value: 7
public const int SwitchCompat_switchPadding = 7;
// aapt resource value: 5
public const int SwitchCompat_switchTextAppearance = 5;
// aapt resource value: 4
public const int SwitchCompat_thumbTextPadding = 4;
// aapt resource value: 3
public const int SwitchCompat_track = 3;
public static int[] TabItem = new int[]
{
16842754,
16842994,
16843087};
// aapt resource value: 0
public const int TabItem_android_icon = 0;
// aapt resource value: 1
public const int TabItem_android_layout = 1;
// aapt resource value: 2
public const int TabItem_android_text = 2;
public static int[] TabLayout = new int[]
{
2130772046,
2130772047,
2130772048,
2130772049,
2130772050,
2130772051,
2130772052,
2130772053,
2130772054,
2130772055,
2130772056,
2130772057,
2130772058,
2130772059,
2130772060,
2130772061};
// aapt resource value: 3
public const int TabLayout_tabBackground = 3;
// aapt resource value: 2
public const int TabLayout_tabContentStart = 2;
// aapt resource value: 5
public const int TabLayout_tabGravity = 5;
// aapt resource value: 0
public const int TabLayout_tabIndicatorColor = 0;
// aapt resource value: 1
public const int TabLayout_tabIndicatorHeight = 1;
// aapt resource value: 7
public const int TabLayout_tabMaxWidth = 7;
// aapt resource value: 6
public const int TabLayout_tabMinWidth = 6;
// aapt resource value: 4
public const int TabLayout_tabMode = 4;
// aapt resource value: 15
public const int TabLayout_tabPadding = 15;
// aapt resource value: 14
public const int TabLayout_tabPaddingBottom = 14;
// aapt resource value: 13
public const int TabLayout_tabPaddingEnd = 13;
// aapt resource value: 11
public const int TabLayout_tabPaddingStart = 11;
// aapt resource value: 12
public const int TabLayout_tabPaddingTop = 12;
// aapt resource value: 10
public const int TabLayout_tabSelectedTextColor = 10;
// aapt resource value: 8
public const int TabLayout_tabTextAppearance = 8;
// aapt resource value: 9
public const int TabLayout_tabTextColor = 9;
public static int[] TextAppearance = new int[]
{
16842901,
16842902,
16842903,
16842904,
16843105,
16843106,
16843107,
16843108,
2130772112};
// aapt resource value: 4
public const int TextAppearance_android_shadowColor = 4;
// aapt resource value: 5
public const int TextAppearance_android_shadowDx = 5;
// aapt resource value: 6
public const int TextAppearance_android_shadowDy = 6;
// aapt resource value: 7
public const int TextAppearance_android_shadowRadius = 7;
// aapt resource value: 3
public const int TextAppearance_android_textColor = 3;
// aapt resource value: 0
public const int TextAppearance_android_textSize = 0;
// aapt resource value: 2
public const int TextAppearance_android_textStyle = 2;
// aapt resource value: 1
public const int TextAppearance_android_typeface = 1;
// aapt resource value: 8
public const int TextAppearance_textAllCaps = 8;
public static int[] TextInputLayout = new int[]
{
16842906,
16843088,
2130772062,
2130772063,
2130772064,
2130772065,
2130772066,
2130772067,
2130772068,
2130772069,
2130772070};
// aapt resource value: 1
public const int TextInputLayout_android_hint = 1;
// aapt resource value: 0
public const int TextInputLayout_android_textColorHint = 0;
// aapt resource value: 6
public const int TextInputLayout_counterEnabled = 6;
// aapt resource value: 7
public const int TextInputLayout_counterMaxLength = 7;
// aapt resource value: 9
public const int TextInputLayout_counterOverflowTextAppearance = 9;
// aapt resource value: 8
public const int TextInputLayout_counterTextAppearance = 8;
// aapt resource value: 4
public const int TextInputLayout_errorEnabled = 4;
// aapt resource value: 5
public const int TextInputLayout_errorTextAppearance = 5;
// aapt resource value: 10
public const int TextInputLayout_hintAnimationEnabled = 10;
// aapt resource value: 3
public const int TextInputLayout_hintEnabled = 3;
// aapt resource value: 2
public const int TextInputLayout_hintTextAppearance = 2;
public static int[] Toolbar = new int[]
{
16842927,
16843072,
2130772078,
2130772081,
2130772085,
2130772097,
2130772098,
2130772099,
2130772100,
2130772102,
2130772264,
2130772265,
2130772266,
2130772267,
2130772268,
2130772269,
2130772270,
2130772271,
2130772272,
2130772273,
2130772274,
2130772275,
2130772276,
2130772277,
2130772278};
// aapt resource value: 0
public const int Toolbar_android_gravity = 0;
// aapt resource value: 1
public const int Toolbar_android_minHeight = 1;
// aapt resource value: 19
public const int Toolbar_collapseContentDescription = 19;
// aapt resource value: 18
public const int Toolbar_collapseIcon = 18;
// aapt resource value: 6
public const int Toolbar_contentInsetEnd = 6;
// aapt resource value: 7
public const int Toolbar_contentInsetLeft = 7;
// aapt resource value: 8
public const int Toolbar_contentInsetRight = 8;
// aapt resource value: 5
public const int Toolbar_contentInsetStart = 5;
// aapt resource value: 4
public const int Toolbar_logo = 4;
// aapt resource value: 22
public const int Toolbar_logoDescription = 22;
// aapt resource value: 17
public const int Toolbar_maxButtonHeight = 17;
// aapt resource value: 21
public const int Toolbar_navigationContentDescription = 21;
// aapt resource value: 20
public const int Toolbar_navigationIcon = 20;
// aapt resource value: 9
public const int Toolbar_popupTheme = 9;
// aapt resource value: 3
public const int Toolbar_subtitle = 3;
// aapt resource value: 11
public const int Toolbar_subtitleTextAppearance = 11;
// aapt resource value: 24
public const int Toolbar_subtitleTextColor = 24;
// aapt resource value: 2
public const int Toolbar_title = 2;
// aapt resource value: 16
public const int Toolbar_titleMarginBottom = 16;
// aapt resource value: 14
public const int Toolbar_titleMarginEnd = 14;
// aapt resource value: 13
public const int Toolbar_titleMarginStart = 13;
// aapt resource value: 15
public const int Toolbar_titleMarginTop = 15;
// aapt resource value: 12
public const int Toolbar_titleMargins = 12;
// aapt resource value: 10
public const int Toolbar_titleTextAppearance = 10;
// aapt resource value: 23
public const int Toolbar_titleTextColor = 23;
public static int[] View = new int[]
{
16842752,
16842970,
2130772279,
2130772280,
2130772281};
// aapt resource value: 1
public const int View_android_focusable = 1;
// aapt resource value: 0
public const int View_android_theme = 0;
// aapt resource value: 3
public const int View_paddingEnd = 3;
// aapt resource value: 2
public const int View_paddingStart = 2;
// aapt resource value: 4
public const int View_theme = 4;
public static int[] ViewBackgroundHelper = new int[]
{
16842964,
2130772282,
2130772283};
// aapt resource value: 0
public const int ViewBackgroundHelper_android_background = 0;
// aapt resource value: 1
public const int ViewBackgroundHelper_backgroundTint = 1;
// aapt resource value: 2
public const int ViewBackgroundHelper_backgroundTintMode = 2;
public static int[] ViewStubCompat = new int[]
{
16842960,
16842994,
16842995};
// aapt resource value: 0
public const int ViewStubCompat_android_id = 0;
// aapt resource value: 2
public const int ViewStubCompat_android_inflatedId = 2;
// aapt resource value: 1
public const int ViewStubCompat_android_layout = 1;
static Styleable()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Styleable()
{
}
}
}
}
#pragma warning restore 1591
| 31.419506 | 147 | 0.730334 | [
"MIT"
] | starl1n/Xamarin.Forms-Samples-of-Clases | Clase 02/Proyecto/XamarinFormsClase02_03/Droid/Resources/Resource.designer.cs | 188,140 | C# |
namespace MassTransit.MongoDbIntegration.Tests.Courier
{
using System;
using System.Threading.Tasks;
using MassTransit.Courier.Contracts;
using MongoDB.Driver;
using MongoDbIntegration.Courier;
using MongoDbIntegration.Courier.Documents;
using NUnit.Framework;
using Testing;
[TestFixture]
public class When_a_complete_routing_slip_is_completed :
MongoDbTestFixture
{
[Test]
public async Task Should_complete_the_activity()
{
ConsumeContext<RoutingSlipActivityCompleted> context = await _prepareCompleted;
Assert.AreEqual(_trackingNumber, context.Message.TrackingNumber);
Assert.IsTrue(context.CorrelationId.HasValue);
Assert.AreNotEqual(_trackingNumber, context.CorrelationId.Value);
}
[Test]
public async Task Should_complete_the_routing_slip()
{
ConsumeContext<RoutingSlipCompleted> context = await _completed;
Assert.AreEqual(_trackingNumber, context.Message.TrackingNumber);
Assert.IsTrue(context.CorrelationId.HasValue);
Assert.AreEqual(_trackingNumber, context.CorrelationId.Value);
}
[Test]
public async Task Should_complete_the_second_activity()
{
ConsumeContext<RoutingSlipActivityCompleted> context = await _sendCompleted;
Assert.AreEqual(_trackingNumber, context.Message.TrackingNumber);
Assert.IsTrue(context.CorrelationId.HasValue);
Assert.AreNotEqual(_trackingNumber, context.CorrelationId.Value);
}
[Test]
public async Task Should_upsert_the_event_into_the_routing_slip()
{
await _completed;
await Task.Delay(2000);
await _prepareCompleted;
await Task.Delay(2000);
await _sendCompleted;
await Task.Delay(2000);
FilterDefinition<RoutingSlipDocument> query = Builders<RoutingSlipDocument>.Filter.Eq(x => x.TrackingNumber, _trackingNumber);
var routingSlip = await (await _collection.FindAsync(query).ConfigureAwait(false)).SingleOrDefaultAsync().ConfigureAwait(false);
Assert.IsNotNull(routingSlip);
Assert.IsNotNull(routingSlip.Events);
Assert.AreEqual(3, routingSlip.Events.Length);
}
[OneTimeSetUp]
public async Task Setup()
{
_trackingNumber = NewId.NextGuid();
Console.WriteLine("Tracking Number: {0}", _trackingNumber);
await Bus.Publish<RoutingSlipCompleted>(new RoutingSlipCompletedEvent(_trackingNumber, DateTime.UtcNow, TimeSpan.FromSeconds(1)));
await Bus.Publish<RoutingSlipActivityCompleted>(new RoutingSlipActivityCompletedEvent(_trackingNumber,
"Prepare",
NewId.NextGuid(), DateTime.UtcNow));
await Bus.Publish<RoutingSlipActivityCompleted>(new RoutingSlipActivityCompletedEvent(_trackingNumber, "Send",
NewId.NextGuid(), DateTime.UtcNow));
}
protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
{
base.ConfigureInMemoryReceiveEndpoint(configurator);
_collection = Database.GetCollection<RoutingSlipDocument>(EventCollectionName);
var persister = new RoutingSlipEventPersister(_collection);
configurator.UseRetry(x =>
{
x.Handle<MongoWriteException>();
x.Interval(10, TimeSpan.FromMilliseconds(20));
});
var partitioner = configurator.CreatePartitioner(16);
configurator.RoutingSlipEventConsumers(persister, partitioner);
configurator.RoutingSlipActivityEventConsumers(persister, partitioner);
_completed = Handled<RoutingSlipCompleted>(configurator);
_prepareCompleted = Handled<RoutingSlipActivityCompleted>(configurator, x => x.Message.ActivityName == "Prepare");
_sendCompleted = Handled<RoutingSlipActivityCompleted>(configurator, x => x.Message.ActivityName == "Send");
}
IMongoCollection<RoutingSlipDocument> _collection;
Guid _trackingNumber;
Task<ConsumeContext<RoutingSlipCompleted>> _completed;
Task<ConsumeContext<RoutingSlipActivityCompleted>> _prepareCompleted;
Task<ConsumeContext<RoutingSlipActivityCompleted>> _sendCompleted;
protected override void SetupActivities(BusTestHarness testHarness)
{
}
}
}
| 37.983471 | 142 | 0.679286 | [
"ECL-2.0",
"Apache-2.0"
] | AlexanderMeier/MassTransit | tests/MassTransit.MongoDbIntegration.Tests/Courier/Complete_Specs.cs | 4,598 | C# |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Aws.Ec2.Outputs
{
[OutputType]
public sealed class GetLaunchTemplateTagSpecificationResult
{
public readonly string ResourceType;
/// <summary>
/// A mapping of tags, each pair of which must exactly match a pair on the desired Launch Template.
/// </summary>
public readonly ImmutableDictionary<string, object> Tags;
[OutputConstructor]
private GetLaunchTemplateTagSpecificationResult(
string resourceType,
ImmutableDictionary<string, object> tags)
{
ResourceType = resourceType;
Tags = tags;
}
}
}
| 29.393939 | 107 | 0.670103 | [
"ECL-2.0",
"Apache-2.0"
] | johnktims/pulumi-aws | sdk/dotnet/Ec2/Outputs/GetLaunchTemplateTagSpecificationResult.cs | 970 | C# |
using System.Globalization;
namespace Skybrud.Essentials.Strings.Extensions {
public static partial class StringExtensions {
/// <summary>
/// Gets whether the string matches a float (<see cref="float"/>).
/// </summary>
/// <param name="str">The string to validate.</param>
/// <returns><c>true</c> if <paramref name="str"/> matches a float; otherwise <c>false</c>.</returns>
public static bool IsFloat(this string str) {
return StringUtils.IsFloat(str);
}
/// <summary>
/// Gets whether the string matches a float (<see cref="float"/>).
/// </summary>
/// <param name="str">The string to validate.</param>
/// <param name="result">The converted value <paramref name="str"/> matches a <see cref="float"/>; otherwise <c>0</c>.</param>
/// <returns><c>true</c> if <paramref name="str"/> matches a float; otherwise <c>false</c>.</returns>
public static bool IsFloat(this string str, out float result) {
return float.TryParse(str, NumberStyles.Any, CultureInfo.InvariantCulture, out result);
}
/// <summary>
/// Converts <paramref name="input"/> to an instance of <see cref="float"/>. If the conversion fails,
/// <c>0</c> will be returned instead.
/// </summary>
/// <param name="input">The input string to be converted.</param>
/// <returns>An instance of <see cref="float"/>.</returns>
public static float ToFloat(this string input) {
return StringUtils.ParseFloat(input);
}
/// <summary>
/// Converts <paramref name="input"/> to an instance of <see cref="float"/>. If the conversion fails,
/// <paramref name="fallback"/> will be returned instead.
/// </summary>
/// <param name="input">The input string to be converted.</param>
/// <param name="fallback">The fallback value that will be returned if the conversion fails.</param>
/// <returns>An instance of <see cref="float"/>.</returns>
public static float ToFloat(this string input, float fallback) {
return StringUtils.ParseFloat(input, fallback);
}
/// <summary>
/// Parses a string of numeric values into an array of <see cref="float"/>. Values in the list that can't be
/// converted to <see cref="float"/> will be ignored.
/// </summary>
/// <param name="str">The comma separated string to be converted.</param>
/// <returns>An array of <see cref="float"/>.</returns>
public static float[] ToFloatArray(this string str) {
return StringUtils.ParseFloatArray(str);
}
/// <summary>
/// Parses a string of numeric values into an array of <see cref="float"/>. Values in the list that can't be
/// converted to <see cref="float"/> will be ignored.
/// </summary>
/// <param name="str">The comma separated string to be converted.</param>
/// <param name="separators">An array of supported separators.</param>
/// <returns>An array of <see cref="float"/>.</returns>
public static float[] ToFloatArray(this string str, params char[] separators) {
return StringUtils.ParseFloatArray(str, separators);
}
}
} | 47.685714 | 134 | 0.601857 | [
"MIT"
] | skybrud/Skybrud.Essentials | src/Skybrud.Essentials/Strings/Extensions/StringExtensions.Float.cs | 3,340 | C# |
// Copyright (c) Isaiah Williams. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.Store.PartnerCenter.Offers
{
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using Models.Offers;
/// <summary>
/// Single offer operations implementation.
/// </summary>
internal class OfferOperations : BasePartnerComponent<Tuple<string, string>>, IOffer
{
/// <summary>The offer add on operations.</summary>
private readonly Lazy<IOfferAddOns> addOns;
/// <summary>
/// Initializes a new instance of the <see cref="OfferOperations" /> class.
/// </summary>
/// <param name="rootPartnerOperations">The root partner operations instance.</param>
/// <param name="offerId">The offer Id.</param>
/// <param name="country">The country on which to base the offer.</param>
public OfferOperations(IPartner rootPartnerOperations, string offerId, string country)
: base(rootPartnerOperations, new Tuple<string, string>(offerId, country))
{
addOns = new Lazy<IOfferAddOns>(() => new OfferAddOnsOperations(rootPartnerOperations, offerId, country));
}
/// <summary>
/// Gets the operations for the current offer's add-ons.
/// </summary>
public IOfferAddOns AddOns => addOns.Value;
/// <summary>
/// Retrieves the offer details.
/// </summary>
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <returns>The offer details.</returns>
public async Task<Offer> GetAsync(CancellationToken cancellationToken = default)
{
IDictionary<string, string> parameters;
parameters = new Dictionary<string, string>
{
{
PartnerService.Instance.Configuration.Apis.GetOffer.Parameters.Country,
Context.Item2
}
};
return await Partner.ServiceClient.GetAsync<Offer>(
new Uri(
string.Format(
CultureInfo.InvariantCulture,
$"/{PartnerService.Instance.ApiVersion}/{PartnerService.Instance.Configuration.Apis.GetOffer.Path}",
Context.Item1),
UriKind.Relative),
parameters,
cancellationToken).ConfigureAwait(false);
}
}
} | 40.833333 | 152 | 0.612987 | [
"MIT"
] | erickbp/partner-center-dotnet | src/PartnerCenter/Offers/OfferOperations.cs | 2,697 | C# |
// Copyright 2005-2010 Gallio Project - http://www.gallio.org/
// Portions Copyright 2000-2004 Jonathan de Halleux
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Collections.Generic;
using System.Reflection;
namespace Gallio.Common.Reflection.Impl
{
internal abstract class NativeCodeElementWrapper<TTarget> : NativeWrapper, ICodeElementInfo
where TTarget : class, ICustomAttributeProvider
{
private readonly TTarget target;
protected NativeCodeElementWrapper(TTarget target)
{
if (target == null)
throw new ArgumentNullException(@"target");
this.target = target;
}
public TTarget Target
{
get { return target; }
}
public abstract string Name { get; }
public abstract CodeElementKind Kind { get; }
public abstract CodeReference CodeReference { get; }
public IEnumerable<IAttributeInfo> GetAttributeInfos(ITypeInfo attributeType, bool inherit)
{
foreach (Attribute attrib in GetAttributes(attributeType, inherit))
yield return Reflector.Wrap(attrib);
}
public bool HasAttribute(ITypeInfo attributeType, bool inherit)
{
return Target.IsDefined(attributeType != null ? attributeType.Resolve(true) : typeof(object), inherit);
}
public IEnumerable<object> GetAttributes(ITypeInfo attributeType, bool inherit)
{
return Target.GetCustomAttributes(attributeType != null ? attributeType.Resolve(true) : typeof(object), inherit);
}
public abstract string GetXmlDocumentation();
public virtual CodeLocation GetCodeLocation()
{
return CodeLocation.Unknown;
}
public override string ToString()
{
return Target.ToString();
}
public override bool Equals(object obj)
{
NativeCodeElementWrapper<TTarget> other = obj as NativeCodeElementWrapper<TTarget>;
return other != null && target.Equals(other.target);
}
public override int GetHashCode()
{
return target.GetHashCode();
}
public bool Equals(ICodeElementInfo other)
{
return Equals((object) other);
}
}
} | 31.933333 | 125 | 0.650313 | [
"ECL-2.0",
"Apache-2.0"
] | citizenmatt/gallio | src/Gallio/Gallio/Common/Reflection/Impl/NativeCodeElementWrapper.cs | 2,874 | C# |
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Abp.Application.Editions;
using Abp.Application.Features;
using Swagger.Sample.Editions;
namespace Swagger.Sample.EntityFrameworkCore.Seed.Host
{
public class DefaultEditionCreator
{
private readonly SampleDbContext _context;
public DefaultEditionCreator(SampleDbContext context)
{
_context = context;
}
public void Create()
{
CreateEditions();
}
private void CreateEditions()
{
var defaultEdition = _context.Editions.IgnoreQueryFilters().FirstOrDefault(e => e.Name == EditionManager.DefaultEditionName);
if (defaultEdition == null)
{
defaultEdition = new Edition { Name = EditionManager.DefaultEditionName, DisplayName = EditionManager.DefaultEditionName };
_context.Editions.Add(defaultEdition);
_context.SaveChanges();
/* Add desired features to the standard edition, if wanted... */
}
}
private void CreateFeatureIfNotExists(int editionId, string featureName, bool isEnabled)
{
if (_context.EditionFeatureSettings.IgnoreQueryFilters().Any(ef => ef.EditionId == editionId && ef.Name == featureName))
{
return;
}
_context.EditionFeatureSettings.Add(new EditionFeatureSetting
{
Name = featureName,
Value = isEnabled.ToString(),
EditionId = editionId
});
_context.SaveChanges();
}
}
}
| 31.207547 | 139 | 0.602177 | [
"MIT"
] | Dpio/swagger-presentation | 2-aspboilerplate/Swagger.Sample/aspnet-core/src/Swagger.Sample.EntityFrameworkCore/EntityFrameworkCore/Seed/Host/DefaultEditionCreator.cs | 1,654 | C# |
using NoRainSDK.Models;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace NoRainSDK.src
{
public class PostStatusService : CommonAbstract<ListModel<IdNameDTO>>
{
public PostStatusService(string appKey, string apSecret) : base(appKey, apSecret, "http://127.0.0.1:8888/PostService/api/PostStatus/")
{
}
public async Task<List<IdNameDTO>> GetAllAsync()
{
return await GetAllAsync<List<IdNameDTO>>();
}
public async Task<long> AddNewAsync(AddIdNameModel dto)
{
return await AddNewAsync<AddIdNameModel>(dto);
}
public async Task<bool> UpdateAsync(UpdateIdNameModel dto)
{
return await UpdateAsync<UpdateIdNameModel>(dto);
}
public async Task<IdNameDTO> GetByIdAsync(long id)
{
return await GetByIdAsync<IdNameDTO>(id);
}
}
}
| 29.090909 | 142 | 0.639583 | [
"Apache-2.0"
] | MapleWithoutWords/NoRainForum-MicroService | NoRainForum/NoRainSDK/src/PostStatusService.cs | 962 | C# |
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
// Ported from um/strmif.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.
using NUnit.Framework;
using System.Runtime.InteropServices;
namespace TerraFX.Interop.UnitTests
{
/// <summary>Provides validation of the <see cref="ALLOCATOR_PROPERTIES" /> struct.</summary>
public static unsafe class ALLOCATOR_PROPERTIESTests
{
/// <summary>Validates that the <see cref="ALLOCATOR_PROPERTIES" /> struct is blittable.</summary>
[Test]
public static void IsBlittableTest()
{
Assert.That(Marshal.SizeOf<ALLOCATOR_PROPERTIES>(), Is.EqualTo(sizeof(ALLOCATOR_PROPERTIES)));
}
/// <summary>Validates that the <see cref="ALLOCATOR_PROPERTIES" /> struct has the right <see cref="LayoutKind" />.</summary>
[Test]
public static void IsLayoutSequentialTest()
{
Assert.That(typeof(ALLOCATOR_PROPERTIES).IsLayoutSequential, Is.True);
}
/// <summary>Validates that the <see cref="ALLOCATOR_PROPERTIES" /> struct has the correct size.</summary>
[Test]
public static void SizeOfTest()
{
Assert.That(sizeof(ALLOCATOR_PROPERTIES), Is.EqualTo(16));
}
}
}
| 39.305556 | 145 | 0.677032 | [
"MIT"
] | Ethereal77/terrafx.interop.windows | tests/Interop/Windows/um/strmif/ALLOCATOR_PROPERTIESTests.cs | 1,417 | C# |
using System;
using System.Threading.Tasks;
using Windows.Storage;
namespace GsriSync.WpfApp.Models
{
internal class Teamspeak : Expandable
{
private const string APPDATA = nameof(APPDATA);
protected override string Archive => "TFAR.zip";
protected override string ExpandPath => $@"{AppData}\TS3Client\plugins";
private string AppData => Environment.GetEnvironmentVariable(APPDATA);
protected async override Task<StorageFolder> GetOrMakeExpandFolderAsync(string expandPath)
{
return await StorageFolder.GetFolderFromPathAsync(expandPath);
}
}
}
| 27.434783 | 98 | 0.703645 | [
"MIT"
] | team-gsri/GsriSync | GsriSync.WpfApp/Models/Teamspeak.cs | 633 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FabriqueNode : Node {
public Node next;
public override Node Next(GameObject obj)
{
if(next != null)
{
return next;
}else
{
return null;
}
}
public override void OnCompleted()
{
}
public override List<Node> GetAllNodes()
{
List<Node> nodes = new List<Node>();
nodes.Add(next);
return nodes;
}
public void OnDrawGizmos()
{
if(next != null)
{
Gizmos.color = Color.blue;
Gizmos.DrawLine(transform.position,next.transform.position);
}
}
}
| 17.428571 | 72 | 0.532787 | [
"Unlicense"
] | Raser23/GamedevBudetUdivlen | GamedevBudetUdivlen/Assets/Scripts/PathNodes/FabriqueNode.cs | 734 | C# |
//
// CGPath.cs: Implements the managed CGPath
//
// Authors: Mono Team
//
// Copyright 2009 Novell, Inc
// Copyright 2011-2014 Xamarin Inc
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
using Foundation;
namespace CoreGraphics {
// untyped enum -> CGPath.h
public enum CGPathElementType {
MoveToPoint,
AddLineToPoint,
AddQuadCurveToPoint,
AddCurveToPoint,
CloseSubpath
}
// CGPath.h
public struct CGPathElement {
public CGPathElementType Type;
public CGPathElement (int t)
{
Type = (CGPathElementType) t;
Point1 = Point2 = Point3 = CGPoint.Empty;
}
// Set for MoveToPoint, AddLineToPoint, AddQuadCurveToPoint, AddCurveToPoint
public CGPoint Point1;
// Set for AddQuadCurveToPoint, AddCurveToPoint
public CGPoint Point2;
// Set for AddCurveToPoint
public CGPoint Point3;
}
public class CGPath : INativeObject, IDisposable {
internal IntPtr handle;
[DllImport (Constants.CoreGraphicsLibrary)]
extern static /* CGMutablePathRef */ IntPtr CGPathCreateMutable ();
public CGPath ()
{
handle = CGPathCreateMutable ();
}
[Mac(10,7)]
public CGPath (CGPath reference, CGAffineTransform transform)
{
if (reference == null)
throw new ArgumentNullException ("reference");
handle = CGPathCreateMutableCopyByTransformingPath (reference.Handle, ref transform);
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static /* CGMutablePathRef */ IntPtr CGPathCreateMutableCopy (/* CGPathRef */ IntPtr path);
public CGPath (CGPath basePath)
{
if (basePath == null)
throw new ArgumentNullException ("basePath");
handle = CGPathCreateMutableCopy (basePath.handle);
}
//
// For use by marshallrs
//
public CGPath (IntPtr handle)
{
CGPathRetain (handle);
this.handle = handle;
}
// Indicates that we own it `owns'
[Preserve (Conditional=true)]
internal CGPath (IntPtr handle, bool owns)
{
if (!owns)
CGPathRetain (handle);
this.handle = handle;
}
~CGPath ()
{
Dispose (false);
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
public IntPtr Handle {
get { return handle; }
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static void CGPathRelease (/* CGPathRef */ IntPtr path);
[DllImport (Constants.CoreGraphicsLibrary)]
extern static /* CGPathRef */ IntPtr CGPathRetain (/* CGPathRef */ IntPtr path);
protected virtual void Dispose (bool disposing)
{
if (handle != IntPtr.Zero){
CGPathRelease (handle);
handle = IntPtr.Zero;
}
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static bool CGPathEqualToPath (/* CGPathRef */ IntPtr path1, /* CGPathRef */ IntPtr path2);
public static bool operator == (CGPath path1, CGPath path2)
{
return Object.Equals (path1, path2);
}
public static bool operator != (CGPath path1, CGPath path2)
{
return !Object.Equals (path1, path2);
}
public override int GetHashCode ()
{
return handle.GetHashCode ();
}
public override bool Equals (object o)
{
CGPath other = o as CGPath;
if (other == null)
return false;
return CGPathEqualToPath (this.handle, other.handle);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathMoveToPoint (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, /* CGFloat */ nfloat x, /* CGFloat */ nfloat y);
public unsafe void MoveToPoint (nfloat x, nfloat y)
{
CGPathMoveToPoint (handle, null, x, y);
}
public unsafe void MoveToPoint (CGPoint point)
{
CGPathMoveToPoint (handle, null, point.X, point.Y);
}
public unsafe void MoveToPoint (CGAffineTransform transform, nfloat x, nfloat y)
{
CGPathMoveToPoint (handle, &transform, x, y);
}
public unsafe void MoveToPoint (CGAffineTransform transform, CGPoint point)
{
CGPathMoveToPoint (handle, &transform, point.X, point.Y);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddLineToPoint (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, /* CGFloat */ nfloat x, /* CGFloat */ nfloat y);
#if !XAMCORE_2_0
[Advice ("Use 'AddLineToPoint' instead.")] // Bad name
public void CGPathAddLineToPoint (nfloat x, nfloat y)
{
AddLineToPoint (x, y);
}
#endif
public unsafe void AddLineToPoint (nfloat x, nfloat y)
{
CGPathAddLineToPoint (handle, null, x, y);
}
public unsafe void AddLineToPoint (CGPoint point)
{
CGPathAddLineToPoint (handle, null, point.X, point.Y);
}
#if !XAMCORE_2_0
[Advice ("Use 'AddLineToPoint' instead.")] // Bad name
public void CGPathAddLineToPoint (CGAffineTransform transform, nfloat x, nfloat y)
{
AddLineToPoint (transform, x, y);
}
#endif
public unsafe void AddLineToPoint (CGAffineTransform transform, nfloat x, nfloat y)
{
CGPathAddLineToPoint (handle, &transform, x, y);
}
public unsafe void AddLineToPoint (CGAffineTransform transform, CGPoint point)
{
CGPathAddLineToPoint (handle, &transform, point.X, point.Y);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddQuadCurveToPoint (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, /* CGFloat */ nfloat cpx, /* CGFloat */ nfloat cpy, /* CGFloat */ nfloat x, /* CGFloat */ nfloat y);
public unsafe void AddQuadCurveToPoint (nfloat cpx, nfloat cpy, nfloat x, nfloat y)
{
CGPathAddQuadCurveToPoint (handle, null, cpx, cpy, x, y);
}
public unsafe void AddQuadCurveToPoint (CGAffineTransform transform, nfloat cpx, nfloat cpy, nfloat x, nfloat y)
{
CGPathAddQuadCurveToPoint (handle, &transform, cpx, cpy, x, y);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddCurveToPoint (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, /* CGFloat */ nfloat cp1x, /* CGFloat */ nfloat cp1y, /* CGFloat */ nfloat cp2x, /* CGFloat */ nfloat cp2y, /* CGFloat */ nfloat x, /* CGFloat */ nfloat y);
public unsafe void AddCurveToPoint (CGAffineTransform transform, nfloat cp1x, nfloat cp1y, nfloat cp2x, nfloat cp2y, nfloat x, nfloat y)
{
CGPathAddCurveToPoint (handle, &transform, cp1x, cp1y, cp2x, cp2y, x, y);
}
public unsafe void AddCurveToPoint (CGAffineTransform transform, CGPoint cp1, CGPoint cp2, CGPoint point)
{
CGPathAddCurveToPoint (handle, &transform, cp1.X, cp1.Y, cp2.X, cp2.Y, point.X, point.Y);
}
public unsafe void AddCurveToPoint (nfloat cp1x, nfloat cp1y, nfloat cp2x, nfloat cp2y, nfloat x, nfloat y)
{
CGPathAddCurveToPoint (handle, null, cp1x, cp1y, cp2x, cp2y, x, y);
}
public unsafe void AddCurveToPoint (CGPoint cp1, CGPoint cp2, CGPoint point)
{
CGPathAddCurveToPoint (handle, null, cp1.X, cp1.Y, cp2.X, cp2.Y, point.X, point.Y);
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static void CGPathCloseSubpath (/* CGMutablePathRef */ IntPtr path);
public void CloseSubpath ()
{
CGPathCloseSubpath (handle);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddRect (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, CGRect rect);
public unsafe void AddRect (CGAffineTransform transform, CGRect rect)
{
CGPathAddRect (handle, &transform, rect);
}
public unsafe void AddRect (CGRect rect)
{
CGPathAddRect (handle, null, rect);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddRects (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, CGRect [] rects, /* size_t */ nint count);
public unsafe void AddRects (CGAffineTransform m, CGRect [] rects)
{
if (rects == null)
throw new ArgumentNullException ("rects");
CGPathAddRects (handle, &m, rects, rects.Length);
}
public unsafe void AddRects (CGAffineTransform m, CGRect [] rects, int count)
{
if (rects == null)
throw new ArgumentNullException ("rects");
if (count > rects.Length)
throw new ArgumentException ("count");
CGPathAddRects (handle, &m, rects, count);
}
public unsafe void AddRects (CGRect [] rects)
{
if (rects == null)
throw new ArgumentNullException ("rects");
CGPathAddRects (handle, null, rects, rects.Length);
}
public unsafe void AddRects (CGRect [] rects, int count)
{
if (rects == null)
throw new ArgumentNullException ("rects");
if (count > rects.Length)
throw new ArgumentException ("count");
CGPathAddRects (handle, null, rects, count);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddLines (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, CGPoint [] points, /* size_t */ nint count);
public unsafe void AddLines (CGAffineTransform m, CGPoint [] points)
{
if (points == null)
throw new ArgumentNullException ("points");
CGPathAddLines (handle, &m, points, points.Length);
}
#if !XAMCORE_2_0
[Advice ("Misnamed method, it's 'AddLines'.")]
public unsafe void AddRects (CGAffineTransform m, CGPoint [] points, int count)
#else
public unsafe void AddLines (CGAffineTransform m, CGPoint [] points, int count)
#endif
{
if (points == null)
throw new ArgumentNullException ("points");
if (count > points.Length)
throw new ArgumentException ("count");
CGPathAddLines (handle, &m, points, count);
}
public unsafe void AddLines (CGPoint [] points)
{
if (points == null)
throw new ArgumentNullException ("points");
CGPathAddLines (handle, null, points, points.Length);
}
#if !XAMCORE_2_0
[Advice ("Misnamed method, it's 'AddLines'.")]
public unsafe void AddRects (CGPoint [] points, int count)
#else
public unsafe void AddLines (CGPoint [] points, int count)
#endif
{
if (points == null)
throw new ArgumentNullException ("points");
if (count > points.Length)
throw new ArgumentException ("count");
CGPathAddLines (handle, null, points, count);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddEllipseInRect (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, CGRect rect);
public unsafe void AddEllipseInRect (CGAffineTransform m, CGRect rect)
{
CGPathAddEllipseInRect (handle, &m, rect);
}
#if !XAMCORE_2_0
[Obsolete ("Use 'AddEllipseInRect' instead.")]
public unsafe void AddElipseInRect (CGAffineTransform m, CGRect rect)
{
CGPathAddEllipseInRect (handle, &m, rect);
}
#endif
public unsafe void AddEllipseInRect (CGRect rect)
{
CGPathAddEllipseInRect (handle, null, rect);
}
#if !XAMCORE_2_0
[Obsolete ("Use 'AddEllipseInRect' instead.")]
public unsafe void AddElipseInRect (CGRect rect)
{
CGPathAddEllipseInRect (handle, null, rect);
}
#endif
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddArc (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, /* CGFloat */ nfloat x, /* CGFloat */ nfloat y, /* CGFloat */ nfloat radius, /* CGFloat */ nfloat startAngle, /* CGFloat */ nfloat endAngle, bool clockwise);
public unsafe void AddArc (CGAffineTransform m, nfloat x, nfloat y, nfloat radius, nfloat startAngle, nfloat endAngle, bool clockwise)
{
CGPathAddArc (handle, &m, x, y, radius, startAngle, endAngle, clockwise);
}
public unsafe void AddArc (nfloat x, nfloat y, nfloat radius, nfloat startAngle, nfloat endAngle, bool clockwise)
{
CGPathAddArc (handle, null, x, y, radius, startAngle, endAngle, clockwise);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddArcToPoint (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, /* CGFloat */ nfloat x1, /* CGFloat */ nfloat y1, /* CGFloat */ nfloat x2, /* CGFloat */ nfloat y2, /* CGFloat */ nfloat radius);
public unsafe void AddArcToPoint (CGAffineTransform m, nfloat x1, nfloat y1, nfloat x2, nfloat y2, nfloat radius)
{
CGPathAddArcToPoint (handle, &m, x1, y1, x2, y2, radius);
}
public unsafe void AddArcToPoint (nfloat x1, nfloat y1, nfloat x2, nfloat y2, nfloat radius)
{
CGPathAddArcToPoint (handle, null, x1, y1, x2, y2, radius);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddRelativeArc (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *m, /* CGFloat */ nfloat x, /* CGFloat */ nfloat y, /* CGFloat */ nfloat radius, /* CGFloat */ nfloat startAngle, /* CGFloat */ nfloat delta);
public unsafe void AddRelativeArc (CGAffineTransform m, nfloat x, nfloat y, nfloat radius, nfloat startAngle, nfloat delta)
{
CGPathAddRelativeArc (handle, &m, x, y, radius, startAngle, delta);
}
public unsafe void AddRelativeArc (nfloat x, nfloat y, nfloat radius, nfloat startAngle, nfloat delta)
{
CGPathAddRelativeArc (handle, null, x, y, radius, startAngle, delta);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddPath (/* CGMutablePathRef */ IntPtr path1, CGAffineTransform *m, /* CGMutablePathRef */ IntPtr path2);
public unsafe void AddPath (CGAffineTransform t, CGPath path2)
{
if (path2 == null)
throw new ArgumentNullException ("path2");
CGPathAddPath (handle, &t, path2.handle);
}
public unsafe void AddPath (CGPath path2)
{
if (path2 == null)
throw new ArgumentNullException ("path2");
CGPathAddPath (handle, null, path2.handle);
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static bool CGPathIsEmpty (/* CGPathRef */ IntPtr path);
public bool IsEmpty {
get {
return CGPathIsEmpty (handle);
}
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static bool CGPathIsRect (/* CGPathRef */ IntPtr path, out CGRect rect);
public bool IsRect (out CGRect rect)
{
return CGPathIsRect (handle, out rect);
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static CGPoint CGPathGetCurrentPoint(/* CGPathRef */ IntPtr path);
public CGPoint CurrentPoint {
get {
return CGPathGetCurrentPoint (handle);
}
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static CGRect CGPathGetBoundingBox (/* CGPathRef */IntPtr path);
public CGRect BoundingBox {
get {
return CGPathGetBoundingBox (handle);
}
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static CGRect CGPathGetPathBoundingBox (/* CGPathRef */ IntPtr path);
public CGRect PathBoundingBox {
get {
return CGPathGetPathBoundingBox (handle);
}
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static bool CGPathContainsPoint(IntPtr path, CGAffineTransform *m, CGPoint point, bool eoFill);
public unsafe bool ContainsPoint (CGAffineTransform m, CGPoint point, bool eoFill)
{
return CGPathContainsPoint (handle, &m, point, eoFill);
}
public unsafe bool ContainsPoint (CGPoint point, bool eoFill)
{
return CGPathContainsPoint (handle, null, point, eoFill);
}
public delegate void ApplierFunction (CGPathElement element);
delegate void CGPathApplierFunction (/* void* */ IntPtr info, /* const CGPathElement* */ IntPtr element);
#if !MONOMAC
[MonoPInvokeCallback (typeof (CGPathApplierFunction))]
#endif
static void ApplierCallback (IntPtr info, IntPtr element_ptr)
{
GCHandle gch = GCHandle.FromIntPtr (info);
// note: CGPathElementType is an untyped enum, always 32bits
CGPathElement element = new CGPathElement (Marshal.ReadInt32(element_ptr, 0));
ApplierFunction func = (ApplierFunction) gch.Target;
IntPtr ptr = Marshal.ReadIntPtr (element_ptr, IntPtr.Size);
int ptsize = Marshal.SizeOf (typeof (CGPoint));
switch (element.Type){
case CGPathElementType.CloseSubpath:
break;
case CGPathElementType.MoveToPoint:
case CGPathElementType.AddLineToPoint:
element.Point1 = (CGPoint) Marshal.PtrToStructure (ptr, typeof (CGPoint));
break;
case CGPathElementType.AddQuadCurveToPoint:
element.Point1 = (CGPoint) Marshal.PtrToStructure (ptr, typeof (CGPoint));
element.Point2 = (CGPoint) Marshal.PtrToStructure (((IntPtr) (((long)ptr) + ptsize)), typeof (CGPoint));
break;
case CGPathElementType.AddCurveToPoint:
element.Point1 = (CGPoint) Marshal.PtrToStructure (ptr, typeof (CGPoint));
element.Point2 = (CGPoint) Marshal.PtrToStructure (((IntPtr) (((long)ptr) + ptsize)), typeof (CGPoint));
element.Point3 = (CGPoint) Marshal.PtrToStructure (((IntPtr) (((long)ptr) + (2*ptsize))), typeof (CGPoint));
break;
}
func (element);
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static void CGPathApply (/* CGPathRef */ IntPtr path, /* void* */ IntPtr info, CGPathApplierFunction function);
public void Apply (ApplierFunction func)
{
GCHandle gch = GCHandle.Alloc (func);
CGPathApply (handle, GCHandle.ToIntPtr (gch), ApplierCallback);
gch.Free ();
}
static CGPath MakeMutable (IntPtr source)
{
var mutable = CGPathCreateMutableCopy (source);
return new CGPath (mutable, owns: true);
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern unsafe static IntPtr CGPathCreateCopyByDashingPath (
/* CGPathRef */ IntPtr path,
/* const CGAffineTransform * */ CGAffineTransform *transform,
/* CGFloat */ nfloat phase,
/* CGFloat */ nfloat [] lengths,
/* size_t */ nint count);
[Mac(10,7)]
public CGPath CopyByDashingPath (CGAffineTransform transform, nfloat [] lengths)
{
return CopyByDashingPath (transform, lengths, 0);
}
[Mac(10,7)]
public unsafe CGPath CopyByDashingPath (CGAffineTransform transform, nfloat [] lengths, nfloat phase)
{
return MakeMutable (CGPathCreateCopyByDashingPath (handle, &transform, phase, lengths, lengths == null ? 0 : lengths.Length));
}
[Mac(10,7)]
public CGPath CopyByDashingPath (nfloat [] lengths)
{
return CopyByDashingPath (lengths, 0);
}
[Mac(10,7)]
public unsafe CGPath CopyByDashingPath (nfloat [] lengths, nfloat phase)
{
var path = CGPathCreateCopyByDashingPath (handle, null, phase, lengths, lengths == null ? 0 : lengths.Length);
return MakeMutable (path);
}
public unsafe CGPath Copy ()
{
return MakeMutable (handle);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static IntPtr CGPathCreateCopyByStrokingPath (/* CGPathRef */ IntPtr path, CGAffineTransform *transform, nfloat lineWidth, CGLineCap lineCap, CGLineJoin lineJoin, /* CGFloat */ nfloat miterLimit);
[Mac(10,7)]
public unsafe CGPath CopyByStrokingPath (CGAffineTransform transform, nfloat lineWidth, CGLineCap lineCap, CGLineJoin lineJoin, nfloat miterLimit)
{
return MakeMutable (CGPathCreateCopyByStrokingPath (handle, &transform, lineWidth, lineCap, lineJoin, miterLimit));
}
[Mac(10,7)]
public unsafe CGPath CopyByStrokingPath (nfloat lineWidth, CGLineCap lineCap, CGLineJoin lineJoin, nfloat miterLimit)
{
return MakeMutable (CGPathCreateCopyByStrokingPath (handle, null, lineWidth, lineCap, lineJoin, miterLimit));
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static IntPtr CGPathCreateCopyByTransformingPath (/* CGPathRef */ IntPtr path, ref CGAffineTransform transform);
public CGPath CopyByTransformingPath (CGAffineTransform transform)
{
return MakeMutable (CGPathCreateCopyByTransformingPath (handle, ref transform));
}
[DllImport (Constants.CoreGraphicsLibrary)]
extern static /* CGMutablePathRef */ IntPtr CGPathCreateMutableCopyByTransformingPath (/* CGPathRef */ IntPtr path, /* const CGAffineTransform* */ ref CGAffineTransform transform);
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static IntPtr CGPathCreateWithEllipseInRect (CGRect boundingRect, CGAffineTransform *transform);
[Mac(10,7)]
static public unsafe CGPath EllipseFromRect (CGRect boundingRect, CGAffineTransform transform)
{
return MakeMutable (CGPathCreateWithEllipseInRect (boundingRect, &transform));
}
[Mac(10,7)]
static public unsafe CGPath EllipseFromRect (CGRect boundingRect)
{
return MakeMutable (CGPathCreateWithEllipseInRect (boundingRect, null));
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static IntPtr CGPathCreateWithRect (CGRect boundingRect, CGAffineTransform *transform);
[Mac(10,7)]
static public unsafe CGPath FromRect (CGRect rectangle, CGAffineTransform transform)
{
return MakeMutable (CGPathCreateWithRect (rectangle, &transform));
}
[Mac(10,7)]
static public unsafe CGPath FromRect (CGRect rectangle)
{
return MakeMutable (CGPathCreateWithRect (rectangle, null));
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static /* CGPathRef */ IntPtr CGPathCreateWithRoundedRect (CGRect rect, /* CGFloat */ nfloat cornerWidth, /* CGFloat */ nfloat cornerHeight, CGAffineTransform *transform);
static unsafe CGPath _FromRoundedRect (CGRect rectangle, nfloat cornerWidth, nfloat cornerHeight, CGAffineTransform *transform)
{
if ((cornerWidth < 0) || (2 * cornerWidth > rectangle.Width))
throw new ArgumentException ("cornerWidth");
if ((cornerHeight < 0) || (2 * cornerHeight > rectangle.Height))
throw new ArgumentException ("cornerHeight");
return MakeMutable (CGPathCreateWithRoundedRect (rectangle, cornerWidth, cornerHeight, transform));
}
[Mac(10,9)][iOS (7,0)]
static unsafe public CGPath FromRoundedRect (CGRect rectangle, nfloat cornerWidth, nfloat cornerHeight)
{
return _FromRoundedRect (rectangle, cornerWidth, cornerHeight, null);
}
[Mac(10,9)][iOS (7,0)]
static public unsafe CGPath FromRoundedRect (CGRect rectangle, nfloat cornerWidth, nfloat cornerHeight, CGAffineTransform transform)
{
return _FromRoundedRect (rectangle, cornerWidth, cornerHeight, &transform);
}
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static void CGPathAddRoundedRect (/* CGMutablePathRef */ IntPtr path, CGAffineTransform *transform, CGRect rect, /* CGFloat */ nfloat cornerWidth, /* CGFloat */ nfloat cornerHeight);
[Mac(10,9)][iOS (7,0)]
public unsafe void AddRoundedRect (CGAffineTransform transform, CGRect rect, nfloat cornerWidth, nfloat cornerHeight)
{
CGPathAddRoundedRect (handle, &transform, rect, cornerWidth, cornerHeight);
}
[Mac(10,9)][iOS (7,0)]
public unsafe void AddRoundedRect (CGRect rect, nfloat cornerWidth, nfloat cornerHeight)
{
CGPathAddRoundedRect (handle, null, rect, cornerWidth, cornerHeight);
}
}
}
| 33.357143 | 265 | 0.720685 | [
"BSD-3-Clause"
] | 960208781/xamarin-macios | src/CoreGraphics/CGPath.cs | 23,350 | C# |
using Microsoft.Extensions.Options;
using SendGrid;
using SendGrid.Helpers.Mail;
using System.Net;
using System.Threading.Tasks;
namespace CodexBank.Common.EmailSender
{
public class EmailSender : IEmailSender
{
private readonly SendGridConfiguration options;
public EmailSender(IOptions<SendGridConfiguration> options)
{
this.options = options.Value;
}
public async Task<bool> SendEmailAsync(string receiver, string subject, string htmlMessage)
=> await this.SendEmailAsync(GlobalConstants.CodexBankEmail, receiver, subject, htmlMessage);
public async Task<bool> SendEmailAsync(string sender, string receiver, string subject, string htmlMessage)
{
var client = new SendGridClient(this.options.ApiKey);
var from = new EmailAddress(sender);
var to = new EmailAddress(receiver, receiver);
var msg = MailHelper.CreateSingleEmail(from, to, subject, htmlMessage, htmlMessage);
try
{
var isSuccessful = await client.SendEmailAsync(msg);
return isSuccessful.StatusCode == HttpStatusCode.Accepted;
}
catch
{
// Ignored
return false;
}
}
}
}
| 31.52381 | 114 | 0.629154 | [
"MIT"
] | Dimulski/CodexBank | src/Common/CodexBank.Common/EmailSender/EmailSender.cs | 1,326 | C# |
using System.Collections.Generic;
namespace Core.Module.CharacterData.Template.Class
{
public class ElvenFighter : ElfFighter, ITemplateHandler
{
private const byte ClassId = 18;
private const string ClassKey = "elven_fighter";
private readonly IDictionary<byte, float> _cpTable;
private readonly IDictionary<byte, float> _hpTable;
private readonly IDictionary<byte, float> _mpTable;
public ElvenFighter(PcParameterInit pcParameter)
{
var result = pcParameter.GetResult();
var fighterCp = result[$"{ClassKey}_cp"];
var fighterHp = result[$"{ClassKey}_hp"];
var fighterMp = result[$"{ClassKey}_mp"];
_cpTable = (IDictionary<byte, float>) fighterCp;
_hpTable = (IDictionary<byte, float>) fighterHp;
_mpTable = (IDictionary<byte, float>) fighterMp;
}
public byte GetClassId()
{
return ClassId;
}
public string GetClassKey()
{
return ClassKey;
}
public float GetCpBegin(byte level)
{
return _cpTable[level];
}
public float GetHpBegin(byte level)
{
return _hpTable[level];
}
public float GetMpBegin(byte level)
{
return _mpTable[level];
}
}
} | 29.166667 | 60 | 0.574286 | [
"MPL-2.0",
"MPL-2.0-no-copyleft-exception"
] | dr3dd/L2Interlude | Core/Module/CharacterData/Template/Class/ElvenFighter.cs | 1,402 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace BottomAnimation.CustonViews
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class CustomButtomActivityView : ContentView
{
public event EventHandler CustomButtomActivityClicked = delegate { };
public CustomButtomActivityView()
{
InitializeComponent();
this.CustomButtomActivity.BindingContext = this;
this.CustomButtomActivity.Clicked += this.OnCustomButtomActivityClicked;
}
private void OnCustomButtomActivityClicked(object sender, EventArgs e)
{
this.CustomButtomActivityClicked?.Invoke(sender, e);
}
#region Button
public string ButtonText
{
get { return (string)GetValue(ButtonTextProperty); }
set { SetValue(ButtonTextProperty, value); }
}
public static readonly BindableProperty ButtonTextProperty = BindableProperty.Create
(
nameof(ButtonText),
typeof(string),
typeof(CustomButtomActivityView),
defaultBindingMode: BindingMode.TwoWay,
propertyChanged: OnButtonTextChange
);
private static void OnButtonTextChange(BindableObject bindable, object oldValue, object newValue)
{
var customButtonView = (CustomButtomActivityView)bindable;
customButtonView.CustomButtomActivity.Text = (string)newValue;
}
public ICommand ButtonCommand
{
get => (ICommand)this.GetValue(ButtonCommandProperty);
set => this.SetValue(ButtonCommandProperty, value);
}
public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create
(
nameof(ButtonCommand),
typeof(ICommand),
typeof(CustomButtomActivityView),
propertyChanged: OnButtonCommandChange
);
private static void OnButtonCommandChange(BindableObject bindable, object oldValue, object newValue)
{
var customButtonView = (CustomButtomActivityView)bindable;
customButtonView.CustomButtomActivity.Command = (ICommand)newValue;
}
public ICommand ButtonCommandParameter
{
get => (ICommand)this.GetValue(ButtonCommandParameterProperty);
set => this.SetValue(ButtonCommandParameterProperty, value);
}
public static readonly BindableProperty ButtonCommandParameterProperty = BindableProperty.Create
(
nameof(ButtonCommandParameter),
typeof(ICommand),
typeof(CustomButtomActivityView),
propertyChanged: OnButtonCommandParameterChange
);
private static void OnButtonCommandParameterChange(BindableObject bindable, object oldValue, object newValue)
{
var customButtonView = (CustomButtomActivityView)bindable;
customButtonView.CustomButtomActivity.CommandParameter = (ICommand)newValue;
}
public Color ButtonBackgroundColor
{
get { return (Color)GetValue(ButtonBackgroundColorProperty); }
set { SetValue(ButtonBackgroundColorProperty, value); }
}
public static readonly BindableProperty ButtonBackgroundColorProperty = BindableProperty.Create
(
nameof(ButtonBackgroundColor),
typeof(Color),
typeof(CustomButtomActivityView),
defaultBindingMode: BindingMode.TwoWay,
propertyChanged: OnButtonBackgroundColorChange
);
private static void OnButtonBackgroundColorChange(BindableObject bindable, object oldValue, object newValue)
{
var customButtonView = (CustomButtomActivityView)bindable;
customButtonView.CustomButtomActivity.BackgroundColor = (Color)newValue;
}
public Color ButtonTextColor
{
get { return (Color)GetValue(ButtonTextColorProperty); }
set { SetValue(ButtonTextColorProperty, value); }
}
public static readonly BindableProperty ButtonTextColorProperty = BindableProperty.Create
(
nameof(ButtonTextColor),
typeof(Color),
typeof(CustomButtomActivityView),
defaultBindingMode: BindingMode.TwoWay,
propertyChanged: OnButtonTextColorChange
);
private static void OnButtonTextColorChange(BindableObject bindable, object oldValue, object newValue)
{
var customButtonView = (CustomButtomActivityView)bindable;
customButtonView.CustomButtomActivity.TextColor = (Color)newValue;
}
public Color ButtonBorderColor
{
get { return (Color)GetValue(ButtonBorderColorProperty); }
set { SetValue(ButtonBorderColorProperty, value); }
}
public static readonly BindableProperty ButtonBorderColorProperty = BindableProperty.Create
(
nameof(ButtonBorderColor),
typeof(Color),
typeof(CustomButtomActivityView),
defaultBindingMode: BindingMode.TwoWay,
propertyChanged: OnButtonBorderColorChange
);
private static void OnButtonBorderColorChange(BindableObject bindable, object oldValue, object newValue)
{
var customButtonView = (CustomButtomActivityView)bindable;
customButtonView.CustomButtomActivity.BorderColor = (Color)newValue;
}
public double ButtonBorderWidth
{
get { return (double)GetValue(ButtonBorderWidthProperty); }
set { SetValue(ButtonBorderWidthProperty, value); }
}
public static readonly BindableProperty ButtonBorderWidthProperty = BindableProperty.Create
(
nameof(ButtonBorderColor),
typeof(double),
typeof(CustomButtomActivityView),
defaultBindingMode: BindingMode.TwoWay,
propertyChanged: OnButtonBorderWidthChange
);
private static void OnButtonBorderWidthChange(BindableObject bindable, object oldValue, object newValue)
{
var customButtonView = (CustomButtomActivityView)bindable;
customButtonView.CustomButtomActivity.BorderWidth = (double)newValue;
}
[Obsolete]
public int ButtonBorderRadius
{
get { return (int)GetValue(ButtonBorderRadiusProperty); }
set { SetValue(ButtonBorderRadiusProperty, value); }
}
[Obsolete]
public static readonly BindableProperty ButtonBorderRadiusProperty = BindableProperty.Create
(
nameof(ButtonBorderColor),
typeof(int),
typeof(CustomButtomActivityView),
defaultBindingMode: BindingMode.TwoWay,
propertyChanged: OnButtonBorderRadiusChange
);
[Obsolete]
private static void OnButtonBorderRadiusChange(BindableObject bindable, object oldValue, object newValue)
{
var customButtonView = (CustomButtomActivityView)bindable;
customButtonView.CustomButtomActivity.BorderRadius = (int)newValue;
}
#endregion
#region ActivityIndicator
public Color ColorActivity
{
get { return (Color)GetValue(ColorActivityProperty); }
set { SetValue(ColorActivityProperty, value); }
}
public static readonly BindableProperty ColorActivityProperty = BindableProperty.Create
(
nameof(ColorActivity),
typeof(Color),
typeof(CustomButtomActivityView),
defaultBindingMode: BindingMode.TwoWay,
propertyChanged: OnColorActivityChange
);
private static void OnColorActivityChange(BindableObject bindable, object oldValue, object newValue)
{
var customButtonView = (CustomButtomActivityView)bindable;
customButtonView.CustomButtomActivityIndicator.Color = (Color)newValue;
}
public bool IsBusy
{
get { return (bool)GetValue(IsBusyActivityProperty); }
set { SetValue(IsBusyActivityProperty, value); }
}
public static readonly BindableProperty IsBusyActivityProperty = BindableProperty.Create
(
nameof(IsBusy),
typeof(bool),
typeof(CustomButtomActivityView),
defaultBindingMode: BindingMode.TwoWay,
propertyChanged: OnIsBusyActivityChange
);
//private static void OnIsBusyActivityChange(BindableObject bindable, object oldValue, object newValue)
//{
// var customButtonView = (CustomButtomActivityView)bindable;
// customButtonView.CustomButtomActivityIndicator.IsVisible = (bool)newValue;
// customButtonView.CustomButtomActivityIndicator.IsRunning = (bool)newValue;
//}
private static async void OnIsBusyActivityChange(object sender, object oldValue, object newValue)
{
if(sender is CustomButtomActivityView customButtomActivityView && newValue is bool isvalid)
{
customButtomActivityView.CustomButtomActivity.IsEnabled = !isvalid;
customButtomActivityView.CustomButtomActivityIndicator.IsRunning = isvalid;
customButtomActivityView.CustomButtomActivityIndicator.IsEnabled = isvalid;
customButtomActivityView.CustomButtomActivityIndicator.IsVisible = isvalid;
var opacity = isvalid ? 1 : 0;
await customButtomActivityView.CustomButtomActivityIndicator.FadeTo(opacity, 250, Easing.SinIn);
customButtomActivityView.CustomButtomActivity.Text = isvalid ? string.Empty : customButtomActivityView.ButtonText;
}
}
#endregion
}
} | 39.370229 | 130 | 0.646437 | [
"MIT"
] | EmersonMeloMachado/BottomAnimation | BottomAnimation/BottomAnimation/CustonViews/CustomButtomActivityView.xaml.cs | 10,317 | C# |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Web;
using umbraco;
using Umbraco.Core.Configuration;
using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
using RenderingEngine = Umbraco.Core.RenderingEngine;
namespace Umbraco.Web.Routing
{
/// <summary>
/// Represents a request for one specified Umbraco IPublishedContent to be rendered
/// by one specified template, using one specified Culture and RenderingEngine.
/// </summary>
public class PublishedRequest
{
private readonly PublishedRouter _publishedRouter;
private bool _readonly; // after prepared
private bool _readonlyUri; // after preparing
private Uri _uri; // clean uri, no virtual dir, no trailing slash nor .aspx, nothing
private ITemplate _template; // template model if any else null
private bool _is404;
private DomainAndUri _domain;
private CultureInfo _culture;
private IPublishedContent _publishedContent;
private IPublishedContent _initialPublishedContent; // found by finders before 404, redirects, etc
private page _umbracoPage; // legacy
/// <summary>
/// Initializes a new instance of the <see cref="PublishedRequest"/> class.
/// </summary>
/// <param name="publishedRouter">The published router.</param>
/// <param name="umbracoContext">The Umbraco context.</param>
/// <param name="uri">The request <c>Uri</c>.</param>
internal PublishedRequest(PublishedRouter publishedRouter, UmbracoContext umbracoContext, Uri uri = null)
{
UmbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext));
_publishedRouter = publishedRouter ?? throw new ArgumentNullException(nameof(publishedRouter));
Uri = uri ?? umbracoContext.CleanedUmbracoUrl;
RenderingEngine = RenderingEngine.Unknown;
}
/// <summary>
/// Gets the UmbracoContext.
/// </summary>
public UmbracoContext UmbracoContext { get; }
/// <summary>
/// Gets or sets the cleaned up Uri used for routing.
/// </summary>
/// <remarks>The cleaned up Uri has no virtual directory, no trailing slash, no .aspx extension, etc.</remarks>
public Uri Uri
{
get => _uri;
set
{
if (_readonlyUri)
throw new InvalidOperationException("Cannot modify Uri after Preparing has triggered.");
_uri = value;
}
}
// utility for ensuring it is ok to set some properties
private void EnsureWriteable()
{
if (_readonly)
throw new InvalidOperationException("Cannot modify a PublishedContentRequest once it is read-only.");
}
/// <summary>
/// Prepares the request.
/// </summary>
public void Prepare()
{
_publishedRouter.PrepareRequest(this);
}
#region Events
/// <summary>
/// Triggers before the published content request is prepared.
/// </summary>
/// <remarks>When the event triggers, no preparation has been done. It is still possible to
/// modify the request's Uri property, for example to restore its original, public-facing value
/// that might have been modified by an in-between equipement such as a load-balancer.</remarks>
public static event EventHandler<EventArgs> Preparing;
/// <summary>
/// Triggers once the published content request has been prepared, but before it is processed.
/// </summary>
/// <remarks>When the event triggers, preparation is done ie domain, culture, document, template,
/// rendering engine, etc. have been setup. It is then possible to change anything, before
/// the request is actually processed and rendered by Umbraco.</remarks>
public static event EventHandler<EventArgs> Prepared;
/// <summary>
/// Triggers the Preparing event.
/// </summary>
internal void OnPreparing()
{
Preparing?.Invoke(this, EventArgs.Empty);
_readonlyUri = true;
}
/// <summary>
/// Triggers the Prepared event.
/// </summary>
internal void OnPrepared()
{
Prepared?.Invoke(this, EventArgs.Empty);
if (HasPublishedContent == false)
Is404 = true; // safety
_readonly = true;
}
#endregion
#region PublishedContent
/// <summary>
/// Gets or sets the requested content.
/// </summary>
/// <remarks>Setting the requested content clears <c>Template</c>.</remarks>
public IPublishedContent PublishedContent
{
get { return _publishedContent; }
set
{
EnsureWriteable();
_publishedContent = value;
IsInternalRedirectPublishedContent = false;
TemplateModel = null;
}
}
/// <summary>
/// Sets the requested content, following an internal redirect.
/// </summary>
/// <param name="content">The requested content.</param>
/// <remarks>Depending on <c>UmbracoSettings.InternalRedirectPreservesTemplate</c>, will
/// preserve or reset the template, if any.</remarks>
public void SetInternalRedirectPublishedContent(IPublishedContent content)
{
if (content == null) throw new ArgumentNullException(nameof(content));
EnsureWriteable();
// unless a template has been set already by the finder,
// template should be null at that point.
// IsInternalRedirect if IsInitial, or already IsInternalRedirect
var isInternalRedirect = IsInitialPublishedContent || IsInternalRedirectPublishedContent;
// redirecting to self
if (content.Id == PublishedContent.Id) // neither can be null
{
// no need to set PublishedContent, we're done
IsInternalRedirectPublishedContent = isInternalRedirect;
return;
}
// else
// save
var template = _template;
var renderingEngine = RenderingEngine;
// set published content - this resets the template, and sets IsInternalRedirect to false
PublishedContent = content;
IsInternalRedirectPublishedContent = isInternalRedirect;
// must restore the template if it's an internal redirect & the config option is set
if (isInternalRedirect && UmbracoConfig.For.UmbracoSettings().WebRouting.InternalRedirectPreservesTemplate)
{
// restore
_template = template;
RenderingEngine = renderingEngine;
}
}
/// <summary>
/// Gets the initial requested content.
/// </summary>
/// <remarks>The initial requested content is the content that was found by the finders,
/// before anything such as 404, redirect... took place.</remarks>
public IPublishedContent InitialPublishedContent => _initialPublishedContent;
/// <summary>
/// Gets value indicating whether the current published content is the initial one.
/// </summary>
public bool IsInitialPublishedContent => _initialPublishedContent != null && _initialPublishedContent == _publishedContent;
/// <summary>
/// Indicates that the current PublishedContent is the initial one.
/// </summary>
public void SetIsInitialPublishedContent()
{
EnsureWriteable();
// note: it can very well be null if the initial content was not found
_initialPublishedContent = _publishedContent;
IsInternalRedirectPublishedContent = false;
}
/// <summary>
/// Gets or sets a value indicating whether the current published content has been obtained
/// from the initial published content following internal redirections exclusively.
/// </summary>
/// <remarks>Used by PublishedContentRequestEngine.FindTemplate() to figure out whether to
/// apply the internal redirect or not, when content is not the initial content.</remarks>
public bool IsInternalRedirectPublishedContent { get; private set; }
/// <summary>
/// Gets a value indicating whether the content request has a content.
/// </summary>
public bool HasPublishedContent => PublishedContent != null;
#endregion
#region Template
/// <summary>
/// Gets or sets the template model to use to display the requested content.
/// </summary>
internal ITemplate TemplateModel
{
get
{
return _template;
}
set
{
_template = value;
RenderingEngine = RenderingEngine.Unknown; // reset
if (_template != null)
RenderingEngine = _publishedRouter.FindTemplateRenderingEngine(_template.Alias);
}
}
/// <summary>
/// Gets the alias of the template to use to display the requested content.
/// </summary>
public string TemplateAlias => _template?.Alias;
/// <summary>
/// Tries to set the template to use to display the requested content.
/// </summary>
/// <param name="alias">The alias of the template.</param>
/// <returns>A value indicating whether a valid template with the specified alias was found.</returns>
/// <remarks>
/// <para>Successfully setting the template does refresh <c>RenderingEngine</c>.</para>
/// <para>If setting the template fails, then the previous template (if any) remains in place.</para>
/// </remarks>
public bool TrySetTemplate(string alias)
{
EnsureWriteable();
if (string.IsNullOrWhiteSpace(alias))
{
TemplateModel = null;
return true;
}
// NOTE - can we stil get it with whitespaces in it due to old legacy bugs?
alias = alias.Replace(" ", "");
var model = _publishedRouter.GetTemplate(alias);
if (model == null)
return false;
TemplateModel = model;
return true;
}
/// <summary>
/// Sets the template to use to display the requested content.
/// </summary>
/// <param name="template">The template.</param>
/// <remarks>Setting the template does refresh <c>RenderingEngine</c>.</remarks>
public void SetTemplate(ITemplate template)
{
EnsureWriteable();
TemplateModel = template;
}
/// <summary>
/// Resets the template.
/// </summary>
/// <remarks>The <c>RenderingEngine</c> becomes unknown.</remarks>
public void ResetTemplate()
{
EnsureWriteable();
TemplateModel = null;
}
/// <summary>
/// Gets a value indicating whether the content request has a template.
/// </summary>
public bool HasTemplate => _template != null;
internal void UpdateOnMissingTemplate()
{
var __readonly = _readonly;
_readonly = false;
_publishedRouter.UpdateRequestOnMissingTemplate(this);
_readonly = __readonly;
}
#endregion
#region Domain and Culture
/// <summary>
/// Gets or sets the content request's domain.
/// </summary>
/// <remarks>Is a DomainAndUri object ie a standard Domain plus the fully qualified uri. For example,
/// the <c>Domain</c> may contain "example.com" whereas the <c>Uri</c> will be fully qualified eg "http://example.com/".</remarks>
public DomainAndUri Domain
{
get { return _domain; }
set
{
EnsureWriteable();
_domain = value;
}
}
/// <summary>
/// Gets a value indicating whether the content request has a domain.
/// </summary>
public bool HasDomain => Domain != null;
/// <summary>
/// Gets or sets the content request's culture.
/// </summary>
public CultureInfo Culture
{
get { return _culture; }
set
{
EnsureWriteable();
_culture = value;
}
}
// note: do we want to have an ordered list of alternate cultures,
// to allow for fallbacks when doing dictionnary lookup and such?
#endregion
#region Rendering
/// <summary>
/// Gets or sets whether the rendering engine is MVC or WebForms.
/// </summary>
public RenderingEngine RenderingEngine { get; internal set; }
#endregion
#region Status
/// <summary>
/// Gets or sets a value indicating whether the requested content could not be found.
/// </summary>
/// <remarks>This is set in the <c>PublishedContentRequestBuilder</c> and can also be used in
/// custom content finders or <c>Prepared</c> event handlers, where we want to allow developers
/// to indicate a request is 404 but not to cancel it.</remarks>
public bool Is404
{
get { return _is404; }
set
{
EnsureWriteable();
_is404 = value;
}
}
/// <summary>
/// Gets a value indicating whether the content request triggers a redirect (permanent or not).
/// </summary>
public bool IsRedirect => string.IsNullOrWhiteSpace(RedirectUrl) == false;
/// <summary>
/// Gets or sets a value indicating whether the redirect is permanent.
/// </summary>
public bool IsRedirectPermanent { get; private set; }
/// <summary>
/// Gets or sets the url to redirect to, when the content request triggers a redirect.
/// </summary>
public string RedirectUrl { get; private set; }
/// <summary>
/// Indicates that the content request should trigger a redirect (302).
/// </summary>
/// <param name="url">The url to redirect to.</param>
/// <remarks>Does not actually perform a redirect, only registers that the response should
/// redirect. Redirect will or will not take place in due time.</remarks>
public void SetRedirect(string url)
{
EnsureWriteable();
RedirectUrl = url;
IsRedirectPermanent = false;
}
/// <summary>
/// Indicates that the content request should trigger a permanent redirect (301).
/// </summary>
/// <param name="url">The url to redirect to.</param>
/// <remarks>Does not actually perform a redirect, only registers that the response should
/// redirect. Redirect will or will not take place in due time.</remarks>
public void SetRedirectPermanent(string url)
{
EnsureWriteable();
RedirectUrl = url;
IsRedirectPermanent = true;
}
/// <summary>
/// Indicates that the content requet should trigger a redirect, with a specified status code.
/// </summary>
/// <param name="url">The url to redirect to.</param>
/// <param name="status">The status code (300-308).</param>
/// <remarks>Does not actually perform a redirect, only registers that the response should
/// redirect. Redirect will or will not take place in due time.</remarks>
public void SetRedirect(string url, int status)
{
EnsureWriteable();
if (status < 300 || status > 308)
throw new ArgumentOutOfRangeException(nameof(status), "Valid redirection status codes 300-308.");
RedirectUrl = url;
IsRedirectPermanent = (status == 301 || status == 308);
if (status != 301 && status != 302) // default redirect statuses
ResponseStatusCode = status;
}
/// <summary>
/// Gets or sets the content request http response status code.
/// </summary>
/// <remarks>Does not actually set the http response status code, only registers that the response
/// should use the specified code. The code will or will not be used, in due time.</remarks>
public int ResponseStatusCode { get; private set; }
/// <summary>
/// Gets or sets the content request http response status description.
/// </summary>
/// <remarks>Does not actually set the http response status description, only registers that the response
/// should use the specified description. The description will or will not be used, in due time.</remarks>
public string ResponseStatusDescription { get; private set; }
/// <summary>
/// Sets the http response status code, along with an optional associated description.
/// </summary>
/// <param name="code">The http status code.</param>
/// <param name="description">The description.</param>
/// <remarks>Does not actually set the http response status code and description, only registers that
/// the response should use the specified code and description. The code and description will or will
/// not be used, in due time.</remarks>
public void SetResponseStatus(int code, string description = null)
{
EnsureWriteable();
// .Status is deprecated
// .SubStatusCode is IIS 7+ internal, ignore
ResponseStatusCode = code;
ResponseStatusDescription = description;
}
#endregion
#region Response Cache
/// <summary>
/// Gets or sets the <c>System.Web.HttpCacheability</c>
/// </summary>
// Note: we used to set a default value here but that would then be the default
// for ALL requests, we shouldn't overwrite it though if people are using [OutputCache] for example
// see: https://our.umbraco.org/forum/using-umbraco-and-getting-started/79715-output-cache-in-umbraco-752
internal HttpCacheability Cacheability { get; set; }
/// <summary>
/// Gets or sets a list of Extensions to append to the Response.Cache object.
/// </summary>
internal List<string> CacheExtensions { get; set; } = new List<string>();
/// <summary>
/// Gets or sets a dictionary of Headers to append to the Response object.
/// </summary>
internal Dictionary<string, string> Headers { get; set; } = new Dictionary<string, string>();
#endregion
#region Legacy
// for legacy/webforms code - todo - get rid of it eventually
internal page UmbracoPage
{
get
{
if (_umbracoPage == null)
throw new InvalidOperationException("The UmbracoPage object has not been initialized yet.");
return _umbracoPage;
}
set { _umbracoPage = value; }
}
#endregion
}
}
| 38.094595 | 138 | 0.593219 | [
"MIT"
] | ismailmayat/Umbraco-CMS | src/Umbraco.Web/Routing/PublishedRequest.cs | 19,735 | C# |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
using System;
using System.Collections.Generic;
using Aliyun.Acs.Core.Transform;
using Aliyun.Acs.Airec.Model.V20201126;
namespace Aliyun.Acs.Airec.Transform.V20201126
{
public class CreateInstanceResponseUnmarshaller
{
public static CreateInstanceResponse Unmarshall(UnmarshallerContext _ctx)
{
CreateInstanceResponse createInstanceResponse = new CreateInstanceResponse();
createInstanceResponse.HttpResponse = _ctx.HttpResponse;
createInstanceResponse.Code = _ctx.StringValue("CreateInstance.code");
createInstanceResponse.RequestId = _ctx.StringValue("CreateInstance.requestId");
createInstanceResponse.Message = _ctx.StringValue("CreateInstance.message");
CreateInstanceResponse.CreateInstance_Result result = new CreateInstanceResponse.CreateInstance_Result();
result.InstanceId = _ctx.StringValue("CreateInstance.Result.instanceId");
createInstanceResponse.Result = result;
return createInstanceResponse;
}
}
}
| 39.413043 | 109 | 0.766685 | [
"Apache-2.0"
] | AxiosCros/aliyun-openapi-net-sdk | aliyun-net-sdk-airec/Airec/Transform/V20201126/CreateInstanceResponseUnmarshaller.cs | 1,813 | C# |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.AzureNextGen.Network.V20180201.Inputs
{
/// <summary>
/// Route Filter Resource.
/// </summary>
public sealed class RouteFilterArgs : Pulumi.ResourceArgs
{
/// <summary>
/// Resource ID.
/// </summary>
[Input("id")]
public Input<string>? Id { get; set; }
/// <summary>
/// Resource location.
/// </summary>
[Input("location", required: true)]
public Input<string> Location { get; set; } = null!;
[Input("peerings")]
private InputList<Inputs.ExpressRouteCircuitPeeringArgs>? _peerings;
/// <summary>
/// A collection of references to express route circuit peerings.
/// </summary>
public InputList<Inputs.ExpressRouteCircuitPeeringArgs> Peerings
{
get => _peerings ?? (_peerings = new InputList<Inputs.ExpressRouteCircuitPeeringArgs>());
set => _peerings = value;
}
[Input("rules")]
private InputList<Inputs.RouteFilterRuleArgs>? _rules;
/// <summary>
/// Collection of RouteFilterRules contained within a route filter.
/// </summary>
public InputList<Inputs.RouteFilterRuleArgs> Rules
{
get => _rules ?? (_rules = new InputList<Inputs.RouteFilterRuleArgs>());
set => _rules = value;
}
[Input("tags")]
private InputMap<string>? _tags;
/// <summary>
/// Resource tags.
/// </summary>
public InputMap<string> Tags
{
get => _tags ?? (_tags = new InputMap<string>());
set => _tags = value;
}
public RouteFilterArgs()
{
}
}
}
| 28.690141 | 101 | 0.576338 | [
"Apache-2.0"
] | pulumi/pulumi-azure-nextgen | sdk/dotnet/Network/V20180201/Inputs/RouteFilterArgs.cs | 2,037 | C# |
using ChubbyWarps.Data;
using Rocket.API.Configuration;
namespace ChubbyWarps.Services
{
public sealed class WarpsDataProvider : DataProvider<WarpsData>
{
public WarpsDataProvider(IConfiguration configuration) : base(configuration) { }
public override string Name => "Data";
}
}
| 25.75 | 88 | 0.728155 | [
"MIT"
] | ChubbyQuokka/ChubbyWarps | ChubbyWarps/Services/WarpsDataProvider.cs | 311 | C# |
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
namespace SequentialReadingBenchmark
{
internal class Program
{
private static void Main(string[] args)
{
Summary[] summaries = BenchmarkRunner.Run(typeof(Program).Assembly);
}
}
}
| 21.857143 | 81 | 0.637255 | [
"MIT"
] | ErwinSturluson/Examples | .NET/CPU/DotNetCpuCacheExamples/SequentialReadingBenchmarks/Program.cs | 308 | C# |
using System;
using System.Collections.Generic;
using Google.OrTools.ConstraintSolver;
namespace OrToolsConstraint {
class Job {
public Job(List<Task> tasks) {
AlternativeTasks = tasks;
}
public Job Successor { get; set; }
public List<Task> AlternativeTasks { get; set; }
}
class Task {
public Task(string name, long duration, long equipment) {
Name = name;
Duration = duration;
Equipment = equipment;
}
public string Name {get; set;}
public long StartTime {get; set;}
public long EndTime {
get {
return StartTime + Duration;
}
}
public long Duration {get; set;}
public long Equipment { get; set; }
public override string ToString() {
return Name + " [ " + Equipment + " ]\tstarts: " + StartTime + " ends:" +
EndTime + ", duration: " + Duration;
}
}
class TaskScheduling {
public static List<Job> myJobList = new List<Job>();
public static Dictionary<long, List<IntervalVar>> tasksToEquipment =
new Dictionary<long, List<IntervalVar>>();
public static Dictionary<string, long> taskIndexes =
new Dictionary<string, long>();
public static void InitTaskList() {
List<Task> taskList = new List<Task>();
taskList.Add(new Task("Job1Task0a", 15, 0));
taskList.Add(new Task("Job1Task0b", 25, 1));
taskList.Add(new Task("Job1Task0c", 10, 2));
myJobList.Add(new Job(taskList));
taskList = new List<Task>();
taskList.Add(new Task("Job1Task1a", 25, 0));
taskList.Add(new Task("Job1Task1b", 30, 1));
taskList.Add(new Task("Job1Task1c", 40, 2));
myJobList.Add(new Job(taskList));
taskList = new List<Task>();
taskList.Add(new Task("Job1Task2a", 20, 0));
taskList.Add(new Task("Job1Task2b", 35, 1));
taskList.Add(new Task("Job1Task2c", 10, 2));
myJobList.Add(new Job(taskList));
taskList = new List<Task>();
taskList.Add(new Task("Job2Task0a", 15, 0));
taskList.Add(new Task("Job2Task0b", 25, 1));
taskList.Add(new Task("Job2Task0c", 10, 2));
myJobList.Add(new Job(taskList));
taskList = new List<Task>();
taskList.Add(new Task("Job2Task1a", 25, 0));
taskList.Add(new Task("Job2Task1b", 30, 1));
taskList.Add(new Task("Job2Task1c", 40, 2));
myJobList.Add(new Job(taskList));
taskList = new List<Task>();
taskList.Add(new Task("Job2Task2a", 20, 0));
taskList.Add(new Task("Job2Task2b", 35, 1));
taskList.Add(new Task("Job2Task2c", 10, 2));
myJobList.Add(new Job(taskList));
taskList = new List<Task>();
taskList.Add(new Task("Job3Task0a", 10, 0));
taskList.Add(new Task("Job3Task0b", 15, 1));
taskList.Add(new Task("Job3Task0c", 50, 2));
myJobList.Add(new Job(taskList));
taskList = new List<Task>();
taskList.Add(new Task("Job3Task1a", 50, 0));
taskList.Add(new Task("Job3Task1b", 10, 1));
taskList.Add(new Task("Job3Task1c", 20, 2));
myJobList.Add(new Job(taskList));
taskList = new List<Task>();
taskList.Add(new Task("Job3Task2a", 65, 0));
taskList.Add(new Task("Job3Task2b", 5, 1));
taskList.Add(new Task("Job3Task2c", 15, 2));
myJobList.Add(new Job(taskList));
myJobList[0].Successor = myJobList[1];
myJobList[1].Successor = myJobList[2];
myJobList[2].Successor = null;
myJobList[3].Successor = myJobList[4];
myJobList[4].Successor = myJobList[5];
myJobList[5].Successor = null;
myJobList[6].Successor = myJobList[7];
myJobList[7].Successor = myJobList[8];
myJobList[8].Successor = null;
}
public static int GetTaskCount() {
int c = 0;
foreach (Job j in myJobList)
foreach (Task t in j.AlternativeTasks) {
taskIndexes[t.Name] = c;
c++;
}
return c;
}
public static int GetEndTaskCount() {
int c = 0;
foreach (Job j in myJobList)
if (j.Successor == null)
c += j.AlternativeTasks.Count;
return c;
}
static void Main(string[] args) {
InitTaskList();
int taskCount = GetTaskCount();
Solver solver = new Solver("ResourceConstraintScheduling");
IntervalVar[] tasks = new IntervalVar[taskCount];
IntVar[] taskChoosed = new IntVar[taskCount];
IntVar[] makeSpan = new IntVar[GetEndTaskCount()];
int endJobCounter = 0;
foreach (Job j in myJobList) {
IntVar[] tmp = new IntVar[j.AlternativeTasks.Count];
int i = 0;
foreach (Task t in j.AlternativeTasks) {
long ti = taskIndexes[t.Name];
taskChoosed[ti] = solver.MakeIntVar(0, 1, t.Name + "_choose");
tmp[i++] = taskChoosed[ti];
tasks[ti] = solver.MakeFixedDurationIntervalVar(
0, 100000, t.Duration, false, t.Name + "_interval");
if (j.Successor == null)
makeSpan[endJobCounter++] = tasks[ti].EndExpr().Var();
if (!tasksToEquipment.ContainsKey(t.Equipment))
tasksToEquipment[t.Equipment] = new List<IntervalVar>();
tasksToEquipment[t.Equipment].Add(tasks[ti]);
}
solver.Add(IntVarArrayHelper.Sum(tmp) == 1);
}
List<SequenceVar> all_seq = new List<SequenceVar>();
foreach (KeyValuePair<long, List<IntervalVar>> pair in tasksToEquipment) {
DisjunctiveConstraint dc = solver.MakeDisjunctiveConstraint(
pair.Value.ToArray(), pair.Key.ToString());
solver.Add(dc);
all_seq.Add(dc.SequenceVar());
}
IntVar objective_var = solver.MakeMax(makeSpan).Var();
OptimizeVar objective_monitor = solver.MakeMinimize(objective_var, 1);
DecisionBuilder sequence_phase =
solver.MakePhase(all_seq.ToArray(), Solver.SEQUENCE_DEFAULT);
DecisionBuilder objective_phase =
solver.MakePhase(objective_var, Solver.CHOOSE_FIRST_UNBOUND,
Solver.ASSIGN_MIN_VALUE);
DecisionBuilder main_phase = solver.Compose(sequence_phase, objective_phase);
const int kLogFrequency = 1000000;
SearchMonitor search_log =
solver.MakeSearchLog(kLogFrequency, objective_monitor);
SolutionCollector collector = solver.MakeLastSolutionCollector();
collector.Add(all_seq.ToArray());
collector.AddObjective(objective_var);
if (solver.Solve(main_phase, search_log, objective_monitor, null, collector))
Console.Out.WriteLine("Optimal solution = " + collector.ObjectiveValue(0));
else
Console.Out.WriteLine("No solution.");
}
}
}
| 32.751295 | 81 | 0.652903 | [
"Apache-2.0"
] | serraict/googleortools | examples/TaskScheduling.cs | 6,323 | C# |
using System;
using System.Collections.Generic;
using MongoDB.Bson;
namespace ReckonMe.Api.Models
{
public class Expense
{
public Expense()
{
Id = Guid.NewGuid();
}
public Guid Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public decimal Value { get; set; }
public string Payer { get; set; }
public DateTime Date { get; set; }
public IEnumerable<string> Members { get; set; }
}
} | 24.090909 | 56 | 0.569811 | [
"MIT"
] | reckonme-stack/ReckonMe.Api | ReckonMe.Api/Models/Expense.cs | 532 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace dgv_radio_checkbox.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
| 34.612903 | 151 | 0.584343 | [
"MIT"
] | IVSoftware/dgv-radio-checkbox | dgv-radio-checkbox/Properties/Settings.Designer.cs | 1,075 | C# |
using System.Collections.Generic;
using System.Linq;
using Abp.Localization;
using Microsoft.EntityFrameworkCore;
namespace AbpCompanyName.AbpProjectName.EntityFrameworkCore.Seed.Host
{
public class DefaultLanguagesCreator
{
public static List<ApplicationLanguage> InitialLanguages => GetInitialLanguages();
private readonly AbpProjectNameDbContext _context;
private static List<ApplicationLanguage> GetInitialLanguages()
{
return new List<ApplicationLanguage>
{
new ApplicationLanguage(null, "en", "English", "famfamfam-flags gb"),
new ApplicationLanguage(null, "ar", "العربية", "famfamfam-flags sa"),
new ApplicationLanguage(null, "de", "German", "famfamfam-flags de"),
new ApplicationLanguage(null, "it", "Italiano", "famfamfam-flags it"),
new ApplicationLanguage(null, "fr", "Français", "famfamfam-flags fr"),
new ApplicationLanguage(null, "pt-BR", "Portuguese", "famfamfam-flags br"),
new ApplicationLanguage(null, "tr", "Türkçe", "famfamfam-flags tr"),
new ApplicationLanguage(null, "ru", "Русский", "famfamfam-flags ru"),
new ApplicationLanguage(null, "zh-CN", "简体中文", "famfamfam-flags cn"),
new ApplicationLanguage(null, "es-MX", "Español México", "famfamfam-flags mx")
};
}
public DefaultLanguagesCreator(AbpProjectNameDbContext context)
{
_context = context;
}
public void Create()
{
CreateLanguages();
}
private void CreateLanguages()
{
foreach (var language in InitialLanguages)
{
AddLanguageIfNotExists(language);
}
}
private void AddLanguageIfNotExists(ApplicationLanguage language)
{
if (_context.Languages.IgnoreQueryFilters().Any(l => l.TenantId == language.TenantId && l.Name == language.Name))
{
return;
}
_context.Languages.Add(language);
_context.SaveChanges();
}
}
} | 35.967213 | 125 | 0.59845 | [
"MIT"
] | 5468sun/netcore-angular-boilerplate-osx | aspnet-core/src/AbpCompanyName.AbpProjectName.EntityFrameworkCore/EntityFrameworkCore/Seed/Host/DefaultLanguagesCreator.cs | 2,223 | C# |
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
// <auto-generated/>
// Template Source: IMethodRequest.cs.tt
namespace Microsoft.Graph
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
/// <summary>
/// The interface IEducationSynchronizationProfileUploadUrlRequest.
/// </summary>
public partial interface IEducationSynchronizationProfileUploadUrlRequest : IBaseRequest
{
/// <summary>
/// Issues the GET request.
/// </summary>
System.Threading.Tasks.Task<string> GetAsync();
/// <summary>
/// Issues the GET request.
/// </summary>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await for async call.</returns>
System.Threading.Tasks.Task<string> GetAsync(
CancellationToken cancellationToken);
/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
/// <param name="value">The expand value.</param>
/// <returns>The request object to send.</returns>
IEducationSynchronizationProfileUploadUrlRequest Expand(string value);
/// <summary>
/// Adds the specified select value to the request.
/// </summary>
/// <param name="value">The select value.</param>
/// <returns>The request object to send.</returns>
IEducationSynchronizationProfileUploadUrlRequest Select(string value);
}
}
| 36.641509 | 153 | 0.595778 | [
"MIT"
] | GeertVL/msgraph-beta-sdk-dotnet | src/Microsoft.Graph/Generated/requests/IEducationSynchronizationProfileUploadUrlRequest.cs | 1,942 | C# |
using System;
namespace NumSharp.Backends
{
public partial class DefaultEngine
{
public override NDArray Mod(in NDArray lhs, in NDArray rhs)
{
switch (lhs.GetTypeCode)
{
#if _REGEN
%foreach supported_dtypes,supported_dtypes_lowercase%
case NPTypeCode.#1: return Mod#1(lhs, rhs);
%
default:
throw new NotSupportedException();
#else
case NPTypeCode.Boolean: return ModBoolean(lhs, rhs);
case NPTypeCode.Byte: return ModByte(lhs, rhs);
case NPTypeCode.Int16: return ModInt16(lhs, rhs);
case NPTypeCode.UInt16: return ModUInt16(lhs, rhs);
case NPTypeCode.Int32: return ModInt32(lhs, rhs);
case NPTypeCode.UInt32: return ModUInt32(lhs, rhs);
case NPTypeCode.Int64: return ModInt64(lhs, rhs);
case NPTypeCode.UInt64: return ModUInt64(lhs, rhs);
case NPTypeCode.Char: return ModChar(lhs, rhs);
case NPTypeCode.Double: return ModDouble(lhs, rhs);
case NPTypeCode.Single: return ModSingle(lhs, rhs);
case NPTypeCode.Decimal: return ModDecimal(lhs, rhs);
default:
throw new NotSupportedException();
#endif
}
}
}
}
| 35.864865 | 67 | 0.592313 | [
"Apache-2.0"
] | AmbachtIT/NumSharp | src/NumSharp.Core/Backends/Default/Math/Default.Mod.cs | 1,329 | C# |
// Copyright (c) Microsoft Corporation
//
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
// EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE,
// FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
//
// See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.
namespace Microsoft.Spectrum.AutoUpdate.Service
{
public interface IExecute
{
void Execute();
}
}
| 38.238095 | 116 | 0.745953 | [
"Apache-2.0"
] | cityscapesc/specobs | main/external/dev/Client/MS.AutoUpdate.Service/IExecute.cs | 803 | C# |
using System;
namespace Device.Inbound
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
| 14 | 46 | 0.521978 | [
"Apache-2.0"
] | iotbusters/assistant.net.iot | src/Device.Routers/Device.Inbound/Program.cs | 184 | C# |
/*****************************************************************************************
MathGraph
Copyright (C) Coast
AUTHOR : Coast
DATE : 2020/9/3
DESCRIPTION :
*****************************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Collections;
namespace Coast.Math.Expression
{
public enum OperatorCode
{
None,
NewLine,
Return,
Not,
DoubleQuotation,
Hash,
Currency,
Mod,
And,
SingleQuotation,
LeftParenthesis,
RightParenthesis,
Mul,
Plus,
Comma,
Minus,
Dot,
Div,
Colon,
SemiColon,
LessThan,
Equals,
GreaterThan,
Query,
At,
LeftSquare,
Backslash,
RightSquare,
Xor,
UnderScore,
LeftBrace,
Or,
RightBrace,
Invert,
LessEqual,
NotEqual,
GreaterEqual,
}
} | 17.835821 | 91 | 0.422594 | [
"MIT"
] | M-Coast/MathGraph | Coast.Math/Expression/Lang/Operators.cs | 1,197 | C# |
/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Amazon.CloudTrail.Model;
using Amazon.CloudTrail.Model.Internal.MarshallTransformations;
using Amazon.CloudTrail.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.CloudTrail
{
/// <summary>
/// Implementation for accessing CloudTrail
///
/// AWS CloudTrail
/// <para>
/// This is the CloudTrail API Reference. It provides descriptions of actions, data types,
/// common parameters, and common errors for CloudTrail.
/// </para>
///
/// <para>
/// CloudTrail is a web service that records AWS API calls for your AWS account and delivers
/// log files to an Amazon S3 bucket. The recorded information includes the identity of
/// the user, the start time of the AWS API call, the source IP address, the request parameters,
/// and the response elements returned by the service.
/// </para>
/// <note>
/// <para>
/// As an alternative to the API, you can use one of the AWS SDKs, which consist of libraries
/// and sample code for various programming languages and platforms (Java, Ruby, .NET,
/// iOS, Android, etc.). The SDKs provide a convenient way to create programmatic access
/// to AWSCloudTrail. For example, the SDKs take care of cryptographically signing requests,
/// managing errors, and retrying requests automatically. For information about the AWS
/// SDKs, including how to download and install them, see the <a href="http://aws.amazon.com/tools/">Tools
/// for Amazon Web Services page</a>.
/// </para>
/// </note>
/// <para>
/// See the <a href="http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">AWS
/// CloudTrail User Guide</a> for information about the data that is included with each
/// AWS API call listed in the log files.
/// </para>
/// </summary>
public partial class AmazonCloudTrailClient : AmazonServiceClient, IAmazonCloudTrail
{
private static IServiceMetadata serviceMetadata = new AmazonCloudTrailMetadata();
#region Constructors
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
public AmazonCloudTrailClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailConfig()) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailConfig{RegionEndpoint = region}) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="config">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(AmazonCloudTrailConfig config)
: base(FallbackCredentialsFactory.GetCredentials(), config) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
public AmazonCloudTrailClient(AWSCredentials credentials)
: this(credentials, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonCloudTrailConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(AWSCredentials credentials, AmazonCloudTrailConfig clientConfig)
: base(credentials, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailConfig() {RegionEndpoint=region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonCloudTrailConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonCloudTrailConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
/// <summary>
/// Creates the signer for the service.
/// </summary>
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
/// <summary>
/// Capture metadata for the service.
/// </summary>
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
/// <summary>
/// Disposes the service client.
/// </summary>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region AddTags
/// <summary>
/// Adds one or more tags to a trail, up to a limit of 50. Tags must be unique per trail.
/// Overwrites an existing tag's value when a new value is specified for an existing tag
/// key. If you specify a key without a value, the tag will be created with the specified
/// key and a value of null. You can tag a trail that applies to all regions only from
/// the region in which the trail was created (that is, from its home region).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param>
///
/// <returns>The response from the AddTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with an invalid trail ARN. The
/// format of a trail ARN is:
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the key or value specified for the tag does not match
/// the regular expression <code>^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the AWS account making the request to create or update
/// an organization trail is not the master account for an organization in AWS Organizations.
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail has exceeded the permitted amount. Currently, the limit
/// is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual AddTagsResponse AddTags(AddTagsRequest request)
{
var marshaller = AddTagsRequestMarshaller.Instance;
var unmarshaller = AddTagsResponseUnmarshaller.Instance;
return Invoke<AddTagsRequest,AddTagsResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the AddTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the AddTags operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual Task<AddTagsResponse> AddTagsAsync(AddTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = AddTagsRequestMarshaller.Instance;
var unmarshaller = AddTagsResponseUnmarshaller.Instance;
return InvokeAsync<AddTagsRequest,AddTagsResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region CreateTrail
/// <summary>
/// Creates a trail that specifies the settings for delivery of log data to an Amazon
/// S3 bucket. A maximum of five trails can exist in a region, irrespective of the region
/// in which they were created.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrail service method.</param>
///
/// <returns>The response from the CreateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between AWS CloudTrail
/// and AWS Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other AWS Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM user or role that is used to create the organization
/// trail is lacking one or more required permissions for creating an organization trail
/// in a required service. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is invalid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail can’t be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is deprecated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, or when the S3 bucket and
/// the KMS key are not in the same region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaximumNumberOfTrailsExceededException">
/// This exception is thrown when the maximum number of trails is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the AWS account making the request to create or update
/// an organization trail is not the master account for an organization in AWS Organizations.
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when AWS Organizations is not configured to support all features.
/// All features must be enabled in AWS Organization to support creating an organization
/// trail. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an AWS account that is not
/// a member of an organization. To make this request, sign in using the credentials of
/// an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailAlreadyExistsException">
/// This exception is thrown when the specified trail already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is deprecated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
public virtual CreateTrailResponse CreateTrail(CreateTrailRequest request)
{
var marshaller = CreateTrailRequestMarshaller.Instance;
var unmarshaller = CreateTrailResponseUnmarshaller.Instance;
return Invoke<CreateTrailRequest,CreateTrailResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the CreateTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CreateTrail operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
public virtual Task<CreateTrailResponse> CreateTrailAsync(CreateTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = CreateTrailRequestMarshaller.Instance;
var unmarshaller = CreateTrailResponseUnmarshaller.Instance;
return InvokeAsync<CreateTrailRequest,CreateTrailResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region DeleteTrail
/// <summary>
/// Deletes a trail. This operation must be called from the region in which the trail
/// was created. <code>DeleteTrail</code> cannot be called on the shadow trails (replicated
/// trails in other regions) of a trail that is enabled in all regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail service method.</param>
///
/// <returns>The response from the DeleteTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM user or role that is used to create the organization
/// trail is lacking one or more required permissions for creating an organization trail
/// in a required service. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a region other
/// than the region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the AWS account making the request to create or update
/// an organization trail is not the master account for an organization in AWS Organizations.
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
public virtual DeleteTrailResponse DeleteTrail(DeleteTrailRequest request)
{
var marshaller = DeleteTrailRequestMarshaller.Instance;
var unmarshaller = DeleteTrailResponseUnmarshaller.Instance;
return Invoke<DeleteTrailRequest,DeleteTrailResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the DeleteTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
public virtual Task<DeleteTrailResponse> DeleteTrailAsync(DeleteTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = DeleteTrailRequestMarshaller.Instance;
var unmarshaller = DeleteTrailResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTrailRequest,DeleteTrailResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region DescribeTrails
/// <summary>
/// Retrieves settings for the trail associated with the current region for your account.
/// </summary>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual DescribeTrailsResponse DescribeTrails()
{
return DescribeTrails(new DescribeTrailsRequest());
}
/// <summary>
/// Retrieves settings for the trail associated with the current region for your account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails service method.</param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual DescribeTrailsResponse DescribeTrails(DescribeTrailsRequest request)
{
var marshaller = DescribeTrailsRequestMarshaller.Instance;
var unmarshaller = DescribeTrailsResponseUnmarshaller.Instance;
return Invoke<DescribeTrailsRequest,DescribeTrailsResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Retrieves settings for the trail associated with the current region for your account.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual Task<DescribeTrailsResponse> DescribeTrailsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeTrailsAsync(new DescribeTrailsRequest(), cancellationToken);
}
/// <summary>
/// Initiates the asynchronous execution of the DescribeTrails operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual Task<DescribeTrailsResponse> DescribeTrailsAsync(DescribeTrailsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = DescribeTrailsRequestMarshaller.Instance;
var unmarshaller = DescribeTrailsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTrailsRequest,DescribeTrailsResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region GetEventSelectors
/// <summary>
/// Describes the settings for the event selectors that you configured for your trail.
/// The information returned for your event selectors includes the following:
///
/// <ul> <li>
/// <para>
/// If your event selector includes read-only events, write-only events, or all events.
/// This applies to both management events and data events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes management events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes data events, the Amazon S3 objects or AWS Lambda functions
/// that you are logging for data events.
/// </para>
/// </li> </ul>
/// <para>
/// For more information, see <a href="http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html">Logging
/// Data and Management Events for Trails </a> in the <i>AWS CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors service method.</param>
///
/// <returns>The response from the GetEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
public virtual GetEventSelectorsResponse GetEventSelectors(GetEventSelectorsRequest request)
{
var marshaller = GetEventSelectorsRequestMarshaller.Instance;
var unmarshaller = GetEventSelectorsResponseUnmarshaller.Instance;
return Invoke<GetEventSelectorsRequest,GetEventSelectorsResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the GetEventSelectors operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
public virtual Task<GetEventSelectorsResponse> GetEventSelectorsAsync(GetEventSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = GetEventSelectorsRequestMarshaller.Instance;
var unmarshaller = GetEventSelectorsResponseUnmarshaller.Instance;
return InvokeAsync<GetEventSelectorsRequest,GetEventSelectorsResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region GetTrailStatus
/// <summary>
/// Returns a JSON-formatted list of information about the specified trail. Fields include
/// information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop
/// logging times for each trail. This operation returns trail status from a single region.
/// To return trail status from all regions, you must call the operation on each region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus service method.</param>
///
/// <returns>The response from the GetTrailStatus service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
public virtual GetTrailStatusResponse GetTrailStatus(GetTrailStatusRequest request)
{
var marshaller = GetTrailStatusRequestMarshaller.Instance;
var unmarshaller = GetTrailStatusResponseUnmarshaller.Instance;
return Invoke<GetTrailStatusRequest,GetTrailStatusResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the GetTrailStatus operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
public virtual Task<GetTrailStatusResponse> GetTrailStatusAsync(GetTrailStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = GetTrailStatusRequestMarshaller.Instance;
var unmarshaller = GetTrailStatusResponseUnmarshaller.Instance;
return InvokeAsync<GetTrailStatusRequest,GetTrailStatusResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region ListPublicKeys
/// <summary>
/// Returns all public keys whose private keys were used to sign the digest files within
/// the specified time range. The public key is needed to validate digest files that were
/// signed with its corresponding private key.
///
/// <note>
/// <para>
/// CloudTrail uses different private/public key pairs per region. Each digest file is
/// signed with a private key unique to its region. Therefore, when you validate a digest
/// file from a particular region, you must look in the same region for its corresponding
/// public key.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys service method.</param>
///
/// <returns>The response from the ListPublicKeys service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are invalid. Either the start time occurs after the
/// end time or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
public virtual ListPublicKeysResponse ListPublicKeys(ListPublicKeysRequest request)
{
var marshaller = ListPublicKeysRequestMarshaller.Instance;
var unmarshaller = ListPublicKeysResponseUnmarshaller.Instance;
return Invoke<ListPublicKeysRequest,ListPublicKeysResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the ListPublicKeys operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
public virtual Task<ListPublicKeysResponse> ListPublicKeysAsync(ListPublicKeysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = ListPublicKeysRequestMarshaller.Instance;
var unmarshaller = ListPublicKeysResponseUnmarshaller.Instance;
return InvokeAsync<ListPublicKeysRequest,ListPublicKeysResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region ListTags
/// <summary>
/// Lists the tags for the trail in the current region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param>
///
/// <returns>The response from the ListTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with an invalid trail ARN. The
/// format of a trail ARN is:
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
public virtual ListTagsResponse ListTags(ListTagsRequest request)
{
var marshaller = ListTagsRequestMarshaller.Instance;
var unmarshaller = ListTagsResponseUnmarshaller.Instance;
return Invoke<ListTagsRequest,ListTagsResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the ListTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListTags operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
public virtual Task<ListTagsResponse> ListTagsAsync(ListTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = ListTagsRequestMarshaller.Instance;
var unmarshaller = ListTagsResponseUnmarshaller.Instance;
return InvokeAsync<ListTagsRequest,ListTagsResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region LookupEvents
/// <summary>
/// Looks up <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events">management
/// events</a> captured by CloudTrail. Events for a region can be looked up in that region
/// during the last 90 days. Lookup supports the following attributes:
///
/// <ul> <li>
/// <para>
/// AWS access key
/// </para>
/// </li> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> <li>
/// <para>
/// Read only
/// </para>
/// </li> <li>
/// <para>
/// Resource name
/// </para>
/// </li> <li>
/// <para>
/// Resource type
/// </para>
/// </li> <li>
/// <para>
/// User name
/// </para>
/// </li> </ul>
/// <para>
/// All attributes are optional. The default number of results returned is 50, with a
/// maximum of 50 possible. The response includes a token that you can use to get the
/// next page of results.
/// </para>
/// <important>
/// <para>
/// The rate of lookup requests is limited to one per second per account. If this limit
/// is exceeded, a throttling error occurs.
/// </para>
/// </important> <important>
/// <para>
/// Events that occurred during the selected time range will not be available for lookup
/// if CloudTrail logging was not enabled when the events occurred.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the LookupEvents service method.</param>
///
/// <returns>The response from the LookupEvents service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidLookupAttributesException">
/// Occurs when an invalid lookup attribute is specified.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is invalid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// Invalid token or token that was previously used in a request with different parameters.
/// This exception is thrown if the token is invalid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are invalid. Either the start time occurs after the
/// end time or the time range is outside the range of possible values.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
public virtual LookupEventsResponse LookupEvents(LookupEventsRequest request)
{
var marshaller = LookupEventsRequestMarshaller.Instance;
var unmarshaller = LookupEventsResponseUnmarshaller.Instance;
return Invoke<LookupEventsRequest,LookupEventsResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the LookupEvents operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the LookupEvents operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
public virtual Task<LookupEventsResponse> LookupEventsAsync(LookupEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = LookupEventsRequestMarshaller.Instance;
var unmarshaller = LookupEventsResponseUnmarshaller.Instance;
return InvokeAsync<LookupEventsRequest,LookupEventsResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region PutEventSelectors
/// <summary>
/// Configures an event selector for your trail. Use event selectors to further specify
/// the management and data event settings for your trail. By default, trails created
/// without specific event selectors will be configured to log all read and write management
/// events, and no data events.
///
///
/// <para>
/// When an event occurs in your account, CloudTrail evaluates the event selectors in
/// all trails. For each trail, if the event matches any event selector, the trail processes
/// and logs the event. If the event doesn't match any event selector, the trail doesn't
/// log the event.
/// </para>
///
/// <para>
/// Example
/// </para>
/// <ol> <li>
/// <para>
/// You create an event selector for a trail and specify that you want write-only events.
/// </para>
/// </li> <li>
/// <para>
/// The EC2 <code>GetConsoleOutput</code> and <code>RunInstances</code> API operations
/// occur in your account.
/// </para>
/// </li> <li>
/// <para>
/// CloudTrail evaluates whether the events match your event selectors.
/// </para>
/// </li> <li>
/// <para>
/// The <code>RunInstances</code> is a write-only event and it matches your event selector.
/// The trail logs the event.
/// </para>
/// </li> <li>
/// <para>
/// The <code>GetConsoleOutput</code> is a read-only event but it doesn't match your event
/// selector. The trail doesn't log the event.
/// </para>
/// </li> </ol>
/// <para>
/// The <code>PutEventSelectors</code> operation must be called from the region in which
/// the trail was created; otherwise, an <code>InvalidHomeRegionException</code> is thrown.
/// </para>
///
/// <para>
/// You can configure up to five event selectors for each trail. For more information,
/// see <a href="http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html">Logging
/// Data and Management Events for Trails </a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html">Limits
/// in AWS CloudTrail</a> in the <i>AWS CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors service method.</param>
///
/// <returns>The response from the PutEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM user or role that is used to create the organization
/// trail is lacking one or more required permissions for creating an organization trail
/// in a required service. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors or data resources that is not valid. The combination
/// of event selectors and data resources is not valid. A trail can have up to 5 event
/// selectors. A trail is limited to 250 data resources. These data resources can be distributed
/// across event selectors, but the overall total cannot exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is invalid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a region other
/// than the region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the AWS account making the request to create or update
/// an organization trail is not the master account for an organization in AWS Organizations.
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
public virtual PutEventSelectorsResponse PutEventSelectors(PutEventSelectorsRequest request)
{
var marshaller = PutEventSelectorsRequestMarshaller.Instance;
var unmarshaller = PutEventSelectorsResponseUnmarshaller.Instance;
return Invoke<PutEventSelectorsRequest,PutEventSelectorsResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the PutEventSelectors operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
public virtual Task<PutEventSelectorsResponse> PutEventSelectorsAsync(PutEventSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = PutEventSelectorsRequestMarshaller.Instance;
var unmarshaller = PutEventSelectorsResponseUnmarshaller.Instance;
return InvokeAsync<PutEventSelectorsRequest,PutEventSelectorsResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region RemoveTags
/// <summary>
/// Removes the specified tags from a trail.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param>
///
/// <returns>The response from the RemoveTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with an invalid trail ARN. The
/// format of a trail ARN is:
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the key or value specified for the tag does not match
/// the regular expression <code>^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the AWS account making the request to create or update
/// an organization trail is not the master account for an organization in AWS Organizations.
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual RemoveTagsResponse RemoveTags(RemoveTagsRequest request)
{
var marshaller = RemoveTagsRequestMarshaller.Instance;
var unmarshaller = RemoveTagsResponseUnmarshaller.Instance;
return Invoke<RemoveTagsRequest,RemoveTagsResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the RemoveTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RemoveTags operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual Task<RemoveTagsResponse> RemoveTagsAsync(RemoveTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = RemoveTagsRequestMarshaller.Instance;
var unmarshaller = RemoveTagsResponseUnmarshaller.Instance;
return InvokeAsync<RemoveTagsRequest,RemoveTagsResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region StartLogging
/// <summary>
/// Starts the recording of AWS API calls and log file delivery for a trail. For a trail
/// that is enabled in all regions, this operation must be called from the region in which
/// the trail was created. This operation cannot be called on the shadow trails (replicated
/// trails in other regions) of a trail that is enabled in all regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartLogging service method.</param>
///
/// <returns>The response from the StartLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM user or role that is used to create the organization
/// trail is lacking one or more required permissions for creating an organization trail
/// in a required service. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a region other
/// than the region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the AWS account making the request to create or update
/// an organization trail is not the master account for an organization in AWS Organizations.
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
public virtual StartLoggingResponse StartLogging(StartLoggingRequest request)
{
var marshaller = StartLoggingRequestMarshaller.Instance;
var unmarshaller = StartLoggingResponseUnmarshaller.Instance;
return Invoke<StartLoggingRequest,StartLoggingResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the StartLogging operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StartLogging operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
public virtual Task<StartLoggingResponse> StartLoggingAsync(StartLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = StartLoggingRequestMarshaller.Instance;
var unmarshaller = StartLoggingResponseUnmarshaller.Instance;
return InvokeAsync<StartLoggingRequest,StartLoggingResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region StopLogging
/// <summary>
/// Suspends the recording of AWS API calls and log file delivery for the specified trail.
/// Under most circumstances, there is no need to use this action. You can update a trail
/// without stopping it first. This action is the only way to stop recording. For a trail
/// enabled in all regions, this operation must be called from the region in which the
/// trail was created, or an <code>InvalidHomeRegionException</code> will occur. This
/// operation cannot be called on the shadow trails (replicated trails in other regions)
/// of a trail enabled in all regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopLogging service method.</param>
///
/// <returns>The response from the StopLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM user or role that is used to create the organization
/// trail is lacking one or more required permissions for creating an organization trail
/// in a required service. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a region other
/// than the region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the AWS account making the request to create or update
/// an organization trail is not the master account for an organization in AWS Organizations.
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
public virtual StopLoggingResponse StopLogging(StopLoggingRequest request)
{
var marshaller = StopLoggingRequestMarshaller.Instance;
var unmarshaller = StopLoggingResponseUnmarshaller.Instance;
return Invoke<StopLoggingRequest,StopLoggingResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the StopLogging operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StopLogging operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
public virtual Task<StopLoggingResponse> StopLoggingAsync(StopLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = StopLoggingRequestMarshaller.Instance;
var unmarshaller = StopLoggingResponseUnmarshaller.Instance;
return InvokeAsync<StopLoggingRequest,StopLoggingResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
#region UpdateTrail
/// <summary>
/// Updates the settings that specify delivery of log files. Changes to a trail do not
/// require stopping the CloudTrail service. Use this action to designate an existing
/// bucket for log delivery. If the existing bucket has previously been a target for CloudTrail
/// log files, an IAM policy exists for the bucket. <code>UpdateTrail</code> must be called
/// from the region in which the trail was created; otherwise, an <code>InvalidHomeRegionException</code>
/// is thrown.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail service method.</param>
///
/// <returns>The response from the UpdateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between AWS CloudTrail
/// and AWS Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other AWS Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM user or role that is used to create the organization
/// trail is lacking one or more required permissions for creating an organization trail
/// in a required service. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a region other
/// than the region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is invalid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are invalid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail can’t be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is deprecated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, or when the S3 bucket and
/// the KMS key are not in the same region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the AWS account making the request to create or update
/// an organization trail is not the master account for an organization in AWS Organizations.
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when AWS Organizations is not configured to support all features.
/// All features must be enabled in AWS Organization to support creating an organization
/// trail. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an AWS account that is not
/// a member of an organization. To make this request, sign in using the credentials of
/// an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is deprecated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
public virtual UpdateTrailResponse UpdateTrail(UpdateTrailRequest request)
{
var marshaller = UpdateTrailRequestMarshaller.Instance;
var unmarshaller = UpdateTrailResponseUnmarshaller.Instance;
return Invoke<UpdateTrailRequest,UpdateTrailResponse>(request, marshaller, unmarshaller);
}
/// <summary>
/// Initiates the asynchronous execution of the UpdateTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail operation.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
/// <returns>The task object representing the asynchronous operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
public virtual Task<UpdateTrailResponse> UpdateTrailAsync(UpdateTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = UpdateTrailRequestMarshaller.Instance;
var unmarshaller = UpdateTrailResponseUnmarshaller.Instance;
return InvokeAsync<UpdateTrailRequest,UpdateTrailResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
#endregion
}
} | 53.30068 | 194 | 0.642926 | [
"Apache-2.0"
] | DalavanCloud/aws-sdk-net | sdk/src/Services/CloudTrail/Generated/_bcl45/AmazonCloudTrailClient.cs | 94,133 | C# |
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Essensoft.AspNetCore.Payment.Alipay.Domain
{
/// <summary>
/// AntMerchantExpandItemSecurityModifyModel Data Structure.
/// </summary>
[Serializable]
public class AntMerchantExpandItemSecurityModifyModel : AlipayObject
{
/// <summary>
/// 商品描述
/// </summary>
[JsonProperty("description")]
public string Description { get; set; }
/// <summary>
/// 商品所属前台类目ID列表(会和商品已存在所属前台类目做差异化比较后做增删操作)
/// </summary>
[JsonProperty("front_category_id_list")]
public List<string> FrontCategoryIdList { get; set; }
/// <summary>
/// 商品ID
/// </summary>
[JsonProperty("item_id")]
public string ItemId { get; set; }
/// <summary>
/// 商品素材列表(会和商品已存在素材做差异化比较后做增删改操作)
/// </summary>
[JsonProperty("material_list")]
public List<MaterialModifyInfo> MaterialList { get; set; }
/// <summary>
/// 商品名称
/// </summary>
[JsonProperty("name")]
public string Name { get; set; }
/// <summary>
/// 商品属性列表(覆盖商品已存在属性)
/// </summary>
[JsonProperty("property_list")]
public List<ItemPropertyInfo> PropertyList { get; set; }
/// <summary>
/// SKU列表(会和商品已存在SKU做差异化比较后做增删改操作)
/// </summary>
[JsonProperty("sku_list")]
public List<SkuModifyInfo> SkuList { get; set; }
/// <summary>
/// 商品状态:EFFECT(有效)、INVALID(无效)
/// </summary>
[JsonProperty("status")]
public string Status { get; set; }
/// <summary>
/// 商品类型:STANDARD_GOODS(标品)、NON_STANDARD_GOODS(非标品)
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
}
| 27.441176 | 72 | 0.557342 | [
"MIT"
] | lotosbin/payment | src/Essensoft.AspNetCore.Payment.Alipay/Domain/AntMerchantExpandItemSecurityModifyModel.cs | 2,162 | C# |
using Android.App;
using Android.Graphics;
using Android.Hardware.Camera2;
using Android.Hardware.Camera2.Params;
using Android.Media;
using Android.OS;
using Android.Util;
using Android.Views;
using Android.Widget;
using ApxLabs.FastAndroidCamera;
using BuildIt.Forms.Controls;
using BuildIt.Forms.Controls.Extensions;
using BuildIt.Forms.Controls.Interfaces;
using BuildIt.Forms.Controls.Platforms.Android;
using BuildIt.Forms.Controls.Platforms.Android.Extensions;
using BuildIt.Forms.Parameters;
using Java.Lang;
using Java.Util;
using Java.Util.Concurrent;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
using Application = Android.App.Application;
using CameraPreviewStopParameters = BuildIt.Forms.Controls.Platforms.Android.Models.CameraPreviewStopParameters;
using Context = Android.Content.Context;
using Semaphore = Java.Util.Concurrent.Semaphore;
#pragma warning disable 618
[assembly: ExportRenderer(typeof(CameraPreviewControl), typeof(CameraPreviewControlRenderer))]
namespace BuildIt.Forms.Controls.Platforms.Android
{
/// <summary>
/// Custom Renderer for <see cref="CameraPreviewControl"/>.
/// </summary>
public class CameraPreviewControlRenderer : FrameRenderer, TextureView.ISurfaceTextureListener, INonMarshalingPreviewCallback, Application.IActivityLifecycleCallbacks
{
// Camera state: Showing camera preview.
internal const int StatePreview = 0;
// Camera state: Waiting for the focus to be locked.
internal const int StateWaitingLock = 1;
// Camera state: Waiting for the exposure to be precapture state.
internal const int StateWaitingPrecapture = 2;
// Camera state: Waiting for the exposure state to be something other than precapture.
internal const int StateWaitingNonPrecapture = 3;
// Camera state: Picture was taken.
internal const int StatePictureTaken = 4;
private const string ImageCapture = "ImageCapture";
private const int CameraFocusCheckDelayInMiliseconds = 100;
// Max preview height that is guaranteed by Camera2 API
private static readonly int MaxPreviewHeight = 1080;
// Max preview width that is guaranteed by Camera2 API
private static readonly int MaxPreviewWidth = 1920;
private static readonly SparseIntArray Orientations = new SparseIntArray();
private readonly SemaphoreSlim stopCameraPreviewSemaphoreSlim = new SemaphoreSlim(1);
private readonly SemaphoreSlim tryFocusingSemaphoreSlim = new SemaphoreSlim(1);
private TaskCompletionSource<bool> autoFocusedCompletionSourceTask;
// An additional thread for running tasks that shouldn't block the UI.
private HandlerThread backgroundThread;
private global::Android.Hardware.Camera camera;
private string cameraId;
private CameraPreviewControl cameraPreviewControl;
private global::Android.Hardware.CameraFacing cameraType;
private bool flashSupported;
private ImageAvailableListener imageAvailableListener;
private ImageScanCompletedListener imageScanCompletedListener;
private ImageReader imageReader;
private LensFacing lensFacing;
// The size of the camera preview
private global::Android.Util.Size previewSize;
private int sensorOrientation;
// CameraDevice.StateListener is called when a CameraDevice changes its state
private CameraStateListener stateCallback;
private CaptureRequest.Builder stillCaptureBuilder;
private SurfaceTexture surfaceTexture;
private Camera2BasicSurfaceTextureListener surfaceTextureListener;
private AutoFitTextureView textureView;
private bool useCamera2Api;
private global::Android.Views.View view;
private int textureWidth;
private int textureHeight;
/// <summary>
/// Initializes a new instance of the <see cref="CameraPreviewControlRenderer"/> class.
/// </summary>
/// <param name="context"><see cref="Context"/>.</param>
public CameraPreviewControlRenderer(Context context)
: base(context)
{
Activity.Application.RegisterActivityLifecycleCallbacks(this);
}
// A handler for running tasks in the background.
public Handler BackgroundHandler { get; set; }
// A reference to the opened CameraDevice
public CameraDevice CameraDevice { get; set; }
public Semaphore CameraOpenCloseLock { get; } = new Semaphore(1);
public CameraCaptureListener CaptureCallback { get; private set; }
// A capture session for camera preview.
public CameraCaptureSession CaptureSession { get; set; }
public CaptureRequest PreviewRequest { get; internal set; }
public CaptureRequest.Builder PreviewRequestBuilder { get; private set; }
public int State { get; set; } = StatePreview;
public ControlAFState CurrentFocusState { get; set; } = ControlAFState.Inactive;
internal Activity Activity => Context as Activity;
internal CameraFocusMode DesiredFocusMode => cameraPreviewControl?.FocusMode ?? default(CameraFocusMode);
public void CaptureStillPicture()
{
try
{
if (Activity == null || CameraDevice == null)
{
return;
}
// This is the CaptureRequest.Builder that we use to take a picture.
if (stillCaptureBuilder == null)
{
stillCaptureBuilder = CameraDevice.CreateCaptureRequest(CameraTemplate.StillCapture);
}
stillCaptureBuilder.AddTarget(imageReader.Surface);
// Use the same AE and AF modes as the preview.
var currentFocusMode = (int)PreviewRequestBuilder.Get(CaptureRequest.ControlAfMode);
var currentFlashMode = (int)PreviewRequestBuilder.Get(CaptureRequest.ControlAeMode);
stillCaptureBuilder.Set(CaptureRequest.ControlAfMode, currentFocusMode);
stillCaptureBuilder.Set(CaptureRequest.ControlAeMode, currentFlashMode);
// Orientation
var rotation = (int)Activity.WindowManager.DefaultDisplay.Rotation;
stillCaptureBuilder.Set(CaptureRequest.JpegOrientation, GetOrientation(rotation));
CaptureSession.StopRepeating();
CaptureSession.Capture(stillCaptureBuilder.Build(), new CameraCaptureStillPictureSessionCallback(this), null);
}
catch (CameraAccessException e)
{
e.PrintStackTrace();
}
}
public void CreateCameraPreviewSession()
{
try
{
SurfaceTexture texture = textureView.SurfaceTexture;
if (texture == null)
{
throw new IllegalStateException("texture is null");
}
// We configure the size of default buffer to be the size of camera preview we want.
texture.SetDefaultBufferSize(previewSize.Width, previewSize.Height);
// This is the output Surface we need to start preview.
Surface surface = new Surface(texture);
// We set up a CaptureRequest.Builder with the output Surface.
PreviewRequestBuilder = CameraDevice.CreateCaptureRequest(CameraTemplate.Preview);
PreviewRequestBuilder.AddTarget(surface);
PreviewRequestBuilder.AddTarget(imageReader.Surface);
// Need this here as add the image reader surface would affect the orientation of jpeg capture
// TODO: handle orientation changes
int rotation = (int)Activity.WindowManager.DefaultDisplay.Rotation;
PreviewRequestBuilder.Set(CaptureRequest.JpegOrientation, GetOrientation(rotation));
SetCamera2FocusMode(cameraPreviewControl.FocusMode);
// Here, we create a CameraCaptureSession for camera preview.
var surfaces = new List<Surface>();
surfaces.Add(surface);
surfaces.Add(imageReader.Surface);
CameraDevice.CreateCaptureSession(surfaces, new CameraCaptureSessionCallback(this), null);
}
catch (CameraAccessException e)
{
e.PrintStackTrace();
}
}
public void OnActivityCreated(Activity activity, Bundle savedInstanceState)
{
}
public void OnActivityDestroyed(Activity activity)
{
}
public void OnActivityPaused(Activity activity)
{
if (useCamera2Api &&
cameraPreviewControl != null &&
cameraPreviewControl.Status == CameraStatus.Started)
{
CloseCamera();
cameraPreviewControl.SetStatus(CameraStatus.Paused);
StopBackgroundThread();
}
}
public void OnActivityResumed(Activity activity)
{
if (!useCamera2Api)
{
return;
}
StartBackgroundThread();
if (textureView == null || (cameraPreviewControl != null && cameraPreviewControl.Status != CameraStatus.Paused))
{
return;
}
// When the screen is turned off and turned back on, the SurfaceTexture is already
// available, and "onSurfaceTextureAvailable" will not be called. In that case, we can open
// a camera and start preview from here (otherwise, we wait until the surface is ready in
// the SurfaceTextureListener).
if (textureView.IsAvailable)
{
OpenCamera(textureView.Width, textureView.Height);
}
else
{
textureView.SurfaceTextureListener = surfaceTextureListener;
}
}
public void OnActivitySaveInstanceState(Activity activity, Bundle outState)
{
}
public void OnActivityStarted(Activity activity)
{
}
public void OnActivityStopped(Activity activity)
{
}
public async void OnPreviewFrame(IntPtr data, global::Android.Hardware.Camera camera)
{
if ((cameraPreviewControl != null &&
cameraPreviewControl.Status != CameraStatus.Started) ||
!await stopCameraPreviewSemaphoreSlim.WaitAsync(0))
{
return;
}
try
{
using (var buffer = new FastJavaByteArray(data))
{
// TODO: see if this can be optimised
var jpegBytes = ConvertYuvToJpeg(buffer, camera);
await cameraPreviewControl.OnMediaFrameArrived(new MediaFrame(jpegBytes));
// finished with this frame, process the next one
camera.AddCallbackBuffer(buffer);
}
}
finally
{
stopCameraPreviewSemaphoreSlim.Release();
}
}
/// <inheritdoc />
public void OnSurfaceTextureAvailable(SurfaceTexture surface, int width, int height)
{
textureWidth = width;
textureHeight = height;
surfaceTexture = surface;
}
/// <inheritdoc />
public bool OnSurfaceTextureDestroyed(SurfaceTexture surface)
{
if (!useCamera2Api && cameraPreviewControl != null && cameraPreviewControl.Status == CameraStatus.Started)
{
var parameters = new CameraPreviewStopParameters(status: CameraStatus.Paused);
StopCameraPreview(parameters).ConfigureAwait(true);
}
return true;
}
/// <inheritdoc />
public void OnSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height)
{
if (useCamera2Api ||
camera == null ||
cameraPreviewControl == null ||
cameraPreviewControl.Status != CameraStatus.Started)
{
return;
}
camera.StopPreview();
PrepareAndStartCamera();
}
/// <inheritdoc />
public void OnSurfaceTextureUpdated(SurfaceTexture surface)
{
}
// Run the precapture sequence for capturing a still image. This method should be called when
// we get a response in {@link #mCaptureCallback} from {@link #lockFocus()}.
public void RunPrecaptureSequence()
{
try
{
// This is how to tell the camera to trigger.
PreviewRequestBuilder.Set(CaptureRequest.ControlAePrecaptureTrigger, (int)ControlAEPrecaptureTrigger.Start);
// Tell #mCaptureCallback to wait for the precapture sequence to be set.
State = StateWaitingPrecapture;
CaptureSession.Capture(PreviewRequestBuilder.Build(), CaptureCallback, BackgroundHandler);
}
catch (CameraAccessException e)
{
e.PrintStackTrace();
}
}
public void SetAutoFlash(CaptureRequest.Builder requestBuilder)
{
if (flashSupported)
{
requestBuilder.Set(CaptureRequest.ControlAeMode, (int)ControlAEMode.OnAutoFlash);
}
}
public void HandleCaptureCompleted()
{
try
{
// After this, the camera will go back to the normal state of preview.
State = StatePreview;
CaptureSession.SetRepeatingRequest(PreviewRequestBuilder.Build(), CaptureCallback, BackgroundHandler);
}
catch (CameraAccessException e)
{
e.PrintStackTrace();
}
}
public IReadOnlyList<CameraFocusMode> RetrieveCamera2SupportedFocusModes()
{
if (CameraDevice == null)
{
return new List<CameraFocusMode>();
}
var supportedFocusModes = new List<CameraFocusMode>();
var manager = (CameraManager)Activity.GetSystemService(Context.CameraService);
var cameraCharacteristics = manager.GetCameraCharacteristics(CameraDevice.Id);
var focusModes = cameraCharacteristics.Get(CameraCharacteristics.ControlAfAvailableModes).ToArray<int>();
foreach (var focusMode in focusModes)
{
supportedFocusModes.Add(((ControlAFMode)focusMode).ToControlFocusMode());
}
var capabilities = cameraCharacteristics.Get(CameraCharacteristics.RequestAvailableCapabilities).ToArray<int>();
if (capabilities.Any(c => c == (int)RequestAvailableCapabilities.ManualSensor))
{
supportedFocusModes.Add(CameraFocusMode.Manual);
}
return supportedFocusModes.AsReadOnly();
}
public IReadOnlyList<CameraFocusMode> RetrieveSupportedFocusModes()
{
var supportedFocusModes = new List<CameraFocusMode>();
var cameraParameters = camera.GetParameters();
if (cameraParameters != null)
{
foreach (var supportedFocusMode in cameraParameters.SupportedFocusModes)
{
switch (supportedFocusMode)
{
case global::Android.Hardware.Camera.Parameters.FocusModeAuto:
supportedFocusModes.Add(CameraFocusMode.Auto);
break;
case global::Android.Hardware.Camera.Parameters.FocusModeContinuousPicture:
supportedFocusModes.Add(CameraFocusMode.Continuous);
break;
}
}
}
// manual focus isn't a mode exposed by Android with the old Camera API but achieved through
// various method calls so should work
supportedFocusModes.Add(CameraFocusMode.Manual);
return supportedFocusModes;
}
internal void ConfigureTransform(int viewWidth, int viewHeight)
{
if (textureView == null || previewSize == null || Activity == null)
{
return;
}
var rotation = (int)Activity.WindowManager.DefaultDisplay.Rotation;
Matrix matrix = new Matrix();
RectF viewRect = new RectF(0, 0, viewWidth, viewHeight);
RectF bufferRect = new RectF(0, 0, previewSize.Height, previewSize.Width);
float centerX = viewRect.CenterX();
float centerY = viewRect.CenterY();
if (rotation == (int)SurfaceOrientation.Rotation90 || rotation == (int)SurfaceOrientation.Rotation270)
{
bufferRect.Offset(centerX - bufferRect.CenterX(), centerY - bufferRect.CenterY());
matrix.SetRectToRect(viewRect, bufferRect, Matrix.ScaleToFit.Fill);
float scale = System.Math.Max((float)viewHeight / previewSize.Height, (float)viewWidth / previewSize.Width);
matrix.PostScale(scale, scale, centerX, centerY);
matrix.PostRotate(90 * (rotation - 2), centerX, centerY);
}
else if (rotation == (int)SurfaceOrientation.Rotation180)
{
matrix.PostRotate(180, centerX, centerY);
}
textureView.SetTransform(matrix);
}
internal async Task OnMediaFrameArrived(byte[] jpegBytes)
{
await cameraPreviewControl.OnMediaFrameArrived(new MediaFrame(jpegBytes));
}
internal void OpenCamera(int width, int height)
{
if (cameraPreviewControl == null ||
cameraPreviewControl.Status == CameraStatus.None ||
cameraPreviewControl.Status == CameraStatus.Started)
{
return;
}
CameraDevice?.Close();
CameraDevice = null;
SetUpCameraOutputs(width, height);
ConfigureTransform(width, height);
var errorOccurred = false;
var manager = (CameraManager)Context.GetSystemService(Context.CameraService);
try
{
if (!CameraOpenCloseLock.TryAcquire(2500, TimeUnit.Milliseconds))
{
cameraPreviewControl.RaiseErrorOpeningCamera();
return;
}
manager.OpenCamera(cameraId, stateCallback, BackgroundHandler);
cameraPreviewControl.SetStatus(CameraStatus.Started);
}
catch (CameraAccessException e)
{
// in case camera is disabled, disconnected or already in use
errorOccurred = true;
e.PrintStackTrace();
}
catch (InterruptedException e)
{
// in case an interruption occurred while trying to lock the camera
e.PrintStackTrace();
errorOccurred = true;
}
catch (Java.Lang.Exception e)
{
// in case any other error occurred, which may be because permissions have been granted yet
e.PrintStackTrace();
errorOccurred = true;
}
if (errorOccurred)
{
cameraPreviewControl.RaiseErrorOpeningCamera();
}
}
internal void SaveToPhotosLibrary(Java.IO.File file)
{
var uri = global::Android.Net.Uri.FromFile(file);
MediaScannerConnection.ScanFile(Context, new[] { uri.Path }, null, imageScanCompletedListener);
}
internal void RaiseErrorOpening()
{
cameraPreviewControl.RaiseErrorOpeningCamera();
}
protected async Task<string> CaptureCamera2PhotoToFile(bool saveToPhotosLibrary)
{
imageAvailableListener.FilePath = BuildFilePath();
imageAvailableListener.SaveToPhotosLibrary = saveToPhotosLibrary;
imageAvailableListener.SavePhotoTaskCompletionSource = new TaskCompletionSource<string>();
CaptureCamera2PhotoAndLockFocus();
var finalFilePath = await imageAvailableListener.SavePhotoTaskCompletionSource.Task;
if (saveToPhotosLibrary)
{
using (var file = new Java.IO.File(finalFilePath))
{
SaveToPhotosLibrary(file);
}
}
return finalFilePath;
}
/// <summary>
/// Captures the most current video frame to a photo and saves it to local storage. Requires 'android.permission.WRITE_EXTERNAL_STORAGE' in manifest.
/// </summary>
/// <param name="saveToPhotosLibrary">Whether or not to add the file to the device's photo library.</param>
/// <returns>The path to the saved photo file.</returns>
protected virtual async Task<string> CapturePhotoToFile(bool saveToPhotosLibrary)
{
camera.StopPreview();
var image = textureView.Bitmap;
try
{
string filePath = BuildFilePath();
var fileStream = new FileStream(filePath, FileMode.Create);
await image.CompressAsync(Bitmap.CompressFormat.Jpeg, 50, fileStream);
fileStream.Close();
image.Recycle();
if (saveToPhotosLibrary)
{
// Broadcasting the the file's Uri in the following intent will allow any Photo Gallery apps to incorporate
// the photo file into their collection -RR
using (var file = new Java.IO.File(filePath))
{
SaveToPhotosLibrary(file);
}
}
return filePath;
}
catch (System.Exception ex)
{
ex.LogError();
return ex.ToString();
}
finally
{
camera.StartPreview();
}
}
/// <inheritdoc />
protected override void OnElementChanged(ElementChangedEventArgs<Frame> e)
{
base.OnElementChanged(e);
var cpc = Element as CameraPreviewControl;
if (cpc == null)
{
return;
}
cameraPreviewControl = cpc;
useCamera2Api = Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop;
if (useCamera2Api)
{
cameraPreviewControl.StartPreviewFunc = StartCamera2Preview;
cameraPreviewControl.StopPreviewFunc = StopCamera2Preview;
cameraPreviewControl.SetFocusModeFunc = SetCamera2FocusMode;
cameraPreviewControl.TryFocusingFunc = TryFocusingCamera2Func;
cameraPreviewControl.RetrieveCamerasFunc = RetrieveCameras2;
cameraPreviewControl.RetrieveSupportedFocusModesFunc = RetrieveCamera2SupportedFocusModes;
cameraPreviewControl.CaptureNativeFrameToFileFunc = CaptureCamera2PhotoToFile;
stateCallback = new CameraStateListener(this);
CaptureCallback = new CameraCaptureListener(this);
imageAvailableListener = new ImageAvailableListener(this);
imageScanCompletedListener = new ImageScanCompletedListener();
surfaceTextureListener = new Camera2BasicSurfaceTextureListener(this);
// fill Orientations list
Orientations.Append((int)SurfaceOrientation.Rotation0, 90);
Orientations.Append((int)SurfaceOrientation.Rotation90, 0);
Orientations.Append((int)SurfaceOrientation.Rotation180, 270);
Orientations.Append((int)SurfaceOrientation.Rotation270, 180);
}
else
{
cameraPreviewControl.StartPreviewFunc = StartCameraPreview;
cameraPreviewControl.StopPreviewFunc = StopCameraPreview;
cameraPreviewControl.SetFocusModeFunc = SetCameraFocusMode;
cameraPreviewControl.RetrieveCamerasFunc = RetrieveCameras;
cameraPreviewControl.CaptureNativeFrameToFileFunc = CapturePhotoToFile;
cameraPreviewControl.RetrieveSupportedFocusModesFunc = RetrieveSupportedFocusModes;
}
try
{
SetupUserInterface();
AddView(view);
}
catch (System.Exception ex)
{
ex.LogError();
}
}
/// <inheritdoc />
protected override async void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
if (e.PropertyName == CameraPreviewControl.PreferredCameraProperty.PropertyName)
{
if (useCamera2Api)
{
await SwitchCamera2IfNecessary();
return;
}
await SwitchCameraIfNecessary();
}
else if (e.PropertyName == CameraPreviewControl.AspectProperty.PropertyName)
{
if (useCamera2Api)
{
ApplyAspectForCameraApi2();
}
else
{
ApplyAspect();
}
}
}
/// <inheritdoc />
protected override void OnLayout(bool changed, int l, int t, int r, int b)
{
base.OnLayout(changed, l, t, r, b);
var msw = MeasureSpec.MakeMeasureSpec(r - l, MeasureSpecMode.Exactly);
var msh = MeasureSpec.MakeMeasureSpec(b - t, MeasureSpecMode.Exactly);
view.Measure(msw, msh);
view.Layout(0, 0, r - l, b - t);
}
private void ApplyAspect()
{
var cameraParameters = camera.GetParameters();
var previewWidth = 0;
var previewHeight = 0;
var orientation = Resources.Configuration.Orientation;
if (orientation == global::Android.Content.Res.Orientation.Landscape)
{
previewWidth = cameraParameters.PreviewSize.Width;
previewHeight = cameraParameters.PreviewSize.Height;
}
else
{
previewWidth = cameraParameters.PreviewSize.Height;
previewHeight = cameraParameters.PreviewSize.Width;
}
switch (cameraPreviewControl.Aspect)
{
case Aspect.AspectFit:
if (textureWidth < (float)textureHeight * previewWidth / (float)previewHeight)
{
textureView.LayoutParameters = new FrameLayout.LayoutParams(textureWidth, textureWidth * previewHeight / previewWidth);
}
else
{
textureView.LayoutParameters = new FrameLayout.LayoutParams(textureHeight * previewWidth / previewHeight, textureHeight);
}
break;
case Aspect.AspectFill:
var previewAspectRatio = (double)previewWidth / previewHeight;
if (previewAspectRatio > 1)
{
// width > height, so keep the height but scale the width to meet aspect ratio
textureView.LayoutParameters = new FrameLayout.LayoutParams((int)(textureWidth * previewAspectRatio), textureHeight);
}
else if (previewAspectRatio < 1 && previewAspectRatio != 0)
{
// width < height
textureView.LayoutParameters = new FrameLayout.LayoutParams(textureWidth, (int)(textureHeight / previewAspectRatio));
}
else
{
// width == height
textureView.LayoutParameters = new FrameLayout.LayoutParams(textureWidth, textureHeight);
}
break;
case Aspect.Fill:
textureView.LayoutParameters = new FrameLayout.LayoutParams(textureWidth, textureHeight);
break;
}
}
private static string BuildFilePath()
{
var absolutePath = global::Android.OS.Environment.GetExternalStoragePublicDirectory(global::Android.OS.Environment.DirectoryDcim).AbsolutePath;
var folderPath = System.IO.Path.Combine(absolutePath, ImageCapture, DateTime.Now.ToString("yyyy-MM-dd"));
var fileCount = 0;
if (Directory.Exists(folderPath))
{
fileCount = Directory.GetFiles(folderPath).Length;
}
else
{
var directory = new Java.IO.File(folderPath);
directory.Mkdirs();
}
var filePath = System.IO.Path.Combine(folderPath, $"{fileCount}.jpg");
return filePath;
}
private static global::Android.Util.Size ChooseOptimalSize(global::Android.Util.Size[] choices, int textureViewWidth, int textureViewHeight, int maxWidth, int maxHeight, global::Android.Util.Size aspectRatio)
{
// Collect the supported resolutions that are at least as big as the preview Surface
var bigEnough = new List<global::Android.Util.Size>();
// Collect the supported resolutions that are smaller than the preview Surface
var notBigEnough = new List<global::Android.Util.Size>();
int w = aspectRatio.Width;
int h = aspectRatio.Height;
for (var i = 0; i < choices.Length; i++)
{
global::Android.Util.Size option = choices[i];
if ((option.Width <= maxWidth) && (option.Height <= maxHeight) &&
option.Height == option.Width * h / w)
{
if (option.Width >= textureViewWidth &&
option.Height >= textureViewHeight)
{
bigEnough.Add(option);
}
else
{
notBigEnough.Add(option);
}
}
}
// Pick the smallest of those big enough. If there is no one big enough, pick the
// largest of those not big enough.
if (bigEnough.Count > 0)
{
return (global::Android.Util.Size)Collections.Min(bigEnough, new CompareSizesByArea());
}
else if (notBigEnough.Count > 0)
{
return (global::Android.Util.Size)Collections.Max(notBigEnough, new CompareSizesByArea());
}
else
{
return choices[0];
}
}
private static Controls.CameraFacing ToCameraFacing(global::Android.Hardware.CameraFacing cameraFacing)
{
return cameraFacing == global::Android.Hardware.CameraFacing.Back ? Controls.CameraFacing.Back : Controls.CameraFacing.Front;
}
private static Controls.CameraFacing ToCameraFacing(LensFacing lensFacing)
{
switch (lensFacing)
{
case LensFacing.Back:
return Controls.CameraFacing.Back;
case LensFacing.Front:
return Controls.CameraFacing.Front;
default:
return Controls.CameraFacing.Unspecified;
}
}
private static global::Android.Hardware.CameraFacing ToCameraFacing(Controls.CameraFacing cameraFacing)
{
return cameraFacing == Controls.CameraFacing.Back
? global::Android.Hardware.CameraFacing.Back
: global::Android.Hardware.CameraFacing.Front;
}
private static LensFacing ToLensFacing(Controls.CameraFacing cameraFacing)
{
return cameraFacing == Controls.CameraFacing.Back ? LensFacing.Back :
LensFacing.Front;
}
private void CloseCamera()
{
try
{
CameraOpenCloseLock.Acquire();
if (CaptureSession != null)
{
CaptureSession.Close();
CaptureSession = null;
}
if (CameraDevice != null)
{
CameraDevice.Close();
CameraDevice = null;
}
if (imageReader != null)
{
imageReader.Close();
imageReader = null;
}
}
catch (InterruptedException e)
{
throw new RuntimeException("Interrupted while trying to lock camera closing.", e);
}
finally
{
CameraOpenCloseLock.Release();
}
}
private byte[] ConvertYuvToJpeg(IList<byte> yuvData, global::Android.Hardware.Camera camera)
{
// conversion code may be needed to work with the ML library
var cameraParameters = camera.GetParameters();
var width = cameraParameters.PreviewSize.Width;
var height = cameraParameters.PreviewSize.Height;
using (var yuv = new YuvImage(yuvData.ToArray(), cameraParameters.PreviewFormat, width, height, null))
{
var ms = new MemoryStream();
var quality = 100; // adjust this as needed
yuv.CompressToJpeg(new Rect(0, 0, width, height), quality, ms);
var jpegData = ms.ToArray();
return jpegData;
}
}
private void SetCameraFocusMode(CameraFocusMode controlFocusMode)
{
if (camera == null)
{
return;
}
var cameraParameters = camera.GetParameters();
var focusMode = RetrieveCameraFocusMode(controlFocusMode);
cameraParameters.FocusMode = focusMode;
camera.SetParameters(cameraParameters);
}
private string RetrieveCameraFocusMode(CameraFocusMode controlFocusMode)
{
var focusMode = global::Android.Hardware.Camera.Parameters.FocusModeFixed;
switch (controlFocusMode)
{
case CameraFocusMode.Auto:
focusMode = global::Android.Hardware.Camera.Parameters.FocusModeAuto;
break;
case CameraFocusMode.Continuous:
focusMode = global::Android.Hardware.Camera.Parameters.FocusModeContinuousPicture;
break;
}
var cameraParameters = camera.GetParameters();
var supportedModes = cameraParameters.SupportedFocusModes;
if (controlFocusMode == CameraFocusMode.Unspecified)
{
focusMode = supportedModes.FirstOrDefault();
}
else if (!supportedModes.Contains(focusMode))
{
focusMode = supportedModes.FirstOrDefault();
var fallbackFocusMode = focusMode.ToPlatformFocusMode();
cameraPreviewControl.ErrorCommand?.Execute(new CameraPreviewControlErrorParameters<CameraFocusMode>(new[] { string.Format(Common.Constants.Errors.UnsupportedFocusModeFormat, controlFocusMode, fallbackFocusMode) }, fallbackFocusMode, true));
}
return focusMode;
}
private void SetCamera2FocusMode(CameraFocusMode controlFocusMode)
{
if (CaptureSession == null || PreviewRequestBuilder == null)
{
return;
}
var newFocusMode = RetrieveCamera2FocusMode(controlFocusMode);
var currentFocusMode = (int)PreviewRequestBuilder.Get(CaptureRequest.ControlAfMode);
if ((int)newFocusMode == currentFocusMode)
{
return;
}
// MK I'm not perfectly sure if that's what needs to be done when switching from ContinuousPicture focus mode, while the camera preview is on
// I found in the docs https://source.android.com/devices/camera/camera3_3Amodes.html, that "Triggering locks focus once currently active sweep concludes"
// Triggering AF with "Start" seems to do the trick
if (currentFocusMode == (int)ControlAFMode.ContinuousPicture)
{
PreviewRequestBuilder.Set(CaptureRequest.ControlAfTrigger, (int)ControlAFTrigger.Start);
CaptureSession.Capture(PreviewRequestBuilder.Build(), CaptureCallback, BackgroundHandler);
}
CaptureSession.StopRepeating();
PreviewRequestBuilder.Set(CaptureRequest.ControlAfMode, (int)newFocusMode);
CaptureSession.SetRepeatingRequest(PreviewRequestBuilder.Build(), CaptureCallback, BackgroundHandler);
}
private ControlAFMode RetrieveCamera2FocusMode(CameraFocusMode controlFocusMode)
{
var focusMode = controlFocusMode.ToPlatformFocusMode();
var supportedModes = RetrieveCamera2SupportedFocusModes();
if (controlFocusMode == CameraFocusMode.Unspecified)
{
// Take the best available
focusMode = supportedModes.OrderBy(m => m)
.LastOrDefault()
.ToPlatformFocusMode();
}
else if (!supportedModes.Contains(controlFocusMode))
{
var fallbackFocusMode = supportedModes.LastOrDefault();
focusMode = fallbackFocusMode.ToPlatformFocusMode();
cameraPreviewControl.ErrorCommand?.Execute(new CameraPreviewControlErrorParameters<CameraFocusMode>(new[] { string.Format(Common.Constants.Errors.UnsupportedFocusModeFormat, controlFocusMode, fallbackFocusMode) }, fallbackFocusMode, true));
}
return focusMode;
}
private int GetOrientation(int rotation)
{
// Sensor orientation is 90 for most devices, or 270 for some devices (eg. Nexus 5X)
// We have to take that into account and rotate JPEG properly.
// For devices with orientation of 90, we simply return our mapping from ORIENTATIONS.
// For devices with orientation of 270, we need to rotate the JPEG 180 degrees.
return (Orientations.Get(rotation) + sensorOrientation + 270) % 360;
}
private void CaptureCamera2PhotoAndLockFocus()
{
if (CaptureSession == null ||
CurrentFocusState == ControlAFState.FocusedLocked ||
CurrentFocusState == ControlAFState.PassiveFocused)
{
// MK Inform CaptureCallback to execute waiting for the focus lock logic
State = StateWaitingLock;
return;
}
try
{
var currentFocusMode = (int)PreviewRequestBuilder.Get(CaptureRequest.ControlAfMode);
if (currentFocusMode == (int)ControlAFMode.ContinuousPicture)
{
// MK This is how to tell the camera to lock focus
PreviewRequestBuilder.Set(CaptureRequest.ControlAfTrigger, (int)ControlAFTrigger.Start);
CaptureSession.Capture(PreviewRequestBuilder.Build(), CaptureCallback, BackgroundHandler);
}
State = StateWaitingLock;
}
catch (CameraAccessException e)
{
e.PrintStackTrace();
}
}
private void PrepareAndStartCamera()
{
var display = Activity.WindowManager.DefaultDisplay;
if (display.Rotation == SurfaceOrientation.Rotation0)
{
camera.SetDisplayOrientation(90);
}
if (display.Rotation == SurfaceOrientation.Rotation270)
{
camera.SetDisplayOrientation(180);
}
var cameraParameters = camera.GetParameters();
int numBytes = cameraParameters.PreviewSize.Width * cameraParameters.PreviewSize.Height * ImageFormat.GetBitsPerPixel(cameraParameters.PreviewFormat) / 8;
using (FastJavaByteArray buffer = new FastJavaByteArray(numBytes))
{
// allocate new Java byte arrays for Android to use for preview frames
camera.AddCallbackBuffer(new FastJavaByteArray(numBytes));
}
SetCameraFocusMode(cameraPreviewControl.FocusMode);
camera.SetNonMarshalingPreviewCallback(this);
camera.StartPreview();
cameraPreviewControl.SetStatus(CameraStatus.Started);
}
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
private async Task StartCamera2Preview()
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
{
var width = (int)Element.Width;
var height = (int)Element.Height;
if (textureView?.IsAvailable ?? false)
{
width = textureView.Width;
height = textureView.Height;
}
OpenCamera(width, height);
}
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
private async Task StopCamera2Preview(ICameraPreviewStopParameters parameters)
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
{
CloseCamera();
if ((parameters as CameraPreviewStopParameters)?.StopBackgroundThread ?? true)
{
StopBackgroundThread();
}
cameraPreviewControl.SetStatus(CameraStatus.Stopped);
}
#pragma warning disable 1998 // Async method lacks 'await' operators and will run synchronously
private async Task SetCamera2FocusMode()
#pragma warning restore 1998 // Async method lacks 'await' operators and will run synchronously
{
if (cameraPreviewControl == null)
{
return;
}
SetCamera2FocusMode(cameraPreviewControl.FocusMode);
}
private async Task<bool> TryFocusingCamera2Func()
{
if (PreviewRequestBuilder == null)
{
return false;
}
var currentFocusMode = (int)PreviewRequestBuilder.Get(CaptureRequest.ControlAfMode);
if (currentFocusMode == (int)ControlAFMode.ContinuousPicture ||
currentFocusMode == (int)ControlAFMode.ContinuousVideo)
{
return false;
}
try
{
await tryFocusingSemaphoreSlim.WaitAsync();
autoFocusedCompletionSourceTask = new TaskCompletionSource<bool>();
StartCameraFocusSetCheckTask();
// MK Code based on the docs https://developer.android.com/reference/android/hardware/camera2/CaptureResult#CONTROL_AF_STATE
// and StackOverflow answer https://stackoverflow.com/a/42158047/510627
PreviewRequestBuilder.Set(CaptureRequest.ControlAfTrigger, (int)ControlAFTrigger.Start);
CaptureSession?.Capture(PreviewRequestBuilder.Build(), CaptureCallback, BackgroundHandler);
CaptureSession?.StopRepeating();
PreviewRequestBuilder.Set(CaptureRequest.ControlAfTrigger, (int)ControlAFTrigger.Idle);
CaptureSession?.SetRepeatingRequest(PreviewRequestBuilder.Build(), CaptureCallback, BackgroundHandler);
return await autoFocusedCompletionSourceTask.Task;
}
catch (System.Exception ex)
{
cameraPreviewControl.ErrorCommand?.Execute(new CameraPreviewControlErrorParameters(new[] { Common.Constants.Errors.CameraFocusingFailed, ex.Message }));
ex.LogError();
}
finally
{
autoFocusedCompletionSourceTask = null;
tryFocusingSemaphoreSlim.Release();
}
return false;
}
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
private async Task<IReadOnlyList<ICamera>> RetrieveCameras2()
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
{
var cameras = new List<ICamera>();
var manager = (CameraManager)Activity.GetSystemService(Context.CameraService);
var cameraIdList = manager.GetCameraIdList();
for (var i = 0; i < cameraIdList.Length; i++)
{
var cameraId = cameraIdList[i];
CameraCharacteristics characteristics = manager.GetCameraCharacteristics(cameraId);
var facing = (LensFacing)(int)characteristics.Get(CameraCharacteristics.LensFacing);
var camera = new Camera()
{
Id = cameraId,
CameraFacing = ToCameraFacing(facing),
};
cameras.Add(camera);
}
return cameras.AsReadOnly();
}
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
private async Task StartCameraPreview()
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
{
if (surfaceTexture == null)
{
RaiseErrorOpening();
}
camera = global::Android.Hardware.Camera.Open((int)cameraType);
ApplyAspect();
camera.SetPreviewTexture(surfaceTexture);
PrepareAndStartCamera();
}
#pragma warning disable 1998
private async Task<bool> TryFocusingCameraFunc()
#pragma warning restore 1998
{
// MK AutoFocus has been deprecated in API level 21 https://developer.android.com/reference/android/hardware/Camera.AutoFocusCallback
if (cameraPreviewControl == null || cameraPreviewControl.FocusMode != CameraFocusMode.Auto || Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
{
return false;
}
camera?.AutoFocus(null);
return true;
}
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
private async Task StopCameraPreview(ICameraPreviewStopParameters parameters)
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
{
try
{
await stopCameraPreviewSemaphoreSlim.WaitAsync();
camera?.StopPreview();
camera?.Release();
cameraPreviewControl.SetStatus((parameters as CameraPreviewStopParameters)?.Status ?? CameraStatus.Stopped);
}
finally
{
stopCameraPreviewSemaphoreSlim.Release();
}
}
#pragma warning disable 1998
private async Task SetCameraFocusMode()
#pragma warning restore 1998
{
if (cameraPreviewControl == null)
{
return;
}
SetCameraFocusMode(cameraPreviewControl.FocusMode);
}
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
private async Task<IReadOnlyList<ICamera>> RetrieveCameras()
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
{
var cameras = new List<ICamera>();
for (var i = 0; i < global::Android.Hardware.Camera.NumberOfCameras; i++)
{
var cameraInfo = new global::Android.Hardware.Camera.CameraInfo();
global::Android.Hardware.Camera.GetCameraInfo(i, cameraInfo);
var camera = new Camera()
{
Id = i.ToString(),
CameraFacing = ToCameraFacing(cameraInfo.Facing),
};
cameras.Add(camera);
}
return cameras.AsReadOnly();
}
private void SetUpCameraOutputs(int width, int height)
{
var manager = (CameraManager)Activity.GetSystemService(Context.CameraService);
try
{
var cameraIdList = manager.GetCameraIdList();
for (var i = 0; i < cameraIdList.Length; i++)
{
var cameraId = cameraIdList[i];
CameraCharacteristics characteristics = manager.GetCameraCharacteristics(cameraId);
var facing = (int)characteristics.Get(CameraCharacteristics.LensFacing);
if (facing != (int)lensFacing)
{
continue;
}
var map = (StreamConfigurationMap)characteristics.Get(CameraCharacteristics.ScalerStreamConfigurationMap);
if (map == null)
{
continue;
}
// For still image captures, we use the largest available size.
global::Android.Util.Size largest = (global::Android.Util.Size)Collections.Max(
Arrays.AsList(map.GetOutputSizes((int)ImageFormatType.Jpeg)),
new CompareSizesByArea());
imageReader = ImageReader.NewInstance(largest.Width, largest.Height, ImageFormatType.Jpeg, 2);
imageReader.SetOnImageAvailableListener(imageAvailableListener, BackgroundHandler);
sensorOrientation = (int)characteristics.Get(CameraCharacteristics.SensorOrientation);
global::Android.Graphics.Point displaySize = new global::Android.Graphics.Point();
Activity.WindowManager.DefaultDisplay.GetSize(displaySize);
var rotatedPreviewWidth = width;
var rotatedPreviewHeight = height;
var maxPreviewWidth = displaySize.X;
var maxPreviewHeight = displaySize.Y;
bool swappedDimensions = SwappedDimensions();
if (swappedDimensions)
{
rotatedPreviewWidth = height;
rotatedPreviewHeight = width;
maxPreviewWidth = displaySize.Y;
maxPreviewHeight = displaySize.X;
}
if (maxPreviewWidth > MaxPreviewWidth)
{
maxPreviewWidth = MaxPreviewWidth;
}
if (maxPreviewHeight > MaxPreviewHeight)
{
maxPreviewHeight = MaxPreviewHeight;
}
// Danger, W.R.! Attempting to use too large a preview size could exceed the camera
// bus' bandwidth limitation, resulting in gorgeous previews but the storage of
// garbage capture data.
previewSize = ChooseOptimalSize(map.GetOutputSizes(Class.FromType(typeof(SurfaceTexture))), rotatedPreviewWidth, rotatedPreviewHeight, maxPreviewWidth, maxPreviewHeight, largest);
ApplyAspectForCameraApi2();
// Check if the flash is supported.
var available = (Java.Lang.Boolean)characteristics.Get(CameraCharacteristics.FlashInfoAvailable);
if (available == null)
{
flashSupported = false;
}
else
{
flashSupported = (bool)available;
}
this.cameraId = cameraId;
return;
}
}
catch (CameraAccessException e)
{
e.PrintStackTrace();
}
catch (NullPointerException e)
{
e.PrintStackTrace();
}
}
private void ApplyAspectForCameraApi2()
{
// We fit the aspect ratio of TextureView to the size of preview we picked.
var orientation = Resources.Configuration.Orientation;
if (orientation == global::Android.Content.Res.Orientation.Landscape)
{
textureView.SetAspectRatio(cameraPreviewControl.Aspect, previewSize.Width, previewSize.Height);
}
else
{
textureView.SetAspectRatio(cameraPreviewControl.Aspect, previewSize.Height, previewSize.Width);
}
}
private bool SwappedDimensions()
{
var swappedDimensions = false;
// Find out if we need to swap dimension to get the preview size relative to sensor
// coordinate.
var displayRotation = Activity.WindowManager.DefaultDisplay.Rotation;
switch (displayRotation)
{
case SurfaceOrientation.Rotation0:
case SurfaceOrientation.Rotation180:
if (sensorOrientation == 90 || sensorOrientation == 270)
{
swappedDimensions = true;
}
break;
case SurfaceOrientation.Rotation90:
case SurfaceOrientation.Rotation270:
if (sensorOrientation == 0 || sensorOrientation == 180)
{
swappedDimensions = true;
}
break;
default:
break;
}
return swappedDimensions;
}
private void SetupUserInterface()
{
view = Activity.LayoutInflater.Inflate(Resource.Layout.CameraLayout, this, false);
lensFacing = ToLensFacing(cameraPreviewControl.PreferredCamera);
textureView = view.FindViewById<AutoFitTextureView>(Resource.Id.autoFitTextureView);
textureView.SurfaceTextureListener = this;
}
// Starts a background thread and its {@link Handler}.
private void StartBackgroundThread()
{
backgroundThread = new HandlerThread("CameraBackground");
backgroundThread.Start();
BackgroundHandler = new Handler(backgroundThread.Looper);
}
// Stops the background thread and its {@link Handler}.
private void StopBackgroundThread()
{
backgroundThread?.QuitSafely();
try
{
backgroundThread?.Join();
backgroundThread = null;
BackgroundHandler = null;
}
catch (InterruptedException e)
{
e.PrintStackTrace();
}
}
private async Task SwitchCamera2IfNecessary()
{
lensFacing = ToLensFacing(cameraPreviewControl.PreferredCamera);
var parameters = new CameraPreviewStopParameters(stopBackgroundThread: false);
await StopCamera2Preview(parameters);
cameraPreviewControl.SetStatus(CameraStatus.None);
cameraPreviewControl.SetStatus(CameraStatus.Starting);
await StartCamera2Preview();
}
private async Task SwitchCameraIfNecessary()
{
var newCameraType = ToCameraFacing(cameraPreviewControl.PreferredCamera);
if (newCameraType == cameraType)
{
return;
}
cameraType = newCameraType;
if (cameraPreviewControl != null &&
cameraPreviewControl.Status == CameraStatus.Started)
{
await StopCameraPreview(CameraPreviewStopParameters.Default);
}
cameraPreviewControl.SetStatus(CameraStatus.None);
cameraPreviewControl.SetStatus(CameraStatus.Starting);
await StartCameraPreview();
}
private void StartCameraFocusSetCheckTask()
{
Task.Run(async () =>
{
while (true)
{
if (CurrentFocusState == ControlAFState.FocusedLocked)
{
autoFocusedCompletionSourceTask?.SetResult(true);
break;
}
if (CurrentFocusState == ControlAFState.NotFocusedLocked)
{
autoFocusedCompletionSourceTask?.SetResult(false);
break;
}
// MK allow some time for the camera to focus
await Task.Delay(CameraFocusCheckDelayInMiliseconds);
}
});
}
}
} | 39.659401 | 256 | 0.580711 | [
"MIT"
] | builttoroam/BuildIt | src/BuildIt.Forms/BuildIt.Forms.Controls/Platforms/Android/CameraPreviewControlRenderer.cs | 58,222 | C# |
using Microsoft.Extensions.Hosting;
using System.Threading;
using System.Threading.Tasks;
namespace BackgroundTasksASPNETCore.Services
{
public class LifeTimeTaskService : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while(!stoppingToken.IsCancellationRequested)
{
// do some logic, for this example lets just wait for 2 seconds
await Task.Delay(2000);
}
}
}
}
| 27.368421 | 83 | 0.653846 | [
"MIT"
] | JakeDixon/background-services-with-asp-net-core | Services/LifeTimeTaskService.cs | 522 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TOUCH : MonoBehaviour
{
public string runname = "Player";
public GameObject todestroy;
public bool activateing = false;
void OnCollisionEnter2D(Collision2D coll)
{
if (coll.gameObject.name == runname)
{
todestroy.SetActive(activateing);
}
}
}
| 22.055556 | 45 | 0.667506 | [
"MIT"
] | Sharkbyteprojects/Wallracepaint | version 2/Scripts/TOUCH.cs | 399 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AMP.Models;
namespace AMP.Utilities
{
public class DemoIdentityManager : IIdentityManager
{
public Person GetPersonByUserName(string userName)
{
Person person;
switch (userName)
{
case "A-Inputter":
person = new Person
{
EmpNo = "111111",
Department = "Government Aid",
DisplayName = "An Inputter",
EmailAddress = "A-Inputter@AMPDemo.com",
UserName = "A-Inputter"
};
return person;
case "A-SRO":
person = new Person
{
EmpNo = "222222",
Department = "Government Aid",
DisplayName = "An SRO",
EmailAddress = "A-SRO@AMPDemo.com",
UserName = "A-SRO"
};
return person;
case "A-Adviser":
person = new Person
{
EmpNo = "333333",
Department = "Government Aid",
DisplayName = "An Adviser",
EmailAddress = "A-Adviser@AMPDemo.com",
UserName = "A-Adviser"
};
return person;
case "A-TeamMember":
person = new Person
{
EmpNo = "444444",
Department = "Government Aid",
DisplayName = "A TeamMember",
EmailAddress = "A-TeamMember@AMPDemo.com",
UserName = "A-TeamMember"
};
return person;
case "A-OfficeHead":
person = new Person
{
EmpNo = "555555",
Department = "Government Aid",
DisplayName = "A OfficeHead",
EmailAddress = "A-OfficeHead@AMPDemo.com",
UserName = "A-OfficeHead"
};
return person;
default:
return null;
}
}
}
} | 34.4 | 67 | 0.365504 | [
"MIT"
] | DFID/aid-management-platform | AMP/Utilities/DemoIdentityManager.cs | 2,582 | C# |
using System;
using System.Data.SqlClient;
using System.Drawing;
using System.Drawing.Printing;
using bv.common.Core;
using bv.model.BLToolkit;
using bv.model.Model.Core;
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
using eidss.model.Reports.TH;
using EIDSS.Reports.BaseControls.Report;
using EIDSS.Reports.Factory;
using EIDSS.Reports.Parameterized.Human.TH.DataSets;
namespace EIDSS.Reports.Parameterized.Human.TH.Reports
{
public sealed partial class NumberOfCasesDeathsMonthTHReport : BaseYearReport
{
private int m_Counter;
public NumberOfCasesDeathsMonthTHReport()
{
InitializeComponent();
HideBaseHeader();
}
public void SetParameters( NumberOfCasesDeathsMonthTHModel model, DbManagerProxy manager, DbManagerProxy archiveManager)
{
Utils.CheckNotNull(model, "model");
Utils.CheckNotNullOrEmpty(model.Language, "lang");
base.SetParameters(model, manager, archiveManager);
m_Counter = 0;
BindHeader(model);
DateTimeCell.Text = ReportRebinder.ToDateTimeString(DateTime.Now);
Action<SqlConnection, SqlTransaction> action = ((connection, transaction) =>
{
m_DataSet.EnforceConstraints = false;
m_Adapter.Connection = connection;
m_Adapter.Transaction = transaction;
m_Adapter.CommandTimeout = CommandTimeout;
m_Adapter.Fill(m_DataSet.NumberOfCasesTable,
model.Language,
model.Year,
model.Diagnoses.ToXml(),
model.Regions.ToXml(),
model.Zones.ToXml(),
model.Provinces.ToXml(),
model.CaseClassification);
});
FillDataTableWithArchive(action,
manager, archiveManager,
m_DataSet.NumberOfCasesTable,
model.Mode,
new[] {"idfReportingArea"},
new[] { "blnIsTotalOrSubtotal", "intOrder", "intOrderTotal" });
m_DataSet.NumberOfCasesTable.DefaultView.Sort = "intOrderTotal, intOrder";
ReportRtlHelper.SetRTL(this);
}
private void BindHeader(NumberOfCasesDeathsMonthTHModel model)
{
HeaderCell2.Text = string.Format(HeaderCell2.Text, model.Year+ DeltaYear);
if (model.Diagnoses.CheckedItems.Length == 0)
{
HeaderRow3.Visible = false;
}
else
{
HeaderCell3.Text = string.Format(HeaderCell3.Text, model.Diagnoses);
}
}
private void ReportingAreaCell_BeforePrint(object sender, PrintEventArgs e)
{
FormatCellAlignment(sender as XRTableCell);
FormatCellFont(sender as XRTableCell);
}
private void Cell_BeforePrint(object sender, PrintEventArgs e)
{
FormatCellFont(sender as XRTableCell);
}
private void LastCell_AfterPrint(object sender, EventArgs e)
{
m_Counter++;
}
private void FormatCellFont(XRTableCell cell)
{
if (cell == null)
{
return;
}
NumberOfCasesDeathsMonthTHDataSet.NumberOfCasesTableRow row = m_DataSet.NumberOfCasesTable[m_Counter];
FontStyle fontStyle = row.blnIsTotalOrSubtotal
? FontStyle.Bold
: FontStyle.Regular;
cell.Font = new Font(cell.Font, fontStyle);
}
private void FormatCellAlignment(XRTableCell cell)
{
if (cell == null)
{
return;
}
NumberOfCasesDeathsMonthTHDataSet.NumberOfCasesTableRow row = m_DataSet.NumberOfCasesTable[m_Counter];
cell.TextAlignment = row.blnIsTotalOrSubtotal
? TextAlignment.MiddleCenter
: TextAlignment.MiddleLeft;
}
}
} | 33.31746 | 129 | 0.577656 | [
"BSD-2-Clause"
] | EIDSS/EIDSS-Legacy | EIDSS v6.1/vb/EIDSS/EIDSS.Reports/Parameterized/Human/TH/Reports/NumberOfCasesDeathsMonthTHReport.cs | 4,198 | C# |
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AplicacaoCinema.Hosting.Atributos;
namespace AplicacaoCinema.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class EnforceHttpsController : ControllerBase
{
[RequireHttps]
[HttpGet("Sim")]
public IActionResult RecuperarHttps()
{
return Ok("Tudo Certo com https");
}
[HttpGet("Nao")]
public IActionResult Recuperar()
{
return Ok("Tudo Certo");
}
[RequireHttpsOrClose]
[HttpGet("ComErro")]
public IActionResult RecuperarSeguro()
{
return Ok("Tudo Certo Seguro");
}
}
}
| 20.027027 | 54 | 0.68691 | [
"MIT"
] | andresbosca/filmes | Controllers/EnforceHttpsController.cs | 743 | C# |
using NUnit.Framework;
using Rhino.Mocks;
using StoryTeller.Domain;
using StoryTeller.Testing;
using StoryTeller.UserInterface.Tests;
namespace StoryTeller.UserInterface.Testing.UI.Tests
{
[TestFixture]
public class EditTestControllerTester : InteractionContext<EditTestController>
{
private Test theTest;
protected override void beforeEach()
{
theTest = new Test("something");
Services.Inject(theTest);
}
[Test]
public void enabled_commands_when_the_test_is_not_queued_or_executing()
{
MockFor<ITestService>().Stub(x => x.GetStatus(theTest)).Return(TestState.NotQueued);
ClassUnderTest.EnableCommands();
ClassUnderTest.RunCommand.Enabled.ShouldBeTrue();
ClassUnderTest.CancelCommand.Enabled.ShouldBeFalse();
}
[Test]
public void enabled_commands_when_the_test_is_queued()
{
MockFor<ITestService>().Stub(x => x.GetStatus(theTest)).Return(TestState.Queued);
ClassUnderTest.EnableCommands();
ClassUnderTest.RunCommand.Enabled.ShouldBeFalse();
ClassUnderTest.CancelCommand.Enabled.ShouldBeTrue();
}
[Test]
public void enabled_commands_when_the_test_is_executing()
{
MockFor<ITestService>().Stub(x => x.GetStatus(theTest)).Return(TestState.Executing);
ClassUnderTest.EnableCommands();
ClassUnderTest.RunCommand.Enabled.ShouldBeFalse();
ClassUnderTest.CancelCommand.Enabled.ShouldBeTrue();
}
}
[TestFixture]
public class when_updating_the_screen_when_the_test_is_in_the_queue : InteractionContext<EditTestController>
{
private Test theTest;
protected override void beforeEach()
{
theTest = new Test("something");
Services.Inject(theTest);
MockFor<ITestService>().Stub(x => x.GetStatus(theTest)).Return(TestState.Queued);
ClassUnderTest.EnableCommands();
}
[Test]
public void cancel_should_be_enabled()
{
ClassUnderTest.CancelCommand.CanExecute(null).ShouldBeTrue();
}
[Test]
public void run_should_not_be_enabled()
{
ClassUnderTest.RunCommand.CanExecute(null).ShouldBeFalse();
}
}
[TestFixture]
public class when_updating_the_screen_when_the_test_is_not_in_the_queue : InteractionContext<EditTestController>
{
private Test theTest;
protected override void beforeEach()
{
theTest = new Test("something");
Services.Inject(theTest);
MockFor<ITestService>().Stub(x => x.GetStatus(theTest)).Return(TestState.NotQueued);
ClassUnderTest.EnableCommands();
}
[Test]
public void cancel_should_not_be_enabled()
{
ClassUnderTest.CancelCommand.CanExecute(null).ShouldBeFalse();
}
[Test]
public void run_should_be_enabled()
{
ClassUnderTest.RunCommand.CanExecute(null).ShouldBeTrue();
}
}
[TestFixture]
public class when_saving_the_test_successfully : InteractionContext<EditTestController>
{
private Test theTest;
protected override void beforeEach()
{
theTest = new Test("something");
Services.Inject(theTest);
MockFor<ITestPresenter>().Expect(x => x.ApplyChanges()).Return(true);
ClassUnderTest.SaveCommand.Execute(null);
}
[Test]
public void the_changes_should_have_been_applied()
{
MockFor<ITestPresenter>().VerifyAllExpectations();
}
[Test]
public void save_the_test()
{
MockFor<ITestService>().AssertWasCalled(x => x.Save(theTest));
}
[Test]
public void record_the_last_saved_version()
{
MockFor<ITestStateManager>().AssertWasCalled(x => x.RecordSnapshot());
}
}
[TestFixture]
public class when_saving_the_test_with_application_failures : InteractionContext<EditTestController>
{
private Test theTest;
protected override void beforeEach()
{
theTest = new Test("something");
Services.Inject(theTest);
MockFor<ITestPresenter>().Expect(x => x.ApplyChanges()).Return(false);
ClassUnderTest.SaveCommand.Execute(null);
}
[Test]
public void do_not_save_or_record_snapshot()
{
MockFor<ITestService>().AssertWasNotCalled(x => x.Save(theTest));
MockFor<ITestStateManager>().AssertWasNotCalled(x => x.RecordSnapshot());
}
}
[TestFixture]
public class when_running_the_test : InteractionContext<EditTestController>
{
private Test theTest;
protected override void beforeEach()
{
theTest = new Test("something");
Services.Inject(theTest);
Services.PartialMockTheClassUnderTest();
ClassUnderTest.Expect(x => x.SaveChanges()).Return(true);
ClassUnderTest.RunCommand.Execute(null);
}
[Test]
public void the_changes_should_have_been_applied_and_saved()
{
ClassUnderTest.VerifyAllExpectations();
}
[Test]
public void tell_the_test_service_to_enqueue_the_test()
{
MockFor<ITestService>().AssertWasCalled(x => x.QueueTest(theTest));
}
}
[TestFixture]
public class when_test_is_cancelled : InteractionContext<EditTestController>
{
private Test theTest;
protected override void beforeEach()
{
theTest = new Test("something");
Services.Inject(theTest);
ClassUnderTest.CancelCommand.Execute(null);
}
[Test]
public void the_test_should_be_cancelled()
{
MockFor<ITestService>().AssertWasCalled(x => x.CancelTest(theTest));
}
}
public abstract class TestControllerTestingExtensions : InteractionContext<EditTestController>
{
protected Test theTest;
protected sealed override void beforeEach()
{
theTest = new Test("something");
Services.Inject(theTest);
setUp();
}
protected abstract void setUp();
public void TheTestIsNotInTheExecutionQueue()
{
MockFor<ITestService>().Expect(x => x.GetStatus(theTest)).Return(TestState.NotQueued);
}
public void TheTestIsCurrentlyInTheExecutionQueue()
{
MockFor<ITestService>().Expect(x => x.GetStatus(theTest)).Return(TestState.Queued).Repeat.Any();
}
}
[TestFixture]
public class when_the_TestController_responds_to_the_test_being_executed : TestControllerTestingExtensions
{
protected override void setUp()
{
TheTestIsCurrentlyInTheExecutionQueue();
}
[Test]
public void run_should_not_be_enabled()
{
SpecificationExtensions.As<IListener<TestRunEvent>>(ClassUnderTest).Handle(new TestRunEvent(theTest, TestState.Executing));
ClassUnderTest.RunCommand.CanExecute(null).ShouldBeFalse();
}
[Test]
public void cancel_should_be_enabled()
{
SpecificationExtensions.As<IListener<TestRunEvent>>(ClassUnderTest).Handle(new TestRunEvent(theTest, TestState.Executing));
ClassUnderTest.CancelCommand.CanExecute(null).ShouldBeTrue();
}
}
} | 29.488889 | 136 | 0.603115 | [
"Apache-2.0"
] | DarthFubuMVC/storyteller | src/StoryTeller.UserInterface.Testing/UI/Tests/EditTestControllerTester.cs | 7,962 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.