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 |
|---|---|---|---|---|---|---|---|---|
// 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;
using System.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Editor.Implementation.NavigateTo;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Host.Mef;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.NavigateTo
{
[ExportWorkspaceServiceFactory(typeof(INavigateToPreviewService), ServiceLayer.Host), Shared]
internal sealed class VisualStudioNavigateToPreviewServiceFactory : IWorkspaceServiceFactory
{
private readonly Lazy<INavigateToPreviewService> _singleton =
new Lazy<INavigateToPreviewService>(() => new VisualStudioNavigateToPreviewService());
[ImportingConstructor]
public VisualStudioNavigateToPreviewServiceFactory()
{
}
public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices)
{
return _singleton.Value;
}
}
}
| 36.387097 | 98 | 0.763298 | [
"Apache-2.0"
] | HenrikWM/roslyn | src/VisualStudio/Core/Def/Implementation/NavigateTo/VisualStudioNavigateToPreviewServiceFactory.cs | 1,130 | C# |
using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
using MS.Core;
namespace System.Reflection
{
public static class __TypeFilter
{
public static IObservable<System.Boolean> Invoke(this IObservable<System.Reflection.TypeFilter> TypeFilterValue,
IObservable<System.Type> m, IObservable<System.Object> filterCriteria)
{
return Observable.Zip(TypeFilterValue, m, filterCriteria,
(TypeFilterValueLambda, mLambda, filterCriteriaLambda) =>
TypeFilterValueLambda.Invoke(mLambda, filterCriteriaLambda));
}
public static IObservable<System.IAsyncResult> BeginInvoke(
this IObservable<System.Reflection.TypeFilter> TypeFilterValue, IObservable<System.Type> m,
IObservable<System.Object> filterCriteria, IObservable<System.AsyncCallback> callback,
IObservable<System.Object> @object)
{
return Observable.Zip(TypeFilterValue, m, filterCriteria, callback, @object,
(TypeFilterValueLambda, mLambda, filterCriteriaLambda, callbackLambda, @objectLambda) =>
TypeFilterValueLambda.BeginInvoke(mLambda, filterCriteriaLambda, callbackLambda, @objectLambda));
}
public static IObservable<System.Boolean> EndInvoke(
this IObservable<System.Reflection.TypeFilter> TypeFilterValue, IObservable<System.IAsyncResult> result)
{
return Observable.Zip(TypeFilterValue, result,
(TypeFilterValueLambda, resultLambda) => TypeFilterValueLambda.EndInvoke(resultLambda));
}
}
} | 44.157895 | 120 | 0.700834 | [
"MIT"
] | RixianOpenTech/RxWrappers | Source/Wrappers/mscorlib/System.Reflection.TypeFilter.cs | 1,678 | C# |
using Duende.IdentityServer.Services;
using ECommerce.Services.Identity.Identity.Services;
using ECommerce.Services.Identity.Shared.Models;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
// Ref:https://www.scottbrady91.com/identity-server/getting-started-with-identityserver-4
namespace ECommerce.Services.Identity.Shared.Extensions.ServiceCollectionExtensions;
public static partial class ServiceCollectionExtensions
{
public static WebApplicationBuilder AddCustomIdentityServer(this WebApplicationBuilder builder)
{
AddCustomIdentityServer(builder.Services);
return builder;
}
public static IServiceCollection AddCustomIdentityServer(this IServiceCollection services)
{
services.AddScoped<IProfileService, IdentityProfileService>();
services.AddIdentityServer(options =>
{
options.Events.RaiseErrorEvents = true;
options.Events.RaiseInformationEvents = true;
options.Events.RaiseFailureEvents = true;
options.Events.RaiseSuccessEvents = true;
})
.AddDeveloperSigningCredential() // This is for dev only scenarios when you don’t have a certificate to use.
.AddInMemoryIdentityResources(IdentityServerConfig.IdentityResources)
.AddInMemoryApiResources(IdentityServerConfig.ApiResources)
.AddInMemoryApiScopes(IdentityServerConfig.ApiScopes)
.AddInMemoryClients(IdentityServerConfig.Clients)
.AddAspNetIdentity<ApplicationUser>()
.AddProfileService<IdentityProfileService>();
return services;
}
}
| 40.853659 | 120 | 0.734925 | [
"MIT"
] | BuiTanLan/ecommerce-microservices | src/Services/ECommerce.Services.Identity/ECommerce.Services.Identity/Shared/Extensions/ServiceCollectionExtensions/ServiceCollection.IdentityServer.cs | 1,677 | C# |
using Bb.Json.Jslt.Asts;
using Bb.Json.Jslt.Services;
using Newtonsoft.Json;
using System;
using System.IO;
using System.Text;
using System.Windows.Controls;
using System.Windows.Documents;
namespace AppJsonEvaluator
{
public static class Extensions
{
//public static void Load(this RichTextBox richTextBox, string filename)
//{
// TextRange textRange = richTextBox.GetRange();
// textRange.Text = System.IO.Path.Combine(Environment.CurrentDirectory, filename).LoadFile();
//}
//public static void Save(this RichTextBox richTextBox, string filename)
//{
// TextRange textRange = richTextBox.GetRange();
// System.IO.Path.Combine(Environment.CurrentDirectory, filename).WriteInFile(textRange.Text);
//}
public static TextRange GetRange(this RichTextBox richTextBox)
{
TextRange textRange = new TextRange(richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd);
return textRange;
}
public static T Deserialize<T>(this string self)
{
return JsonConvert.DeserializeObject<T>(self);
}
public static string Serialize<T>(this T self)
{
return JsonConvert.SerializeObject(self);
}
public static string LoadFile(this string filename)
{
return File.ReadAllText(filename);
}
public static void WriteInFile(this string self, string content)
{
if (File.Exists(self))
File.Delete(self);
byte[] array = System.Text.UTF8Encoding.UTF8.GetBytes(content);
using (var file = File.OpenWrite(self))
{
file.Write(array, 0, array.Length);
}
}
public static TemplateTransformProvider GetProvider(string[] paths, params Type[] services)
{
var configuration = new TranformJsonAstConfiguration();
configuration.Assemblies.Add(typeof(Bb.Jslt.Services.Services).Assembly);
if (paths != null)
foreach (var item in paths)
if (!string.IsNullOrEmpty(item))
configuration.Paths.Add(item);
foreach (var item in services)
configuration.Services.ServiceDiscovery.AddService(item);
TemplateTransformProvider Templateprovider = new TemplateTransformProvider(configuration);
return Templateprovider;
}
public static JsltTemplate GetTransformProvider(this string self, bool withDebug, string templatefilename, string[] paths, params Type[] services)
{
#if UNIT_TEST
StringBuilder sb = new StringBuilder(self.Replace('\'', '"').Replace('§', '\''));
#else
StringBuilder sb = new StringBuilder(self);
#endif
var provider = GetProvider(paths, services);
JsltTemplate template = provider.GetTemplate(sb, withDebug, templatefilename);
return template;
}
}
}
| 29.257143 | 154 | 0.622721 | [
"MIT"
] | Black-Beard-Sdk/jslt | src/Black.Beard.JsltEvaluator/Extensions.cs | 3,075 | C# |
using System.Collections.Generic;
namespace Ryujinx.Graphics.Gal.Shader
{
class ShaderIrBlock
{
public int Position { get; set; }
public int EndPosition { get; set; }
public ShaderIrBlock Next { get; set; }
public ShaderIrBlock Branch { get; set; }
public List<ShaderIrBlock> Sources { get; private set; }
public List<ShaderIrNode> Nodes { get; private set; }
public ShaderIrBlock(int position)
{
Position = position;
Sources = new List<ShaderIrBlock>();
Nodes = new List<ShaderIrNode>();
}
public void AddNode(ShaderIrNode node)
{
Nodes.Add(node);
}
public ShaderIrNode[] GetNodes()
{
return Nodes.ToArray();
}
public ShaderIrNode GetLastNode()
{
if (Nodes.Count > 0)
{
return Nodes[Nodes.Count - 1];
}
return null;
}
}
} | 22.130435 | 64 | 0.522593 | [
"Unlicense"
] | igorquintaes/Ryujinx | Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs | 1,018 | 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.
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.AspNetCore.E2ETesting;
using Newtonsoft.Json.Linq;
using OpenQA.Selenium;
using Templates.Test.Helpers;
using Xunit;
using Xunit.Abstractions;
// Turn off parallel test run for Edge as the driver does not support multiple Selenium tests at the same time
#if EDGE
[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)]
#endif
namespace Templates.Test.SpaTemplateTest
{
public class SpaTemplateTestBase : BrowserTestBase
{
public SpaTemplateTestBase(
ProjectFactoryFixture projectFactory, BrowserFixture browserFixture, ITestOutputHelper output) : base(browserFixture, output)
{
ProjectFactory = projectFactory;
}
public ProjectFactoryFixture ProjectFactory { get; set; }
public Project Project { get; set; }
// Rather than using [Theory] to pass each of the different values for 'template',
// it's important to distribute the SPA template tests over different test classes
// so they can be run in parallel. Xunit doesn't parallelize within a test class.
protected async Task SpaTemplateImplAsync(
string key,
string template,
bool useLocalDb = false,
bool usesAuth = false)
{
Project = await ProjectFactory.GetOrCreateProject(key, Output);
var createResult = await Project.RunDotNetNewAsync(template, auth: usesAuth ? "Individual" : null, language: null, useLocalDb);
Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult));
// We shouldn't have to do the NPM restore in tests because it should happen
// automatically at build time, but by doing it up front we can avoid having
// multiple NPM installs run concurrently which otherwise causes errors when
// tests run in parallel.
var clientAppSubdirPath = Path.Combine(Project.TemplateOutputDir, "ClientApp");
Assert.True(File.Exists(Path.Combine(clientAppSubdirPath, "package.json")), "Missing a package.json");
var projectFileContents = ReadFile(Project.TemplateOutputDir, $"{Project.ProjectName}.csproj");
if (usesAuth && !useLocalDb)
{
Assert.Contains(".db", projectFileContents);
}
var npmRestoreResult = await Project.RestoreWithRetryAsync(Output, clientAppSubdirPath);
Assert.True(0 == npmRestoreResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm restore", Project, npmRestoreResult));
var lintResult = await ProcessEx.RunViaShellAsync(Output, clientAppSubdirPath, "npm run lint");
Assert.True(0 == lintResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run lint", Project, lintResult));
if (template == "react" || template == "reactredux")
{
var testResult = await ProcessEx.RunViaShellAsync(Output, clientAppSubdirPath, "npm run test");
Assert.True(0 == testResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run test", Project, testResult));
}
var publishResult = await Project.RunDotNetPublishAsync();
Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult));
// Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release
// The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build
// later, while the opposite is not true.
var buildResult = await Project.RunDotNetBuildAsync();
Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult));
// localdb is not installed on the CI machines, so skip it.
var shouldVisitFetchData = !useLocalDb;
if (usesAuth)
{
var migrationsResult = await Project.RunDotNetEfCreateMigrationAsync(template);
Assert.True(0 == migrationsResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", Project, migrationsResult));
Project.AssertEmptyMigration(template);
if (shouldVisitFetchData)
{
var dbUpdateResult = await Project.RunDotNetEfUpdateDatabaseAsync();
Assert.True(0 == dbUpdateResult.ExitCode, ErrorMessages.GetFailedProcessMessage("update database", Project, dbUpdateResult));
}
}
using (var aspNetProcess = Project.StartBuiltProjectAsync())
{
Assert.False(
aspNetProcess.Process.HasExited,
ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process));
await WarmUpServer(aspNetProcess);
await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html");
if (BrowserFixture.IsHostAutomationSupported())
{
var (browser, logs) = await BrowserFixture.GetOrCreateBrowserAsync(Output, $"{Project.ProjectName}.build");
aspNetProcess.VisitInBrowser(browser);
TestBasicNavigation(visitFetchData: shouldVisitFetchData, usesAuth, browser, logs);
}
}
if (usesAuth)
{
UpdatePublishedSettings();
}
using (var aspNetProcess = Project.StartPublishedProjectAsync())
{
Assert.False(
aspNetProcess.Process.HasExited,
ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", Project, aspNetProcess.Process));
await WarmUpServer(aspNetProcess);
await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html");
if (BrowserFixture.IsHostAutomationSupported())
{
var (browser, logs) = await BrowserFixture.GetOrCreateBrowserAsync(Output, $"{Project.ProjectName}.publish");
aspNetProcess.VisitInBrowser(browser);
TestBasicNavigation(visitFetchData: shouldVisitFetchData, usesAuth, browser, logs);
}
}
}
private static async Task WarmUpServer(AspNetProcess aspNetProcess)
{
var attempt = 0;
var maxAttempts = 3;
do
{
try
{
attempt++;
var response = await aspNetProcess.SendRequest("/");
if (response.StatusCode == HttpStatusCode.OK)
{
break;
}
}
catch (OperationCanceledException)
{
}
await Task.Delay(TimeSpan.FromSeconds(5 * attempt));
} while (attempt < maxAttempts);
}
private void UpdatePublishedSettings()
{
// Hijack here the config file to use the development key during publish.
var appSettings = JObject.Parse(File.ReadAllText(Path.Combine(Project.TemplateOutputDir, "appsettings.json")));
var appSettingsDevelopment = JObject.Parse(File.ReadAllText(Path.Combine(Project.TemplateOutputDir, "appsettings.Development.json")));
((JObject)appSettings["IdentityServer"]).Merge(appSettingsDevelopment["IdentityServer"]);
((JObject)appSettings["IdentityServer"]).Merge(new
{
IdentityServer = new
{
Key = new
{
FilePath = "./tempkey.json"
}
}
});
var testAppSettings = appSettings.ToString();
File.WriteAllText(Path.Combine(Project.TemplatePublishDir, "appsettings.json"), testAppSettings);
}
private void TestBasicNavigation(bool visitFetchData, bool usesAuth, IWebDriver browser, ILogs logs)
{
browser.Exists(By.TagName("ul"));
// <title> element gets project ID injected into it during template execution
browser.Contains(Project.ProjectGuid, () => browser.Title);
// Initially displays the home page
browser.Equal("Hello, world!", () => browser.FindElement(By.TagName("h1")).Text);
// Can navigate to the counter page
browser.FindElement(By.PartialLinkText("Counter")).Click();
browser.Contains("counter", () => browser.Url);
browser.Equal("Counter", () => browser.FindElement(By.TagName("h1")).Text);
// Clicking the counter button works
browser.Equal("0", () => browser.FindElement(By.CssSelector("p>strong")).Text);
browser.FindElement(By.CssSelector("p+button")).Click();
browser.Equal("1", () => browser.FindElement(By.CssSelector("p>strong")).Text);
if (visitFetchData)
{
browser.FindElement(By.PartialLinkText("Fetch data")).Click();
if (usesAuth)
{
// We will be redirected to the identity UI
browser.Contains("/Identity/Account/Login", () => browser.Url);
browser.FindElement(By.PartialLinkText("Register as a new user")).Click();
var userName = $"{Guid.NewGuid()}@example.com";
var password = $"!Test.Password1$";
browser.Exists(By.Name("Input.Email"));
browser.FindElement(By.Name("Input.Email")).SendKeys(userName);
browser.FindElement(By.Name("Input.Password")).SendKeys(password);
browser.FindElement(By.Name("Input.ConfirmPassword")).SendKeys(password);
browser.FindElement(By.Id("registerSubmit")).Click();
}
// Can navigate to the 'fetch data' page
browser.Contains("fetch-data", () => browser.Url);
browser.Equal("Weather forecast", () => browser.FindElement(By.TagName("h1")).Text);
// Asynchronously loads and displays the table of weather forecasts
browser.Exists(By.CssSelector("table>tbody>tr"));
browser.Equal(5, () => browser.FindElements(By.CssSelector("p+table>tbody>tr")).Count);
}
foreach (var logKind in logs.AvailableLogTypes)
{
var entries = logs.GetLog(logKind);
var badEntries = entries.Where(e => new LogLevel[] { LogLevel.Warning, LogLevel.Severe }.Contains(e.Level));
badEntries = badEntries.Where(e => !e.Message.EndsWith("failed: WebSocket is closed before the connection is established."));
Assert.True(badEntries.Count() == 0, "There were Warnings or Errors from the browser." + Environment.NewLine + string.Join(Environment.NewLine, badEntries));
}
}
private void AssertFileExists(string basePath, string path, bool shouldExist)
{
var fullPath = Path.Combine(basePath, path);
var doesExist = File.Exists(fullPath);
if (shouldExist)
{
Assert.True(doesExist, "Expected file to exist, but it doesn't: " + path);
}
else
{
Assert.False(doesExist, "Expected file not to exist, but it does: " + path);
}
}
private string ReadFile(string basePath, string path)
{
AssertFileExists(basePath, path, shouldExist: true);
return File.ReadAllText(Path.Combine(basePath, path));
}
}
}
| 46.680608 | 173 | 0.606581 | [
"Apache-2.0"
] | jo262t/AspNetCore | src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs | 12,277 | C# |
/* Copyright (c) Citrix Systems, Inc.
* 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.
*
* 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 THE COPYRIGHT HOLDER OR
* CONTRIBUTORS 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.
*/
using System.IO;
using System.Linq;
using System.Text;
using NUnit.Framework;
using XenCenterLib.Compression;
namespace XenAdminTests.CompressionTests
{
[TestFixture, Category(TestCategories.UICategoryA)]
class CompressionStreamTest
{
private class CompressionStreamFake : CompressionStream
{
public CompressionStreamFake()
{
Reset();
}
public void Reset()
{
Dispose();
zipStream = new MemoryStream();
}
}
private CompressionStreamFake fakeCompressionStream;
[TestFixtureSetUp]
public void TestFixtureSetUp()
{
fakeCompressionStream = new CompressionStreamFake();
}
[TestFixtureTearDown]
public void TestFixtureTearDown()
{
fakeCompressionStream.Dispose();
}
[SetUp]
public void SetUp()
{
fakeCompressionStream.Reset();
}
[Test]
public void ReadAndWrite()
{
byte[] bytesToAdd = Encoding.ASCII.GetBytes("This is a test");
fakeCompressionStream.Write(bytesToAdd, 0, bytesToAdd.Length);
fakeCompressionStream.Position = 0;
byte[] outBytes = new byte[fakeCompressionStream.Length];
fakeCompressionStream.Read(outBytes, 0, 14);
Assert.IsTrue(bytesToAdd.SequenceEqual(outBytes), "Read Write arrays are equal");
}
[Test]
public void BufferedReadAndBufferedWrite()
{
using(MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes("This is a test")))
{
fakeCompressionStream.BufferedWrite(ms);
fakeCompressionStream.Position = 0;
using( MemoryStream oms = new MemoryStream() )
{
fakeCompressionStream.BufferedRead(oms);
Assert.IsTrue( oms.Length > 1, "Stream is not empty" );
Assert.AreEqual(ms,oms, "Streams are equal");
}
}
}
[Test]
public void PropertiesAreEqualToUnderlyingStream()
{
using(MemoryStream ms = new MemoryStream())
{
Assert.AreEqual(ms.CanRead, fakeCompressionStream.CanRead);
Assert.AreEqual(ms.CanSeek, fakeCompressionStream.CanSeek);
Assert.AreEqual(ms.CanTimeout, fakeCompressionStream.CanTimeout);
Assert.AreEqual(ms.CanWrite, fakeCompressionStream.CanWrite);
}
}
[Test]
public void LengthAndPositionSetters()
{
fakeCompressionStream.SetLength(20);
Assert.AreEqual(20, fakeCompressionStream.Length);
fakeCompressionStream.Position = 2;
Assert.AreEqual(2,fakeCompressionStream.Position);
}
[Test]
public void Seeking()
{
using (MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes("This is a test")))
{
fakeCompressionStream.BufferedWrite(ms);
fakeCompressionStream.Position = 0;
fakeCompressionStream.Seek(0, SeekOrigin.Begin);
Assert.AreEqual('T', fakeCompressionStream.ReadByte());
fakeCompressionStream.Seek(5, SeekOrigin.Begin);
Assert.AreEqual('i', fakeCompressionStream.ReadByte());
}
}
}
}
| 35.123288 | 98 | 0.597309 | [
"BSD-2-Clause"
] | CraigOrendi/xenadmin | XenAdminTests/CompressionTests/CompressionStreamTests.cs | 5,130 | C# |
using UnityEngine;
public class Shop : MonoBehaviour {
public TurretBlueprint standardTurret;
public TurretBlueprint missileLuncher;
public TurretBlueprint laserBeamer;
BuildManager buildManager;
void Start()
{
buildManager = BuildManager.instance;
}
public void SelectStandardTurret()
{
Debug.Log("Standard Turret Selected!");
buildManager.SelectTurretToBuild(standardTurret);
}
public void SelectMissileLuncher()
{
Debug.Log("Missile Luncher Selected!");
buildManager.SelectTurretToBuild(missileLuncher);
}
public void SelectLaserBeamer()
{
Debug.Log("Laser Beamer Selected!");
buildManager.SelectTurretToBuild(laserBeamer);
}
}
| 22.323529 | 57 | 0.681159 | [
"MIT"
] | VaiaIthilnaur/TowerDefenceAnimuConventGame | TowerDefence/Assets/Scripts/Shop.cs | 761 | C# |
using System;
using System.Linq.Expressions;
using Bing.Expressions;
namespace Bing.Data.Queries.Conditions
{
/// <summary>
/// 与查询条件
/// </summary>
/// <typeparam name="TEntity">实体类型</typeparam>
public class AndCondition<TEntity> : ICondition<TEntity> where TEntity : class
{
/// <summary>
/// 初始化一个<see cref="AndCondition{TEntity}"/>类型的实例
/// </summary>
/// <param name="left">查询条件1</param>
/// <param name="right">查询条件2</param>
public AndCondition(Expression<Func<TEntity, bool>> left, Expression<Func<TEntity, bool>> right) => Predicate = left.And(right);
/// <summary>
/// 查询条件
/// </summary>
protected Expression<Func<TEntity, bool>> Predicate { get; set; }
/// <summary>
/// 获取查询条件
/// </summary>
public virtual Expression<Func<TEntity, bool>> GetCondition() => Predicate;
}
}
| 29.935484 | 136 | 0.590517 | [
"MIT"
] | bing-framework/Bing.NetCode | framework/src/Bing.Data/Bing/Data/Queries/Conditions/AndCondition.cs | 1,004 | 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 fms-2018-01-01.normal.json service model.
*/
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.FMS.Model;
namespace Amazon.FMS
{
/// <summary>
/// Interface for accessing FMS
///
/// This is the <i>Firewall Manager API Reference</i>. This guide is for developers who
/// need detailed information about the Firewall Manager API actions, data types, and
/// errors. For detailed information about Firewall Manager features, see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-chapter.html">Firewall
/// Manager Developer Guide</a>.
///
///
/// <para>
/// Some API actions require explicit resource permissions. For information, see the developer
/// guide topic <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-api-permissions-ref.html">Firewall
/// Manager required permissions for API actions</a>.
/// </para>
/// </summary>
public partial interface IAmazonFMS : IAmazonService, IDisposable
{
#if AWS_ASYNC_ENUMERABLES_API
/// <summary>
/// Paginators for the service
/// </summary>
IFMSPaginatorFactory Paginators { get; }
#endif
#region AssociateAdminAccount
/// <summary>
/// Sets the Firewall Manager administrator account. The account must be a member of the
/// organization in Organizations whose resources you want to protect. Firewall Manager
/// sets the permissions that allow the account to administer your Firewall Manager policies.
///
///
/// <para>
/// The account that you associate with Firewall Manager is called the Firewall Manager
/// administrator account.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateAdminAccount service method.</param>
/// <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 AssociateAdminAccount service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.LimitExceededException">
/// The operation exceeds a resource limit, for example, the maximum number of <code>policy</code>
/// objects that you can create for an Amazon Web Services account. For more information,
/// see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html">Firewall
/// Manager Limits</a> in the <i>WAF Developer Guide</i>.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount">REST API Reference for AssociateAdminAccount Operation</seealso>
Task<AssociateAdminAccountResponse> AssociateAdminAccountAsync(AssociateAdminAccountRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region AssociateThirdPartyFirewall
/// <summary>
/// Sets the Firewall Manager policy administrator as a tenant administrator of a third-party
/// firewall service. A tenant is an instance of the third-party firewall service that's
/// associated with your Amazon Web Services customer account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateThirdPartyFirewall service method.</param>
/// <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 AssociateThirdPartyFirewall service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateThirdPartyFirewall">REST API Reference for AssociateThirdPartyFirewall Operation</seealso>
Task<AssociateThirdPartyFirewallResponse> AssociateThirdPartyFirewallAsync(AssociateThirdPartyFirewallRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteAppsList
/// <summary>
/// Permanently deletes an Firewall Manager applications list.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteAppsList service method.</param>
/// <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 DeleteAppsList service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteAppsList">REST API Reference for DeleteAppsList Operation</seealso>
Task<DeleteAppsListResponse> DeleteAppsListAsync(DeleteAppsListRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteNotificationChannel
/// <summary>
/// Deletes an Firewall Manager association with the IAM role and the Amazon Simple Notification
/// Service (SNS) topic that is used to record Firewall Manager SNS logs.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteNotificationChannel service method.</param>
/// <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 DeleteNotificationChannel service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel">REST API Reference for DeleteNotificationChannel Operation</seealso>
Task<DeleteNotificationChannelResponse> DeleteNotificationChannelAsync(DeleteNotificationChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeletePolicy
/// <summary>
/// Permanently deletes an Firewall Manager policy.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeletePolicy service method.</param>
/// <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 DeletePolicy service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.LimitExceededException">
/// The operation exceeds a resource limit, for example, the maximum number of <code>policy</code>
/// objects that you can create for an Amazon Web Services account. For more information,
/// see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html">Firewall
/// Manager Limits</a> in the <i>WAF Developer Guide</i>.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy">REST API Reference for DeletePolicy Operation</seealso>
Task<DeletePolicyResponse> DeletePolicyAsync(DeletePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteProtocolsList
/// <summary>
/// Permanently deletes an Firewall Manager protocols list.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteProtocolsList service method.</param>
/// <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 DeleteProtocolsList service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteProtocolsList">REST API Reference for DeleteProtocolsList Operation</seealso>
Task<DeleteProtocolsListResponse> DeleteProtocolsListAsync(DeleteProtocolsListRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DisassociateAdminAccount
/// <summary>
/// Disassociates the account that has been set as the Firewall Manager administrator
/// account. To set a different account as the administrator account, you must submit
/// an <code>AssociateAdminAccount</code> request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateAdminAccount service method.</param>
/// <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 DisassociateAdminAccount service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount">REST API Reference for DisassociateAdminAccount Operation</seealso>
Task<DisassociateAdminAccountResponse> DisassociateAdminAccountAsync(DisassociateAdminAccountRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DisassociateThirdPartyFirewall
/// <summary>
/// Disassociates a Firewall Manager policy administrator from a third-party firewall
/// tenant. When you call <code>DisassociateThirdPartyFirewall</code>, the third-party
/// firewall vendor deletes all of the firewalls that are associated with the account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateThirdPartyFirewall service method.</param>
/// <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 DisassociateThirdPartyFirewall service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateThirdPartyFirewall">REST API Reference for DisassociateThirdPartyFirewall Operation</seealso>
Task<DisassociateThirdPartyFirewallResponse> DisassociateThirdPartyFirewallAsync(DisassociateThirdPartyFirewallRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetAdminAccount
/// <summary>
/// Returns the Organizations account that is associated with Firewall Manager as the
/// Firewall Manager administrator.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetAdminAccount service method.</param>
/// <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 GetAdminAccount service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount">REST API Reference for GetAdminAccount Operation</seealso>
Task<GetAdminAccountResponse> GetAdminAccountAsync(GetAdminAccountRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetAppsList
/// <summary>
/// Returns information about the specified Firewall Manager applications list.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetAppsList service method.</param>
/// <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 GetAppsList service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAppsList">REST API Reference for GetAppsList Operation</seealso>
Task<GetAppsListResponse> GetAppsListAsync(GetAppsListRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetComplianceDetail
/// <summary>
/// Returns detailed compliance information about the specified member account. Details
/// include resources that are in and out of compliance with the specified policy.
///
/// <ul> <li>
/// <para>
/// Resources are considered noncompliant for WAF and Shield Advanced policies if the
/// specified policy has not been applied to them.
/// </para>
/// </li> <li>
/// <para>
/// Resources are considered noncompliant for security group policies if they are in scope
/// of the policy, they violate one or more of the policy rules, and remediation is disabled
/// or not possible.
/// </para>
/// </li> <li>
/// <para>
/// Resources are considered noncompliant for Network Firewall policies if a firewall
/// is missing in the VPC, if the firewall endpoint isn't set up in an expected Availability
/// Zone and subnet, if a subnet created by the Firewall Manager doesn't have the expected
/// route table, and for modifications to a firewall policy that violate the Firewall
/// Manager policy's rules.
/// </para>
/// </li> <li>
/// <para>
/// Resources are considered noncompliant for DNS Firewall policies if a DNS Firewall
/// rule group is missing from the rule group associations for the VPC.
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetComplianceDetail service method.</param>
/// <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 GetComplianceDetail service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail">REST API Reference for GetComplianceDetail Operation</seealso>
Task<GetComplianceDetailResponse> GetComplianceDetailAsync(GetComplianceDetailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetNotificationChannel
/// <summary>
/// Information about the Amazon Simple Notification Service (SNS) topic that is used
/// to record Firewall Manager SNS logs.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetNotificationChannel service method.</param>
/// <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 GetNotificationChannel service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel">REST API Reference for GetNotificationChannel Operation</seealso>
Task<GetNotificationChannelResponse> GetNotificationChannelAsync(GetNotificationChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetPolicy
/// <summary>
/// Returns information about the specified Firewall Manager policy.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetPolicy service method.</param>
/// <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 GetPolicy service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidTypeException">
/// The value of the <code>Type</code> parameter is invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy">REST API Reference for GetPolicy Operation</seealso>
Task<GetPolicyResponse> GetPolicyAsync(GetPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetProtectionStatus
/// <summary>
/// If you created a Shield Advanced policy, returns policy-level attack summary information
/// in the event of a potential DDoS attack. Other policy types are currently unsupported.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetProtectionStatus service method.</param>
/// <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 GetProtectionStatus service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetProtectionStatus">REST API Reference for GetProtectionStatus Operation</seealso>
Task<GetProtectionStatusResponse> GetProtectionStatusAsync(GetProtectionStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetProtocolsList
/// <summary>
/// Returns information about the specified Firewall Manager protocols list.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetProtocolsList service method.</param>
/// <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 GetProtocolsList service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetProtocolsList">REST API Reference for GetProtocolsList Operation</seealso>
Task<GetProtocolsListResponse> GetProtocolsListAsync(GetProtocolsListRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetThirdPartyFirewallAssociationStatus
/// <summary>
/// The onboarding status of a Firewall Manager admin account to third-party firewall
/// vendor tenant.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetThirdPartyFirewallAssociationStatus service method.</param>
/// <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 GetThirdPartyFirewallAssociationStatus service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetThirdPartyFirewallAssociationStatus">REST API Reference for GetThirdPartyFirewallAssociationStatus Operation</seealso>
Task<GetThirdPartyFirewallAssociationStatusResponse> GetThirdPartyFirewallAssociationStatusAsync(GetThirdPartyFirewallAssociationStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetViolationDetails
/// <summary>
/// Retrieves violations for a resource based on the specified Firewall Manager policy
/// and Amazon Web Services account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetViolationDetails service method.</param>
/// <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 GetViolationDetails service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetViolationDetails">REST API Reference for GetViolationDetails Operation</seealso>
Task<GetViolationDetailsResponse> GetViolationDetailsAsync(GetViolationDetailsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListAppsLists
/// <summary>
/// Returns an array of <code>AppsListDataSummary</code> objects.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListAppsLists service method.</param>
/// <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 ListAppsLists service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.LimitExceededException">
/// The operation exceeds a resource limit, for example, the maximum number of <code>policy</code>
/// objects that you can create for an Amazon Web Services account. For more information,
/// see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html">Firewall
/// Manager Limits</a> in the <i>WAF Developer Guide</i>.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListAppsLists">REST API Reference for ListAppsLists Operation</seealso>
Task<ListAppsListsResponse> ListAppsListsAsync(ListAppsListsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListComplianceStatus
/// <summary>
/// Returns an array of <code>PolicyComplianceStatus</code> objects. Use <code>PolicyComplianceStatus</code>
/// to get a summary of which member accounts are protected by the specified policy.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListComplianceStatus service method.</param>
/// <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 ListComplianceStatus service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus">REST API Reference for ListComplianceStatus Operation</seealso>
Task<ListComplianceStatusResponse> ListComplianceStatusAsync(ListComplianceStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListMemberAccounts
/// <summary>
/// Returns a <code>MemberAccounts</code> object that lists the member accounts in the
/// administrator's Amazon Web Services organization.
///
///
/// <para>
/// The <code>ListMemberAccounts</code> must be submitted by the account that is set as
/// the Firewall Manager administrator.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListMemberAccounts service method.</param>
/// <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 ListMemberAccounts service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts">REST API Reference for ListMemberAccounts Operation</seealso>
Task<ListMemberAccountsResponse> ListMemberAccountsAsync(ListMemberAccountsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListPolicies
/// <summary>
/// Returns an array of <code>PolicySummary</code> objects.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListPolicies service method.</param>
/// <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 ListPolicies service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.LimitExceededException">
/// The operation exceeds a resource limit, for example, the maximum number of <code>policy</code>
/// objects that you can create for an Amazon Web Services account. For more information,
/// see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html">Firewall
/// Manager Limits</a> in the <i>WAF Developer Guide</i>.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies">REST API Reference for ListPolicies Operation</seealso>
Task<ListPoliciesResponse> ListPoliciesAsync(ListPoliciesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListProtocolsLists
/// <summary>
/// Returns an array of <code>ProtocolsListDataSummary</code> objects.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListProtocolsLists service method.</param>
/// <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 ListProtocolsLists service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListProtocolsLists">REST API Reference for ListProtocolsLists Operation</seealso>
Task<ListProtocolsListsResponse> ListProtocolsListsAsync(ListProtocolsListsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListTagsForResource
/// <summary>
/// Retrieves the list of tags for the specified Amazon Web Services resource.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTagsForResource service method.</param>
/// <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 ListTagsForResource service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListTagsForResource">REST API Reference for ListTagsForResource Operation</seealso>
Task<ListTagsForResourceResponse> ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListThirdPartyFirewallFirewallPolicies
/// <summary>
/// Retrieves a list of all of the third-party firewall policies that are associated with
/// the third-party firewall administrator's account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListThirdPartyFirewallFirewallPolicies service method.</param>
/// <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 ListThirdPartyFirewallFirewallPolicies service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListThirdPartyFirewallFirewallPolicies">REST API Reference for ListThirdPartyFirewallFirewallPolicies Operation</seealso>
Task<ListThirdPartyFirewallFirewallPoliciesResponse> ListThirdPartyFirewallFirewallPoliciesAsync(ListThirdPartyFirewallFirewallPoliciesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region PutAppsList
/// <summary>
/// Creates an Firewall Manager applications list.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAppsList service method.</param>
/// <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 PutAppsList service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.LimitExceededException">
/// The operation exceeds a resource limit, for example, the maximum number of <code>policy</code>
/// objects that you can create for an Amazon Web Services account. For more information,
/// see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html">Firewall
/// Manager Limits</a> in the <i>WAF Developer Guide</i>.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutAppsList">REST API Reference for PutAppsList Operation</seealso>
Task<PutAppsListResponse> PutAppsListAsync(PutAppsListRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region PutNotificationChannel
/// <summary>
/// Designates the IAM role and Amazon Simple Notification Service (SNS) topic that Firewall
/// Manager uses to record SNS logs.
///
///
/// <para>
/// To perform this action outside of the console, you must configure the SNS topic to
/// allow the Firewall Manager role <code>AWSServiceRoleForFMS</code> to publish SNS logs.
/// For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-api-permissions-ref.html">Firewall
/// Manager required permissions for API actions</a> in the <i>Firewall Manager Developer
/// Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutNotificationChannel service method.</param>
/// <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 PutNotificationChannel service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel">REST API Reference for PutNotificationChannel Operation</seealso>
Task<PutNotificationChannelResponse> PutNotificationChannelAsync(PutNotificationChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region PutPolicy
/// <summary>
/// Creates an Firewall Manager policy.
///
///
/// <para>
/// Firewall Manager provides the following types of policies:
/// </para>
/// <ul> <li>
/// <para>
/// An WAF policy (type WAFV2), which defines rule groups to run first in the corresponding
/// WAF web ACL and rule groups to run last in the web ACL.
/// </para>
/// </li> <li>
/// <para>
/// An WAF Classic policy (type WAF), which defines a rule group.
/// </para>
/// </li> <li>
/// <para>
/// A Shield Advanced policy, which applies Shield Advanced protection to specified accounts
/// and resources.
/// </para>
/// </li> <li>
/// <para>
/// A security group policy, which manages VPC security groups across your Amazon Web
/// Services organization.
/// </para>
/// </li> <li>
/// <para>
/// An Network Firewall policy, which provides firewall rules to filter network traffic
/// in specified Amazon VPCs.
/// </para>
/// </li> <li>
/// <para>
/// A DNS Firewall policy, which provides Route 53 Resolver DNS Firewall rules to filter
/// DNS queries for specified VPCs.
/// </para>
/// </li> </ul>
/// <para>
/// Each policy is specific to one of the types. If you want to enforce more than one
/// policy type across accounts, create multiple policies. You can create multiple policies
/// for each type.
/// </para>
///
/// <para>
/// You must be subscribed to Shield Advanced to create a Shield Advanced policy. For
/// more information about subscribing to Shield Advanced, see <a href="https://docs.aws.amazon.com/waf/latest/DDOSAPIReference/API_CreateSubscription.html">CreateSubscription</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutPolicy service method.</param>
/// <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 PutPolicy service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidTypeException">
/// The value of the <code>Type</code> parameter is invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.LimitExceededException">
/// The operation exceeds a resource limit, for example, the maximum number of <code>policy</code>
/// objects that you can create for an Amazon Web Services account. For more information,
/// see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html">Firewall
/// Manager Limits</a> in the <i>WAF Developer Guide</i>.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy">REST API Reference for PutPolicy Operation</seealso>
Task<PutPolicyResponse> PutPolicyAsync(PutPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region PutProtocolsList
/// <summary>
/// Creates an Firewall Manager protocols list.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutProtocolsList service method.</param>
/// <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 PutProtocolsList service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.LimitExceededException">
/// The operation exceeds a resource limit, for example, the maximum number of <code>policy</code>
/// objects that you can create for an Amazon Web Services account. For more information,
/// see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html">Firewall
/// Manager Limits</a> in the <i>WAF Developer Guide</i>.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutProtocolsList">REST API Reference for PutProtocolsList Operation</seealso>
Task<PutProtocolsListResponse> PutProtocolsListAsync(PutProtocolsListRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region TagResource
/// <summary>
/// Adds one or more tags to an Amazon Web Services resource.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the TagResource service method.</param>
/// <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 TagResource service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.LimitExceededException">
/// The operation exceeds a resource limit, for example, the maximum number of <code>policy</code>
/// objects that you can create for an Amazon Web Services account. For more information,
/// see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html">Firewall
/// Manager Limits</a> in the <i>WAF Developer Guide</i>.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/TagResource">REST API Reference for TagResource Operation</seealso>
Task<TagResourceResponse> TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UntagResource
/// <summary>
/// Removes one or more tags from an Amazon Web Services resource.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UntagResource service method.</param>
/// <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 UntagResource service method, as returned by FMS.</returns>
/// <exception cref="Amazon.FMS.Model.InternalErrorException">
/// The operation failed because of a system problem, even though the request was valid.
/// Retry your request.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidInputException">
/// The parameters of the request were invalid.
/// </exception>
/// <exception cref="Amazon.FMS.Model.InvalidOperationException">
/// The operation failed because there was nothing to do or the operation wasn't possible.
/// For example, you might have submitted an <code>AssociateAdminAccount</code> request
/// for an account ID that was already set as the Firewall Manager administrator. Or you
/// might have tried to access a Region that's disabled by default, and that you need
/// to enable for the Firewall Manager administrator account and for Organizations before
/// you can access it.
/// </exception>
/// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
/// The specified resource was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/UntagResource">REST API Reference for UntagResource Operation</seealso>
Task<UntagResourceResponse> UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
}
} | 57.843954 | 243 | 0.668112 | [
"Apache-2.0"
] | Hazy87/aws-sdk-net | sdk/src/Services/FMS/Generated/_netstandard/IAmazonFMS.cs | 70,802 | C# |
using System;
namespace TestFu.Grammars
{
public delegate void ProductionTokenDelegate(IProductionToken token);
}
| 17.428571 | 71 | 0.786885 | [
"ECL-2.0",
"Apache-2.0"
] | Gallio/mbunit-v2 | src/mbunit/TestFu/Grammars/ProductionTokenDelegate.cs | 122 | C# |
namespace Dashing.Tests.TestDomain {
public class Order {
public int OrderId { get; set; }
public Delivery Delivery { get; set; }
public Customer Customer { get; set; }
}
} | 23 | 46 | 0.603865 | [
"MIT"
] | Itzalive/dashing | Dashing.Tests/TestDomain/Order.cs | 209 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
namespace Server.Api
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.UseMvc();
}
}
}
| 30.111111 | 110 | 0.680812 | [
"MIT"
] | rafaelbarrelo/ServerApi | src/Startup.cs | 1,086 | C# |
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
namespace Chinook.API.Middleware
{
public static class UserKeyValidatorsExtension
{
public static IApplicationBuilder ApplyEntityValidation(this IApplicationBuilder app)
{
app.UseMiddleware<EntityValidationMiddleware>();
return app;
}
}
public class EntityValidationMiddleware
{
private readonly RequestDelegate _next;
public EntityValidationMiddleware(RequestDelegate next)
{
_next = next;
}
public async Task Invoke(HttpContext context)
{
if (context.Request.GetDisplayUrl().Contains("swagger"))
await _next.Invoke(context);
else
{
switch (context.Request.Method)
{
case "GET" when !context.Request.Headers.Keys.Contains("id"):
context.Response.StatusCode = 400; //Bad Request
await context.Response.WriteAsync("Id is missing");
return;
case "POST" when !context.Request.ContentLength.Equals(0):
context.Response.StatusCode = 400; //UnAuthorized
await context.Response.WriteAsync("Entity missing");
return;
case "PUT" when !context.Request.Headers.Keys.Contains("id") ||
!context.Request.ContentLength.Equals(0):
context.Response.StatusCode = 400; //UnAuthorized
await context.Response.WriteAsync("Entity missing");
return;
case "DELETE" when !context.Request.Headers.Keys.Contains("id"):
context.Response.StatusCode = 400; //UnAuthorized
await context.Response.WriteAsync("Id is missing");
return;
default:
await _next.Invoke(context);
break;
}
}
}
}
} | 40.196429 | 93 | 0.531764 | [
"MIT"
] | cwoodruff/ChinookASPNETCore3APINTier | ChinookASPNETCore3APINTier/Chinook.API/Middleware/EntityValidationMiddleware.cs | 2,251 | 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.
// This file contains the IDN functions and implementation.
//
// This allows encoding of non-ASCII domain names in a "punycode" form,
// for example:
//
// \u5B89\u5BA4\u5948\u7F8E\u6075-with-SUPER-MONKEYS
//
// is encoded as:
//
// xn---with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n
//
// Additional options are provided to allow unassigned IDN characters and
// to validate according to the Std3ASCII Rules (like DNS names).
//
// There are also rules regarding bidirectionality of text and the length
// of segments.
//
// For additional rules see also:
// RFC 3490 - Internationalizing Domain Names in Applications (IDNA)
// RFC 3491 - Nameprep: A Stringprep Profile for Internationalized Domain Names (IDN)
// RFC 3492 - Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Text;
namespace System.Globalization
{
// IdnMapping class used to map names to Punycode
public sealed partial class IdnMapping
{
private bool _allowUnassigned;
private bool _useStd3AsciiRules;
public IdnMapping()
{
}
public bool AllowUnassigned
{
get { return _allowUnassigned; }
set { _allowUnassigned = value; }
}
public bool UseStd3AsciiRules
{
get { return _useStd3AsciiRules; }
set { _useStd3AsciiRules = value; }
}
// Gets ASCII (Punycode) version of the string
public string GetAscii(string unicode)
{
return GetAscii(unicode, 0);
}
public string GetAscii(string unicode, int index)
{
if (unicode == null)
throw new ArgumentNullException(nameof(unicode));
return GetAscii(unicode, index, unicode.Length - index);
}
public string GetAscii(string unicode, int index, int count)
{
if (unicode == null)
throw new ArgumentNullException(nameof(unicode));
if (index < 0 || count < 0)
throw new ArgumentOutOfRangeException((index < 0) ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
if (index > unicode.Length)
throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
if (index > unicode.Length - count)
throw new ArgumentOutOfRangeException(nameof(unicode), SR.ArgumentOutOfRange_IndexCountBuffer);
if (count == 0)
{
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
}
if (unicode[index + count - 1] == 0)
{
throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode));
}
if (GlobalizationMode.Invariant)
{
return GetAsciiInvariant(unicode, index, count);
}
unsafe
{
fixed (char* pUnicode = unicode)
{
return GetAsciiCore(unicode, pUnicode + index, count);
}
}
}
// Gets Unicode version of the string. Normalized and limited to IDNA characters.
public string GetUnicode(string ascii)
{
return GetUnicode(ascii, 0);
}
public string GetUnicode(string ascii, int index)
{
if (ascii == null)
throw new ArgumentNullException(nameof(ascii));
return GetUnicode(ascii, index, ascii.Length - index);
}
public string GetUnicode(string ascii, int index, int count)
{
if (ascii == null)
throw new ArgumentNullException(nameof(ascii));
if (index < 0 || count < 0)
throw new ArgumentOutOfRangeException((index < 0) ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
if (index > ascii.Length)
throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
if (index > ascii.Length - count)
throw new ArgumentOutOfRangeException(nameof(ascii), SR.ArgumentOutOfRange_IndexCountBuffer);
// This is a case (i.e. explicitly null-terminated input) where behavior in .NET and Win32 intentionally differ.
// The .NET APIs should (and did in v4.0 and earlier) throw an ArgumentException on input that includes a terminating null.
// The Win32 APIs fail on an embedded null, but not on a terminating null.
if (count > 0 && ascii[index + count - 1] == (char)0)
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
if (GlobalizationMode.Invariant)
{
return GetUnicodeInvariant(ascii, index, count);
}
unsafe
{
fixed (char* pAscii = ascii)
{
return GetUnicodeCore(ascii, pAscii + index, count);
}
}
}
public override bool Equals(object? obj)
{
return
obj is IdnMapping that &&
_allowUnassigned == that._allowUnassigned &&
_useStd3AsciiRules == that._useStd3AsciiRules;
}
public override int GetHashCode()
{
return (_allowUnassigned ? 100 : 200) + (_useStd3AsciiRules ? 1000 : 2000);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe string GetStringForOutput(string originalString, char* input, int inputLength, char* output, int outputLength)
{
return originalString.Length == inputLength && new ReadOnlySpan<char>(input, inputLength).SequenceEqual(new ReadOnlySpan<char>(output, outputLength)) ?
originalString :
new string(output, 0, outputLength);
}
//
// Invariant implementation
//
private const char c_delimiter = '-';
private const string c_strAcePrefix = "xn--";
private const int c_labelLimit = 63; // Not including dots
private const int c_defaultNameLimit = 255; // Including dots
private const int c_initialN = 0x80;
private const int c_maxint = 0x7ffffff;
private const int c_initialBias = 72;
private const int c_punycodeBase = 36;
private const int c_tmin = 1;
private const int c_tmax = 26;
private const int c_skew = 38;
private const int c_damp = 700;
// Legal "dot" separators (i.e: . in www.microsoft.com)
private static readonly char[] c_Dots = { '.', '\u3002', '\uFF0E', '\uFF61' };
private string GetAsciiInvariant(string unicode, int index, int count)
{
if (index > 0 || count < unicode.Length)
{
unicode = unicode.Substring(index, count);
}
// Check for ASCII only string, which will be unchanged
if (ValidateStd3AndAscii(unicode, UseStd3AsciiRules, true))
{
return unicode;
}
// Cannot be null terminated (normalization won't help us with this one, and
// may have returned false before checking the whole string above)
Debug.Assert(count >= 1, "[IdnMapping.GetAscii] Expected 0 length strings to fail before now.");
if (unicode[unicode.Length - 1] <= 0x1f)
{
throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode));
}
// May need to check Std3 rules again for non-ascii
if (UseStd3AsciiRules)
{
ValidateStd3AndAscii(unicode, true, false);
}
// Go ahead and encode it
return PunycodeEncode(unicode);
}
// See if we're only ASCII
private static bool ValidateStd3AndAscii(string unicode, bool bUseStd3, bool bCheckAscii)
{
// If its empty, then its too small
if (unicode.Length == 0)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
int iLastDot = -1;
// Loop the whole string
for (int i = 0; i < unicode.Length; i++)
{
// Aren't allowing control chars (or 7f, but idn tables catch that, they don't catch \0 at end though)
if (unicode[i] <= 0x1f)
{
throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, i ), nameof(unicode));
}
// If its Unicode or a control character, return false (non-ascii)
if (bCheckAscii && unicode[i] >= 0x7f)
return false;
// Check for dots
if (IsDot(unicode[i]))
{
// Can't have 2 dots in a row
if (i == iLastDot + 1)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
// If its too far between dots then fail
if (i - iLastDot > c_labelLimit + 1)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
// If validating Std3, then char before dot can't be - char
if (bUseStd3 && i > 0)
ValidateStd3(unicode[i - 1], true);
// Remember where the last dot is
iLastDot = i;
continue;
}
// If necessary, make sure its a valid std3 character
if (bUseStd3)
{
ValidateStd3(unicode[i], (i == iLastDot + 1));
}
}
// If we never had a dot, then we need to be shorter than the label limit
if (iLastDot == -1 && unicode.Length > c_labelLimit)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
// Need to validate entire string length, 1 shorter if last char wasn't a dot
if (unicode.Length > c_defaultNameLimit - (IsDot(unicode[unicode.Length - 1]) ? 0 : 1))
throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
c_defaultNameLimit - (IsDot(unicode[unicode.Length - 1]) ? 0 : 1)), nameof(unicode));
// If last char wasn't a dot we need to check for trailing -
if (bUseStd3 && !IsDot(unicode[unicode.Length - 1]))
ValidateStd3(unicode[unicode.Length - 1], true);
return true;
}
/* PunycodeEncode() converts Unicode to Punycode. The input */
/* is represented as an array of Unicode code points (not code */
/* units; surrogate pairs are not allowed), and the output */
/* will be represented as an array of ASCII code points. The */
/* output string is *not* null-terminated; it will contain */
/* zeros if and only if the input contains zeros. (Of course */
/* the caller can leave room for a terminator and add one if */
/* needed.) The input_length is the number of code points in */
/* the input. The output_length is an in/out argument: the */
/* caller passes in the maximum number of code points that it */
/* can receive, and on successful return it will contain the */
/* number of code points actually output. The case_flags array */
/* holds input_length boolean values, where nonzero suggests that */
/* the corresponding Unicode character be forced to uppercase */
/* after being decoded (if possible), and zero suggests that */
/* it be forced to lowercase (if possible). ASCII code points */
/* are encoded literally, except that ASCII letters are forced */
/* to uppercase or lowercase according to the corresponding */
/* uppercase flags. If case_flags is a null pointer then ASCII */
/* letters are left as they are, and other code points are */
/* treated as if their uppercase flags were zero. The return */
/* value can be any of the punycode_status values defined above */
/* except punycode_bad_input; if not punycode_success, then */
/* output_size and output might contain garbage. */
private static string PunycodeEncode(string unicode)
{
// 0 length strings aren't allowed
if (unicode.Length == 0)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
StringBuilder output = new StringBuilder(unicode.Length);
int iNextDot = 0;
int iAfterLastDot = 0;
int iOutputAfterLastDot = 0;
// Find the next dot
while (iNextDot < unicode.Length)
{
// Find end of this segment
iNextDot = unicode.IndexOfAny(c_Dots, iAfterLastDot);
Debug.Assert(iNextDot <= unicode.Length, "[IdnMapping.punycode_encode]IndexOfAny is broken");
if (iNextDot < 0)
iNextDot = unicode.Length;
// Only allowed to have empty . section at end (www.microsoft.com.)
if (iNextDot == iAfterLastDot)
{
// Only allowed to have empty sections as trailing .
if (iNextDot != unicode.Length)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
// Last dot, stop
break;
}
// We'll need an Ace prefix
output.Append(c_strAcePrefix);
// Everything resets every segment.
bool bRightToLeft = false;
// Check for RTL. If right-to-left, then 1st & last chars must be RTL
BidiCategory eBidi = CharUnicodeInfo.GetBidiCategory(unicode, iAfterLastDot);
if (eBidi == BidiCategory.RightToLeft || eBidi == BidiCategory.RightToLeftArabic)
{
// It has to be right to left.
bRightToLeft = true;
// Check last char
int iTest = iNextDot - 1;
if (char.IsLowSurrogate(unicode, iTest))
{
iTest--;
}
eBidi = CharUnicodeInfo.GetBidiCategory(unicode, iTest);
if (eBidi != BidiCategory.RightToLeft && eBidi != BidiCategory.RightToLeftArabic)
{
// Oops, last wasn't RTL, last should be RTL if first is RTL
throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode));
}
}
// Handle the basic code points
int basicCount;
int numProcessed = 0; // Num code points that have been processed so far (this segment)
for (basicCount = iAfterLastDot; basicCount < iNextDot; basicCount++)
{
// Can't be lonely surrogate because it would've thrown in normalization
Debug.Assert(char.IsLowSurrogate(unicode, basicCount) == false, "[IdnMapping.punycode_encode]Unexpected low surrogate");
// Double check our bidi rules
BidiCategory testBidi = CharUnicodeInfo.GetBidiCategory(unicode, basicCount);
// If we're RTL, we can't have LTR chars
if (bRightToLeft && testBidi == BidiCategory.LeftToRight)
{
// Oops, throw error
throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode));
}
// If we're not RTL we can't have RTL chars
if (!bRightToLeft && (testBidi == BidiCategory.RightToLeft || testBidi == BidiCategory.RightToLeftArabic))
{
// Oops, throw error
throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode));
}
// If its basic then add it
if (Basic(unicode[basicCount]))
{
output.Append(EncodeBasic(unicode[basicCount]));
numProcessed++;
}
// If its a surrogate, skip the next since our bidi category tester doesn't handle it.
else if (char.IsSurrogatePair(unicode, basicCount))
basicCount++;
}
int numBasicCodePoints = numProcessed; // number of basic code points
// Stop if we ONLY had basic code points
if (numBasicCodePoints == iNextDot - iAfterLastDot)
{
// Get rid of xn-- and this segments done
output.Remove(iOutputAfterLastDot, c_strAcePrefix.Length);
}
else
{
// If it has some non-basic code points the input cannot start with xn--
if (unicode.Length - iAfterLastDot >= c_strAcePrefix.Length &&
unicode.Substring(iAfterLastDot, c_strAcePrefix.Length).Equals(
c_strAcePrefix, StringComparison.OrdinalIgnoreCase))
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(unicode));
// Need to do ACE encoding
int numSurrogatePairs = 0; // number of surrogate pairs so far
// Add a delimiter (-) if we had any basic code points (between basic and encoded pieces)
if (numBasicCodePoints > 0)
{
output.Append(c_delimiter);
}
// Initialize the state
int n = c_initialN;
int delta = 0;
int bias = c_initialBias;
// Main loop
while (numProcessed < (iNextDot - iAfterLastDot))
{
/* All non-basic code points < n have been */
/* handled already. Find the next larger one: */
int j;
int m;
int test = 0;
for (m = c_maxint, j = iAfterLastDot;
j < iNextDot;
j += IsSupplementary(test) ? 2 : 1)
{
test = char.ConvertToUtf32(unicode, j);
if (test >= n && test < m) m = test;
}
/* Increase delta enough to advance the decoder's */
/* <n,i> state to <m,0>, but guard against overflow: */
delta += (int)((m - n) * ((numProcessed - numSurrogatePairs) + 1));
Debug.Assert(delta > 0, "[IdnMapping.cs]1 punycode_encode - delta overflowed int");
n = m;
for (j = iAfterLastDot; j < iNextDot; j+= IsSupplementary(test) ? 2 : 1)
{
// Make sure we're aware of surrogates
test = char.ConvertToUtf32(unicode, j);
// Adjust for character position (only the chars in our string already, some
// haven't been processed.
if (test < n)
{
delta++;
Debug.Assert(delta > 0, "[IdnMapping.cs]2 punycode_encode - delta overflowed int");
}
if (test == n)
{
// Represent delta as a generalized variable-length integer:
int q, k;
for (q = delta, k = c_punycodeBase; ; k += c_punycodeBase)
{
int t = k <= bias ? c_tmin : k >= bias + c_tmax ? c_tmax : k - bias;
if (q < t) break;
Debug.Assert(c_punycodeBase != t, "[IdnMapping.punycode_encode]Expected c_punycodeBase (36) to be != t");
output.Append(EncodeDigit(t + (q - t) % (c_punycodeBase - t)));
q = (q - t) / (c_punycodeBase - t);
}
output.Append(EncodeDigit(q));
bias = Adapt(delta, (numProcessed - numSurrogatePairs) + 1, numProcessed == numBasicCodePoints);
delta = 0;
numProcessed++;
if (IsSupplementary(m))
{
numProcessed++;
numSurrogatePairs++;
}
}
}
++delta;
++n;
Debug.Assert(delta > 0, "[IdnMapping.cs]3 punycode_encode - delta overflowed int");
}
}
// Make sure its not too big
if (output.Length - iOutputAfterLastDot > c_labelLimit)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
// Done with this segment, add dot if necessary
if (iNextDot != unicode.Length)
output.Append('.');
iAfterLastDot = iNextDot + 1;
iOutputAfterLastDot = output.Length;
}
// Throw if we're too long
if (output.Length > c_defaultNameLimit - (IsDot(unicode[unicode.Length-1]) ? 0 : 1))
throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
c_defaultNameLimit - (IsDot(unicode[unicode.Length-1]) ? 0 : 1)), nameof(unicode));
// Return our output string
return output.ToString();
}
// Is it a dot?
// are we U+002E (., full stop), U+3002 (ideographic full stop), U+FF0E (fullwidth full stop), or
// U+FF61 (halfwidth ideographic full stop).
// Note: IDNA Normalization gets rid of dots now, but testing for last dot is before normalization
private static bool IsDot(char c)
{
return c == '.' || c == '\u3002' || c == '\uFF0E' || c == '\uFF61';
}
private static bool IsSupplementary(int cTest)
{
return cTest >= 0x10000;
}
private static bool Basic(uint cp)
{
// Is it in ASCII range?
return cp < 0x80;
}
// Validate Std3 rules for a character
private static void ValidateStd3(char c, bool bNextToDot)
{
// Check for illegal characters
if ((c <= ',' || c == '/' || (c >= ':' && c <= '@') || // Lots of characters not allowed
(c >= '[' && c <= '`') || (c >= '{' && c <= (char)0x7F)) ||
(c == '-' && bNextToDot))
throw new ArgumentException(SR.Format(SR.Argument_IdnBadStd3, c), nameof(c));
}
private string GetUnicodeInvariant(string ascii, int index, int count)
{
if (index > 0 || count < ascii.Length)
{
// We're only using part of the string
ascii = ascii.Substring(index, count);
}
// Convert Punycode to Unicode
string strUnicode = PunycodeDecode(ascii);
// Output name MUST obey IDNA rules & round trip (casing differences are allowed)
if (!ascii.Equals(GetAscii(strUnicode), StringComparison.OrdinalIgnoreCase))
throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii));
return strUnicode;
}
/* PunycodeDecode() converts Punycode to Unicode. The input is */
/* represented as an array of ASCII code points, and the output */
/* will be represented as an array of Unicode code points. The */
/* input_length is the number of code points in the input. The */
/* output_length is an in/out argument: the caller passes in */
/* the maximum number of code points that it can receive, and */
/* on successful return it will contain the actual number of */
/* code points output. The case_flags array needs room for at */
/* least output_length values, or it can be a null pointer if the */
/* case information is not needed. A nonzero flag suggests that */
/* the corresponding Unicode character be forced to uppercase */
/* by the caller (if possible), while zero suggests that it be */
/* forced to lowercase (if possible). ASCII code points are */
/* output already in the proper case, but their flags will be set */
/* appropriately so that applying the flags would be harmless. */
/* The return value can be any of the punycode_status values */
/* defined above; if not punycode_success, then output_length, */
/* output, and case_flags might contain garbage. On success, the */
/* decoder will never need to write an output_length greater than */
/* input_length, because of how the encoding is defined. */
private static string PunycodeDecode(string ascii)
{
// 0 length strings aren't allowed
if (ascii.Length == 0)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
// Throw if we're too long
if (ascii.Length > c_defaultNameLimit - (IsDot(ascii[ascii.Length-1]) ? 0 : 1))
throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
c_defaultNameLimit - (IsDot(ascii[ascii.Length-1]) ? 0 : 1)), nameof(ascii));
// output stringbuilder
StringBuilder output = new StringBuilder(ascii.Length);
// Dot searching
int iNextDot = 0;
int iAfterLastDot = 0;
int iOutputAfterLastDot = 0;
while (iNextDot < ascii.Length)
{
// Find end of this segment
iNextDot = ascii.IndexOf('.', iAfterLastDot);
if (iNextDot < 0 || iNextDot > ascii.Length)
iNextDot = ascii.Length;
// Only allowed to have empty . section at end (www.microsoft.com.)
if (iNextDot == iAfterLastDot)
{
// Only allowed to have empty sections as trailing .
if (iNextDot != ascii.Length)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
// Last dot, stop
break;
}
// In either case it can't be bigger than segment size
if (iNextDot - iAfterLastDot > c_labelLimit)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
// See if this section's ASCII or ACE
if (ascii.Length < c_strAcePrefix.Length + iAfterLastDot ||
string.Compare(ascii, iAfterLastDot, c_strAcePrefix, 0, c_strAcePrefix.Length, StringComparison.OrdinalIgnoreCase) != 0)
{
// Its ASCII, copy it
output.Append(ascii, iAfterLastDot, iNextDot - iAfterLastDot);
}
else
{
// Not ASCII, bump up iAfterLastDot to be after ACE Prefix
iAfterLastDot += c_strAcePrefix.Length;
// Get number of basic code points (where delimiter is)
// numBasicCodePoints < 0 if there're no basic code points
int iTemp = ascii.LastIndexOf(c_delimiter, iNextDot - 1);
// Trailing - not allowed
if (iTemp == iNextDot - 1)
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
int numBasicCodePoints;
if (iTemp <= iAfterLastDot)
numBasicCodePoints = 0;
else
{
numBasicCodePoints = iTemp - iAfterLastDot;
// Copy all the basic code points, making sure they're all in the allowed range,
// and losing the casing for all of them.
for (int copyAscii = iAfterLastDot; copyAscii < iAfterLastDot + numBasicCodePoints; copyAscii++)
{
// Make sure we don't allow unicode in the ascii part
if (ascii[copyAscii] > 0x7f)
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
// When appending make sure they get lower cased
output.Append((char)(ascii[copyAscii] >= 'A' && ascii[copyAscii] <='Z' ? ascii[copyAscii] - 'A' + 'a' : ascii[copyAscii]));
}
}
// Get ready for main loop. Start at beginning if we didn't have any
// basic code points, otherwise start after the -.
// asciiIndex will be next character to read from ascii
int asciiIndex = iAfterLastDot + (numBasicCodePoints > 0 ? numBasicCodePoints + 1 : 0);
// initialize our state
int n = c_initialN;
int bias = c_initialBias;
int i = 0;
int w, k;
// no Supplementary characters yet
int numSurrogatePairs = 0;
// Main loop, read rest of ascii
while (asciiIndex < iNextDot)
{
/* Decode a generalized variable-length integer into delta, */
/* which gets added to i. The overflow checking is easier */
/* if we increase i as we go, then subtract off its starting */
/* value at the end to obtain delta. */
int oldi = i;
for (w = 1, k = c_punycodeBase; ; k += c_punycodeBase)
{
// Check to make sure we aren't overrunning our ascii string
if (asciiIndex >= iNextDot)
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
// decode the digit from the next char
int digit = DecodeDigit(ascii[asciiIndex++]);
Debug.Assert(w > 0, "[IdnMapping.punycode_decode]Expected w > 0");
if (digit > (c_maxint - i) / w)
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
i += (int)(digit * w);
int t = k <= bias ? c_tmin : k >= bias + c_tmax ? c_tmax : k - bias;
if (digit < t)
break;
Debug.Assert(c_punycodeBase != t, "[IdnMapping.punycode_decode]Expected t != c_punycodeBase (36)");
if (w > c_maxint / (c_punycodeBase - t))
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
w *= (c_punycodeBase - t);
}
bias = Adapt(i - oldi, (output.Length - iOutputAfterLastDot - numSurrogatePairs) + 1, oldi == 0);
/* i was supposed to wrap around from output.Length to 0, */
/* incrementing n each time, so we'll fix that now: */
Debug.Assert((output.Length - iOutputAfterLastDot - numSurrogatePairs) + 1 > 0,
"[IdnMapping.punycode_decode]Expected to have added > 0 characters this segment");
if (i / ((output.Length - iOutputAfterLastDot - numSurrogatePairs) + 1) > c_maxint - n)
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
n += (int)(i / (output.Length - iOutputAfterLastDot - numSurrogatePairs + 1));
i %= (output.Length - iOutputAfterLastDot - numSurrogatePairs + 1);
// Make sure n is legal
if ((n < 0 || n > 0x10ffff) || (n >= 0xD800 && n <= 0xDFFF))
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
// insert n at position i of the output: Really tricky if we have surrogates
int iUseInsertLocation;
string strTemp = char.ConvertFromUtf32(n);
// If we have supplimentary characters
if (numSurrogatePairs > 0)
{
// Hard way, we have supplimentary characters
int iCount;
for (iCount = i, iUseInsertLocation = iOutputAfterLastDot; iCount > 0; iCount--, iUseInsertLocation++)
{
// If its a surrogate, we have to go one more
if (iUseInsertLocation >= output.Length)
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
if (char.IsSurrogate(output[iUseInsertLocation]))
iUseInsertLocation++;
}
}
else
{
// No Supplementary chars yet, just add i
iUseInsertLocation = iOutputAfterLastDot + i;
}
// Insert it
output.Insert(iUseInsertLocation, strTemp);
// If it was a surrogate increment our counter
if (IsSupplementary(n))
numSurrogatePairs++;
// Index gets updated
i++;
}
// Do BIDI testing
bool bRightToLeft = false;
// Check for RTL. If right-to-left, then 1st & last chars must be RTL
BidiCategory eBidi = CharUnicodeInfo.GetBidiCategory(output, iOutputAfterLastDot);
if (eBidi == BidiCategory.RightToLeft || eBidi == BidiCategory.RightToLeftArabic)
{
// It has to be right to left.
bRightToLeft = true;
}
// Check the rest of them to make sure RTL/LTR is consistent
for (int iTest = iOutputAfterLastDot; iTest < output.Length; iTest++)
{
// This might happen if we run into a pair
if (char.IsLowSurrogate(output[iTest]))
continue;
// Check to see if its LTR
eBidi = CharUnicodeInfo.GetBidiCategory(output, iTest);
if ((bRightToLeft && eBidi == BidiCategory.LeftToRight) ||
(!bRightToLeft && (eBidi == BidiCategory.RightToLeft || eBidi == BidiCategory.RightToLeftArabic)))
throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii));
}
// Its also a requirement that the last one be RTL if 1st is RTL
if (bRightToLeft && eBidi != BidiCategory.RightToLeft && eBidi != BidiCategory.RightToLeftArabic)
{
// Oops, last wasn't RTL, last should be RTL if first is RTL
throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii));
}
}
// See if this label was too long
if (iNextDot - iAfterLastDot > c_labelLimit)
throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
// Done with this segment, add dot if necessary
if (iNextDot != ascii.Length)
output.Append('.');
iAfterLastDot = iNextDot + 1;
iOutputAfterLastDot = output.Length;
}
// Throw if we're too long
if (output.Length > c_defaultNameLimit - (IsDot(output[output.Length-1]) ? 0 : 1))
throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, c_defaultNameLimit - (IsDot(output[output.Length-1]) ? 0 : 1)), nameof(ascii));
// Return our output string
return output.ToString();
}
// DecodeDigit(cp) returns the numeric value of a basic code */
// point (for use in representing integers) in the range 0 to */
// c_punycodeBase-1, or <0 if cp is does not represent a value. */
private static int DecodeDigit(char cp)
{
if (cp >= '0' && cp <= '9')
return cp - '0' + 26;
// Two flavors for case differences
if (cp >= 'a' && cp <= 'z')
return cp - 'a';
if (cp >= 'A' && cp <= 'Z')
return cp - 'A';
// Expected 0-9, A-Z or a-z, everything else is illegal
throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(cp));
}
private static int Adapt(int delta, int numpoints, bool firsttime)
{
uint k;
delta = firsttime ? delta / c_damp : delta / 2;
Debug.Assert(numpoints != 0, "[IdnMapping.adapt]Expected non-zero numpoints.");
delta += delta / numpoints;
for (k = 0; delta > ((c_punycodeBase - c_tmin) * c_tmax) / 2; k += c_punycodeBase)
{
delta /= c_punycodeBase - c_tmin;
}
Debug.Assert(delta + c_skew != 0, "[IdnMapping.adapt]Expected non-zero delta+skew.");
return (int)(k + (c_punycodeBase - c_tmin + 1) * delta / (delta + c_skew));
}
/* EncodeBasic(bcp,flag) forces a basic code point to lowercase */
/* if flag is false, uppercase if flag is true, and returns */
/* the resulting code point. The code point is unchanged if it */
/* is caseless. The behavior is undefined if bcp is not a basic */
/* code point. */
private static char EncodeBasic(char bcp)
{
if (HasUpperCaseFlag(bcp))
bcp += (char)('a' - 'A');
return bcp;
}
// Return whether a punycode code point is flagged as being upper case.
private static bool HasUpperCaseFlag(char punychar)
{
return (punychar >= 'A' && punychar <= 'Z');
}
/* EncodeDigit(d,flag) returns the basic code point whose value */
/* (when used for representing integers) is d, which needs to be in */
/* the range 0 to punycodeBase-1. The lowercase form is used unless flag is */
/* true, in which case the uppercase form is used. */
private static char EncodeDigit(int d)
{
Debug.Assert(d >= 0 && d < c_punycodeBase, "[IdnMapping.encode_digit]Expected 0 <= d < punycodeBase");
// 26-35 map to ASCII 0-9
if (d > 25) return (char)(d - 26 + '0');
// 0-25 map to a-z or A-Z
return (char)(d + 'a');
}
}
}
| 46.321749 | 163 | 0.515259 | [
"MIT"
] | Geotab/corefx | src/Common/src/CoreLib/System/Globalization/IdnMapping.cs | 41,319 | 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.Collections.Generic;
using Newtonsoft.Json;
using Aliyun.Acs.Core;
namespace Aliyun.Acs.Ecs.Model.V20140526
{
public class DeleteDeploymentSetResponse : AcsResponse
{
private string requestId;
public string RequestId
{
get
{
return requestId;
}
set
{
requestId = value;
}
}
}
}
| 26.930233 | 63 | 0.721071 | [
"Apache-2.0"
] | aliyun/aliyun-openapi-net-sdk | aliyun-net-sdk-ecs/Ecs/Model/V20140526/DeleteDeploymentSetResponse.cs | 1,158 | C# |
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
/// <summary>
/// code editor
/// </summary>
public class CodeEditor : State
{
protected List<LineInfo> m_buffer = new List<LineInfo>();
protected int m_curLine;
protected int m_curIndex;
protected bool m_insertMode;
protected int m_lineOffset;
// Use this for initialization
public override void onSwitchIn()
{
onClearAll();
m_stateMgr.TextMode();
m_insertMode = false;
m_stateMgr.m_textDisplay.UNDER_CURSOR = false;
if (!string.IsNullOrEmpty(m_stateMgr.CUR_SOURCE_CODE))
{
// 读取已有文件
readCode(m_stateMgr.CUR_SOURCE_CODE);
m_curLine = 0;
m_curIndex = 0;
}
refresh();
}
/// <summary>
/// key input
/// </summary>
/// <param name="key"></param>
public override void onInput(KCode key)
{
switch (key)
{
case KCode.Home:
onClearAll();
break;
case KCode.Return:
onReturn();
break;
case KCode.UpArrow:
case KCode.DownArrow:
case KCode.LeftArrow:
case KCode.RightArrow:
onMoveCursor(key);
break;
case KCode.Delete:
onDel();
break;
case KCode.Escape:
exportCode();
m_stateMgr.GotoState(StateEnums.eStateSaver);
return;
case KCode.Insert:
m_insertMode = !m_insertMode; // 切换插入/覆盖模式
m_stateMgr.m_textDisplay.UNDER_CURSOR = m_insertMode;
break;
case KCode.CapsLock:
m_stateMgr.m_keyboard.SetCaps(!m_stateMgr.m_keyboard.CAPS); // 切换字母大小写
break;
default:
onInputKey(key);
break;
}
refresh();
}
/// <summary>
/// 清除
/// </summary>
protected void onClearAll()
{
m_buffer.Clear();
m_buffer.Add(new LineInfo());
m_buffer[0].TEXT = "10 ";
m_buffer[0].IS_NEW_LINE = true;
m_curLine = 0;
m_curIndex = 3;
m_lineOffset = 0;
}
protected void readCode( string code )
{
m_buffer.Clear();
using( StringReader sr = new StringReader(code) )
{
string codeLine = sr.ReadLine();
while( codeLine != null )
{
LineInfo line = new LineInfo(codeLine);
line.IS_NEW_LINE = false;
m_buffer.Add(line);
codeLine = sr.ReadLine();
}
}
}
/// <summary>
/// 回车,创建新行(自动补行号)或者移至下一行,新行上回车会将新行移至第一行
/// </summary>
protected void onReturn()
{
LineInfo line = m_buffer[m_curLine];
if (line.IS_NEW_LINE) // 卷屏至最上?
return;
// 负数代表这行行号错误或者没行号
int lineNum = line.LINE_NUM;
if ( lineNum < 0 )
{
m_stateMgr.NotifierInfo(Defines.INFO_LINE_NUM_ERR);
return;
}
if( m_curLine == m_buffer.Count - 1 )
{
// 创建新行
lineNum += 10;
LineInfo newLine = new LineInfo( lineNum + " " );
m_buffer.Add( newLine );
m_curLine = m_buffer.Count - 1;
m_curIndex = newLine.LENGTH;
}
else
{
// 移至下行
m_curLine++;
m_curIndex = 0;
}
// 代码按行号排序
sortCode();
}
/// <summary>
/// 字符输入
/// </summary>
/// <param name="code"></param>
public void onInputKey( KCode key )
{
if (key >= KCode.Space && key < KCode.Delete) // 可输入字符
{
if (m_insertMode)
m_buffer[m_curLine].InsChar(m_curIndex, (char)key);
else
m_buffer[m_curLine].SetChar(m_curIndex, (char)key);
m_curIndex++;
}
}
protected void onDel()
{
LineInfo li = m_buffer[m_curLine];
if (li.LENGTH > 0)
{
if (m_curIndex < li.LENGTH)
{
li.Remove(m_curIndex);
}
else
{
li.Remove(m_curIndex - 1);
m_curIndex--;
}
return;
}
if (m_buffer.Count > 1)
{
m_buffer.Remove(li);
if (m_curLine >= m_buffer.Count)
{
// 光标移至删除行的上一行
m_curLine--;
m_curIndex = m_buffer[m_curLine].GetLastLineIndex(m_curIndex % Defines.TEXT_AREA_WIDTH);
}
else
{
// 光标不动(自动指向删除行的下一行)
m_curIndex = m_buffer[m_curLine].GetFirstLineIndex(m_curIndex % Defines.TEXT_AREA_WIDTH);
}
}
}
protected void onMoveCursor( KCode dir )
{
LineInfo line = m_buffer[m_curLine];
if( dir == KCode.UpArrow )
{
if (m_curIndex >= Defines.TEXT_AREA_WIDTH)
{
m_curIndex -= Defines.TEXT_AREA_WIDTH;
}
else if(m_curLine > 0)
{
if (line.LINE_NUM < 0)
{
m_stateMgr.NotifierInfo(Defines.INFO_LINE_NUM_ERR);
}
else
{
// 移至上一行
m_curLine--;
m_curIndex = m_buffer[m_curLine].GetLastLineIndex(m_curIndex);
}
}
}
else if( dir == KCode.DownArrow )
{
if (m_curIndex + Defines.TEXT_AREA_WIDTH < line.LENGTH)
{
m_curIndex += Defines.TEXT_AREA_WIDTH;
}
else if (m_curLine < m_buffer.Count - 1)
{
if (line.LINE_NUM < 0)
{
m_stateMgr.NotifierInfo(Defines.INFO_LINE_NUM_ERR);
}
else
{
// 移至下一行
m_curLine++;
m_curIndex = m_buffer[m_curLine].GetFirstLineIndex(m_curIndex % Defines.TEXT_AREA_WIDTH);
}
}
}
else if( dir == KCode.LeftArrow )
{
if (m_curIndex > 0)
m_curIndex--;
}
else if( dir == KCode.RightArrow )
{
if (m_curIndex < line.LENGTH)
m_curIndex++;
}
}
protected void refresh()
{
m_stateMgr.m_textDisplay.Clear();
// 计算光标新位置
int x = m_curIndex % Defines.TEXT_AREA_WIDTH;
int y = 0;
for (int i = 0; i < m_curLine; i++)
y += m_buffer[i].LINE_COUNT;
y += m_curIndex / Defines.TEXT_AREA_WIDTH;
// 光标超出范围,滚动屏幕
if( ( y + m_lineOffset ) < 0 )
m_lineOffset -= (y + m_lineOffset);
else if ( ( y + m_lineOffset ) >= Defines.TEXT_AREA_HEIGHT)
m_lineOffset -= ( y + m_lineOffset - Defines.TEXT_AREA_HEIGHT + 1 );
// 设置光标
m_stateMgr.m_textDisplay.SetCursor(x, y + m_lineOffset);
// 绘制文本行
y = 0;
foreach (LineInfo li in m_buffer)
{
int yStartPos = y + m_lineOffset;
int yEndPos = yStartPos + li.LENGTH - 1;
if ( !((yStartPos < 0 && yEndPos < 0) || (yStartPos >= Defines.TEXT_AREA_HEIGHT && yEndPos >= Defines.TEXT_AREA_HEIGHT)) )
m_stateMgr.m_textDisplay.DrawText(0, yStartPos, li.TEXT);
y += li.LINE_COUNT;
}
// 刷新
m_stateMgr.m_textDisplay.Refresh();
}
protected void exportCode()
{
StringBuilder code = new StringBuilder();
foreach (LineInfo li in m_buffer)
{
if( !li.IS_NEW_LINE )
code.AppendLine(li.TEXT);
}
m_stateMgr.CUR_SOURCE_CODE = code.ToString();
}
/// <summary>
/// 刷新源代码,按行号排序
/// </summary>
protected void sortCode()
{
m_buffer.Sort((LineInfo line1, LineInfo line2) =>
{
return line1.LINE_NUM - line2.LINE_NUM;
});
}
}
| 25.317221 | 134 | 0.474582 | [
"MIT"
] | fancyblock/GVBASIC | GVBASIC/Assets/Script/State/CodeEditor/CodeEditor.cs | 8,744 | C# |
namespace Cake.VsCode.Tests
{
internal sealed class VscePackagerFixture : VsceFixture<VscePackageSettings>
{
protected override void RunTool()
{
var tool = new VscePackager(FileSystem, Environment, ProcessRunner, Tools);
tool.Run(Settings);
}
}
}
| 25.666667 | 87 | 0.636364 | [
"MIT"
] | cake-contrib/Cake.VsCode | Source/Cake.VsCode.Tests/VscePackagerFixture.cs | 310 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class EditorModeUI : MonoBehaviour
{
public TabButton mapButton;
public TabButton propButton;
public TabButton encounterButton;
private UIManager _uiManager;
private void Awake()
{
_uiManager = UIManager.GetInstance();
}
void Start()
{
mapButton.SetupAction(() => SelectButton(EditMode.Terrain));
propButton.SetupAction(() => SelectButton(EditMode.Prefab));
encounterButton.SetupAction(() => SelectButton(EditMode.Encounter));
mapButton.Select();
}
void SelectButton(EditMode editMode)
{
_uiManager.SetEditMode(editMode);
mapButton.Unselect();
propButton.Unselect();
encounterButton.Unselect();
}
}
| 23.052632 | 77 | 0.643836 | [
"MIT"
] | ambid17/PlanarWorlds | Assets/Scripts/UI/EditorModeUI.cs | 876 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Kujikatsu043.Algorithms;
using Kujikatsu043.Collections;
using Kujikatsu043.Extensions;
using Kujikatsu043.Numerics;
using Kujikatsu043.Questions;
namespace Kujikatsu043.Questions
{
/// <summary>
/// https://atcoder.jp/contests/cf16-final/tasks/codefestival_2016_final_b
/// </summary>
public class QuestionC : AtCoderQuestionBase
{
public override IEnumerable<object> Solve(TextReader inputStream)
{
var n = inputStream.ReadInt();
int max;
for (max = 1; true; max++)
{
if (max * (max + 1) / 2 >= n)
{
break;
}
}
var over = max * (max + 1) / 2 - n;
for (int i = 1; i <= max; i++)
{
if (i != over)
{
yield return i;
}
}
}
}
}
| 25.136364 | 78 | 0.533454 | [
"MIT"
] | terry-u16/AtCoder | Kujikatsu043/Kujikatsu043/Kujikatsu043/Questions/QuestionC.cs | 1,108 | C# |
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: keyboard.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Naki3D.Common.Protocol {
/// <summary>Holder for reflection information generated from keyboard.proto</summary>
public static partial class KeyboardReflection {
#region Descriptor
/// <summary>File descriptor for keyboard.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static KeyboardReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Cg5rZXlib2FyZC5wcm90bxIWbmFraTNkLmNvbW1vbi5wcm90b2NvbCJaChJL",
"ZXlib2FyZFVwZGF0ZURhdGESMwoEdHlwZRgBIAEoDjIlLm5ha2kzZC5jb21t",
"b24ucHJvdG9jb2wuS2V5QWN0aW9uVHlwZRIPCgdrZXljb2RlGAIgASgFKikK",
"DUtleUFjdGlvblR5cGUSCgoGS0VZX1VQEAASDAoIS0VZX0RPV04QAWIGcHJv",
"dG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Naki3D.Common.Protocol.KeyActionType), }, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Naki3D.Common.Protocol.KeyboardUpdateData), global::Naki3D.Common.Protocol.KeyboardUpdateData.Parser, new[]{ "Type", "Keycode" }, null, null, null, null)
}));
}
#endregion
}
#region Enums
public enum KeyActionType {
[pbr::OriginalName("KEY_UP")] KeyUp = 0,
[pbr::OriginalName("KEY_DOWN")] KeyDown = 1,
}
#endregion
#region Messages
/// <summary>
/// Raspi -> Device
/// </summary>
public sealed partial class KeyboardUpdateData : pb::IMessage<KeyboardUpdateData>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<KeyboardUpdateData> _parser = new pb::MessageParser<KeyboardUpdateData>(() => new KeyboardUpdateData());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<KeyboardUpdateData> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Naki3D.Common.Protocol.KeyboardReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public KeyboardUpdateData() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public KeyboardUpdateData(KeyboardUpdateData other) : this() {
type_ = other.type_;
keycode_ = other.keycode_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public KeyboardUpdateData Clone() {
return new KeyboardUpdateData(this);
}
/// <summary>Field number for the "type" field.</summary>
public const int TypeFieldNumber = 1;
private global::Naki3D.Common.Protocol.KeyActionType type_ = global::Naki3D.Common.Protocol.KeyActionType.KeyUp;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Naki3D.Common.Protocol.KeyActionType Type {
get { return type_; }
set {
type_ = value;
}
}
/// <summary>Field number for the "keycode" field.</summary>
public const int KeycodeFieldNumber = 2;
private int keycode_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int Keycode {
get { return keycode_; }
set {
keycode_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as KeyboardUpdateData);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(KeyboardUpdateData other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Type != other.Type) return false;
if (Keycode != other.Keycode) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (Type != global::Naki3D.Common.Protocol.KeyActionType.KeyUp) hash ^= Type.GetHashCode();
if (Keycode != 0) hash ^= Keycode.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Type != global::Naki3D.Common.Protocol.KeyActionType.KeyUp) {
output.WriteRawTag(8);
output.WriteEnum((int) Type);
}
if (Keycode != 0) {
output.WriteRawTag(16);
output.WriteInt32(Keycode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Type != global::Naki3D.Common.Protocol.KeyActionType.KeyUp) {
output.WriteRawTag(8);
output.WriteEnum((int) Type);
}
if (Keycode != 0) {
output.WriteRawTag(16);
output.WriteInt32(Keycode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (Type != global::Naki3D.Common.Protocol.KeyActionType.KeyUp) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
}
if (Keycode != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Keycode);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(KeyboardUpdateData other) {
if (other == null) {
return;
}
if (other.Type != global::Naki3D.Common.Protocol.KeyActionType.KeyUp) {
Type = other.Type;
}
if (other.Keycode != 0) {
Keycode = other.Keycode;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
Type = (global::Naki3D.Common.Protocol.KeyActionType) input.ReadEnum();
break;
}
case 16: {
Keycode = input.ReadInt32();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
Type = (global::Naki3D.Common.Protocol.KeyActionType) input.ReadEnum();
break;
}
case 16: {
Keycode = input.ReadInt32();
break;
}
}
}
}
#endif
}
#endregion
}
#endregion Designer generated code
| 35.387324 | 210 | 0.671841 | [
"MIT"
] | iimcz/cmtoolbox | backend/Generated/Protobuf/Keyboard.cs | 10,050 | C# |
namespace LearningSystem.Infrastructure
{
using LearningSystem.Core.Entities;
using LearningSystem.Core.Repositories;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
public class Repository<TEntity> : IRepository<TEntity> where TEntity : class, IEntity
{
protected readonly DataContext context;
protected DbSet<TEntity> entities;
protected IQueryable<TEntity> queriableEntities;
string errorMessage = string.Empty;
public Repository(DataContext context)
{
this.context = context;
entities = context.Set<TEntity>();
queriableEntities = context.Set<TEntity>();
}
public IEnumerable<TEntity> GetAll()
{
return queriableEntities.AsEnumerable();
}
public TEntity Get(int id)
{
return queriableEntities.SingleOrDefault(s => s.Id == id);
}
public void Insert(TEntity entity)
{
if (entity == null)
{
throw new ArgumentNullException("entity");
}
((IAuditInfo)entity).CreatedDate = DateTime.Now;
entities.Add(entity);
context.SaveChanges();
}
public void Update(TEntity entity)
{
if (entity == null)
{
throw new ArgumentNullException("entity");
}
var entityDb = this.Get(entity.Id);
context.Entry(entityDb).State = EntityState.Detached;
((IAuditInfo)entity).CreatedDate = ((IAuditInfo)entityDb).CreatedDate;
((IAuditInfo)entity).ModifiedDate = DateTime.Now;
context.Entry(entity).State = EntityState.Modified;
context.SaveChanges();
}
public void Delete(TEntity entity)
{
if (entity == null)
{
throw new ArgumentNullException("entity");
}
entities.Remove(entity);
context.SaveChanges();
}
public void SaveChanges()
{
context.SaveChanges();
}
public IRepository<TEntity> Include<TProperty>(Expression<Func<TEntity, TProperty>> navigationPropertyPath)
{
queriableEntities = queriableEntities.Include(navigationPropertyPath);
return this;
}
public IRepository<TEntity> ThenInclude<TPreviousProperty, TProperty>(Expression<Func<TPreviousProperty, TProperty>> navigationPropertyPath)
{
var includableQueryableEntities = queriableEntities as IIncludableQueryable<TEntity, TPreviousProperty>;
if (includableQueryableEntities != null)
{
queriableEntities = includableQueryableEntities.ThenInclude(navigationPropertyPath);
}
else
{
var includableQueryableListEntities = queriableEntities as IIncludableQueryable<TEntity, List<TPreviousProperty>>;
queriableEntities = includableQueryableListEntities.ThenInclude(navigationPropertyPath);
}
return this;
}
}
} | 32.539216 | 148 | 0.600181 | [
"MIT"
] | VGGeorgiev/LearningSystem | LearningSystem.Infrastructure/Repositories/Repository.cs | 3,321 | C# |
using System;
using System.Collections.Generic;
namespace ReunionGet.Parser
{
public static class BEncoding
{
public static object Read(ReadOnlySpan<byte> content, bool strict = false)
{
var reader = new BEncodingReader(content);
object obj = ReadCore(ref reader, strict);
if (!reader.Ends())
throw new FormatException("Unexpected content after ending.");
return obj;
}
private static object ReadCore(ref BEncodingReader reader, bool strict)
{
if (reader.TryReadInt64(out long l, strict))
{
return l;
}
else if (reader.TryReadString(out string? str))
{
return str;
}
else if (reader.TryReadListStart())
{
var list = new List<object>();
while (!reader.TryReadListDictEnd())
list.Add(ReadCore(ref reader, strict));
return list;
}
else if (reader.TryReadDictStart())
{
var dict = new Dictionary<string, object>();
string? lastKey = null;
while (!reader.TryReadListDictEnd())
{
string key = reader.ReadString();
if (strict &&
string.CompareOrdinal(lastKey, key) >= 0)
throw new FormatException("Dictionary keys must appear in sorted order.");
lastKey = key;
dict.Add(key, ReadCore(ref reader, strict));
}
return dict;
}
else
{
throw new FormatException("Can't read current state as any type of object.");
}
}
}
}
| 29.571429 | 98 | 0.483629 | [
"MIT"
] | huoyaoyuan/ReunionGet | Source/Portable/ReunionGet.Parser/BEncoding.cs | 1,865 | C# |
using System;
using System.Collections;
using System.Xml;
namespace Nessus.Data
{
public class NessusManager : IDisposable
{
NessusManagerSession _session;
int RandomNumber { get { return new Random().Next(9999); } }
/// <summary>
/// Initializes a new instance of the <see cref="AutoAssess.Data.Nessus.NessusManager"/> class.
/// </summary>
/// <param name='sess'>
/// NessesManagerSession configured to connect to the nessus host.
/// </param>
public NessusManager (NessusManagerSession sess)
{
_session = sess;
}
/// <summary>
/// Login the specified username, password and loggedIn.
/// </summary>
/// <param name='username'>
/// Username.
/// </param>
/// <param name='password'>
/// Password.
/// </param>
/// <param name='loggedIn'>
/// Logged in.
/// </param>
public XmlDocument Login(string username, string password, out bool loggedIn)
{
return this.Login(username, password, this.RandomNumber, out loggedIn);
}
/// <summary>
/// Login the specified username, password, seq and loggedIn.
/// </summary>
/// <param name='username'>
/// Username.
/// </param>
/// <param name='password'>
/// Password.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <param name='loggedIn'>
/// Logged in.
/// </param>
public XmlDocument Login(string username, string password, int seq, out bool loggedIn)
{
return _session.Authenticate(username, password, seq, out loggedIn);
}
/// <summary>
/// Logout this instance.
/// </summary>
public XmlDocument Logout ()
{
return this.Logout(this.RandomNumber);
}
/// <summary>
/// Logout the specified seq.
/// </summary>
/// <param name='seq'>
/// Seq.
/// </param>
public XmlDocument Logout(int seq)
{
Hashtable options = new Hashtable();
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/logout", options);
return response;
}
/// <summary>
/// Adds the user.
/// </summary>
/// <returns>
/// The user.
/// </returns>
/// <param name='username'>
/// Username.
/// </param>
/// <param name='password'>
/// Password.
/// </param>
/// <param name='isAdmin'>
/// Is admin.
/// </param>
public XmlDocument AddUser(string username, string password, bool isAdmin)
{
return this.AddUser(username, password, isAdmin, this.RandomNumber);
}
/// <summary>
/// Adds the user.
/// </summary>
/// <returns>
/// The user.
/// </returns>
/// <param name='username'>
/// Username.
/// </param>
/// <param name='password'>
/// Password.
/// </param>
/// <param name='isAdmin'>
/// Is admin.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument AddUser(string username, string password, bool isAdmin, int seq)
{
if (!_session.IsAuthenticated || !_session.IsAdministrator)
throw new Exception("Not authenticated or not administrator");
Hashtable options = new Hashtable();
options.Add("seq", seq);
options.Add("password", password);
options.Add("admin", isAdmin ? "1" : "0");
options.Add("login", username);
XmlDocument response = _session.ExecuteCommand("/users/add", options);
return response;
}
/// <summary>
/// Deletes the user.
/// </summary>
/// <returns>
/// The user.
/// </returns>
/// <param name='username'>
/// Username.
/// </param>
public XmlDocument DeleteUser(string username)
{
return this.DeleteUser(username, this.RandomNumber);
}
/// <summary>
/// Deletes the user.
/// </summary>
/// <returns>
/// The user.
/// </returns>
/// <param name='username'>
/// Username.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument DeleteUser(string username, int seq)
{
if (!_session.IsAuthenticated || !_session.IsAdministrator)
throw new Exception("Not authed or not admin");
Hashtable options = new Hashtable();
options.Add("login", username);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/users/delete", options);
return response;
}
/// <summary>
/// Edits the user.
/// </summary>
/// <returns>
/// The user.
/// </returns>
/// <param name='username'>
/// Username.
/// </param>
/// <param name='password'>
/// Password.
/// </param>
/// <param name='isAdmin'>
/// Is admin.
/// </param>
public XmlDocument EditUser(string username, string password, bool isAdmin)
{
return this.EditUser(username, password, isAdmin, this.RandomNumber);
}
/// <summary>
/// Edits the user.
/// </summary>
/// <returns>
/// The user.
/// </returns>
/// <param name='username'>
/// Username.
/// </param>
/// <param name='password'>
/// Password.
/// </param>
/// <param name='isAdmin'>
/// Is admin.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument EditUser(string username, string password, bool isAdmin, int seq)
{
if (!_session.IsAuthenticated || !_session.IsAdministrator)
throw new Exception("Not authed or not admin.");
Hashtable options = new Hashtable();
options.Add("login", username);
options.Add("password", password);
options.Add("admin", isAdmin ? "1" : "0");
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/users/edit", options);
return response;
}
/// <summary>
/// Changes the user password.
/// </summary>
/// <returns>
/// The user password.
/// </returns>
/// <param name='username'>
/// Username.
/// </param>
/// <param name='password'>
/// Password.
/// </param>
public XmlDocument ChangeUserPassword(string username, string password)
{
return this.ChangeUserPassword(username, password, this.RandomNumber);
}
/// <summary>
/// Changes the user password.
/// </summary>
/// <returns>
/// The user password.
/// </returns>
/// <param name='username'>
/// Username.
/// </param>
/// <param name='password'>
/// Password.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ChangeUserPassword(string username, string password, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("login", username);
options.Add("password", password);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/users/chpasswd", options);
return response;
}
/// <summary>
/// Lists the users.
/// </summary>
/// <returns>
/// The users.
/// </returns>
public XmlDocument ListUsers()
{
return this.ListUsers(this.RandomNumber);
}
/// <summary>
/// Lists the users.
/// </summary>
/// <returns>
/// The users.
/// </returns>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ListUsers(int seq)
{
if (!_session.IsAuthenticated || !_session.IsAdministrator)
throw new Exception("Not authed or not admin.");
Hashtable options = new Hashtable();
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/users/list", options);
return response;
}
/// <summary>
/// Lists the plugin families.
/// </summary>
/// <returns>
/// The plugin families.
/// </returns>
public XmlDocument ListPluginFamilies()
{
return this.ListPluginFamilies(this.RandomNumber);
}
/// <summary>
/// Lists the plugin families.
/// </summary>
/// <returns>
/// The plugin families.
/// </returns>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ListPluginFamilies(int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/plugins/list", options);
return response;
}
/// <summary>
/// Lists the plugins by family.
/// </summary>
/// <returns>
/// The plugins by family.
/// </returns>
/// <param name='family'>
/// Family.
/// </param>
public XmlDocument ListPluginsByFamily(string family)
{
return this.ListPluginsByFamily(family, this.RandomNumber);
}
/// <summary>
/// Lists the plugins by family.
/// </summary>
/// <returns>
/// The plugins by family.
/// </returns>
/// <param name='family'>
/// Family.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ListPluginsByFamily(string family, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("family", family);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/plugins/list/family", options);
return response;
}
/// <summary>
/// Gets the plugin descroption by filename.
/// </summary>
/// <returns>
/// The plugin descroption by filename.
/// </returns>
/// <param name='filename'>
/// Filename.
/// </param>
public XmlDocument GetPluginDescriptionByFilename(string filename)
{
return this.GetPluginDescriptionByFilename(filename, this.RandomNumber);
}
/// <summary>
/// Gets the plugin description by filename.
/// </summary>
/// <returns>
/// The plugin description by filename.
/// </returns>
/// <param name='filename'>
/// Filename.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument GetPluginDescriptionByFilename(string filename, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("fname", filename);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/plugins/description", options);
return response;
}
/// <summary>
/// Lists the policies.
/// </summary>
/// <returns>
/// The policies.
/// </returns>
public XmlDocument ListPolicies()
{
return this.ListPolicies(this.RandomNumber);
}
/// <summary>
/// Lists the policies.
/// </summary>
/// <returns>
/// The policies.
/// </returns>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ListPolicies(int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/policy/list", options);
return response;
}
public XmlDocument ListTemplates()
{
return this.ListTemplates(this.RandomNumber);
}
/// <summary>
/// Lists the policies.
/// </summary>
/// <returns>
/// The policies.
/// </returns>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ListTemplates(int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/scan/template/list", options);
return response;
}
/// <summary>
/// Deletes the policy.
/// </summary>
/// <returns>
/// The policy.
/// </returns>
/// <param name='policyID'>
/// Policy I.
/// </param>
public XmlDocument DeletePolicy(int policyID)
{
return this.DeletePolicy(policyID, this.RandomNumber);
}
/// <summary>
/// Deletes the policy.
/// </summary>
/// <returns>
/// The policy.
/// </returns>
/// <param name='policyID'>
/// Policy ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument DeletePolicy(int policyID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("policy_id", policyID);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/policy/delete", options);
return response;
}
/// <summary>
/// Copies the policy.
/// </summary>
/// <returns>
/// The policy.
/// </returns>
/// <param name='policyID'>
/// Policy ID.
/// </param>
public XmlDocument CopyPolicy(int policyID)
{
return this.CopyPolicy(policyID, this.RandomNumber);
}
/// <summary>
/// Copies the policy.
/// </summary>
/// <returns>
/// The policy.
/// </returns>
/// <param name='policyID'>
/// Policy ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument CopyPolicy(int policyID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("policy_id", policyID);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/policy/copy", options);
return response;
}
/// <summary>
/// Gets the feed information.
/// </summary>
/// <returns>
/// The feed information.
/// </returns>
public XmlDocument GetFeedInformation()
{
return this.GetFeedInformation(this.RandomNumber);
}
/// <summary>
/// Gets the feed information.
/// </summary>
/// <returns>
/// The feed information.
/// </returns>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument GetFeedInformation(int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed");
Hashtable options = new Hashtable();
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/feed/", options);
return response;
}
/// <summary>
/// Creates the scan.
/// </summary>
/// <returns>
/// The scan.
/// </returns>
/// <param name='target'>
/// Target.
/// </param>
/// <param name='policyID'>
/// Policy ID.
/// </param>
/// <param name='name'>
/// Name.
/// </param>
public XmlDocument CreateScan(string target, int policyID, string name)
{
return this.CreateScan(target, policyID, name, this.RandomNumber);
}
/// <summary>
/// Creates the scan.
/// </summary>
/// <returns>
/// The scan.
/// </returns>
/// <param name='target'>
/// Target.
/// </param>
/// <param name='policyID'>
/// Policy ID.
/// </param>
/// <param name='name'>
/// Name.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument CreateScan(string target, int policyID, string name, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("target", target);
options.Add("policy_id", policyID);
options.Add("scan_name", name);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/scan/new", options);
return response;
}
/// <summary>
/// Stops the scan.
/// </summary>
/// <returns>
/// The scan.
/// </returns>
/// <param name='scanID'>
/// Scan ID.
/// </param>
public XmlDocument StopScan(String scanID)
{
return this.StopScan(scanID, this.RandomNumber);
}
/// <summary>
/// Stops the scan.
/// </summary>
/// <returns>
/// The scan.
/// </returns>
/// <param name='scanID'>
/// Scan ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument StopScan(String scanID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("scan_uuid", scanID.ToString());
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/scan/stop", options);
return response;
}
/// <summary>
/// Pauses the scan.
/// </summary>
/// <returns>
/// The scan.
/// </returns>
/// <param name='scanID'>
/// Scan ID.
/// </param>
public XmlDocument PauseScan(String scanID)
{
return this.PauseScan(scanID, this.RandomNumber);
}
/// <summary>
/// Pauses the scan.
/// </summary>
/// <returns>
/// The scan.
/// </returns>
/// <param name='scanID'>
/// Scan ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument PauseScan(String scanID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("scan_uuid", scanID);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/scan/pause", options);
return response;
}
/// <summary>
/// Resumes the scan.
/// </summary>
/// <returns>
/// The scan.
/// </returns>
/// <param name='scanID'>
/// Scan ID.
/// </param>
public XmlDocument ResumeScan(String scanID)
{
return this.ResumeScan(scanID, this.RandomNumber);
}
/// <summary>
/// Resumes the scan.
/// </summary>
/// <returns>
/// The scan.
/// </returns>
/// <param name='scanID'>
/// Scan ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ResumeScan(String scanID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("scan_uuid", scanID);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/scan/resume", options);
return response;
}
/// <summary>
/// Lists the scans.
/// </summary>
/// <returns>
/// The scans.
/// </returns>
public XmlDocument ListScans()
{
return this.ListScans(this.RandomNumber);
}
/// <summary>
/// Lists the scans.
/// </summary>
/// <returns>
/// The scans.
/// </returns>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ListScans(int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/scan/list", options);
return response;
}
/// <summary>
/// Creates the scan template.
/// </summary>
/// <returns>
/// The scan template.
/// </returns>
/// <param name='name'>
/// Name.
/// </param>
/// <param name='policyID'>
/// Policy ID.
/// </param>
/// <param name='target'>
/// Target.
/// </param>
public XmlDocument CreateScanTemplate(string name, int policyID, string target)
{
return this.CreateScanTemplate(name, policyID, target, this.RandomNumber);
}
/// <summary>
/// Creates the scan template.
/// </summary>
/// <returns>
/// The scan template.
/// </returns>
/// <param name='name'>
/// Name.
/// </param>
/// <param name='policyID'>
/// Policy ID.
/// </param>
/// <param name='target'>
/// Target.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument CreateScanTemplate(string name, int policyID, string target, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("template_name", name);
options.Add("policy_id", policyID);
options.Add("target", target);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/scan/template/new", options);
return response;
}
/// <summary>
/// Edits the scan template.
/// </summary>
/// <returns>
/// The scan template.
/// </returns>
/// <param name='name'>
/// Name.
/// </param>
/// <param name='readableName'>
/// Readable name.
/// </param>
/// <param name='policyID'>
/// Policy ID.
/// </param>
/// <param name='target'>
/// Target.
/// </param>
public XmlDocument EditScanTemplate(string name, string readableName, int policyID, string target)
{
return this.EditScanTemplate(name, readableName, policyID, target, this.RandomNumber);
}
/// <summary>
/// Edits the scan template.
/// </summary>
/// <returns>
/// The scan template.
/// </returns>
/// <param name='name'>
/// Name.
/// </param>
/// <param name='readableName'>
/// Readable name.
/// </param>
/// <param name='policyID'>
/// Policy ID.
/// </param>
/// <param name='target'>
/// Target.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument EditScanTemplate(string name, string readableName, int policyID, string target, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("template", name);
options.Add("template_name", readableName);
options.Add("policy_id", policyID);
options.Add("target", target);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/scan/template/edit", options);
return response;
}
/// <summary>
/// Deletes the scan template.
/// </summary>
/// <returns>
/// The scan template.
/// </returns>
/// <param name='name'>
/// Name.
/// </param>
public XmlDocument DeleteScanTemplate(string name)
{
return this.DeleteScanTemplate(name, this.RandomNumber);
}
/// <summary>
/// Deletes the scan template.
/// </summary>
/// <returns>
/// The scan template.
/// </returns>
/// <param name='name'>
/// Name.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument DeleteScanTemplate(string name, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("template", name);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/scan/template/delete", options);
return response;
}
/// <summary>
/// Launchs the scan template.
/// </summary>
/// <returns>
/// The scan template.
/// </returns>
/// <param name='name'>
/// Name.
/// </param>
public XmlDocument LaunchScanTemplate(string name)
{
return this.LaunchScanTemplate(name, this.RandomNumber);
}
/// <summary>
/// Launchs the scan template.
/// </summary>
/// <returns>
/// The scan template.
/// </returns>
/// <param name='name'>
/// Name.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument LaunchScanTemplate(string name, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("template", name);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/scan/template/launch", options);
return response;
}
/// <summary>
/// Lists the reports.
/// </summary>
/// <returns>
/// The reports.
/// </returns>
public XmlDocument ListReports()
{
return this.ListReports(this.RandomNumber);
}
/// <summary>
/// Lists the reports.
/// </summary>
/// <returns>
/// The reports.
/// </returns>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ListReports(int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/report/list", options);
return response;
}
/// <summary>
/// Deletes the report.
/// </summary>
/// <returns>
/// The report.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
public XmlDocument DeleteReport(string reportID)
{
return this.DeleteReport(reportID, this.RandomNumber);
}
/// <summary>
/// Deletes the report.
/// </summary>
/// <returns>
/// The report.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument DeleteReport(string reportID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("report", reportID);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/report/delete", options);
return response;
}
/// <summary>
/// Gets the report hosts.
/// </summary>
/// <returns>
/// The report hosts.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
public XmlDocument GetReportHosts(string reportID)
{
return this.GetReportHosts(reportID, this.RandomNumber);
}
/// <summary>
/// Gets the report hosts.
/// </summary>
/// <returns>
/// The report hosts.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument GetReportHosts(string reportID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("report", reportID);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/report2/hosts", options);
return response;
}
/// <summary>
/// Gets the ports for host from report.
/// </summary>
/// <returns>
/// The ports for host from report.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='host'>
/// Host.
/// </param>
public XmlDocument GetPortsForHostFromReport(string reportID, string host)
{
return this.GetPortsForHostFromReport(reportID, host, this.RandomNumber);
}
/// <summary>
/// Gets the ports for host from report.
/// </summary>
/// <returns>
/// The ports for host from report.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='host'>
/// Host.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument GetPortsForHostFromReport(string reportID, string host, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("report", reportID);
options.Add("hostname", host);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/report2/ports", options);
return response;
}
/// <summary>
/// Check if Report has an Audit Trail for plugin execution
/// </summary>
/// <returns>
/// The report hosts.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
public XmlDocument ReportHasAudit(string reportID)
{
return this.ReportHasAudit(reportID, this.RandomNumber);
}
/// <summary>
/// Check if Report has an Audit Trail for plugin execution
/// </summary>
/// <returns>
/// The report hosts.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ReportHasAudit(string reportID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("report", reportID);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/report/hasAuditTrail", options);
return response;
}
/// <summary>
/// Checks if the report has a KB with debugging data.
/// </summary>
/// <returns>
/// The report hosts.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
public XmlDocument ReportHasKB(string reportID)
{
return this.ReportHasKB(reportID, this.RandomNumber);
}
/// <summary>
/// Checks if the report has a KB with debugging data.
/// </summary>
/// <returns>
/// The report hosts.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument ReportHasKB(string reportID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("report", reportID);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/report/hasKB", options);
return response;
}
/// <summary>
/// Retrives a specific plugin execution audit trail.
/// </summary>
/// <returns>
/// The report hosts.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='plugin_id'>
/// Plugin ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
public XmlDocument GetAuditTrail(string reportID, string host, int plugin_id)
{
return this.GetAuditTrail(reportID, host, plugin_id, this.RandomNumber);
}
/// <summary>
/// Retrives a specific plugin execution audit trail.
/// </summary>
/// <returns>
/// The report hosts.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='plugin_id'>
/// Plugin ID.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument GetAuditTrail(string reportID, string host, int plugin_id, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("plugin_id", plugin_id);
options.Add("report", reportID);
options.Add("hostname", host);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/report/trail-details", options);
return response;
}
/// <summary>
/// Gets the report details by port and host.
/// </summary>
/// <returns>
/// The report details by port and host.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='host'>
/// Host.
/// </param>
/// <param name='port'>
/// Port.
/// </param>
/// <param name='protocol'>
/// Protocol.
/// </param>
public XmlDocument GetReportDetailsByPortAndHost(string reportID, string host, int port, string protocol)
{
return this.GetReportDetailsByPortAndHost(reportID, host, port, protocol, this.RandomNumber);
}
/// <summary>
/// Gets the report details by port and host.
/// </summary>
/// <returns>
/// The report details by port and host.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='host'>
/// Host.
/// </param>
/// <param name='port'>
/// Port.
/// </param>
/// <param name='protocol'>
/// Protocol.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument GetReportDetailsByPortAndHost(string reportID, string host, int port, string protocol, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("report", reportID);
options.Add("hostname", host);
options.Add("port", port);
options.Add("protocol", protocol);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/report/details", options);
return response;
}
/// <summary>
/// Gets the report tags.
/// </summary>
/// <returns>
/// The report tags.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='host'>
/// Host.
/// </param>
public XmlDocument GetReportTags(Guid reportID, string host)
{
return this.GetReportTags(reportID, host, this.RandomNumber);
}
/// <summary>
/// Gets the report tags.
/// </summary>
/// <returns>
/// The report tags.
/// </returns>
/// <param name='reportID'>
/// Report ID.
/// </param>
/// <param name='host'>
/// Host.
/// </param>
/// <param name='seq'>
/// Seq.
/// </param>
/// <exception cref='Exception'>
/// Represents errors that occur during application execution.
/// </exception>
public XmlDocument GetReportTags(Guid reportID, string host, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("report", reportID.ToString());
options.Add("hostname", host);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/report/tags", options);
return response;
}
public XmlDocument GetNessusV2Report(string reportID)
{
return this.GetNessusV2Report(reportID, this.RandomNumber);
}
public XmlDocument GetNessusV2Report(string reportID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("report", reportID);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/file/report/download", options);
return response;
}
public XmlDocument GetNessusReportErros(string reportID)
{
return this.GetNessusReportErros(reportID, this.RandomNumber);
}
public XmlDocument GetNessusReportErros(string reportID, int seq)
{
if (!_session.IsAuthenticated)
throw new Exception("Not authed.");
Hashtable options = new Hashtable();
options.Add("report", reportID);
options.Add("seq", seq);
XmlDocument response = _session.ExecuteCommand("/report/errors", options);
return response;
}
public void Dispose()
{}
}
}
| 24.626302 | 116 | 0.592423 | [
"Apache-2.0"
] | breakersall/Posh-SecMod | Nessus/nessus-sharp/NessusManager.cs | 37,826 | C# |
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PureCloudPlatform.Client.V2.Client;
namespace PureCloudPlatform.Client.V2.Model
{
/// <summary>
/// CampaignProgressNotificationUriReference
/// </summary>
[DataContract]
public partial class CampaignProgressNotificationUriReference : IEquatable<CampaignProgressNotificationUriReference>
{
/// <summary>
/// Initializes a new instance of the <see cref="CampaignProgressNotificationUriReference" /> class.
/// </summary>
/// <param name="Id">Id.</param>
/// <param name="Name">Name.</param>
public CampaignProgressNotificationUriReference(string Id = null, string Name = null)
{
this.Id = Id;
this.Name = Name;
}
/// <summary>
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public string Id { get; set; }
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name="name", EmitDefaultValue=false)]
public string Name { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class CampaignProgressNotificationUriReference {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Name: ").Append(Name).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 string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as CampaignProgressNotificationUriReference);
}
/// <summary>
/// Returns true if CampaignProgressNotificationUriReference instances are equal
/// </summary>
/// <param name="other">Instance of CampaignProgressNotificationUriReference to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(CampaignProgressNotificationUriReference other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return true &&
(
this.Id == other.Id ||
this.Id != null &&
this.Id.Equals(other.Id)
) &&
(
this.Name == other.Name ||
this.Name != null &&
this.Name.Equals(other.Name)
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
// credit: http://stackoverflow.com/a/263416/677735
unchecked // Overflow is fine, just wrap
{
int hash = 41;
// Suitable nullity checks etc, of course :)
if (this.Id != null)
hash = hash * 59 + this.Id.GetHashCode();
if (this.Name != null)
hash = hash * 59 + this.Name.GetHashCode();
return hash;
}
}
}
}
| 26.438889 | 121 | 0.472158 | [
"MIT"
] | maxwang/platform-client-sdk-dotnet | build/src/PureCloudPlatform.Client.V2/Model/CampaignProgressNotificationUriReference.cs | 4,759 | C# |
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq.Expressions;
using System.Reflection;
using System.Threading.Tasks;
using Orleans.CodeGeneration;
using Orleans.Runtime.Configuration;
using Orleans.Runtime.ConsistentRing;
using Orleans.Runtime.GrainDirectory;
using Orleans.Runtime.Providers;
using Orleans.Runtime.Scheduler;
using Orleans.Serialization;
using Orleans.Storage;
using Orleans.Streams;
namespace Orleans.Runtime
{
/// <summary>
/// Internal class for system grains to get access to runtime object
/// </summary>
internal class InsideRuntimeClient : IRuntimeClient
{
private static readonly Logger logger = LogManager.GetLogger("InsideRuntimeClient", LoggerType.Runtime);
private static readonly Logger invokeExceptionLogger = LogManager.GetLogger("Grain.InvokeException", LoggerType.Application);
private static readonly Logger appLogger = LogManager.GetLogger("Application", LoggerType.Application);
private readonly Dispatcher dispatcher;
private readonly ILocalGrainDirectory directory;
private readonly List<IDisposable> disposables;
private readonly ConcurrentDictionary<CorrelationId, CallbackData> callbacks;
private readonly InterceptedMethodInvokerCache interceptedMethodInvokerCache = new InterceptedMethodInvokerCache();
public TimeSpan ResponseTimeout { get; private set; }
private readonly GrainTypeManager typeManager;
private IGrainTypeResolver grainInterfaceMap;
internal readonly IConsistentRingProvider ConsistentRingProvider;
public InsideRuntimeClient(
Dispatcher dispatcher,
Catalog catalog,
ILocalGrainDirectory directory,
SiloAddress silo,
ClusterConfiguration config,
IConsistentRingProvider ring,
GrainTypeManager typeManager,
GrainFactory grainFactory)
{
this.dispatcher = dispatcher;
MySilo = silo;
this.directory = directory;
ConsistentRingProvider = ring;
Catalog = catalog;
disposables = new List<IDisposable>();
callbacks = new ConcurrentDictionary<CorrelationId, CallbackData>();
Config = config;
config.OnConfigChange("Globals/Message", () => ResponseTimeout = Config.Globals.ResponseTimeout);
RuntimeClient.Current = this;
this.typeManager = typeManager;
this.InternalGrainFactory = grainFactory;
}
public static InsideRuntimeClient Current { get { return (InsideRuntimeClient)RuntimeClient.Current; } }
public IStreamProviderManager CurrentStreamProviderManager { get; internal set; }
public IStreamProviderRuntime CurrentStreamProviderRuntime { get; internal set; }
public Catalog Catalog { get; private set; }
public SiloAddress MySilo { get; private set; }
public Dispatcher Dispatcher { get { return dispatcher; } }
public ClusterConfiguration Config { get; private set; }
public OrleansTaskScheduler Scheduler { get { return Dispatcher.Scheduler; } }
public IGrainFactory GrainFactory { get { return InternalGrainFactory; } }
public GrainFactory InternalGrainFactory { get; private set; }
#region Implementation of IRuntimeClient
public void SendRequest(
GrainReference target,
InvokeMethodRequest request,
TaskCompletionSource<object> context,
Action<Message, TaskCompletionSource<object>> callback,
string debugContext,
InvokeMethodOptions options,
string genericArguments = null)
{
var message = Message.CreateMessage(request, options);
SendRequestMessage(target, message, context, callback, debugContext, options, genericArguments);
}
private void SendRequestMessage(
GrainReference target,
Message message,
TaskCompletionSource<object> context,
Action<Message, TaskCompletionSource<object>> callback,
string debugContext,
InvokeMethodOptions options,
string genericArguments = null)
{
// fill in sender
if (message.SendingSilo == null)
message.SendingSilo = MySilo;
if (!String.IsNullOrEmpty(genericArguments))
message.GenericGrainType = genericArguments;
SchedulingContext schedulingContext = RuntimeContext.Current != null ?
RuntimeContext.Current.ActivationContext as SchedulingContext : null;
ActivationData sendingActivation = null;
if (schedulingContext == null)
{
throw new InvalidOperationException(
String.Format("Trying to send a message {0} on a silo not from within grain and not from within system target (RuntimeContext is not set to SchedulingContext) "
+ "RuntimeContext.Current={1} TaskScheduler.Current={2}",
message,
RuntimeContext.Current == null ? "null" : RuntimeContext.Current.ToString(),
TaskScheduler.Current));
}
switch (schedulingContext.ContextType)
{
case SchedulingContextType.SystemThread:
throw new ArgumentException(
String.Format("Trying to send a message {0} on a silo not from within grain and not from within system target (RuntimeContext is of SchedulingContextType.SystemThread type)", message), "context");
case SchedulingContextType.Activation:
message.SendingActivation = schedulingContext.Activation.ActivationId;
message.SendingGrain = schedulingContext.Activation.Grain;
sendingActivation = schedulingContext.Activation;
break;
case SchedulingContextType.SystemTarget:
message.SendingActivation = schedulingContext.SystemTarget.ActivationId;
message.SendingGrain = schedulingContext.SystemTarget.GrainId;
break;
}
// fill in destination
var targetGrainId = target.GrainId;
message.TargetGrain = targetGrainId;
if (targetGrainId.IsSystemTarget)
{
SiloAddress targetSilo = (target.SystemTargetSilo ?? MySilo);
message.TargetSilo = targetSilo;
message.TargetActivation = ActivationId.GetSystemActivation(targetGrainId, targetSilo);
message.Category = targetGrainId.Equals(Constants.MembershipOracleId) ?
Message.Categories.Ping : Message.Categories.System;
}
if (target.IsObserverReference)
{
message.TargetObserverId = target.ObserverId;
}
if (debugContext != null)
message.DebugContext = debugContext;
var oneWay = (options & InvokeMethodOptions.OneWay) != 0;
if (context == null && !oneWay)
logger.Warn(ErrorCode.IGC_SendRequest_NullContext, "Null context {0}: {1}", message, Utils.GetStackTrace());
if (message.IsExpirableMessage(Config.Globals))
message.Expiration = DateTime.UtcNow + ResponseTimeout + Constants.MAXIMUM_CLOCK_SKEW;
if (!oneWay)
{
var callbackData = new CallbackData(
callback,
TryResendMessage,
context,
message,
() => UnRegisterCallback(message.Id),
Config.Globals);
callbacks.TryAdd(message.Id, callbackData);
callbackData.StartTimer(ResponseTimeout);
}
if (targetGrainId.IsSystemTarget)
{
// Messages to system targets bypass the task system and get sent "in-line"
dispatcher.TransportMessage(message);
}
else
{
dispatcher.SendMessage(message, sendingActivation);
}
}
private void SendResponse(Message request, Response response)
{
// Don't process messages that have already timed out
if (request.IsExpired)
{
request.DropExpiredMessage(MessagingStatisticsGroup.Phase.Respond);
return;
}
dispatcher.SendResponse(request, response);
}
/// <summary>
/// Reroute a message coming in through a gateway
/// </summary>
/// <param name="message"></param>
internal void RerouteMessage(Message message)
{
ResendMessageImpl(message);
}
private bool TryResendMessage(Message message)
{
if (!message.MayResend(Config.Globals)) return false;
message.ResendCount = message.ResendCount + 1;
MessagingProcessingStatisticsGroup.OnIgcMessageResend(message);
ResendMessageImpl(message);
return true;
}
internal bool TryForwardMessage(Message message, ActivationAddress forwardingAddress)
{
if (!message.MayForward(Config.Globals)) return false;
message.ForwardCount = message.ForwardCount + 1;
MessagingProcessingStatisticsGroup.OnIgcMessageForwared(message);
ResendMessageImpl(message, forwardingAddress);
return true;
}
private void ResendMessageImpl(Message message, ActivationAddress forwardingAddress = null)
{
if (logger.IsVerbose) logger.Verbose("Resend {0}", message);
message.TargetHistory = message.GetTargetHistory();
if (message.TargetGrain.IsSystemTarget)
{
dispatcher.SendSystemTargetMessage(message);
}
else if (forwardingAddress != null)
{
message.TargetAddress = forwardingAddress;
message.IsNewPlacement = false;
dispatcher.Transport.SendMessage(message);
}
else
{
message.TargetActivation = null;
message.TargetSilo = null;
message.ClearTargetAddress();
dispatcher.SendMessage(message);
}
}
/// <summary>
/// UnRegister a callback.
/// </summary>
/// <param name="id"></param>
private void UnRegisterCallback(CorrelationId id)
{
CallbackData ignore;
callbacks.TryRemove(id, out ignore);
}
public void SniffIncomingMessage(Message message)
{
try
{
if (message.CacheInvalidationHeader != null)
{
foreach (ActivationAddress address in message.CacheInvalidationHeader)
{
directory.InvalidateCacheEntry(address, message.IsReturnedFromRemoteCluster);
}
}
#if false
//// 1:
//// Also record sending activation address for responses only in the cache.
//// We don't record sending addresses for requests, since it is not clear that this silo ever wants to send messages to the grain sending this request.
//// However, it is sure that this silo does send messages to the sender of a reply.
//// In most cases it will already have its address cached, unless it had a wrong outdated address cached and now this is a fresher address.
//// It is anyway always safe to cache the replier address.
//// 2:
//// after further thought decided not to do it.
//// It seems to better not bother caching the sender of a response at all,
//// and instead to take a very occasional hit of a full remote look-up instead of this small but non-zero hit on every response.
//if (message.Direction.Equals(Message.Directions.Response) && message.Result.Equals(Message.ResponseTypes.Success))
//{
// ActivationAddress sender = message.SendingAddress;
// // just make sure address we are about to cache is OK and cachable.
// if (sender.IsComplete && !sender.Grain.IsClient && !sender.Grain.IsSystemTargetType && !sender.Activation.IsSystemTargetType)
// {
// directory.AddCacheEntry(sender);
// }
//}
#endif
}
catch (Exception exc)
{
logger.Warn(ErrorCode.IGC_SniffIncomingMessage_Exc, "SniffIncomingMessage has thrown exception. Ignoring.", exc);
}
}
internal async Task Invoke(IAddressable target, IInvokable invokable, Message message)
{
try
{
// Don't process messages that have already timed out
if (message.IsExpired)
{
message.DropExpiredMessage(MessagingStatisticsGroup.Phase.Invoke);
return;
}
RequestContext.Import(message.RequestContextData);
if (Config.Globals.PerformDeadlockDetection && !message.TargetGrain.IsSystemTarget)
{
UpdateDeadlockInfoInRequestContext(new RequestInvocationHistory(message));
// RequestContext is automatically saved in the msg upon send and propagated to the next hop
// in RuntimeClient.CreateMessage -> RequestContext.ExportToMessage(message);
}
object resultObject;
try
{
var request = (InvokeMethodRequest) message.BodyObject;
if (request.Arguments != null)
{
CancellationSourcesExtension.RegisterCancellationTokens(target, request, logger);
}
var invoker = invokable.GetInvoker(request.InterfaceId, message.GenericGrainType);
if (invoker is IGrainExtensionMethodInvoker
&& !(target is IGrainExtension))
{
// We are trying the invoke a grain extension method on a grain
// -- most likely reason is that the dynamic extension is not installed for this grain
// So throw a specific exception here rather than a general InvalidCastException
var error = String.Format(
"Extension not installed on grain {0} attempting to invoke type {1} from invokable {2}",
target.GetType().FullName, invoker.GetType().FullName, invokable.GetType().FullName);
var exc = new GrainExtensionNotInstalledException(error);
string extraDebugInfo = null;
#if DEBUG
extraDebugInfo = Utils.GetStackTrace();
#endif
logger.Warn(ErrorCode.Stream_ExtensionNotInstalled,
string.Format("{0} for message {1} {2}", error, message, extraDebugInfo), exc);
throw exc;
}
resultObject = await InvokeWithInterceptors(target, request, invoker);
}
catch (Exception exc1)
{
if (invokeExceptionLogger.IsVerbose || message.Direction == Message.Directions.OneWay)
{
invokeExceptionLogger.Warn(ErrorCode.GrainInvokeException,
"Exception during Grain method call of message: " + message, exc1);
}
if (message.Direction != Message.Directions.OneWay)
{
SafeSendExceptionResponse(message, exc1);
}
return;
}
if (message.Direction == Message.Directions.OneWay) return;
SafeSendResponse(message, resultObject);
}
catch (Exception exc2)
{
logger.Warn(ErrorCode.Runtime_Error_100329, "Exception during Invoke of message: " + message, exc2);
if (message.Direction != Message.Directions.OneWay)
SafeSendExceptionResponse(message, exc2);
}
}
private Task<object> InvokeWithInterceptors(IAddressable target, InvokeMethodRequest request, IGrainMethodInvoker invoker)
{
// If the target has a grain-level interceptor or there is a silo-level interceptor, intercept the
// call.
var siloWideInterceptor = SiloProviderRuntime.Instance.GetInvokeInterceptor();
var grainWithInterceptor = target as IGrainInvokeInterceptor;
// Silo-wide interceptors do not operate on system targets.
var hasSiloWideInterceptor = siloWideInterceptor != null && target is IGrain;
var hasGrainLevelInterceptor = grainWithInterceptor != null;
if (!hasGrainLevelInterceptor && !hasSiloWideInterceptor)
{
// The call is not intercepted at either the silo or the grain level, so call the invoker
// directly.
return invoker.Invoke(target, request);
}
// Get an invoker which delegates to the grain's IGrainInvocationInterceptor implementation.
// If the grain does not implement IGrainInvocationInterceptor, then the invoker simply delegates
// calls to the provided invoker.
var interceptedMethodInvoker = interceptedMethodInvokerCache.GetOrCreate(
target.GetType(),
request.InterfaceId,
invoker);
var methodInfo = interceptedMethodInvoker.GetMethodInfo(request.MethodId);
if (hasSiloWideInterceptor)
{
// There is a silo-level interceptor and possibly a grain-level interceptor.
// As a minor optimization, only pass the intercepted invoker if there is a grain-level
// interceptor.
return siloWideInterceptor(
methodInfo,
request,
(IGrain)target,
hasGrainLevelInterceptor ? interceptedMethodInvoker : invoker);
}
// The grain has an invoke method, but there is no silo-wide interceptor.
return grainWithInterceptor.Invoke(methodInfo, request, invoker);
}
private void SafeSendResponse(Message message, object resultObject)
{
try
{
SendResponse(message, new Response(SerializationManager.DeepCopy(resultObject)));
}
catch (Exception exc)
{
logger.Warn(ErrorCode.IGC_SendResponseFailed,
"Exception trying to send a response: " + exc.Message, exc);
SendResponse(message, Response.ExceptionResponse(exc));
}
}
private static readonly Lazy<Func<Exception, Exception>> prepForRemotingLazy =
new Lazy<Func<Exception, Exception>>(() =>
{
ParameterExpression exceptionParameter = Expression.Parameter(typeof(Exception));
MethodCallExpression prepForRemotingCall = Expression.Call(exceptionParameter, "PrepForRemoting", Type.EmptyTypes);
Expression<Func<Exception, Exception>> lambda = Expression.Lambda<Func<Exception, Exception>>(prepForRemotingCall, exceptionParameter);
Func<Exception, Exception> func = lambda.Compile();
return func;
});
private static Exception PrepareForRemoting(Exception exception)
{
// Call the Exception.PrepForRemoting internal method, which preserves the original stack when the exception
// is rethrown at the remote site (and appends the call site stacktrace). If this is not done, then when the
// exception is rethrown the original stacktrace is entire replaced.
// Note: another commonly used approach since .NET 4.5 is to use ExceptionDispatchInfo.Capture(ex).Throw()
// but that involves rethrowing the exception in-place, which is not what we want here, but could in theory
// be done at the receiving end with some rework (could be tackled when we reopen #875 Avoid unnecessary use of TCS).
prepForRemotingLazy.Value.Invoke(exception);
return exception;
}
private void SafeSendExceptionResponse(Message message, Exception ex)
{
try
{
var copiedException = PrepareForRemoting((Exception)SerializationManager.DeepCopy(ex));
SendResponse(message, Response.ExceptionResponse(copiedException));
}
catch (Exception exc1)
{
try
{
logger.Warn(ErrorCode.IGC_SendExceptionResponseFailed,
"Exception trying to send an exception response: " + exc1.Message, exc1);
SendResponse(message, Response.ExceptionResponse(exc1));
}
catch (Exception exc2)
{
logger.Warn(ErrorCode.IGC_UnhandledExceptionInInvoke,
"Exception trying to send an exception. Ignoring and not trying to send again. Exc: " + exc2.Message, exc2);
}
}
}
// assumes deadlock information was already loaded into RequestContext from the message
private static void UpdateDeadlockInfoInRequestContext(RequestInvocationHistory thisInvocation)
{
IList prevChain;
object obj = RequestContext.Get(RequestContext.CALL_CHAIN_REQUEST_CONTEXT_HEADER);
if (obj != null)
{
prevChain = ((IList)obj);
}
else
{
prevChain = new List<RequestInvocationHistory>();
RequestContext.Set(RequestContext.CALL_CHAIN_REQUEST_CONTEXT_HEADER, prevChain);
}
// append this call to the end of the call chain. Update in place.
prevChain.Add(thisInvocation);
}
public void ReceiveResponse(Message message)
{
if (message.Result == Message.ResponseTypes.Rejection)
{
if (!message.TargetSilo.Matches(this.CurrentSilo))
{
// gatewayed message - gateway back to sender
if (logger.IsVerbose2) logger.Verbose2(ErrorCode.Dispatcher_NoCallbackForRejectionResp, "No callback for rejection response message: {0}", message);
dispatcher.Transport.SendMessage(message);
return;
}
if (logger.IsVerbose) logger.Verbose(ErrorCode.Dispatcher_HandleMsg, "HandleMessage {0}", message);
switch (message.RejectionType)
{
case Message.RejectionTypes.DuplicateRequest:
// try to remove from callbackData, just in case it is still there.
break;
case Message.RejectionTypes.Overloaded:
break;
case Message.RejectionTypes.Unrecoverable:
// fall through & reroute
case Message.RejectionTypes.Transient:
if (message.CacheInvalidationHeader == null)
{
// Remove from local directory cache. Note that SendingGrain is the original target, since message is the rejection response.
// If CacheMgmtHeader is present, we already did this. Otherwise, we left this code for backward compatability.
// It should be retired as we move to use CacheMgmtHeader in all relevant places.
directory.InvalidateCacheEntry(message.SendingAddress);
}
break;
default:
logger.Error(ErrorCode.Dispatcher_InvalidEnum_RejectionType,
"Missing enum in switch: " + message.RejectionType);
break;
}
}
CallbackData callbackData;
bool found = callbacks.TryGetValue(message.Id, out callbackData);
if (found)
{
// IMPORTANT: we do not schedule the response callback via the scheduler, since the only thing it does
// is to resolve/break the resolver. The continuations/waits that are based on this resolution will be scheduled as work items.
callbackData.DoCallback(message);
}
else
{
if (logger.IsVerbose) logger.Verbose(ErrorCode.Dispatcher_NoCallbackForResp,
"No callback for response message: " + message);
}
}
public Logger AppLogger
{
get { return appLogger; }
}
public string Identity
{
get { return MySilo.ToLongString(); }
}
public IAddressable CurrentGrain
{
get
{
return CurrentActivationData == null ? null : CurrentActivationData.GrainInstance;
}
}
public IActivationData CurrentActivationData
{
get
{
if (RuntimeContext.Current == null) return null;
SchedulingContext context = RuntimeContext.Current.ActivationContext as SchedulingContext;
if (context != null && context.Activation != null)
{
return context.Activation;
}
return null;
}
}
public ActivationAddress CurrentActivationAddress
{
get
{
return CurrentActivationData == null ? null : CurrentActivationData.Address;
}
}
public SiloAddress CurrentSilo
{
get { return MySilo; }
}
public IStorageProvider CurrentStorageProvider
{
get
{
if (RuntimeContext.Current != null)
{
SchedulingContext context = RuntimeContext.Current.ActivationContext as SchedulingContext;
if (context != null && context.Activation != null)
{
return context.Activation.StorageProvider;
}
}
throw new InvalidOperationException("Storage provider only available from inside grain");
}
}
public Task<IGrainReminder> RegisterOrUpdateReminder(string reminderName, TimeSpan dueTime, TimeSpan period)
{
GrainReference grainReference;
return GetReminderService("RegisterOrUpdateReminder", reminderName, out grainReference)
.RegisterOrUpdateReminder(grainReference, reminderName, dueTime, period);
}
public Task UnregisterReminder(IGrainReminder reminder)
{
GrainReference ignore;
return GetReminderService("UnregisterReminder", reminder.ReminderName, out ignore)
.UnregisterReminder(reminder);
}
public Task<IGrainReminder> GetReminder(string reminderName)
{
GrainReference grainReference;
return GetReminderService("GetReminder", reminderName, out grainReference)
.GetReminder(grainReference, reminderName);
}
public Task<List<IGrainReminder>> GetReminders()
{
GrainReference grainReference;
return GetReminderService("GetReminders", String.Empty, out grainReference)
.GetReminders(grainReference);
}
private IReminderService GetReminderService(
string operation,
string reminderName,
out GrainReference grainRef)
{
CheckValidReminderServiceType(operation);
grainRef = CurrentActivationData.GrainReference;
SiloAddress destination = MapGrainReferenceToSiloRing(grainRef);
if (logger.IsVerbose)
{
logger.Verbose("{0} for reminder {1}, grainRef: {2} responsible silo: {3}/x{4, 8:X8} based on {5}",
operation,
reminderName,
grainRef.ToDetailedString(),
destination,
destination.GetConsistentHashCode(),
ConsistentRingProvider.ToString());
}
return InternalGrainFactory.GetSystemTarget<IReminderService>(Constants.ReminderServiceId, destination);
}
public async Task ExecAsync(Func<Task> asyncFunction, ISchedulingContext context, string activityName)
{
// Schedule call back to grain context
await OrleansTaskScheduler.Instance.QueueNamedTask(asyncFunction, context, activityName);
}
public void Reset(bool cleanup)
{
throw new InvalidOperationException();
}
public TimeSpan GetResponseTimeout()
{
return ResponseTimeout;
}
public void SetResponseTimeout(TimeSpan timeout)
{
ResponseTimeout = timeout;
}
public GrainReference CreateObjectReference(IAddressable obj, IGrainMethodInvoker invoker)
{
throw new InvalidOperationException("Cannot create a local object reference from a grain.");
}
public void DeleteObjectReference(IAddressable obj)
{
throw new InvalidOperationException("Cannot delete a local object reference from a grain.");
}
public void DeactivateOnIdle(ActivationId id)
{
ActivationData data;
if (!Catalog.TryGetActivationData(id, out data)) return; // already gone
data.ResetKeepAliveRequest(); // DeactivateOnIdle method would undo / override any current “keep alive” setting, making this grain immideately avaliable for deactivation.
Catalog.DeactivateActivationOnIdle(data);
}
#endregion
internal void Stop()
{
lock (disposables)
{
foreach (var disposable in disposables)
{
try
{
disposable.Dispose();
}
catch (Exception e)
{
logger.Warn(ErrorCode.IGC_DisposeError, "Exception while disposing: " + e.Message, e);
}
}
}
}
internal void Start()
{
grainInterfaceMap = typeManager.GetTypeCodeMap();
}
public IGrainTypeResolver GrainTypeResolver
{
get { return grainInterfaceMap; }
}
private void CheckValidReminderServiceType(string doingWhat)
{
var remType = Config.Globals.ReminderServiceType;
if (remType.Equals(GlobalConfiguration.ReminderServiceProviderType.NotSpecified) ||
remType.Equals(GlobalConfiguration.ReminderServiceProviderType.Disabled))
{
throw new InvalidOperationException(
string.Format("Cannot {0} when ReminderServiceProviderType is {1}",
doingWhat, remType));
}
}
private SiloAddress MapGrainReferenceToSiloRing(GrainReference grainRef)
{
var hashCode = grainRef.GetUniformHashCode();
return ConsistentRingProvider.GetPrimaryTargetSilo(hashCode);
}
public string CaptureRuntimeEnvironment()
{
var callStack = Utils.GetStackTrace(1); // Don't include this method in stack trace
return String.Format(
" TaskScheduler={0}" + Environment.NewLine
+ " RuntimeContext={1}" + Environment.NewLine
+ " WorkerPoolThread={2}" + Environment.NewLine
+ " WorkerPoolThread.CurrentWorkerThread.ManagedThreadId={3}" + Environment.NewLine
+ " Thread.CurrentThread.ManagedThreadId={4}" + Environment.NewLine
+ " StackTrace=" + Environment.NewLine
+ " {5}",
TaskScheduler.Current,
RuntimeContext.Current,
WorkerPoolThread.CurrentWorkerThread == null ? "null" : WorkerPoolThread.CurrentWorkerThread.Name,
WorkerPoolThread.CurrentWorkerThread == null ? "null" : WorkerPoolThread.CurrentWorkerThread.ManagedThreadId.ToString(CultureInfo.InvariantCulture),
System.Threading.Thread.CurrentThread.ManagedThreadId,
callStack);
}
public IGrainMethodInvoker GetInvoker(int interfaceId, string genericGrainType = null)
{
return GrainTypeManager.Instance.GetInvoker(interfaceId, genericGrainType);
}
public SiloStatus GetSiloStatus(SiloAddress siloAddress)
{
return Silo.CurrentSilo.LocalSiloStatusOracle.GetApproximateSiloStatus(siloAddress);
}
public void BreakOutstandingMessagesToDeadSilo(SiloAddress deadSilo)
{
foreach (var callback in callbacks)
{
if (deadSilo.Equals(callback.Value.Message.TargetSilo))
{
callback.Value.OnTargetSiloFail();
}
}
}
}
}
| 42.664612 | 220 | 0.585648 | [
"MIT"
] | Horusiath/orleans | src/OrleansRuntime/Core/InsideRuntimeClient.cs | 34,607 | 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>
//------------------------------------------------------------------------------
[assembly: global::Xamarin.Forms.Xaml.XamlResourceIdAttribute("EssentialUIKit.Views.Shopping.PaymentSuccessPage.xaml", "Views/Shopping/PaymentSuccessPage.xaml", typeof(global::EssentialUIKit.Views.Shopping.PaymentSuccessPage))]
namespace EssentialUIKit.Views.Shopping {
[global::Xamarin.Forms.Xaml.XamlFilePathAttribute("Views\\Shopping\\PaymentSuccessPage.xaml")]
public partial class PaymentSuccessPage : global::Xamarin.Forms.ContentPage {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "2.0.0.0")]
private void InitializeComponent() {
global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(PaymentSuccessPage));
}
}
}
| 45.6 | 227 | 0.623684 | [
"MIT"
] | PraganK/Crafty-Crew | EssentialUIKit/obj/Debug/netstandard2.0/Views/Shopping/PaymentSuccessPage.xaml.g.cs | 1,140 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CDFTesterProcessCreator
{
/// <summary>
/// A class to handle the pretty printing of the console during CDFTester execution.
/// </summary>
public static class ConsoleWriter
{
/// <summary>
/// The original row of the cursor position.
/// ConsoleWriter manipulates the console, so this keeps track of position.
/// </summary>
public static int OrigRow { get; set; }
/// <summary>
/// The original column of the cursor position.
/// ConsoleWriter manipulates the console, so this keeps track of position.
/// </summary>
public static int OrigCol { get; set; }
/// <summary>
/// Resets row and column to the beginning of console.
/// To be used after a Console.Clear()
/// </summary>
public static void ResetColRow()
{
OrigRow = 0;
OrigCol = 0;
}
/// <summary>
/// Writes to console given cartesian-like coordinate system based on OrigRow and OrigCol as the origin.
/// </summary>
/// <param name="str">The string to be written to console.</param>
/// <param name="x">The column to begin writing the string.</param>
/// <param name="y">The row to write the string to.</param>
/// <param name="clear">Whether the line should be cleared before writing.</param>
public static void WriteAtPosition(string str, int x, int y, bool clear = false)
{
try
{
Console.SetCursorPosition(OrigCol + x, OrigRow + y);
if (clear)
ClearLine();
Console.Write(str);
}
catch (ArgumentOutOfRangeException e)
{
Console.Clear();
Console.WriteLine(e.Message);
}
}
/// <summary>
/// Clears the line y-rows away from the current cursor position.
/// </summary>
/// <param name="y">The number of lines away from the current cursor user wants to clear.</param>
public static void ClearLine(int y = 0)
{
int currentLineCursor = Console.CursorTop + y;
Console.SetCursorPosition(0, currentLineCursor);
Console.Write(new string(' ', Console.WindowWidth));
Console.SetCursorPosition(0, currentLineCursor);
}
/// <summary>
/// Writes an animated "Working..." to the console.
/// </summary>
/// <param name="waiting"></param>
/// <param name="procNotExited"></param>
public static void Working(bool waiting = true, bool procNotExited = true)
{
// Since process exited event triggers printing of status above "Working..." statement.
// HACK: waiting and procNotExited are used to determine when to exit and reprint.
// Only kind of works.
if (waiting && procNotExited)
{
WriteAtPosition("Working ", 0, 0, true);
}
else return;
if (waiting && procNotExited)
{
Thread.Sleep(1000);
WriteAtPosition(". ", Console.CursorLeft, 0);
}
else return;
if (waiting && procNotExited)
{
Thread.Sleep(1000);
WriteAtPosition(". ", Console.CursorLeft, 0);
}
else return;
if (waiting && procNotExited)
{
Thread.Sleep(1000);
WriteAtPosition(". ", Console.CursorLeft, 0);
}
else return;
if (waiting && procNotExited)
{
Thread.Sleep(1000);
}
else return;
}
/// <summary>
/// Prints to console details about the exited process.
/// </summary>
/// <param name="proc">The ProcessInfo instance of the exited process.</param>
/// <param name="procCount">Number of processes still running.</param>
public static void ProcessExited(ProcessInfo proc, int procCount)
{
string tempstr = String.Format("{0} proccesses left. ", procCount);
#if !DEBUG
ClearLine(-1);
#endif
WriteAtPosition(tempstr, 0, 0);
Console.WriteLine("{0} has exited.\n", proc.CDFPath);
OrigRow = Console.CursorTop;
}
/// <summary>
/// Prints the total execution time to the console.
/// </summary>
/// <param name="time">Elapsed time as a prettified string.</param>
public static void ElapsedTime(string time)
{
Console.SetCursorPosition(0, Console.CursorTop);
Console.WriteLine("\nTotal execution time: " + time);
}
}
}
| 35.468085 | 112 | 0.544691 | [
"MIT"
] | blaine91787/CDF-Tester | CDFTesterProcessCreator/ConsoleWriter.cs | 5,003 | C# |
//---------------------------------------------------------------------------------------------------
// <auto-generated>
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
// Generated by DynamicsCrm.DevKit - https://github.com/phuocle/Dynamics-Crm-DevKit
// </auto-generated>
//---------------------------------------------------------------------------------------------------
using Microsoft.Xrm.Sdk;
using System;
using System.Diagnostics;
namespace Dev.DevKit.Shared.Entities.msdyn_ocprovisioningstateOptionSets
{
public enum statecode
{
/// <summary>
/// Active = 0
/// </summary>
Active = 0,
/// <summary>
/// Inactive = 1
/// </summary>
Inactive = 1
}
public enum statuscode
{
/// <summary>
/// Deprovisioned = 192350006
/// </summary>
Deprovisioned = 192350006,
/// <summary>
/// Deprovisioning = 192350005
/// </summary>
Deprovisioning = 192350005,
/// <summary>
/// Draft = 192350001
/// </summary>
Draft = 192350001,
/// <summary>
/// Error = 192350004
/// </summary>
Error = 192350004,
/// <summary>
/// Processing = 192350002
/// </summary>
Processing = 192350002,
/// <summary>
/// Running = 192350003
/// </summary>
Running = 192350003
}
}
namespace Dev.DevKit.Shared.Entities
{
public partial class msdyn_ocprovisioningstate : EntityBase
{
public struct Fields
{
public const string CreatedBy = "createdby";
public const string CreatedOn = "createdon";
public const string CreatedOnBehalfBy = "createdonbehalfby";
public const string ImportSequenceNumber = "importsequencenumber";
public const string ModifiedBy = "modifiedby";
public const string ModifiedOn = "modifiedon";
public const string ModifiedOnBehalfBy = "modifiedonbehalfby";
public const string msdyn_communicationprovidersettingid = "msdyn_communicationprovidersettingid";
public const string msdyn_errormessage = "msdyn_errormessage";
public const string msdyn_exceptiondetails = "msdyn_exceptiondetails";
public const string msdyn_name = "msdyn_name";
public const string msdyn_ocfbapplicationid = "msdyn_ocfbapplicationid";
public const string msdyn_ocfbpageid = "msdyn_ocfbpageid";
public const string msdyn_oclinechannelconfigid = "msdyn_oclinechannelconfigid";
public const string msdyn_ocprovisioningstateId = "msdyn_ocprovisioningstateid";
public const string msdyn_octeamschannelconfigid = "msdyn_octeamschannelconfigid";
public const string msdyn_ocwhatsappchannelaccountId = "msdyn_ocwhatsappchannelaccountid";
public const string msdyn_phonenumberid = "msdyn_phonenumberid";
public const string msdyn_provisioningresponse = "msdyn_provisioningresponse";
public const string OverriddenCreatedOn = "overriddencreatedon";
public const string OwnerId = "ownerid";
public const string OwningBusinessUnit = "owningbusinessunit";
public const string OwningTeam = "owningteam";
public const string OwningUser = "owninguser";
public const string statecode = "statecode";
public const string statuscode = "statuscode";
public const string TimeZoneRuleVersionNumber = "timezoneruleversionnumber";
public const string UTCConversionTimeZoneCode = "utcconversiontimezonecode";
public const string VersionNumber = "versionnumber";
}
public const string EntityLogicalName = "msdyn_ocprovisioningstate";
public const int EntityTypeCode = 10570;
[DebuggerNonUserCode()]
public msdyn_ocprovisioningstate()
{
Entity = new Entity(EntityLogicalName);
PreEntity = CloneThisEntity(Entity);
}
[DebuggerNonUserCode()]
public msdyn_ocprovisioningstate(Guid msdyn_ocprovisioningstateId)
{
Entity = new Entity(EntityLogicalName, msdyn_ocprovisioningstateId);
PreEntity = CloneThisEntity(Entity);
}
[DebuggerNonUserCode()]
public msdyn_ocprovisioningstate(string keyName, object keyValue)
{
Entity = new Entity(EntityLogicalName, keyName, keyValue);
PreEntity = CloneThisEntity(Entity);
}
[DebuggerNonUserCode()]
public msdyn_ocprovisioningstate(Entity entity)
{
Entity = entity;
PreEntity = CloneThisEntity(Entity);
}
[DebuggerNonUserCode()]
public msdyn_ocprovisioningstate(Entity entity, Entity merge)
{
Entity = entity;
foreach (var property in merge?.Attributes)
{
var key = property.Key;
var value = property.Value;
Entity[key] = value;
}
PreEntity = CloneThisEntity(Entity);
}
[DebuggerNonUserCode()]
public msdyn_ocprovisioningstate(KeyAttributeCollection keys)
{
Entity = new Entity(EntityLogicalName, keys);
PreEntity = CloneThisEntity(Entity);
}
/// <summary>
/// <para>Unique identifier of the user who created the record.</para>
/// <para>ReadOnly - Lookup to systemuser</para>
/// <para>Created By</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference CreatedBy
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.CreatedBy); }
}
/// <summary>
/// <para>Date and time when the record was created.</para>
/// <para>ReadOnly - DateTimeBehavior: UserLocal - DateTimeFormat: DateAndTime</para>
/// <para>Created On</para>
/// </summary>
[DebuggerNonUserCode()]
public DateTime? CreatedOnUtc
{
get { return Entity.GetAttributeValue<DateTime?>(Fields.CreatedOn); }
}
/// <summary>
/// <para>Unique identifier of the delegate user who created the record.</para>
/// <para>ReadOnly - Lookup to systemuser</para>
/// <para>Created By (Delegate)</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference CreatedOnBehalfBy
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.CreatedOnBehalfBy); }
}
/// <summary>
/// <para>Sequence number of the import that created this record.</para>
/// <para>Integer - MinValue: -2,147,483,648 - MaxValue: 2,147,483,647</para>
/// <para>Import Sequence Number</para>
/// </summary>
[DebuggerNonUserCode()]
public int? ImportSequenceNumber
{
get { return Entity.GetAttributeValue<int?>(Fields.ImportSequenceNumber); }
set { Entity.Attributes[Fields.ImportSequenceNumber] = value; }
}
/// <summary>
/// <para>Unique identifier of the user who modified the record.</para>
/// <para>ReadOnly - Lookup to systemuser</para>
/// <para>Modified By</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference ModifiedBy
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.ModifiedBy); }
}
/// <summary>
/// <para>Date and time when the record was modified.</para>
/// <para>ReadOnly - DateTimeBehavior: UserLocal - DateTimeFormat: DateAndTime</para>
/// <para>Modified On</para>
/// </summary>
[DebuggerNonUserCode()]
public DateTime? ModifiedOnUtc
{
get { return Entity.GetAttributeValue<DateTime?>(Fields.ModifiedOn); }
}
/// <summary>
/// <para>Unique identifier of the delegate user who modified the record.</para>
/// <para>ReadOnly - Lookup to systemuser</para>
/// <para>Modified By (Delegate)</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference ModifiedOnBehalfBy
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.ModifiedOnBehalfBy); }
}
/// <summary>
/// <para>Related Communication Provider Settings</para>
/// <para>Lookup to msdyn_occommunicationprovidersetting</para>
/// <para>CommunicationProviderSettings</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference msdyn_communicationprovidersettingid
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.msdyn_communicationprovidersettingid); }
set { Entity.Attributes[Fields.msdyn_communicationprovidersettingid] = value; }
}
/// <summary>
/// <para>Additional details</para>
/// <para>Memo - MaxLength: 8192</para>
/// <para>Additional details</para>
/// </summary>
[DebuggerNonUserCode()]
public string msdyn_errormessage
{
get { return Entity.GetAttributeValue<string>(Fields.msdyn_errormessage); }
set { Entity.Attributes[Fields.msdyn_errormessage] = value; }
}
/// <summary>
/// <para>Exception Details during channel provisioning</para>
/// <para>Required - Memo - MaxLength: 8192</para>
/// <para>Error Message (Deprecated)</para>
/// </summary>
[DebuggerNonUserCode()]
public string msdyn_exceptiondetails
{
get { return Entity.GetAttributeValue<string>(Fields.msdyn_exceptiondetails); }
set { Entity.Attributes[Fields.msdyn_exceptiondetails] = value; }
}
/// <summary>
/// <para>The name of the custom entity.</para>
/// <para>Required - String - MaxLength: 100</para>
/// <para>Name</para>
/// </summary>
[DebuggerNonUserCode()]
public string msdyn_name
{
get { return Entity.GetAttributeValue<string>(Fields.msdyn_name); }
set { Entity.Attributes[Fields.msdyn_name] = value; }
}
/// <summary>
/// <para>Related Facebook application</para>
/// <para>Lookup to msdyn_ocfbapplication</para>
/// <para>Facebook Application</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference msdyn_ocfbapplicationid
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.msdyn_ocfbapplicationid); }
set { Entity.Attributes[Fields.msdyn_ocfbapplicationid] = value; }
}
/// <summary>
/// <para>Related Facebook page</para>
/// <para>Lookup to msdyn_ocfbpage</para>
/// <para>Facebook Page</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference msdyn_ocfbpageid
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.msdyn_ocfbpageid); }
set { Entity.Attributes[Fields.msdyn_ocfbpageid] = value; }
}
/// <summary>
/// <para>Related Line Channel</para>
/// <para>Lookup to msdyn_oclinechannelconfig</para>
/// <para>Line Channel</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference msdyn_oclinechannelconfigid
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.msdyn_oclinechannelconfigid); }
set { Entity.Attributes[Fields.msdyn_oclinechannelconfigid] = value; }
}
/// <summary>
/// <para>Unique identifier for entity instances</para>
/// <para>Primary Key - Uniqueidentifier</para>
/// <para>Provisioning State</para>
/// </summary>
[DebuggerNonUserCode()]
public Guid msdyn_ocprovisioningstateId
{
get { return Id; }
set
{
Entity.Attributes[Fields.msdyn_ocprovisioningstateId] = value;
Entity.Id = value;
}
}
/// <summary>
/// <para>Related Teams Channel</para>
/// <para>Lookup to msdyn_octeamschannelconfig</para>
/// <para>Teams Channel</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference msdyn_octeamschannelconfigid
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.msdyn_octeamschannelconfigid); }
set { Entity.Attributes[Fields.msdyn_octeamschannelconfigid] = value; }
}
/// <summary>
/// <para>Related WhatsApp Account</para>
/// <para>Lookup to msdyn_ocwhatsappchannelaccount</para>
/// <para>WhatsApp Account</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference msdyn_ocwhatsappchannelaccountId
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.msdyn_ocwhatsappchannelaccountId); }
set { Entity.Attributes[Fields.msdyn_ocwhatsappchannelaccountId] = value; }
}
/// <summary>
/// <para>Related Phone Number</para>
/// <para>Lookup to msdyn_ocphonenumber</para>
/// <para>Phone Number</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference msdyn_phonenumberid
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.msdyn_phonenumberid); }
set { Entity.Attributes[Fields.msdyn_phonenumberid] = value; }
}
/// <summary>
/// <para>Response for the provisioning action</para>
/// <para>Memo - MaxLength: 2000</para>
/// <para>msdyn_provisioningresponse</para>
/// </summary>
[DebuggerNonUserCode()]
public string msdyn_provisioningresponse
{
get { return Entity.GetAttributeValue<string>(Fields.msdyn_provisioningresponse); }
set { Entity.Attributes[Fields.msdyn_provisioningresponse] = value; }
}
/// <summary>
/// <para>Date and time that the record was migrated.</para>
/// <para>DateTimeBehavior: UserLocal - DateTimeFormat: DateOnly</para>
/// <para>Record Created On</para>
/// </summary>
[DebuggerNonUserCode()]
public DateTime? OverriddenCreatedOnUtc
{
get { return Entity.GetAttributeValue<DateTime?>(Fields.OverriddenCreatedOn); }
set { Entity.Attributes[Fields.OverriddenCreatedOn] = value; }
}
/// <summary>
/// <para>Owner Id</para>
/// <para>Owner</para>
/// <para>Owner</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference OwnerId
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.OwnerId); }
set { Entity.Attributes[Fields.OwnerId] = value; }
}
/// <summary>
/// <para>Unique identifier for the business unit that owns the record</para>
/// <para>ReadOnly - Lookup to businessunit</para>
/// <para>Owning Business Unit</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference OwningBusinessUnit
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.OwningBusinessUnit); }
}
/// <summary>
/// <para>Unique identifier for the team that owns the record.</para>
/// <para>ReadOnly - Lookup to team</para>
/// <para>Owning Team</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference OwningTeam
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.OwningTeam); }
}
/// <summary>
/// <para>Unique identifier for the user that owns the record.</para>
/// <para>ReadOnly - Lookup to systemuser</para>
/// <para>Owning User</para>
/// </summary>
[DebuggerNonUserCode()]
public EntityReference OwningUser
{
get { return Entity.GetAttributeValue<EntityReference>(Fields.OwningUser); }
}
/// <summary>
/// <para>Status of the Provisioning State</para>
/// <para>State</para>
/// <para>Status</para>
/// </summary>
[DebuggerNonUserCode()]
public Dev.DevKit.Shared.Entities.msdyn_ocprovisioningstateOptionSets.statecode? statecode
{
get
{
var value = Entity.GetAttributeValue<OptionSetValue>(Fields.statecode);
if (value == null) return null;
return (Dev.DevKit.Shared.Entities.msdyn_ocprovisioningstateOptionSets.statecode)value.Value;
}
set
{
if (value.HasValue)
Entity.Attributes[Fields.statecode] = new OptionSetValue((int)value.Value);
else
Entity.Attributes[Fields.statecode] = null;
}
}
/// <summary>
/// <para>Reason for the status of the Provisioning State</para>
/// <para>Status</para>
/// <para>Status Reason</para>
/// </summary>
[DebuggerNonUserCode()]
public Dev.DevKit.Shared.Entities.msdyn_ocprovisioningstateOptionSets.statuscode? statuscode
{
get
{
var value = Entity.GetAttributeValue<OptionSetValue>(Fields.statuscode);
if (value == null) return null;
return (Dev.DevKit.Shared.Entities.msdyn_ocprovisioningstateOptionSets.statuscode)value.Value;
}
set
{
if (value.HasValue)
Entity.Attributes[Fields.statuscode] = new OptionSetValue((int)value.Value);
else
Entity.Attributes[Fields.statuscode] = null;
}
}
/// <summary>
/// <para>For internal use only.</para>
/// <para>Integer - MinValue: -1 - MaxValue: 2,147,483,647</para>
/// <para>Time Zone Rule Version Number</para>
/// </summary>
[DebuggerNonUserCode()]
public int? TimeZoneRuleVersionNumber
{
get { return Entity.GetAttributeValue<int?>(Fields.TimeZoneRuleVersionNumber); }
set { Entity.Attributes[Fields.TimeZoneRuleVersionNumber] = value; }
}
/// <summary>
/// <para>Time zone code that was in use when the record was created.</para>
/// <para>Integer - MinValue: -1 - MaxValue: 2,147,483,647</para>
/// <para>UTC Conversion Time Zone Code</para>
/// </summary>
[DebuggerNonUserCode()]
public int? UTCConversionTimeZoneCode
{
get { return Entity.GetAttributeValue<int?>(Fields.UTCConversionTimeZoneCode); }
set { Entity.Attributes[Fields.UTCConversionTimeZoneCode] = value; }
}
/// <summary>
/// <para>Version Number</para>
/// <para>ReadOnly - BigInt</para>
/// <para>Version Number</para>
/// </summary>
[DebuggerNonUserCode()]
public long? VersionNumber
{
get { return Entity.GetAttributeValue<long?>(Fields.VersionNumber); }
}
}
}
| 32.409449 | 105 | 0.699466 | [
"MIT"
] | Kayserheimer/Dynamics-Crm-DevKit | test/v.2.12.31/TestAllEntities/All-DEMO/Dev.DevKit.Shared/Entities/msdyn_ocprovisioningstate.generated.cs | 16,466 | C# |
using UnityEngine;
using UnityEngine.UI;
namespace DaftAppleGames.UI
{
public class ActionPrompt : MonoBehaviour
{
[Header("Config")]
public bool displayPrompt;
public GameObject promptGameObject;
[Header("UI Config")]
public string promptText;
public Text promptTextObject;
public float promptHeight;
/// <summary>
/// Initialise the prompt
/// </summary>
public virtual void Start()
{
// Set the prompt text
promptTextObject.text = promptText;
// Set the prompt height
Vector3 promptPosition = promptGameObject.transform.localPosition;
promptPosition.y = promptHeight;
promptGameObject.transform.localPosition = promptPosition;
}
/// <summary>
/// Show prompt, if configured to do so
/// </summary>
public virtual void ShowPrompt()
{
if (displayPrompt)
{
promptGameObject.SetActive(true);
}
}
/// <summary>
/// Hide prompt
/// </summary>
public virtual void HidePrompt()
{
promptGameObject.SetActive(false);
}
}
} | 25.94 | 78 | 0.538165 | [
"MIT"
] | mroshaw/3DForgeComponents | Assets/3D Forge Components/Scripts/DaftAppleGames/UI/ActionPrompt.cs | 1,297 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Linq;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using Inaprop;
namespace Inaprop
{
public partial class MainForm
{
private void InitializePlot()
{
chart1.Series.Clear();
chart2.Series.Clear();
chart3.Series.Clear();
chart4.Series.Clear();
chart5.Series.Clear();
chart6.Series.Clear();
chart1.ChartAreas[0].AxisX.Title = "position [m]";
chart2.ChartAreas[0].AxisX.Title = "position [m]";
chart3.ChartAreas[0].AxisX.Title = "position [m]";
chart4.ChartAreas[0].AxisX.Title = "position [m]";
chart5.ChartAreas[0].AxisX.Title = "position [m]";
chart6.ChartAreas[0].AxisX.Title = "position [m]";
chart1.ChartAreas[0].AxisY.Title = "chord [m]";
chart2.ChartAreas[0].AxisY.Title = "phi [deg]";
chart3.ChartAreas[0].AxisY.Title = "gamma";
chart4.ChartAreas[0].AxisY.Title = "10^3 × Re";
chart5.ChartAreas[0].AxisY.Title = "Cd";
chart6.ChartAreas[0].AxisY.Title = "Cl";
}
private void ShowPlot2()
{
chart1.Series.Clear();
chart2.Series.Clear();
chart3.Series.Clear();
chart4.Series.Clear();
chart5.Series.Clear();
chart6.Series.Clear();
List<double> List_Radius = new List<double>();
List_Radius.Add(0.0);
List<double> List_ci = new List<double>();
List_ci.Add(0.0);
List<double> List_phi = new List<double>();
List_phi.Add(0.0);
List<double> List_gamma = new List<double>();
List_gamma.Add(0.0);
List<double> List_Re = new List<double>();
List_Re.Add(0.0);
List<double> List_Cl = new List<double>();
List_Cl.Add(0.0);
List<double> List_Cd = new List<double>();
List_Cd.Add(0.0);
List<string> legend = new List<string>();
int index = 0;
foreach (Prop prop in Props)
{
if (prop.Show == true)
{
Series plotSeries1 = new Series();
Series plotSeries2 = new Series();
Series plotSeries3 = new Series();
Series plotSeries4 = new Series();
Series plotSeries5 = new Series();
Series plotSeries6 = new Series();
//plotSeries1.Add(new Series()); plotSeries2.Add(new Series());
//plotSeries3.Add(new Series()); plotSeries4.Add(new Series());
plotSeries1.ChartType = SeriesChartType.Spline;
plotSeries2.ChartType = SeriesChartType.Spline;
plotSeries3.ChartType = SeriesChartType.Spline;
plotSeries4.ChartType = SeriesChartType.Spline;
plotSeries5.ChartType = SeriesChartType.Spline;
plotSeries6.ChartType = SeriesChartType.Spline;
for (int x = 0; x < prop.n_number; x++)
{
plotSeries1.Points.AddXY(prop.R[x], prop.ci[x]);
plotSeries2.Points.AddXY(prop.R[x], prop.phi[x] * 180 / Math.PI);
plotSeries3.Points.AddXY(prop.R[x], prop.gamma[x]);
plotSeries4.Points.AddXY(prop.R[x], prop.Re[x] / 1000); //1000で割ってグラフ見やすく
plotSeries5.Points.AddXY(prop.R[x], prop.CDs[x]);
plotSeries6.Points.AddXY(prop.R[x], prop.CLs[x]);
legend.Add(prop.Name);
}
chart1.Series.Add(plotSeries1);
chart2.Series.Add(plotSeries2);
chart3.Series.Add(plotSeries3);
chart4.Series.Add(plotSeries4);
chart5.Series.Add(plotSeries5);
chart6.Series.Add(plotSeries6);
chart1.Series[index].Name = prop.Name;
chart2.Series[index].Name = prop.Name;
chart3.Series[index].Name = prop.Name;
chart4.Series[index].Name = prop.Name;
chart5.Series[index].Name = prop.Name;
chart6.Series[index].Name = prop.Name;
index++;
List_Radius.Add(prop.Radius);
List_ci.Add(prop.ci.Max());
List_phi.Add(prop.phi.Max());
List_gamma.Add(prop.gamma.Max());
List_Re.Add(prop.Re.Max());
List_Cd.Add(prop.CDs.Max());
List_Cl.Add(prop.CLs.Max());
}
}
chart1.Update(); chart2.Update();
chart3.Update(); chart4.Update();
chart5.Update(); chart6.Update();
double plotmargin = 1.05; //グラフの余白分
chart1.ChartAreas[0].AxisX.Minimum = 0;
chart1.ChartAreas[0].AxisX.Maximum = List_Radius.Max();
chart1.ChartAreas[0].AxisY.Maximum = List_ci.Max() * plotmargin;
chart2.ChartAreas[0].AxisX.Minimum = 0;
chart2.ChartAreas[0].AxisX.Maximum = List_Radius.Max();
chart2.ChartAreas[0].AxisY.Maximum = List_phi.Max() * 180 / Math.PI * plotmargin;
chart3.ChartAreas[0].AxisX.Minimum = 0;
chart3.ChartAreas[0].AxisX.Maximum = List_Radius.Max();
chart3.ChartAreas[0].AxisY.Maximum = List_gamma.Max() * plotmargin;
chart4.ChartAreas[0].AxisX.Minimum = 0;
chart4.ChartAreas[0].AxisX.Maximum = List_Radius.Max();
chart4.ChartAreas[0].AxisY.Maximum = List_Re.Max() / 1000 * plotmargin;
chart5.ChartAreas[0].AxisX.Minimum = 0;
chart5.ChartAreas[0].AxisX.Maximum = List_Radius.Max();
chart5.ChartAreas[0].AxisY.Maximum = List_Cd.Max() * plotmargin;
chart6.ChartAreas[0].AxisX.Minimum = 0;
chart6.ChartAreas[0].AxisX.Maximum = List_Radius.Max();
chart6.ChartAreas[0].AxisY.Maximum = List_Cl.Max() * plotmargin;
}
/// <summary>
/// PlotShowIndexSeriesにShowのtrueの番号を代入。消去してからListに追加
/// Propsに入ってるPropn中からShowがTrueつまり、表示になっているものの番号をPlotShowIndexSeriesに代入
/// </summary>
List<int> PlotShowIndexSeries = new List<int>();
private void PlotDetect()
{
int max_index = PlotShowIndexSeries.Count;
for (int i = 0; i < max_index; i++)
{
PlotShowIndexSeries.RemoveAt(0);
}
foreach (Prop prop in Props)
{
if (prop.Show == true)
{
PlotShowIndexSeries.Add(prop.dataGridView_index);
}
}
}
}
}
| 44.390244 | 100 | 0.517033 | [
"MIT"
] | ina111/Inaprop | MainForm.Plot.cs | 7,417 | C# |
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
#pragma warning disable
using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
{
/// <remarks>
/// RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
/// <code>
/// OcspIdentifier ::= SEQUENCE {
/// ocspResponderID ResponderID,
/// -- As in OCSP response data
/// producedAt GeneralizedTime
/// -- As in OCSP response data
/// }
/// </code>
/// </remarks>
public class OcspIdentifier
: Asn1Encodable
{
private readonly ResponderID ocspResponderID;
private readonly DerGeneralizedTime producedAt;
public static OcspIdentifier GetInstance(
object obj)
{
if (obj == null || obj is OcspIdentifier)
return (OcspIdentifier) obj;
if (obj is Asn1Sequence)
return new OcspIdentifier((Asn1Sequence) obj);
throw new ArgumentException(
"Unknown object in 'OcspIdentifier' factory: "
+ BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
"obj");
}
private OcspIdentifier(
Asn1Sequence seq)
{
if (seq == null)
throw new ArgumentNullException("seq");
if (seq.Count != 2)
throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
this.ocspResponderID = ResponderID.GetInstance(seq[0].ToAsn1Object());
this.producedAt = (DerGeneralizedTime) seq[1].ToAsn1Object();
}
public OcspIdentifier(
ResponderID ocspResponderID,
DateTime producedAt)
{
if (ocspResponderID == null)
throw new ArgumentNullException();
this.ocspResponderID = ocspResponderID;
this.producedAt = new DerGeneralizedTime(producedAt);
}
public ResponderID OcspResponderID
{
get { return ocspResponderID; }
}
public DateTime ProducedAt
{
get { return producedAt.ToDateTime(); }
}
public override Asn1Object ToAsn1Object()
{
return new DerSequence(ocspResponderID, producedAt);
}
}
}
#pragma warning restore
#endif
| 25.204819 | 99 | 0.710325 | [
"MIT"
] | Bregermann/TargetCrack | Target Crack/Assets/Best HTTP/Source/SecureProtocol/asn1/esf/OcspIdentifier.cs | 2,092 | C# |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace phirSOFT.Collections
{
/// <inheritdoc />
/// <summary>
/// Provides a <see cref="T:System.Collections.Generic.IDictionary`2" /> that will create missing values when requested,
/// but will not keep a strong reference to it.
/// </summary>
/// <typeparam name="TKey">The type of the key</typeparam>
/// <typeparam name="TValue">The type of the value</typeparam>
public class WeakLazyDictionary<TKey, TValue> : IDictionary<TKey, TValue> where TValue : class
{
private readonly Dictionary<TKey, WeakReference<TValue>> _dictionary =
new Dictionary<TKey, WeakReference<TValue>>();
private readonly Func<TKey, TValue> _generatorFunc;
public WeakLazyDictionary(Func<TKey, TValue> generatorFunc)
{
_generatorFunc = generatorFunc;
}
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
{
return _dictionary.Select(kv =>
{
var exists = kv.Value.TryGetTarget(out var value);
return new {kv.Key, exists, value};
})
.Where(p => p.exists)
.Select(p => new KeyValuePair<TKey, TValue>(p.Key, p.value))
.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public void Add(KeyValuePair<TKey, TValue> item)
{
throw new NotImplementedException();
}
public void Clear()
{
throw new NotImplementedException();
}
public bool Contains(KeyValuePair<TKey, TValue> item)
{
throw new NotImplementedException();
}
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
{
throw new NotImplementedException();
}
public bool Remove(KeyValuePair<TKey, TValue> item)
{
return Contains(item) && _dictionary.Remove(item.Key);
}
public int Count => _dictionary.Count;
public bool IsReadOnly => true;
public void Add(TKey key, TValue value)
{
throw new NotSupportedException();
}
public bool ContainsKey(TKey key)
{
return _dictionary.ContainsKey(key);
}
public bool Remove(TKey key)
{
return _dictionary.Remove(key);
}
public bool TryGetValue(TKey key, out TValue value)
{
if (_dictionary.ContainsKey(key))
{
_dictionary[key].TryGetTarget(out value);
return true;
}
value = null;
return false;
}
public TValue this[TKey key]
{
get
{
if (_dictionary.TryGetValue(key, out var reference) &&
reference.TryGetTarget(out var value))
return value;
value = _generatorFunc(key);
_dictionary[key] = new WeakReference<TValue>(value);
return value;
}
set => throw new NotSupportedException();
}
public ICollection<TKey> Keys => _dictionary.Keys;
public ICollection<TValue> Values => _dictionary.Values
.Select(reference =>
{
var test = reference.TryGetTarget(out var value);
return new {test, value};
})
.Where(t => t.test)
.Select(t => t.value)
.ToList();
}
} | 29.5 | 128 | 0.54318 | [
"MIT"
] | phirSOFT/phirSOFT.Collections | phirSOFT.Collections/WeakLazyDictionary.cs | 3,719 | C# |
using Pluto.Domain.Enums;
using Pluto.Domain.Models.Common;
using Pluto.Utils.Cryptography;
namespace Pluto.Domain.Models
{
public class User : Entity
{
// -> Empty contructor for EF
public User()
{
}
public User(string name, string email, string password, UserProfile profile)
{
Name = name;
Email = email;
Profile = profile;
Password = password.Encrypt();
}
public virtual string Name { get; private set; }
public virtual string Email { get; private set; }
public virtual string Password { get; private set; }
public virtual UserProfile Profile { get; private set; }
public void UpdateInfo(string name, string email, UserProfile profile)
{
Name = name;
Email = email;
Profile = profile;
}
public void ChangePassword(string password) => Password = password.Encrypt();
public bool CheckPassword(string password) => password.Encrypt() == Password;
public bool IsAdmin() => Profile == UserProfile.Admin;
}
}
| 27.309524 | 85 | 0.592851 | [
"MIT"
] | spaki/Pluto | Pluto.Domain/Models/User.cs | 1,149 | C# |
using Plastic.Molding.Data;
namespace Plastic.Molding.Cs.Data.EntityFramework
{
public class EfFieldMoldCollection : FieldMoldCollection<IEfFieldMold>
{
protected override void AddTypes()
{
AddType<EfCalculatedFieldMold>();
AddType<EfDecimalFieldMold>();
AddType<EfIntFieldMold>();
AddType<EfStringFieldMold>();
AddType<EfDateTimeFieldMold>();
AddType<EfParentFieldMold>();
AddType<EfChildFieldMold>();
AddType<EfMultipleFieldMold>();
AddType<EfEnumerationFieldMold>();
AddType<EfBoolFieldMold>();
}
}
} | 31.47619 | 74 | 0.615734 | [
"Unlicense"
] | jonkeda/Plastic | Plastic/Molding/Cs/Data/EntityFramework/EfFieldMoldCollection.cs | 663 | C# |
using Newbe.Mahua.Apis;
using System;
using Newbe.Mahua.NativeApi;
namespace Newbe.Mahua.CQP.Apis
{
internal class RemoveBanGroupMemberApiMahuaMahuaCommandHandler
: CqpApiMahuaCommandHandlerBase<RemoveBanGroupMemberApiMahuaCommand>
{
public RemoveBanGroupMemberApiMahuaMahuaCommandHandler(
ICoolQApi coolQApi,
ICqpAuthCodeContainer cqpAuthCodeContainer)
: base(coolQApi, cqpAuthCodeContainer)
{
}
public override void Handle(RemoveBanGroupMemberApiMahuaCommand message)
{
CoolQApi.CQ_setGroupBan(AuthCode, Convert.ToInt64(message.ToGroup), Convert.ToInt64(message.ToQq), 0);
}
}
}
| 30.434783 | 114 | 0.71 | [
"MIT"
] | BOBO41/Newbe.Mahua.Framework | src/Newbe.Mahua.CQP/Apis/RemoveBanGroupMemberApiMahuaMahuaCommandHandler.cs | 702 | C# |
using UnityEngine;
using UnityEngine.UI;
public class LoadLevelButton : MonoBehaviour {
public LevelSlotDialog dialog;
void Start() {
GetComponent<Button>().onClick.AddListener(Clicked);
dialog.gameObject.SetActive(false);
}
public void Clicked() {
dialog.gameObject.SetActive(true);
dialog.Build();
}
}
| 21.117647 | 60 | 0.665738 | [
"BSD-3-Clause"
] | AvantTeam/MochiRun | Assets/UI/LevelSlot/LoadLevelButton.cs | 359 | C# |
using UnityEngine;
using System.Collections;
public class Controls : MonoBehaviour
{
//How Sensitive/Fast the camera is
public float controlSensitivity = 4F;
//The Value that rotates the camera
private float rotation = 0;
//Runs once per frame
void Update()
{
//Run this entire function every frame
CameraControls();
}
//Rotates the Camera Clockwise or CounterClockwise
void CameraControls ()
{
//If the player presses the left arrow key rotate the camera counter clockwise
if(Input.GetKey(KeyCode.LeftArrow))
{
//Subtract the controlSensitvity value(in this case 4) from the rotation value every frame
rotation -= controlSensitivity;
}
// Otherwis if the Player Hits the right arrow key rotate the camera clockwise
else if(Input.GetKey(KeyCode.RightArrow))
{
//Adds the controlSensitvity value(in this case 4) to the rotation value every frame
rotation += controlSensitivity;
}
//Rotate the camera in the Z-axis by the roatation value(0,in the x and 0 in the y axis b/c we only need 1dimension of rotation)
Camera.main.transform.Rotate(0, 0, rotation);
//Reset Rotation to 0 so that the camera is not always rotating
rotation = 0;
//We use natural 3d physics to move the ball dependant on the direction our Camera is facing, Not necessary to edit this, unless you would
//Like to change how fast the ball moves
Physics.gravity = new Vector3(0, -9.81F * Camera.main.transform.up.y, -9.81F * Camera.main.transform.up.z);
}
}
| 32.608696 | 140 | 0.734667 | [
"CC0-1.0"
] | Richetech/CosmicBounceTut | Milestones:Phases/Milestone1/CosmicBounceTut_Part_1/Assets/Scripts/Controls.cs | 1,502 | C# |
namespace Grayscale.Kifuwarazusa.Entities.Features
{
public abstract class KomaSyurui14Array
{
#region 静的プロパティー類
/// <summary>
/// 外字、後手
/// </summary>
public static char[] GaijiGote { get { return KomaSyurui14Array.gaijiGote; } }
protected static char[] gaijiGote;
/// <summary>
/// 外字、先手
/// </summary>
public static char[] GaijiSente { get { return KomaSyurui14Array.gaijiSente; } }
protected static char[] gaijiSente;
public static string[] NimojiSente { get { return KomaSyurui14Array.nimojiSente; } }
protected static string[] nimojiSente;
public static string[] NimojiGote { get { return KomaSyurui14Array.nimojiGote; } }
protected static string[] nimojiGote;
/// <summary>
/// ------------------------------------------------------------------------------------------------------------------------
/// 駒の表示文字。
/// ------------------------------------------------------------------------------------------------------------------------
/// </summary>
public static string[] Ichimoji { get { return KomaSyurui14Array.ichimoji; } }
protected static string[] ichimoji;
/// <summary>
/// ------------------------------------------------------------------------------------------------------------------------
/// 駒の符号用の単語。
/// ------------------------------------------------------------------------------------------------------------------------
/// </summary>
public static string[] Fugo { get { return KomaSyurui14Array.fugo; } }
protected static string[] fugo;
/// <summary>
/// ------------------------------------------------------------------------------------------------------------------------
/// 駒のSFEN符号用の単語。
/// ------------------------------------------------------------------------------------------------------------------------
/// </summary>
public static string[] Sfen1P { get { return KomaSyurui14Array.sfen1P; } }
protected static string[] sfen1P;
public static string[] Sfen2P { get { return KomaSyurui14Array.sfen2P; } }
protected static string[] sfen2P;
/// <summary>
/// ------------------------------------------------------------------------------------------------------------------------
/// 駒のSFEN(打)符号用の単語。
/// ------------------------------------------------------------------------------------------------------------------------
/// </summary>
public static string[] SfenDa { get { return KomaSyurui14Array.sfenDa; } }
protected static string[] sfenDa;
/// <summary>
/// ************************************************************************************************************************
/// 成れる駒
/// ************************************************************************************************************************
/// </summary>
public static bool[] FlagNareruKoma { get { return KomaSyurui14Array.flagNareruKoma; } }
protected static bool[] flagNareruKoma;
/// <summary>
/// ------------------------------------------------------------------------------------------------------------------------
/// 駒が成らなかったときの駒ハンドル
/// ------------------------------------------------------------------------------------------------------------------------
/// </summary>
public static PieceType NarazuCaseHandle(PieceType syurui)
{
return KomaSyurui14Array.narazuCaseHandle[(int)syurui];
}
protected static PieceType[] narazuCaseHandle;
/// <summary>
/// ************************************************************************************************************************
/// 成り駒なら真。
/// ************************************************************************************************************************
/// </summary>
/// <returns></returns>
public static bool[] FlagNari { get { return KomaSyurui14Array.flagNari; } }
protected static bool[] flagNari;
public static bool IsNari(PieceType syurui)
{
return KomaSyurui14Array.FlagNari[(int)syurui];
}
/// <summary>
/// ------------------------------------------------------------------------------------------------------------------------
/// 駒が成ったときの駒ハンドル
/// ------------------------------------------------------------------------------------------------------------------------
/// </summary>
public static PieceType[] NariCaseHandle { get { return KomaSyurui14Array.nariCaseHandle; } }
protected static PieceType[] nariCaseHandle;
public static PieceType ToNariCase(PieceType syurui)
{
return KomaSyurui14Array.NariCaseHandle[(int)syurui];
}
static KomaSyurui14Array()
{
KomaSyurui14Array.nariCaseHandle = new PieceType[]{
PieceType.None,//[0]ヌル
PieceType.PP,
PieceType.PL,
PieceType.PN,
PieceType.PS,
PieceType.G,
PieceType.K,
PieceType.PR,
PieceType.PB,
PieceType.PR,
PieceType.PB,
PieceType.PP,
PieceType.PL,
PieceType.PN,
PieceType.PS,
};
KomaSyurui14Array.flagNari = new bool[]{
false,//[0]ヌル
false,//[1]歩
false,//[2]香
false,//[3]桂
false,//[4]銀
false,//[5]金
false,//[6]王
false,//[7]飛車
false,//[8]角
true,//[9]竜
true,//[10]馬
true,//[11]と
true,//[12]杏
true,//[13]圭
true,//[14]全
false,//[15]エラー
};
KomaSyurui14Array.narazuCaseHandle = new PieceType[]{
PieceType.None,//[0]ヌル
PieceType.P,//[1]歩
PieceType.L,//[2]香
PieceType.N,//[3]桂
PieceType.S,//[4]銀
PieceType.G,//[5]金
PieceType.K,//[6]王
PieceType.R,//[7]飛車
PieceType.B,//[8]角
PieceType.R,//[9]竜→飛車
PieceType.B,//[10]馬→角
PieceType.P,//[11]と→歩
PieceType.L,//[12]杏→香
PieceType.N,//[13]圭→桂
PieceType.S,//[14]全→銀
};
KomaSyurui14Array.flagNareruKoma = new bool[]{
false,//[0]ヌル
true,//[1]歩
true,//[2]香
true,//[3]桂
true,//[4]銀
false,//[5]金
false,//[6]王
true,//[7]飛
true,//[8]角
false,//[9]竜
false,//[10]馬
false,//[11]と
false,//[12]杏
false,//[13]圭
false,//[14]全
false,//[15]エラー
};
KomaSyurui14Array.sfenDa = new string[]{
"×",//[0]ヌル
"P",//[1]
"L",
"N",
"S",
"G",
"K",
"R",
"B",
"R",
"B",
"P",
"L",
"N",
"S",
"<打×U>",//[15]
};
KomaSyurui14Array.sfen1P = new string[]{
"×",//[0]ヌル
"P",
"L",
"N",
"S",
"G",
"K",
"R",
"B",
"+R",
"+B",
"+P",
"+L",
"+N",
"+S",
"U×SFEN",
};
KomaSyurui14Array.sfen2P = new string[]{
"×",//[0]ヌル
"p",
"l",
"n",
"s",
"g",
"k",
"r",
"b",
"+r",
"+b",
"+p",
"+l",
"+n",
"+s",
"U×sfen",
};
KomaSyurui14Array.fugo = new string[]{
"×",//[0]ヌル
"歩",
"香",
"桂",
"銀",
"金",
"王",
"飛",
"角",
"竜",
"馬",
"と",
"成香",
"成桂",
"成銀",
"U×符",
};
KomaSyurui14Array.ichimoji = new string[]{
"×",//[0]ヌル
"歩",
"香",
"桂",
"銀",
"金",
"王",
"飛",
"角",
"竜",
"馬",
"と",
"杏",
"圭",
"全",
"U×",
};
KomaSyurui14Array.nimojiGote = new string[]{
"△×",//[0]ヌル
"△歩",
"△香",
"△桂",
"△銀",
"△金",
"△王",
"△飛",
"△角",
"△竜",
"△馬",
"△と",
"△杏",
"△圭",
"△全",
"△×",
};
KomaSyurui14Array.nimojiSente = new string[]{
"▲×",//[0]ヌル
"▲歩",
"▲香",
"▲桂",
"▲銀",
"▲金",
"▲王",
"▲飛",
"▲角",
"▲竜",
"▲馬",
"▲と",
"▲杏",
"▲圭",
"▲全",
"▲×",
};
KomaSyurui14Array.gaijiSente = new char[]{
'x',//[0]ヌル
'歩',
'香',
'桂',
'銀',
'金',
'王',
'飛',
'角',
'竜',
'馬',
'と',
'杏',
'圭',
'全',
'x',
};
//逆さ歩(外字)
KomaSyurui14Array.gaijiGote = new char[]{
'x',//[0]ヌル
'',//逆さ歩(外字)
'',//逆さ香(外字)
'',//逆さ桂(外字)
'',//逆さ銀(外字)
'',//逆さ金(外字)
'',//逆さ王(外字)
'',//逆さ飛(外字)
'',//逆さ角(外字)
'',//逆さ竜(外字)
'',//逆さ馬(外字)
'',//逆さと(外字)
'',//逆さ杏(外字)
'',//逆さ圭(外字)
'',//逆さ全(外字)
'X',//[15]エラー
};
}
#endregion
/// <summary>
/// ------------------------------------------------------------------------------------------------------------------------
/// 外字を利用した表示文字。
/// ------------------------------------------------------------------------------------------------------------------------
/// </summary>
public static char ToGaiji(PieceType koma, Playerside pside)
{
char result;
switch (pside)
{
case Playerside.P2:
result = KomaSyurui14Array.GaijiGote[(int)koma];
break;
case Playerside.P1:
result = KomaSyurui14Array.GaijiSente[(int)koma];
break;
default:
result = '×';
break;
}
return result;
}
/// <summary>
/// ------------------------------------------------------------------------------------------------------------------------
/// 「歩」といった、外字を利用しない表示文字。
/// ------------------------------------------------------------------------------------------------------------------------
/// </summary>
public static string ToIchimoji(PieceType koma)
{
return KomaSyurui14Array.Ichimoji[(int)koma];
}
/// <summary>
/// ------------------------------------------------------------------------------------------------------------------------
/// 「▲歩」といった、外字を利用しない表示文字。
/// ------------------------------------------------------------------------------------------------------------------------
/// </summary>
public static string ToNimoji(PieceType koma, Playerside pside)
{
string result;
switch (pside)
{
case Playerside.P2:
result = KomaSyurui14Array.NimojiGote[(int)koma];
break;
case Playerside.P1:
result = KomaSyurui14Array.NimojiSente[(int)koma];
break;
default:
result = "××";
break;
}
return result;
}
/// <summary>
/// ------------------------------------------------------------------------------------------------------------------------
/// 駒のSFEN符号用の単語。
/// ------------------------------------------------------------------------------------------------------------------------
/// </summary>
public static string SfenText(PieceType komaSyurui, Playerside pside)
{
string str;
if (Playerside.P1 == pside)
{
str = KomaSyurui14Array.Sfen1P[(int)komaSyurui];
}
else
{
str = KomaSyurui14Array.Sfen2P[(int)komaSyurui];
}
return str;
}
public static bool Matches(PieceType koma1, PieceType koma2)
{
return (int)koma2 == (int)koma1;
}
}
}
| 31.176344 | 132 | 0.273229 | [
"MIT"
] | muzudho/201505-KifuWarabe-WCSC25-v1-14 | Sources/Entities/Features/P025KifuLarabe/KomaSyurui14Array.cs | 15,490 | C# |
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using Renci.SshNet.Sftp;
namespace CSLabs.Api.Util
{
public static class SftpExtensions
{
public static string GetExtension(this SftpFile file)
{
return file.Name.Substring(file.Name.LastIndexOf(".") + 1);
}
public static IEnumerable<XmlNode> ToIEnumerable(this XmlNodeList nodeList)
{
var list = new List<XmlNode>();
for (int i = 0; i < nodeList.Count; i++)
{
list.Add(nodeList.Item(i));
}
return list;
}
}
} | 24.538462 | 83 | 0.575235 | [
"MIT"
] | ius-csg/cslabs-extension-2020 | cslabs-backend/CSLabs.Api/Util/SftpExtensions.cs | 638 | C# |
// MiddleMouseKeyChangeSpriteSystem.cs
using UnityEngine;
using Entitas;
public class MiddleMouseKeyChangeSpriteSystem : IExecuteSystem
{
readonly IGroup<GameEntity> _sprites;
// 获取所有拥有Sprite的组
public MiddleMouseKeyChangeSpriteSystem(Contexts contexts)
{
_sprites = contexts.game.GetGroup(GameMatcher.Sprite);
}
// 如果按下的中键,则替换
public void Execute()
{
if(Input.GetMouseButtonDown(2))
{
foreach(var e in _sprites.GetEntities())
{
//e.sprite.name = "head2"; //-->不能触发ReactiveSystem
e.ReplaceSprite("head2");
}
}
}
}
| 23.357143 | 67 | 0.614679 | [
"MIT"
] | WarrenMondeville/ECSFrameworkUnityExample | UnityProject/Assets/2_EntityViewAndMovement/Scripts/Systems/Input/MiddleMouseKeyChangeSpriteSystem.cs | 702 | C# |
// ===========
// DO NOT EDIT - this file is automatically regenerated.
// ===========
using System;
using System.Collections.Generic;
using Unity.Entities;
using Unity.Collections;
using Improbable.Gdk.Core;
using Improbable.Gdk.Subscriptions;
using Improbable.Worker.CInterop;
using Entity = Unity.Entities.Entity;
namespace Improbable.Gdk.Tests.ComponentsWithNoFields
{
[AutoRegisterSubscriptionManager]
public class ComponentWithNoFieldsWithCommandsCommandSenderSubscriptionManager : SubscriptionManager<ComponentWithNoFieldsWithCommandsCommandSender>
{
private readonly World world;
private readonly WorkerSystem workerSystem;
private Dictionary<EntityId, HashSet<Subscription<ComponentWithNoFieldsWithCommandsCommandSender>>>
entityIdToSenderSubscriptions =
new Dictionary<EntityId, HashSet<Subscription<ComponentWithNoFieldsWithCommandsCommandSender>>>();
public ComponentWithNoFieldsWithCommandsCommandSenderSubscriptionManager(World world)
{
this.world = world;
// Check that these are there
workerSystem = world.GetExistingSystem<WorkerSystem>();
var constraintSystem = world.GetExistingSystem<ComponentConstraintsCallbackSystem>();
constraintSystem.RegisterEntityAddedCallback(entityId =>
{
if (!entityIdToSenderSubscriptions.TryGetValue(entityId, out var subscriptions))
{
return;
}
workerSystem.TryGetEntity(entityId, out var entity);
foreach (var subscription in subscriptions)
{
if (!subscription.HasValue)
{
subscription.SetAvailable(new ComponentWithNoFieldsWithCommandsCommandSender(entity, world));
}
}
});
constraintSystem.RegisterEntityRemovedCallback(entityId =>
{
if (!entityIdToSenderSubscriptions.TryGetValue(entityId, out var subscriptions))
{
return;
}
foreach (var subscription in subscriptions)
{
if (subscription.HasValue)
{
ResetValue(subscription);
subscription.SetUnavailable();
}
}
});
}
public override Subscription<ComponentWithNoFieldsWithCommandsCommandSender> Subscribe(EntityId entityId)
{
if (entityIdToSenderSubscriptions == null)
{
entityIdToSenderSubscriptions = new Dictionary<EntityId, HashSet<Subscription<ComponentWithNoFieldsWithCommandsCommandSender>>>();
}
if (entityId.Id < 0)
{
throw new ArgumentException("EntityId can not be < 0");
}
var subscription = new Subscription<ComponentWithNoFieldsWithCommandsCommandSender>(this, entityId);
if (!entityIdToSenderSubscriptions.TryGetValue(entityId, out var subscriptions))
{
subscriptions = new HashSet<Subscription<ComponentWithNoFieldsWithCommandsCommandSender>>();
entityIdToSenderSubscriptions.Add(entityId, subscriptions);
}
if (workerSystem.TryGetEntity(entityId, out var entity))
{
subscription.SetAvailable(new ComponentWithNoFieldsWithCommandsCommandSender(entity, world));
}
else if (entityId.Id == 0)
{
subscription.SetAvailable(new ComponentWithNoFieldsWithCommandsCommandSender(Entity.Null, world));
}
subscriptions.Add(subscription);
return subscription;
}
public override void Cancel(ISubscription subscription)
{
var sub = ((Subscription<ComponentWithNoFieldsWithCommandsCommandSender>) subscription);
if (sub.HasValue)
{
var sender = sub.Value;
sender.IsValid = false;
}
var subscriptions = entityIdToSenderSubscriptions[sub.EntityId];
subscriptions.Remove(sub);
if (subscriptions.Count == 0)
{
entityIdToSenderSubscriptions.Remove(sub.EntityId);
}
}
public override void ResetValue(ISubscription subscription)
{
var sub = ((Subscription<ComponentWithNoFieldsWithCommandsCommandSender>) subscription);
if (sub.HasValue)
{
sub.Value.RemoveAllCallbacks();
}
}
}
[AutoRegisterSubscriptionManager]
public class ComponentWithNoFieldsWithCommandsCommandReceiverSubscriptionManager : SubscriptionManager<ComponentWithNoFieldsWithCommandsCommandReceiver>
{
private readonly World world;
private readonly WorkerSystem workerSystem;
private readonly ComponentUpdateSystem componentUpdateSystem;
private Dictionary<EntityId, HashSet<Subscription<ComponentWithNoFieldsWithCommandsCommandReceiver>>> entityIdToReceiveSubscriptions;
private HashSet<EntityId> entitiesMatchingRequirements = new HashSet<EntityId>();
private HashSet<EntityId> entitiesNotMatchingRequirements = new HashSet<EntityId>();
public ComponentWithNoFieldsWithCommandsCommandReceiverSubscriptionManager(World world)
{
this.world = world;
// Check that these are there
workerSystem = world.GetExistingSystem<WorkerSystem>();
componentUpdateSystem = world.GetExistingSystem<ComponentUpdateSystem>();
var constraintSystem = world.GetExistingSystem<ComponentConstraintsCallbackSystem>();
constraintSystem.RegisterAuthorityCallback(ComponentWithNoFieldsWithCommands.ComponentId, authorityChange =>
{
if (authorityChange.Authority == Authority.Authoritative)
{
if (!entitiesNotMatchingRequirements.Contains(authorityChange.EntityId))
{
return;
}
workerSystem.TryGetEntity(authorityChange.EntityId, out var entity);
foreach (var subscription in entityIdToReceiveSubscriptions[authorityChange.EntityId])
{
subscription.SetAvailable(new ComponentWithNoFieldsWithCommandsCommandReceiver(world, entity, authorityChange.EntityId));
}
entitiesMatchingRequirements.Add(authorityChange.EntityId);
entitiesNotMatchingRequirements.Remove(authorityChange.EntityId);
}
else if (authorityChange.Authority == Authority.NotAuthoritative)
{
if (!entitiesMatchingRequirements.Contains(authorityChange.EntityId))
{
return;
}
workerSystem.TryGetEntity(authorityChange.EntityId, out var entity);
foreach (var subscription in entityIdToReceiveSubscriptions[authorityChange.EntityId])
{
ResetValue(subscription);
subscription.SetUnavailable();
}
entitiesNotMatchingRequirements.Add(authorityChange.EntityId);
entitiesMatchingRequirements.Remove(authorityChange.EntityId);
}
});
}
public override Subscription<ComponentWithNoFieldsWithCommandsCommandReceiver> Subscribe(EntityId entityId)
{
if (entityIdToReceiveSubscriptions == null)
{
entityIdToReceiveSubscriptions = new Dictionary<EntityId, HashSet<Subscription<ComponentWithNoFieldsWithCommandsCommandReceiver>>>();
}
var subscription = new Subscription<ComponentWithNoFieldsWithCommandsCommandReceiver>(this, entityId);
if (!entityIdToReceiveSubscriptions.TryGetValue(entityId, out var subscriptions))
{
subscriptions = new HashSet<Subscription<ComponentWithNoFieldsWithCommandsCommandReceiver>>();
entityIdToReceiveSubscriptions.Add(entityId, subscriptions);
}
if (workerSystem.TryGetEntity(entityId, out var entity)
&& componentUpdateSystem.HasComponent(ComponentWithNoFieldsWithCommands.ComponentId, entityId)
&& componentUpdateSystem.GetAuthority(entityId, ComponentWithNoFieldsWithCommands.ComponentId) != Authority.NotAuthoritative)
{
entitiesMatchingRequirements.Add(entityId);
subscription.SetAvailable(new ComponentWithNoFieldsWithCommandsCommandReceiver(world, entity, entityId));
}
else
{
entitiesNotMatchingRequirements.Add(entityId);
}
subscriptions.Add(subscription);
return subscription;
}
public override void Cancel(ISubscription subscription)
{
var sub = ((Subscription<ComponentWithNoFieldsWithCommandsCommandReceiver>) subscription);
if (sub.HasValue)
{
var receiver = sub.Value;
receiver.IsValid = false;
receiver.RemoveAllCallbacks();
}
var subscriptions = entityIdToReceiveSubscriptions[sub.EntityId];
subscriptions.Remove(sub);
if (subscriptions.Count == 0)
{
entityIdToReceiveSubscriptions.Remove(sub.EntityId);
entitiesMatchingRequirements.Remove(sub.EntityId);
entitiesNotMatchingRequirements.Remove(sub.EntityId);
}
}
public override void ResetValue(ISubscription subscription)
{
var sub = ((Subscription<ComponentWithNoFieldsWithCommandsCommandReceiver>) subscription);
if (sub.HasValue)
{
sub.Value.RemoveAllCallbacks();
}
}
}
public class ComponentWithNoFieldsWithCommandsCommandSender
{
public bool IsValid;
private readonly Entity entity;
private readonly CommandSystem commandSender;
private readonly CommandCallbackSystem callbackSystem;
private int callbackEpoch;
internal ComponentWithNoFieldsWithCommandsCommandSender(Entity entity, World world)
{
this.entity = entity;
callbackSystem = world.GetOrCreateSystem<CommandCallbackSystem>();
// todo check that this exists
commandSender = world.GetExistingSystem<CommandSystem>();
IsValid = true;
}
public void SendCmdCommand(EntityId targetEntityId, global::Improbable.Gdk.Tests.ComponentsWithNoFields.Empty request, Action<global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.ReceivedResponse> callback = null)
{
var commandRequest = new ComponentWithNoFieldsWithCommands.Cmd.Request(targetEntityId, request);
SendCmdCommand(commandRequest, callback);
}
public void SendCmdCommand(global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.Request request, Action<global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.ReceivedResponse> callback = null)
{
int validCallbackEpoch = callbackEpoch;
var requestId = commandSender.SendCommand(request, entity);
if (callback != null)
{
Action<global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.ReceivedResponse> wrappedCallback = response =>
{
if (!this.IsValid || validCallbackEpoch != this.callbackEpoch)
{
return;
}
callback(response);
};
callbackSystem.RegisterCommandResponseCallback(requestId, wrappedCallback);
}
}
public void RemoveAllCallbacks()
{
++callbackEpoch;
}
}
public class ComponentWithNoFieldsWithCommandsCommandReceiver
{
public bool IsValid;
private readonly EntityId entityId;
private readonly CommandCallbackSystem callbackSystem;
private readonly CommandSystem commandSystem;
private Dictionary<Action<global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.ReceivedRequest>, ulong> cmdCallbackToCallbackKey;
public event Action<global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.ReceivedRequest> OnCmdRequestReceived
{
add
{
if (cmdCallbackToCallbackKey == null)
{
cmdCallbackToCallbackKey = new Dictionary<Action<global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.ReceivedRequest>, ulong>();
}
var key = callbackSystem.RegisterCommandRequestCallback(entityId, value);
cmdCallbackToCallbackKey.Add(value, key);
}
remove
{
if (!cmdCallbackToCallbackKey.TryGetValue(value, out var key))
{
return;
}
callbackSystem.UnregisterCommandRequestCallback(key);
cmdCallbackToCallbackKey.Remove(value);
}
}
internal ComponentWithNoFieldsWithCommandsCommandReceiver(World world, Entity entity, EntityId entityId)
{
this.entityId = entityId;
callbackSystem = world.GetOrCreateSystem<CommandCallbackSystem>();
commandSystem = world.GetExistingSystem<CommandSystem>();
// should check the system actually exists
IsValid = true;
}
public void SendCmdResponse(global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.Response response)
{
commandSystem.SendResponse(response);
}
public void SendCmdResponse(long requestId, global::Improbable.Gdk.Tests.ComponentsWithNoFields.Empty response)
{
commandSystem.SendResponse(new global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.Response(requestId, response));
}
public void SendCmdFailure(long requestId, string failureMessage)
{
commandSystem.SendResponse(new global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.Response(requestId, failureMessage));
}
public void RemoveAllCallbacks()
{
if (cmdCallbackToCallbackKey != null)
{
foreach (var callbackToKey in cmdCallbackToCallbackKey)
{
callbackSystem.UnregisterCommandRequestCallback(callbackToKey.Value);
}
cmdCallbackToCallbackKey.Clear();
}
}
}
}
| 40.814815 | 273 | 0.63132 | [
"MIT"
] | gdk-for-unity-bot/gdk-for-unity | test-project/Assets/Generated/Source/improbable/gdk/tests/componentswithnofields/ComponentWithNoFieldsWithCommandsCommandSenderReceiver.cs | 15,428 | C# |
using UnityEngine;
using System.Collections;
public class PlayWeaponSound : MonoBehaviour
{
[SerializeField]
private AudioSource audioSource;
public void Play()
{
this.audioSource.Play();
}
public void Stop()
{
this.audioSource.Stop();
}
}
| 14.181818 | 45 | 0.596154 | [
"MIT"
] | mentalnote/OldHabitsDieHarder | Assets/Scripts/PlayWeaponSound.cs | 314 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering;
using Microsoft.AspNetCore.Components.Web;
namespace Havit.Blazor.Components.Web.Bootstrap
{
/// <summary>
/// Displays bootstrap icon. See <see href="https://icons.getbootstrap.com/">https://icons.getbootstrap.com/</see>.
/// </summary>
internal class HxBootstrapIcon : ComponentBase
{
/// <summary>
/// Icon to display.
/// </summary>
[Parameter] public BootstrapIcon Icon { get; set; }
/// <summary>
/// CSS Class to combine with basic icon CSS class.
/// </summary>
[Parameter] public string CssClass { get; set; }
/// <summary>
/// Additional attributes to be splatted onto an underlying HTML element.
/// </summary>
[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object> AdditionalAttributes { get; set; }
/// <inheritdoc />
protected override void BuildRenderTree(RenderTreeBuilder builder)
{
// no base call
builder.OpenElement(0, "i");
builder.AddAttribute(1, "class", CssClassHelper.Combine("hx-icon", "bi-" + Icon.Name, CssClass));
builder.AddMultipleAttributes(2, AdditionalAttributes);
builder.CloseElement(); // i
}
}
}
| 29.574468 | 116 | 0.722302 | [
"MIT"
] | havit/Havit.Blazor | Havit.Blazor.Components.Web.Bootstrap/Icons/HxBootstrapIcon.cs | 1,392 | C# |
using UnityEngine;
using System.Collections;
public class IOSImagePickResult : ISN_Result {
private Texture2D _image = null;
public IOSImagePickResult(string ImageData):base(true) {
if(ImageData.Length == 0) {
_IsSucceeded = false;
return;
}
byte[] decodedFromBase64 = System.Convert.FromBase64String(ImageData);
_image = new Texture2D(1, 1);
// _image = new Texture2D(1, 1, TextureFormat.DXT5, false);
_image.LoadImage(decodedFromBase64);
_image.hideFlags = HideFlags.DontSave;
if(!IOSNativeSettings.Instance.DisablePluginLogs)
Debug.Log("IOSImagePickResult: w" + _image.width + " h: " + _image.height);
}
public Texture2D image {
get {
return _image;
}
}
}
| 20.882353 | 78 | 0.712676 | [
"MIT"
] | Bregermann/TargetCrack | Target Crack/Assets/Extensions/IOSNative/Other/Camera/IOSImagePickResult.cs | 712 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HoveringVehicle : Vehicle {
[System.Serializable]
public class Engine {
public void Init (Rigidbody _rigidbody) {
rigidbody = _rigidbody;
}
public Transform transform;
private Rigidbody rigidbody;
public float forceMultiplier;
}
public Engine [ ] engines;
public float targetHeight;
public float steeringForce;
public float engineForce;
public override void Start () {
base.Start ();
foreach (Engine engine in engines) {
engine.Init (GetComponent<Rigidbody>());
}
}
public void FixedUpdate() {
Fly ();
}
public override void Move(float direction) {
HoverTowards (transform.position + transform.forward * direction, 1f);
}
private void HoverTowards (Vector3 position, float forceMultiplier) {
foreach (Engine engine in engines) {
float sign = Mathf.Sign (Vector3.Dot (engine.transform.position - (transform.position + GetComponent<Rigidbody>().centerOfMass), (position - transform.position).normalized));
engine.forceMultiplier = 1f - steeringForce * sign * forceMultiplier;
}
}
public override void Brake() {
HoverTowards (transform.position - GetComponent<Rigidbody>().velocity, Mathf.Min (GetComponent<Rigidbody>().velocity.magnitude / 10f, 0.5f));
}
public override void Turn(float angle) {
GetComponent<Rigidbody>().AddTorque (transform.rotation * new Vector3 (0f, angle, 0f));
}
private void Fly () {
foreach (Engine engine in engines) {
Ray ray = new Ray (engine.transform.position, Vector3.down);
RaycastHit hit;
Debug.DrawRay (ray.origin, ray.direction * targetHeight);
float heightForce = 1f;
if (Physics.Raycast (ray, out hit)) {
heightForce = 1 + Mathf.Clamp (targetHeight - hit.distance, -1f, 1f);
}
float equillibriumForce = GetComponent<Rigidbody>().mass * (Physics.gravity.y * -1f) / engines.Length;
float relHeight = 1 + (transform.position.y - engine.transform.position.y);
Vector3 force = engine.transform.up * equillibriumForce * relHeight * heightForce * engine.forceMultiplier;
GetComponent<Rigidbody>().AddForceAtPosition (force, engine.transform.position);
}
}
}
| 33.226667 | 186 | 0.638443 | [
"MIT"
] | Lomztein/Project-Incoming | Assets/Source/Enemies/HoveringVehicle.cs | 2,494 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum CastDirection
{
Up,
Down,
Left,
Right,
Forward,
Backward
}
| 12.5 | 33 | 0.685714 | [
"MIT"
] | JackEvans24/bug-racing | Assets/Scripts/Helpers/CastDirection.cs | 175 | C# |
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Microsoft.PowerToys.Run.Plugin.Registry.Classes;
using Microsoft.PowerToys.Run.Plugin.Registry.Constants;
using Microsoft.PowerToys.Run.Plugin.Registry.Properties;
using Microsoft.Win32;
namespace Microsoft.PowerToys.Run.Plugin.Registry.Helper
{
#pragma warning disable CA1031 // Do not catch general exception types
/// <summary>
/// Helper class to easier work with the registry
/// </summary>
internal static class RegistryHelper
{
/// <summary>
/// A list that contain all registry base keys in a long/full version and in a short version (e.g HKLM = HKEY_LOCAL_MACHINE)
/// </summary>
private static readonly IReadOnlyDictionary<string, RegistryKey> _baseKeys = new Dictionary<string, RegistryKey>(12)
{
{ KeyName.ClassRootShort, Win32.Registry.ClassesRoot },
{ Win32.Registry.ClassesRoot.Name, Win32.Registry.ClassesRoot },
{ KeyName.CurrentConfigShort, Win32.Registry.CurrentConfig },
{ Win32.Registry.CurrentConfig.Name, Win32.Registry.CurrentConfig },
{ KeyName.CurrentUserShort, Win32.Registry.CurrentUser },
{ Win32.Registry.CurrentUser.Name, Win32.Registry.CurrentUser },
{ KeyName.LocalMachineShort, Win32.Registry.LocalMachine },
{ Win32.Registry.LocalMachine.Name, Win32.Registry.LocalMachine },
{ KeyName.PerformanceDataShort, Win32.Registry.PerformanceData },
{ Win32.Registry.PerformanceData.Name, Win32.Registry.PerformanceData },
{ KeyName.UsersShort, Win32.Registry.Users },
{ Win32.Registry.Users.Name, Win32.Registry.Users },
};
/// <summary>
/// Try to find registry base keys based on the given query
/// </summary>
/// <param name="query">The query to search</param>
/// <returns>A combination of a list of base <see cref="RegistryKey"/> and the sub keys</returns>
internal static (IEnumerable<RegistryKey>? baseKey, string subKey) GetRegistryBaseKey(in string query)
{
if (string.IsNullOrWhiteSpace(query))
{
return (null, string.Empty);
}
var baseKey = query.Split('\\').FirstOrDefault() ?? string.Empty;
var subKey = query.Replace(baseKey, string.Empty, StringComparison.InvariantCultureIgnoreCase).TrimStart('\\');
var baseKeyResult = _baseKeys
.Where(found => found.Key.StartsWith(baseKey, StringComparison.InvariantCultureIgnoreCase))
.Select(found => found.Value)
.Distinct();
return (baseKeyResult, subKey);
}
/// <summary>
/// Return a list of all registry base key
/// </summary>
/// <returns>A list with all registry base keys</returns>
internal static ICollection<RegistryEntry> GetAllBaseKeys()
{
return new Collection<RegistryEntry>
{
new RegistryEntry(Win32.Registry.ClassesRoot),
new RegistryEntry(Win32.Registry.CurrentConfig),
new RegistryEntry(Win32.Registry.CurrentUser),
new RegistryEntry(Win32.Registry.LocalMachine),
new RegistryEntry(Win32.Registry.PerformanceData),
new RegistryEntry(Win32.Registry.Users),
};
}
/// <summary>
/// Search for the given sub-key path in the given registry base key
/// </summary>
/// <param name="baseKey">The base <see cref="RegistryKey"/></param>
/// <param name="subKeyPath">The path of the registry sub-key</param>
/// <returns>A list with all found registry keys</returns>
internal static ICollection<RegistryEntry> SearchForSubKey(in RegistryKey baseKey, in string subKeyPath)
{
if (string.IsNullOrEmpty(subKeyPath))
{
return FindSubKey(baseKey, string.Empty);
}
var subKeysNames = subKeyPath.Split('\\');
var index = 0;
RegistryKey? subKey = baseKey;
ICollection<RegistryEntry> result;
do
{
result = FindSubKey(subKey, subKeysNames.ElementAtOrDefault(index) ?? string.Empty);
if (result.Count == 0)
{
// If a subKey can't be found, show no results.
break;
}
if (result.Count == 1 && index < subKeysNames.Length)
{
subKey = result.First().Key;
}
if (result.Count > 1 || subKey == null)
{
break;
}
index++;
}
while (index < subKeysNames.Length);
return result;
}
/// <summary>
/// Return a human readable summary of a given <see cref="RegistryKey"/>
/// </summary>
/// <param name="key">The <see cref="RegistryKey"/> for the summary</param>
/// <returns>A human readable summary</returns>
internal static string GetSummary(in RegistryKey key)
{
return $"{Resources.SubKeys} {key.SubKeyCount} - {Resources.Values} {key.ValueCount}";
}
/// <summary>
/// Open a given registry key in the registry editor
/// </summary>
/// <param name="fullKey">The registry key to open</param>
internal static void OpenRegistryKey(in string fullKey)
{
// it's impossible to directly open a key via command-line option, so we must override the last remember key
Win32.Registry.SetValue(@"HKEY_Current_User\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit", "LastKey", fullKey);
// -m => allow multi-instance (hidden start option)
Wox.Infrastructure.Helper.OpenInShell("regedit.exe", "-m", null, true);
}
/// <summary>
/// Try to find the given registry sub-key in the given registry parent-key
/// </summary>
/// <param name="parentKey">The parent-key, also the root to start the search</param>
/// <param name="searchSubKey">The sub-key to find</param>
/// <returns>A list with all found registry sub-keys</returns>
private static ICollection<RegistryEntry> FindSubKey(in RegistryKey parentKey, in string searchSubKey)
{
var list = new Collection<RegistryEntry>();
try
{
foreach (var subKey in parentKey.GetSubKeyNames().OrderBy(found => found))
{
if (!subKey.StartsWith(searchSubKey, StringComparison.InvariantCultureIgnoreCase))
{
continue;
}
if (string.Equals(subKey, searchSubKey, StringComparison.OrdinalIgnoreCase))
{
var key = parentKey.OpenSubKey(subKey, RegistryKeyPermissionCheck.ReadSubTree);
if (key != null)
{
list.Add(new RegistryEntry(key));
}
return list;
}
try
{
var key = parentKey.OpenSubKey(subKey, RegistryKeyPermissionCheck.ReadSubTree);
if (key != null)
{
list.Add(new RegistryEntry(key));
}
}
catch (Exception exception)
{
list.Add(new RegistryEntry($"{parentKey.Name}\\{subKey}", exception));
}
}
}
catch (Exception ex)
{
list.Add(new RegistryEntry(parentKey.Name, ex));
}
return list;
}
/// <summary>
/// Return a list with a registry sub-keys of the given registry parent-key
/// </summary>
/// <param name="parentKey">The registry parent-key</param>
/// <param name="maxCount">(optional) The maximum count of the results</param>
/// <returns>A list with all found registry sub-keys</returns>
private static ICollection<RegistryEntry> GetAllSubKeys(in RegistryKey parentKey, in int maxCount = 50)
{
var list = new Collection<RegistryEntry>();
try
{
foreach (var subKey in parentKey.GetSubKeyNames())
{
if (list.Count >= maxCount)
{
break;
}
list.Add(new RegistryEntry(parentKey));
}
}
catch (Exception exception)
{
list.Add(new RegistryEntry(parentKey.Name, exception));
}
return list;
}
}
#pragma warning restore CA1031 // Do not catch general exception types
}
| 40.855932 | 137 | 0.546152 | [
"MIT"
] | Fentaniao/PowerToys | src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Helper/RegistryHelper.cs | 9,409 | C# |
namespace Telnyx.net.Entities.OutboundVoiceProfiles
{
using System.Collections.Generic;
using Newtonsoft.Json;
public class OutboundVoiceProfileCallRecording
{
/// <summary>
/// Specifies which calls are recorded.
/// </summary>
[JsonProperty("call_recording_type")]
public string CallRecordingType { get; set; }
/// <summary>
/// When call_recording_type is 'by_caller_phone_number', only outbound calls using one of these numbers will be recorded. Numbers must be specified in E164 format.
/// </summary>
[JsonProperty("call_recording_caller_phone_numbers")]
public List<string> CallRecordingCallerPhoneNumbers { get; set; }
/// <summary>
/// When using 'dual' channels, the final audio file will be a stereo recording with the first leg on channel A, and the rest on channel B.
/// </summary>
[JsonProperty("call_recording_channels")]
public string CallRecordingChannels { get; set; }
/// <summary>
/// The audio file format for calls being recorded.
/// </summary>
[JsonProperty("call_recording_format")]
public string CallRecordingFormat { get; set; }
}
}
| 38.363636 | 182 | 0.651659 | [
"MIT"
] | MValle21/telnyx-dotnet | src/Telnyx.net/Entities/OutboundVoiceProfiles/OutboundVoiceProfileCallRecording.cs | 1,268 | C# |
using System.Windows.Forms;
namespace Demo.Nehe
{
partial class Lesson16Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer = new System.Windows.Forms.Timer(this.components);
this.canvas = new UserControl();
this.SuspendLayout();
//
// timer
//
this.timer.Interval = 16;
this.timer.Tick += new System.EventHandler(this.TimerTick);
//
// canvas
//
this.canvas.Dock = System.Windows.Forms.DockStyle.Fill;
this.canvas.Location = new System.Drawing.Point(0, 0);
this.canvas.Name = "canvas";
this.canvas.Size = new System.Drawing.Size(284, 262);
this.canvas.TabIndex = 0;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.canvas);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Lesson4Form";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "HaxGL";
this.Activated += new System.EventHandler(this.MainFormActivated);
this.Deactivate += new System.EventHandler(this.MainFormDeactivate);
this.ResumeLayout(false);
}
#endregion
private UserControl canvas;
private System.Windows.Forms.Timer timer;
}
}
| 33.92 | 107 | 0.560928 | [
"Apache-2.0"
] | jdarc/webgl.net | Demo/Nehe/Lesson16Form.designer.cs | 2,546 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.Recognizers.Text.Sequence.English
{
public class EmailParser : BaseSequenceParser
{
private BaseSequenceConfiguration config;
public EmailParser(BaseSequenceConfiguration config)
{
this.config = config;
}
}
}
| 22.647059 | 61 | 0.683117 | [
"MIT"
] | 17000cyh/Recognizers-Text | .NET/Microsoft.Recognizers.Text.Sequence/English/Parsers/EmailParser.cs | 387 | C# |
using System;
using System.IO;
using System.Text;
using Compress.Support.Compression.LZMA;
namespace Compress.SevenZip.Structure
{
public class Header
{
public StreamsInfo StreamsInfo;
public FileInfo FileInfo;
public void Read(BinaryReader br)
{
for (; ; )
{
HeaderProperty hp = (HeaderProperty)br.ReadByte();
switch (hp)
{
case HeaderProperty.kMainStreamsInfo:
StreamsInfo = new StreamsInfo();
StreamsInfo.Read(br);
break;
case HeaderProperty.kFilesInfo:
FileInfo = new FileInfo();
FileInfo.Read(br);
break;
case HeaderProperty.kEnd:
return;
default:
throw new Exception(hp.ToString());
}
}
}
public void WriteHeader(BinaryWriter bw)
{
bw.Write((byte)HeaderProperty.kHeader);
StreamsInfo.Write(bw);
FileInfo.Write(bw);
bw.Write((byte)HeaderProperty.kEnd);
}
public static ZipReturn ReadHeaderOrPackedHeader(Stream stream, long baseOffset, out Header header)
{
header = null;
using BinaryReader br = new(stream, Encoding.UTF8, true);
HeaderProperty hp = (HeaderProperty)br.ReadByte();
switch (hp)
{
case HeaderProperty.kEncodedHeader:
{
StreamsInfo streamsInfo = new();
streamsInfo.Read(br);
if (streamsInfo.Folders.Length > 1)
{
return ZipReturn.ZipUnsupportedCompression;
}
Folder firstFolder = streamsInfo.Folders[0];
if (firstFolder.Coders.Length > 1)
{
return ZipReturn.ZipUnsupportedCompression;
}
byte[] method = firstFolder.Coders[0].Method;
if (!((method.Length == 3) && (method[0] == 3) && (method[1] == 1) && (method[2] == 1))) // LZMA
{
return ZipReturn.ZipUnsupportedCompression;
}
stream.Seek(baseOffset + (long)streamsInfo.PackPosition, SeekOrigin.Begin);
using (LzmaStream decoder = new(firstFolder.Coders[0].Properties, stream))
{
ZipReturn zr = ReadHeaderOrPackedHeader(decoder, baseOffset, out header);
if (zr != ZipReturn.ZipGood)
{
return zr;
}
}
return ZipReturn.ZipGood;
}
case HeaderProperty.kHeader:
{
header = new Header();
header.Read(br);
return ZipReturn.ZipGood;
}
}
return ZipReturn.ZipCentralDirError;
}
public void Report(ref StringBuilder sb)
{
sb.AppendLine("Header");
sb.AppendLine("------");
if (StreamsInfo == null)
{
sb.AppendLine("StreamsInfo == null");
}
else
{
StreamsInfo.Report(ref sb);
}
if (FileInfo == null)
{
sb.AppendLine("FileInfo == null");
}
else
{
FileInfo.Report(ref sb);
}
}
}
} | 32.648 | 121 | 0.410194 | [
"Apache-2.0"
] | RomVault/RVWorld | Compress/SevenZip/Structure/Header.cs | 4,083 | C# |
#region Using Directives
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
#endregion
namespace Pharmatechnik.Nav.Language.CodeGen {
// ReSharper disable once InconsistentNaming
sealed class IBeginWfsCodeModel : FileGenerationCodeModel {
IBeginWfsCodeModel(TaskCodeInfo taskCodeInfo,
string relativeSyntaxFileName,
string filePath,
ImmutableList<string> usingNamespaces,
ImmutableList<InitTransitionCodeModel> initTransitions,
ImmutableList<string> codeDeclarations)
:base(taskCodeInfo, relativeSyntaxFileName, filePath) {
UsingNamespaces = usingNamespaces ?? throw new ArgumentNullException(nameof(usingNamespaces));
InitTransitions = initTransitions ?? throw new ArgumentNullException(nameof(initTransitions));
CodeDeclarations = codeDeclarations ?? throw new ArgumentNullException(nameof(codeDeclarations));
}
public string Namespace => Task.WflNamespace;
public string BaseInterfaceName => Task.IBeginWfsBaseTypeName;
public ImmutableList<string> UsingNamespaces { get; }
public ImmutableList<InitTransitionCodeModel> InitTransitions { get; }
public ImmutableList<string> CodeDeclarations { get; }
public static IBeginWfsCodeModel FromTaskDefinition(ITaskDefinitionSymbol taskDefinition, IPathProvider pathProvider) {
if (taskDefinition == null) {
throw new ArgumentNullException(nameof(taskDefinition));
}
if (pathProvider == null) {
throw new ArgumentNullException(nameof(pathProvider));
}
var taskCodeInfo = TaskCodeInfo.FromTaskDefinition(taskDefinition);
var relativeSyntaxFileName = pathProvider.GetRelativePath(pathProvider.IBeginWfsFileName, pathProvider.SyntaxFileName);
var namespaces = GetUsingNamespaces(taskDefinition, taskCodeInfo);
var codeDeclarations = CodeModelBuilder.GetCodeDeclarations(taskDefinition);
var initTransitions = CodeModelBuilder.GetInitTransitions(taskDefinition, taskCodeInfo);
return new IBeginWfsCodeModel(
taskCodeInfo : taskCodeInfo,
relativeSyntaxFileName: relativeSyntaxFileName,
filePath : pathProvider.IBeginWfsFileName,
usingNamespaces : namespaces.ToImmutableList(),
initTransitions : initTransitions.ToImmutableList(),
codeDeclarations : codeDeclarations.ToImmutableList());
}
private static IEnumerable<string> GetUsingNamespaces(ITaskDefinitionSymbol taskDefinition, TaskCodeInfo taskCodeInfo) {
var namespaces = new List<string>();
namespaces.Add(taskCodeInfo.IwflNamespace);
namespaces.Add(CodeGenFacts.NavigationEngineIwflNamespace);
namespaces.Add(CodeGenFacts.NavigationEngineWflNamespace);
namespaces.AddRange(taskDefinition.CodeGenerationUnit.GetCodeUsingNamespaces());
return namespaces.ToSortedNamespaces();
}
}
} | 47.605634 | 132 | 0.657101 | [
"MIT"
] | IInspectable/Nav-Language-Extensions | Nav.Language/CodeGen/CodeModel/IBeginWfsCodeModel.cs | 3,312 | C# |
using BuildVision.Contracts;
namespace BuildVision.UI.Settings.Models.Columns
{
public class GridColumnSettings : BaseGridColumnSettingsAttribute
{
public static GridColumnSettings Empty { get; } = new GridColumnSettings
{
PropertyNameId = string.Empty,
Header = Resources.NoneMenuItem
};
public string PropertyNameId { get; set; }
private GridColumnSettings()
{
}
public GridColumnSettings(
string propertyNameId,
string header,
bool visible,
int displayIndex,
double width,
string valueStringFormat)
{
PropertyNameId = propertyNameId;
Header = header;
Visible = visible;
DisplayIndex = displayIndex;
Width = width;
ValueStringFormat = valueStringFormat;
}
}
}
| 25.75 | 80 | 0.576052 | [
"MIT"
] | FroggieFrog/BuildVision | src/BuildVision.UI/Settings/Models/GridColumnSettings.cs | 929 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// Este código fue generado por una herramienta.
// Versión de runtime:4.0.30319.42000
//
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// se vuelve a generar el código.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TGC.Examples.Properties {
using System;
/// <summary>
/// Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc.
/// </summary>
// StronglyTypedResourceBuilder generó automáticamente esta clase
// a través de una herramienta como ResGen o Visual Studio.
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
// con la opción /str o recompile su proyecto de VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TGC.Examples.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
/// búsquedas de recursos mediante esta clase de recurso fuertemente tipado.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Busca un recurso adaptado de tipo System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap folder {
get {
object obj = ResourceManager.GetObject("folder", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Busca un recurso adaptado de tipo System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap folder1 {
get {
object obj = ResourceManager.GetObject("folder1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Busca un recurso adaptado de tipo System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap go_home {
get {
object obj = ResourceManager.GetObject("go_home", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Busca un recurso adaptado de tipo System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap go_up {
get {
object obj = ResourceManager.GetObject("go_up", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Busca un recurso adaptado de tipo System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap image_x_generic {
get {
object obj = ResourceManager.GetObject("image_x_generic", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
| 41.578947 | 178 | 0.585021 | [
"MIT"
] | AVinitzca/tgc-viewer | TGC.Examples/Properties/Resources.Designer.cs | 4,754 | C# |
using System;
using System.Collections.Generic;
using System.Text;
namespace Sanatana.DataGenerator.EntityFrameworkCoreSpecs.Tools.Samples.Entities
{
public class Post
{
public int Id { get; set; }
public int CategoryId { get; set; }
public string MarkerText { get; set; }
}
}
| 22.5 | 80 | 0.679365 | [
"MIT"
] | RodionKulin/Sanatana.DataGenerator | Sanatana.DataGenerator.EntityFrameworkCoreSpecs/Tools/Samples/Entities/Post.cs | 317 | C# |
using System;
using System.Collections.Generic;
namespace Orleans.Storage
{
public interface ILocalDataStore
{
string Etag { get; }
string WriteRow(IList<Tuple<string, string>> keys, IDictionary<string, object> data, string eTag);
IDictionary<string, object> ReadRow(IList<Tuple<string, string>> keys);
IList<IDictionary<string, object>> ReadMultiRow(IList<Tuple<string, string>> keys);
bool DeleteRow(IList<Tuple<string, string>> keys, string eTag);
void Clear();
}
internal static class LocalDataStoreInstance
{
public static ILocalDataStore LocalDataStore { get; internal set; }
}
}
| 31.809524 | 106 | 0.687126 | [
"MIT"
] | Drawaes/orleans | src/Orleans/Providers/ILocalDataStore.cs | 668 | C# |
// WARNING
//
// This file has been generated automatically by Xamarin Studio to store outlets and
// actions made in the UI designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
using System.CodeDom.Compiler;
namespace CNotes
{
[Register ("CNotesTvc")]
partial class CNotesTvc
{
[Outlet]
UIKit.UIActivityIndicatorView activityIndicator { get; set; }
[Outlet]
UIKit.UIBarButtonItem noteCountLabel { get; set; }
[Action ("composeClicked:")]
partial void composeClicked (Foundation.NSObject sender);
[Action ("editClicked:")]
partial void editClicked (Foundation.NSObject sender);
void ReleaseDesignerOutlets ()
{
if (activityIndicator != null) {
activityIndicator.Dispose ();
activityIndicator = null;
}
if (noteCountLabel != null) {
noteCountLabel.Dispose ();
noteCountLabel = null;
}
}
}
}
| 22.634146 | 84 | 0.709052 | [
"MIT"
] | colbylwilliams/C-Notes | CNotes/CNotes/ViewControllers/CNotesTvc.designer.cs | 928 | C# |
/*
* Elemental Annotations <https://github.com/takeshik/ElementalAnnotations>
* Copyright © 2015 Takeshi KIRIYA (aka takeshik) <takeshik@tksk.io>
* Licensed under the zlib License; for details, see the website.
*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
// ReSharper disable CheckNamespace
#if ELEMENTAL_ANNOTATIONS_DEFAULT_NAMESPACE
namespace Elemental.Annotations
#else
namespace PresetViewerPlugin.Annotations
#endif
// ReSharper restore CheckNamespace
{
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
[Conditional("DEBUG")]
public abstract class ElementalAttribute
: Attribute
{
public string Description { get; private set; }
protected ElementalAttribute(string description = null)
{
this.Description = description;
}
}
public static partial class CodeElement
{
private static readonly Lazy<IReadOnlyDictionary<Type, string>> _elements =
new Lazy<IReadOnlyDictionary<Type, string>>(() => typeof(CodeElement).GetTypeInfo().Assembly.DefinedTypes
.Where(x => x.IsSubclassOf(typeof(ElementalAttribute)))
.ToDictionary(x => x.AsType(), x => (string) x.GetDeclaredField("Name").GetValue(null))
);
public static IEnumerable<Type> Types
{
get
{
return _elements.Value.Keys;
}
}
public static IEnumerable<string> Names
{
get
{
return _elements.Value.Values;
}
}
public static ILookup<string, string> GetElements(MemberInfo member, bool inherit = true)
{
return member.GetCustomAttributes(typeof(ElementalAttribute), inherit)
.Cast<ElementalAttribute>()
.MakeLookup();
}
public static ILookup<string, string> GetElements(ParameterInfo parameter, bool inherit = true)
{
return parameter.GetCustomAttributes(typeof(ElementalAttribute), inherit)
.Cast<ElementalAttribute>()
.MakeLookup();
}
public static ILookup<string, string> GetElements(Module module)
{
return module.GetCustomAttributes(typeof(ElementalAttribute))
.Cast<ElementalAttribute>()
.MakeLookup();
}
public static ILookup<string, string> GetElements(Assembly assembly)
{
return assembly.GetCustomAttributes(typeof(ElementalAttribute))
.Cast<ElementalAttribute>()
.MakeLookup();
}
private static ILookup<string, string> MakeLookup(this IEnumerable<ElementalAttribute> attributes)
{
return attributes.ToLookup(x => _elements.Value[x.GetType()], x => x.Description);
}
}
}
| 31.978261 | 117 | 0.626445 | [
"Apache-2.0",
"MIT"
] | ruhiel/PresetViewerPlugin | PresetViewerPlugin/Annotations/ElementalAttribute.cs | 2,943 | C# |
namespace Ifak.Fast.Mediator.Util
{
using System;
internal sealed partial class RecyclableMemoryStreamManager
{
/// <summary>
/// Arguments for the StreamCreated event
/// </summary>
public sealed class StreamCreatedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event
/// </summary>
public string Tag { get; }
/// <summary>
/// Requested stream size
/// </summary>
public long RequestedSize { get; }
/// <summary>
/// Actual stream size
/// </summary>
public long ActualSize{ get; }
/// <summary>
/// Initializes a StreamCreatedEventArgs struct
/// </summary>
/// <param name="guid">Unique ID of the stream</param>
/// <param name="tag">Tag of the stream</param>
/// <param name="requestedSize">The requested stream size</param>
/// <param name="actualSize">The actual stream size</param>
public StreamCreatedEventArgs(Guid guid, string tag, long requestedSize, long actualSize)
{
this.Id = guid;
this.Tag = tag;
this.RequestedSize = requestedSize;
this.ActualSize = actualSize;
}
}
/// <summary>
/// Arguments for the StreamDisposed event
/// </summary>
public sealed class StreamDisposedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event
/// </summary>
public string Tag { get; }
/// <summary>
/// Stack where the stream was allocated
/// </summary>
public string AllocationStack { get; }
/// <summary>
/// Stack where stream was disposed
/// </summary>
public string DisposeStack { get; }
/// <summary>
/// Initializes a StreamDisposedEventArgs struct
/// </summary>
/// <param name="guid">Unique ID of the stream</param>
/// <param name="tag">Tag of the stream</param>
/// <param name="allocationStack">Stack of original allocation</param>
/// <param name="disposeStack">Dispose stack</param>
public StreamDisposedEventArgs(Guid guid, string tag, string allocationStack, string disposeStack)
{
this.Id = guid;
this.Tag = tag;
this.AllocationStack = allocationStack;
this.DisposeStack = disposeStack;
}
}
/// <summary>
/// Arguments for the StreamDoubleDisposed event
/// </summary>
public sealed class StreamDoubleDisposedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event
/// </summary>
public string Tag { get; }
/// <summary>
/// Stack where the stream was allocated
/// </summary>
public string AllocationStack { get; }
/// <summary>
/// First dispose stack
/// </summary>
public string DisposeStack1 { get; }
/// <summary>
/// Second dispose stack
/// </summary>
public string DisposeStack2 { get; }
/// <summary>
/// Initializes a StreamDoubleDisposedEventArgs struct
/// </summary>
/// <param name="guid">Unique ID of the stream</param>
/// <param name="tag">Tag of the stream</param>
/// <param name="allocationStack">Stack of original allocation</param>
/// <param name="disposeStack1">First dispose stack</param>
/// <param name="disposeStack2">Second dispose stack</param>
public StreamDoubleDisposedEventArgs(Guid guid, string tag, string allocationStack, string disposeStack1, string disposeStack2)
{
this.Id = guid;
this.Tag = tag;
this.AllocationStack = allocationStack;
this.DisposeStack1 = disposeStack1;
this.DisposeStack2 = disposeStack2;
}
}
/// <summary>
/// Arguments for the StreamFinalized event
/// </summary>
public sealed class StreamFinalizedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event
/// </summary>
public string Tag { get; }
/// <summary>
/// Stack where the stream was allocated
/// </summary>
public string AllocationStack { get; }
/// <summary>
/// Initializes a StreamFinalizedEventArgs struct
/// </summary>
/// <param name="guid">Unique ID of the stream</param>
/// <param name="tag">Tag of the stream</param>
/// <param name="allocationStack">Stack of original allocation</param>
public StreamFinalizedEventArgs(Guid guid, string tag, string allocationStack)
{
this.Id = guid;
this.Tag = tag;
this.AllocationStack = allocationStack;
}
}
/// <summary>
/// Arguments for the StreamConvertedToArray event
/// </summary>
public sealed class StreamConvertedToArrayEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event
/// </summary>
public string Tag { get; }
/// <summary>
/// Stack where ToArray was called
/// </summary>
public string Stack { get; }
/// <summary>
/// Length of stack
/// </summary>
public long Length { get; }
/// <summary>
/// Initializes a StreamConvertedToArrayEventArgs struct
/// </summary>
/// <param name="guid">Unique ID of the stream</param>
/// <param name="tag">Tag of the stream</param>
/// <param name="stack">Stack of ToArray call</param>
/// <param name="length">Length of stream</param>
public StreamConvertedToArrayEventArgs(Guid guid, string tag, string stack, long length)
{
this.Id = guid;
this.Tag = tag;
this.Stack = stack;
this.Length = length;
}
}
/// <summary>
/// Arguments for the StreamOverCapacity event
/// </summary>
public sealed class StreamOverCapacityEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event
/// </summary>
public string Tag { get; }
/// <summary>
/// Original allocation stack
/// </summary>
public string AllocationStack { get; }
/// <summary>
/// Requested capacity
/// </summary>
public long RequestedCapacity { get; }
/// <summary>
/// Maximum capacity
/// </summary>
public long MaximumCapacity { get; }
/// <summary>
/// Initializes a StreamOverCapacityEventArgs struct
/// </summary>
/// <param name="guid">Unique ID of the stream</param>
/// <param name="tag">Tag of the stream</param>
/// <param name="requestedCapacity">Requested capacity</param>
/// <param name="maximumCapacity">Maximum stream capacity of the manager</param>
/// <param name="allocationStack">Original allocation stack</param>
internal StreamOverCapacityEventArgs(Guid guid, string tag, long requestedCapacity, long maximumCapacity, string allocationStack)
{
this.Id = guid;
this.Tag = tag;
this.RequestedCapacity = requestedCapacity;
this.MaximumCapacity = maximumCapacity;
this.AllocationStack = allocationStack;
}
}
/// <summary>
/// Arguments for BlockCreated event
/// </summary>
public sealed class BlockCreatedEventArgs : EventArgs
{
/// <summary>
/// How many bytes are currently in use from the small pool
/// </summary>
public long SmallPoolInUse { get; }
/// <summary>
/// Initializes a BlockCreatedEventArgs struct
/// </summary>
/// <param name="smallPoolInUse">Number of bytes currently in use from the small pool</param>
internal BlockCreatedEventArgs(long smallPoolInUse)
{
this.SmallPoolInUse = smallPoolInUse;
}
}
/// <summary>
/// Arguments for the LargeBufferCreated events
/// </summary>
public sealed class LargeBufferCreatedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event
/// </summary>
public string Tag { get; }
/// <summary>
/// Whether the buffer was satisfied from the pool or not
/// </summary>
public bool Pooled { get; }
/// <summary>
/// Required buffer size
/// </summary>
public long RequiredSize { get; }
/// <summary>
/// How many bytes are in use from the large pool
/// </summary>
public long LargePoolInUse { get; }
/// <summary>
/// If the buffer was not satisfied from the pool, and GenerateCallstacks is turned on, then
/// this will contain the callstack of the allocation request.
/// </summary>
public string CallStack { get; }
/// <summary>
/// Initializes a LargeBufferCreatedEventArgs struct
/// </summary>
/// <param name="guid">Unique ID of the stream</param>
/// <param name="tag">Tag of the stream</param>
/// <param name="requiredSize">Required size of the new buffer</param>
/// <param name="largePoolInUse">How many bytes from the large pool are currently in use</param>
/// <param name="pooled">Whether the buffer was satisfied from the pool or not</param>
/// <param name="callStack">Callstack of the allocation, if it wasn't pooled.</param>
internal LargeBufferCreatedEventArgs(Guid guid, string tag, long requiredSize, long largePoolInUse, bool pooled, string callStack)
{
this.RequiredSize = requiredSize;
this.LargePoolInUse = largePoolInUse;
this.Pooled = pooled;
this.Id = guid;
this.Tag = tag;
this.CallStack = callStack;
}
}
/// <summary>
/// Arguments for the BufferDiscarded event
/// </summary>
public sealed class BufferDiscardedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event
/// </summary>
public string Tag { get; }
/// <summary>
/// Type of the buffer
/// </summary>
public Events.MemoryStreamBufferType BufferType { get; }
/// <summary>
/// The reason this buffer was discarded
/// </summary>
public Events.MemoryStreamDiscardReason Reason { get; }
/// <summary>
/// Initalize a new LargeBufferDiscardedEventArgs struct
/// </summary>
/// <param name="guid">Unique ID of the stream</param>
/// <param name="tag">Tag of the stream</param>
/// <param name="bufferType">Type of buffer being discarded</param>
/// <param name="reason">The reason for the discard</param>
internal BufferDiscardedEventArgs(Guid guid, string tag, Events.MemoryStreamBufferType bufferType, Events.MemoryStreamDiscardReason reason)
{
this.Id = guid;
this.Tag = tag;
this.BufferType = bufferType;
this.Reason = reason;
}
}
/// <summary>
/// Arguments for the StreamLength event
/// </summary>
public sealed class StreamLengthEventArgs : EventArgs
{
/// <summary>
/// Length of the stream
/// </summary>
public long Length { get; }
/// <summary>
/// Initializes a StreamLengthEventArgs struct
/// </summary>
/// <param name="length">Length of the strength</param>
public StreamLengthEventArgs(long length)
{
this.Length = length;
}
}
/// <summary>
/// Arguments for the UsageReport event
/// </summary>
public sealed class UsageReportEventArgs : EventArgs
{
/// <summary>
/// Bytes from the small pool currently in use
/// </summary>
public long SmallPoolInUseBytes { get; }
/// <summary>
/// Bytes from the small pool currently available
/// </summary>
public long SmallPoolFreeBytes { get; }
/// <summary>
/// Bytes from the large pool currently in use
/// </summary>
public long LargePoolInUseBytes { get; }
/// <summary>
/// Bytes from the large pool currently available
/// </summary>
public long LargePoolFreeBytes { get; }
/// <summary>
/// Initializes a new UsageReportEventArgs struct
/// </summary>
/// <param name="smallPoolInUseBytes">Bytes from the small pool currently in use</param>
/// <param name="smallPoolFreeBytes">Bytes from the small pool currently available</param>
/// <param name="largePoolInUseBytes">Bytes from the large pool currently in use</param>
/// <param name="largePoolFreeBytes">Bytes from the large pool currently available</param>
public UsageReportEventArgs(
long smallPoolInUseBytes,
long smallPoolFreeBytes,
long largePoolInUseBytes,
long largePoolFreeBytes)
{
this.SmallPoolInUseBytes = smallPoolInUseBytes;
this.SmallPoolFreeBytes = smallPoolFreeBytes;
this.LargePoolInUseBytes = largePoolInUseBytes;
this.LargePoolFreeBytes = largePoolFreeBytes;
}
}
}
}
| 36.636156 | 151 | 0.512555 | [
"MIT"
] | ifakFAST/Mediator.Net | Mediator.Net/MediatorLib/Util/RecyclableMemoryStream/EventArgs.cs | 16,012 | C# |
using System;
using System.Linq;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.WebUtilities;
namespace KendoUI.Core.Samples.Utils
{
public static class KendoUtils
{
public static string GetJsonDataFromQueryString(this HttpContext httpContext)
{
var rawQueryString = httpContext.Request.QueryString.ToString();
var rawQueryStringKeyValue = QueryHelpers.ParseQuery(rawQueryString).FirstOrDefault();
var dataString = Uri.UnescapeDataString(rawQueryStringKeyValue.Key);
return dataString;
}
}
} | 32.722222 | 98 | 0.718166 | [
"Apache-2.0"
] | VahidN/KendoUI.Core.Samples | src/KendoUI.Core.Samples/Utils/KendoUtils.cs | 589 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WeddingBidders.Server.Services.Contracts
{
public interface IWeddingService
{
}
}
| 17.076923 | 50 | 0.77027 | [
"MIT"
] | QuinntyneBrown/wedding-bidders | Server/Services/Contracts/IWeddingService.cs | 224 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using Microsoft.MixedReality.Toolkit.Input;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
#if WINDOWS_UWP
using System.Threading.Tasks;
using Windows.Storage;
#endif
namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.Logging
{
public class UserInputPlayback : MonoBehaviour
{
[SerializeField]
private string customFilename = "";
public InputPointerVisualizer _EyeGazeVisualizer;
public InputPointerVisualizer _HeadGazeVisualizer;
[SerializeField]
private DrawOnTexture[] heatmapRefs = null;
private List<string> loggedLines;
#if WINDOWS_UWP
private StorageFolder uwpRootFolder = KnownFolders.MusicLibrary;
private readonly string uwpSubFolderName = "MRTK_ET_Demo\\tester";
private readonly string uwpFileName = "mrtk_log_mostRecentET.csv";
private StorageFolder uwpLogSessionFolder;
private StorageFile uwpLogFile;
#endif
private void Start()
{
IsPlaying = false;
ResetCurrentStream();
LoadingStatus_Hide();
}
private void ResetCurrentStream()
{
loggedLines = new List<string>();
}
#if WINDOWS_UWP
public async Task<bool> UWP_Load()
{
return await UWP_LoadNewFile(FileName);
}
public async Task<bool> UWP_LoadNewFile(string filename)
{
ResetCurrentStream();
bool fileExists = await UWP_FileExists(uwpSubFolderName, uwpFileName);
if (fileExists)
{
txt_LoadingUpdate.text = "File exists: " + uwpFileName;
await UWP_ReadData(uwpLogFile);
}
else
{
txt_LoadingUpdate.text = "Error: File does not exist! " + uwpFileName;
return false;
}
return true;
}
public async Task<bool> UWP_FileExists(string dir, string filename)
{
try
{
uwpLogSessionFolder = await uwpRootFolder.GetFolderAsync(dir);
uwpLogFile = await uwpLogSessionFolder.GetFileAsync(filename);
return true;
}
catch
{
txt_LoadingUpdate.text = "Error: File could not be found.";
}
return false;
}
private async Task<bool> UWP_ReadData(StorageFile logfile)
{
using (var inputStream = await logfile.OpenReadAsync())
using (var classicStream = inputStream.AsStreamForRead())
using (var streamReader = new StreamReader(classicStream))
{
while (streamReader.Peek() >= 0)
{
loggedLines.Add(streamReader.ReadLine());
}
txt_LoadingUpdate.text = "Finished loading log file. Lines: " + loggedLines.Count;
return true;
}
}
#endif
public void LoadNewFile(string filename)
{
ResetCurrentStream();
try
{
#if WINDOWS_UWP
if (!UnityEngine.Windows.File.Exists(filename))
#else
if (!System.IO.File.Exists(filename))
#endif
{
txt_LoadingUpdate.text += "Error: Playback log file does not exist! ->> " + filename + " <<";
Log(("Error: Playback log file does not exist! ->" + filename + "<"));
Debug.LogError("Playback log file does not exist! " + filename);
return;
}
// Create an instance of StreamReader to read from a file.
// The using statement also closes the StreamReader.
using (StreamReader sr = new StreamReader(new FileStream(filename, FileMode.Open)))
{
string line;
// Read and display lines from the file until the end of the file is reached.
while ((line = sr.ReadLine()) != null)
{
loggedLines.Add(line);
}
txt_LoadingUpdate.text = "Finished loading log file. Lines: " + loggedLines.Count;
Log(("Finished loading log file. Lines: " + loggedLines.Count));
}
}
catch (Exception e)
{
// Let the user know what went wrong.
Debug.Log("The file could not be read:");
Debug.Log(e.Message);
}
}
#region Parsers
private Vector3 TryParseStringToVector3(string x, string y, string z, out bool isValid)
{
isValid = true;
float tx, ty, tz;
if (!float.TryParse(x, out tx))
{
tx = float.NaN;
isValid = false;
}
if (!float.TryParse(y, out ty))
{
ty = float.NaN;
isValid = false;
}
if (!float.TryParse(z, out tz))
{
tz = float.NaN;
isValid = false;
}
return new Vector3(tx, ty, tz);
}
private float ParseStringToFloat(string val)
{
float tval;
if (!float.TryParse(val, out tval))
tval = float.NaN;
return tval;
}
#endregion
#region Available player actions
public void Load()
{
#if UNITY_EDITOR
LoadInEditor();
#elif WINDOWS_UWP
LoadInUWP();
#endif
}
private void LoadInEditor()
{
txt_LoadingUpdate.text = "Load: " + FileName;
LoadNewFile(FileName);
}
#if WINDOWS_UWP
private async void LoadInUWP()
{
txt_LoadingUpdate.text = "[Load.1] " + FileName;
await UWP_Load();
}
#endif
private string FileName
{
get
{
#if WINDOWS_UWP
return "C:\\Data\\Users\\DefaultAccount\\Music\\MRTK_ET_Demo\\tester\\" + customFilename;
#else
return customFilename;
#endif
}
}
public bool IsPlaying
{
private set;
get;
}
public void Play()
{
IsPlaying = true;
lastUpdatedTime = DateTime.UtcNow;
deltaTimeToUpdateInMs = 0f;
_EyeGazeVisualizer.gameObject.SetActive(true);
_EyeGazeVisualizer.UnpauseApp();
if (_HeadGazeVisualizer != null)
{
_HeadGazeVisualizer.gameObject.SetActive(true);
_HeadGazeVisualizer.UnpauseApp();
}
}
public void Pause()
{
IsPlaying = false;
_EyeGazeVisualizer.PauseApp();
if (_HeadGazeVisualizer != null)
{
_HeadGazeVisualizer.PauseApp();
}
}
public void Clear()
{
_EyeGazeVisualizer.ResetVisualizations();
_HeadGazeVisualizer.ResetVisualizations();
}
public void SpeedUp() { }
public void SlowDown() { }
public void ShowAllAndFreeze()
{
Debug.Log(">> ShowAllAndFreeze");
ShowAllAndFreeze(_EyeGazeVisualizer, InputSourceType.Eyes);
ShowAllAndFreeze(_HeadGazeVisualizer, InputSourceType.Head);
ShowHeatmap();
}
private void ShowAllAndFreeze(InputPointerVisualizer visualizer, InputSourceType iType)
{
if (visualizer != null)
{
visualizer.gameObject.SetActive(true);
#if UNITY_EDITOR
Load();
#elif WINDOWS_UWP
txt_LoadingUpdate.text = "[Load.2] " + FileName;
bool result = AsyncHelpers.RunSync<bool>(() => UWP_Load());
txt_LoadingUpdate.text = "[Load.2] Done. ";
#endif
txt_LoadingUpdate.text = "Loading done. Visualize data...";
// Let's unpause the visualizer to make updates
visualizer.UnpauseApp();
// Let's make sure that the visualizer will show all data at once
visualizer.AmountOfSamples = loggedLines.Count;
// Now let's populate the visualizer
for (int i = 0; i < loggedLines.Count; i++)
{
string[] split = loggedLines[i].Split(System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator.ToCharArray());
if (iType == InputSourceType.Eyes)
UpdateEyeGazeSignal(split, visualizer);
if (iType == InputSourceType.Head)
UpdateHeadGazeSignal(split, visualizer);
}
visualizer.PauseApp();
}
}
private void ShowHeatmap()
{
if ((heatmapRefs != null) && (heatmapRefs.Length > 0))
{
// First, let's load the data
if (!DataIsLoaded)
{
Load();
}
counter = 0;
StartCoroutine(UpdateStatus(0.2f));
StartCoroutine(PopulateHeatmap());
}
}
public TextMesh txt_LoadingUpdate;
private void LoadingStatus_Hide()
{
}
private void LoadingStatus_Show()
{
if (txt_LoadingUpdate != null)
{
if (!txt_LoadingUpdate.gameObject.activeSelf)
txt_LoadingUpdate.gameObject.SetActive(true);
}
}
private void UpdateLoadingStatus(int now, int total)
{
if (txt_LoadingUpdate != null)
{
LoadingStatus_Show();
txt_LoadingUpdate.text = String.Format($"Replay status: {((100f * now) / total):0}%");
}
}
private void Log(string msg)
{
if (txt_LoadingUpdate != null)
{
LoadingStatus_Show();
txt_LoadingUpdate.text = String.Format($"{msg}");
}
}
private static int counter = 0;
private IEnumerator PopulateHeatmap()
{
float maxTargetingDistInMeters = 10f;
RaycastHit hit;
// Now let's populate the visualizer
for (int i = 0; i < loggedLines.Count; i++)
{
Ray? currentPointingRay = GetEyeRay(loggedLines[i].Split(System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator.ToCharArray()));
if (currentPointingRay.HasValue)
{
if (UnityEngine.Physics.Raycast(currentPointingRay.Value, out hit, maxTargetingDistInMeters))
{
for (int hi = 0; hi < heatmapRefs.Length; hi++)
{
if (heatmapRefs[hi].gameObject == hit.collider.gameObject)
{
heatmapRefs[hi].DrawAtThisHitPos(hit.point);
}
}
}
counter = i;
yield return null;
}
}
}
private IEnumerator UpdateStatus(float updateFrequency)
{
while (counter < loggedLines.Count - 1)
{
UpdateLoadingStatus(counter, loggedLines.Count);
yield return new WaitForSeconds(updateFrequency);
}
LoadingStatus_Hide();
}
private IEnumerator AddToCounter(float time)
{
while (counter < 100)
{
yield return new WaitForSeconds(time);
counter++;
}
}
private Ray? GetEyeRay(string[] split)
{
return GetRay(split[9], split[10], split[11], split[12], split[13], split[14]);
//TODO: do not hard code indices.
}
private Ray? GetRay(string ox, string oy, string oz, string dirx, string diry, string dirz)
{
bool isValidVec1 = false, isValidVec2 = false;
Vector3 origin = TryParseStringToVector3(ox, oy, oz, out isValidVec1);
Vector3 dir = TryParseStringToVector3(dirx, diry, dirz, out isValidVec2);
if (isValidVec1 && isValidVec2)
{
return new Ray(origin, dir);
}
return null;
}
#endregion
#region Handle data replay
private bool DataIsLoaded
{
get { return (loggedLines.Count > 0); }
}
DateTime lastUpdatedTime;
float deltaTimeToUpdateInMs;
float lastTimestampInMs = 0;
private void UpdateTimestampForNextReplay(string[] split)
{
float timestampInMs;
if (float.TryParse(split[2], out timestampInMs))
{
lastUpdatedTime = DateTime.UtcNow;
deltaTimeToUpdateInMs = timestampInMs - lastTimestampInMs;
lastTimestampInMs = timestampInMs;
}
}
private void UpdateEyeGazeSignal(string[] split, InputPointerVisualizer vizz)
{
Ray? ray = GetEyeRay(split);
if (ray.HasValue)
{
vizz.UpdateDataVis(new Ray(ray.Value.origin, ray.Value.direction));
}
}
private void UpdateHeadGazeSignal(string[] split, InputPointerVisualizer vizz)
{
}
private void UpdateTargetingSignal(string ox, string oy, string oz, string dirx, string diry, string dirz, Ray cursorRay, InputPointerVisualizer vizz)
{
bool isValidVec1 = false, isValidVec2 = false;
Vector3 origin = TryParseStringToVector3(ox, oy, oz, out isValidVec1);
Vector3 dir = TryParseStringToVector3(dirx, diry, dirz, out isValidVec2);
if (isValidVec1 && isValidVec2)
{
cursorRay = new Ray(origin, dir);
vizz.UpdateDataVis(cursorRay);
}
}
private int replayIndex = 0;
private bool replayNotStartedYet = true;
public int nrOfSamples = 30;
[Range(0.00f, 10.0f)]
public float replaySpeed = 1;
private void Update()
{
// First, let's checked if we're paused
if (IsPlaying)
{
// Second, let's check that it's time to add a new data point
if ((DateTime.UtcNow - lastUpdatedTime).TotalMilliseconds * replaySpeed > deltaTimeToUpdateInMs)
{
PlayNext();
}
}
}
private void PlayNext()
{
// Have we started the replay yet?
if (replayNotStartedYet)
{
replayNotStartedYet = false;
replayIndex = 0;
if (!DataIsLoaded)
{
Load();
}
// Let's unpause the visualizer to make updates
// Show only a certain amount of data at once
if (_EyeGazeVisualizer != null)
{
_EyeGazeVisualizer.UnpauseApp();
_EyeGazeVisualizer.AmountOfSamples = nrOfSamples;
}
if (_HeadGazeVisualizer != null)
{
_HeadGazeVisualizer.UnpauseApp();
_HeadGazeVisualizer.AmountOfSamples = nrOfSamples;
}
}
// Now let's populate the visualizer step by step
if (replayIndex < loggedLines.Count)
{
string[] split = loggedLines[replayIndex].Split(System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator.ToCharArray());
UpdateEyeGazeSignal(split, _EyeGazeVisualizer);
UpdateHeadGazeSignal(split, _HeadGazeVisualizer);
UpdateTimestampForNextReplay(split);
replayIndex++;
}
else
{
txt_LoadingUpdate.text = String.Format($"Replay done!");
Pause();
replayNotStartedYet = true;
}
}
#endregion
}
} | 31.266294 | 160 | 0.516796 | [
"MIT"
] | Bhaskers-Blu-Org2/MRDL_Unity_PeriodicTable | Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputPlayback.cs | 16,792 | C# |
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using NetPhlixDB.Data;
namespace NetPhlixDB.Data.Migrations
{
[DbContext(typeof(NetPhlixDbContext))]
[Migration("20181224080259_InitialCreate")]
partial class InitialCreate
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("UserId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider");
b.Property<string>("ProviderKey");
b.Property<string>("ProviderDisplayName");
b.Property<string>("UserId")
.IsRequired();
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId");
b.Property<string>("RoleId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId");
b.Property<string>("LoginProvider");
b.Property<string>("Name");
b.Property<string>("Value");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.Company", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("CompanyName");
b.Property<DateTime>("CreatedOn");
b.Property<string>("Details");
b.HasKey("Id");
b.ToTable("Companies");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.Event", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("EventInfo");
b.Property<string>("EventPicture");
b.Property<string>("EventTitle");
b.HasKey("Id");
b.ToTable("Events");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.Genre", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("GenreType");
b.HasKey("Id");
b.ToTable("Genres");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.Movie", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("DateReleased");
b.Property<string>("Director");
b.Property<int>("Duration");
b.Property<string>("Language");
b.Property<double>("MovieRating");
b.Property<int>("MovieType");
b.Property<string>("Poster");
b.Property<decimal>("ProductionCost");
b.Property<string>("Storyline");
b.Property<string>("Title");
b.Property<string>("Trailer");
b.Property<string>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("Movies");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.MovieCompany", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("CompanyId");
b.Property<string>("MovieId");
b.HasKey("Id");
b.HasIndex("CompanyId");
b.HasIndex("MovieId");
b.ToTable("MovieCompanies");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.MovieGenre", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("GenreId");
b.Property<string>("MovieId");
b.HasKey("Id");
b.HasIndex("GenreId");
b.HasIndex("MovieId");
b.ToTable("MovieGenres");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.MoviePerson", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("EventId");
b.Property<string>("MovieId");
b.Property<string>("PersonId");
b.HasKey("Id");
b.HasIndex("EventId");
b.HasIndex("MovieId");
b.HasIndex("PersonId");
b.ToTable("MoviePeople");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.Person", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("Age");
b.Property<string>("Bio");
b.Property<DateTime>("BirthDate");
b.Property<string>("BirthPlace");
b.Property<string>("FirstName");
b.Property<string>("LastName");
b.Property<int>("PersonRole");
b.Property<string>("Picture");
b.HasKey("Id");
b.ToTable("People");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.Review", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("AddedBy");
b.Property<DateTime>("DateAdded");
b.Property<string>("MovieId");
b.Property<double>("Rating");
b.Property<string>("ReviewContent");
b.Property<string>("Title");
b.Property<string>("UserId");
b.HasKey("Id");
b.HasIndex("MovieId");
b.HasIndex("UserId");
b.ToTable("Reviews");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.User", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AccessFailedCount");
b.Property<int>("Age");
b.Property<string>("Avatar");
b.Property<DateTime>("BirthDate");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<DateTime>("CreatedOn");
b.Property<string>("Email")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed");
b.Property<string>("FirstName");
b.Property<string>("LastName");
b.Property<bool>("LockoutEnabled");
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.HasMaxLength(256);
b.Property<string>("PasswordHash");
b.Property<string>("PhoneNumber");
b.Property<bool>("PhoneNumberConfirmed");
b.Property<string>("SecurityStamp");
b.Property<bool>("TwoFactorEnabled");
b.Property<string>("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasName("UserNameIndex")
.HasFilter("[NormalizedUserName] IS NOT NULL");
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.HasOne("NetPhlixDB.Data.Models.User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.HasOne("NetPhlixDB.Data.Models.User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("NetPhlixDB.Data.Models.User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.HasOne("NetPhlixDB.Data.Models.User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("NetPhlixDB.Data.Models.Movie", b =>
{
b.HasOne("NetPhlixDB.Data.Models.User")
.WithMany("Watchlist")
.HasForeignKey("UserId");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.MovieCompany", b =>
{
b.HasOne("NetPhlixDB.Data.Models.Company", "Company")
.WithMany("CompanyMovies")
.HasForeignKey("CompanyId");
b.HasOne("NetPhlixDB.Data.Models.Movie", "Movie")
.WithMany("MovieCompanies")
.HasForeignKey("MovieId");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.MovieGenre", b =>
{
b.HasOne("NetPhlixDB.Data.Models.Genre", "Genre")
.WithMany("GenreMovies")
.HasForeignKey("GenreId");
b.HasOne("NetPhlixDB.Data.Models.Movie", "Movie")
.WithMany("MovieGenres")
.HasForeignKey("MovieId");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.MoviePerson", b =>
{
b.HasOne("NetPhlixDB.Data.Models.Event")
.WithMany("MoviePeople")
.HasForeignKey("EventId");
b.HasOne("NetPhlixDB.Data.Models.Movie", "Movie")
.WithMany("MoviePeople")
.HasForeignKey("MovieId");
b.HasOne("NetPhlixDB.Data.Models.Person", "Person")
.WithMany("PersonMovies")
.HasForeignKey("PersonId");
});
modelBuilder.Entity("NetPhlixDB.Data.Models.Review", b =>
{
b.HasOne("NetPhlixDB.Data.Models.Movie", "Movie")
.WithMany("Reviews")
.HasForeignKey("MovieId");
b.HasOne("NetPhlixDB.Data.Models.User", "User")
.WithMany("Reviews")
.HasForeignKey("UserId");
});
#pragma warning restore 612, 618
}
}
}
| 32.083333 | 125 | 0.450174 | [
"MIT"
] | DimchoLakov/NetClixDB | src/Data/NetPhlixDB.Data/Migrations/20181224080259_InitialCreate.Designer.cs | 15,787 | C# |
namespace Alpaca.Markets;
/// <summary>
/// Encapsulates request parameters for <see cref="IAlpacaTradingClient.UpdateWatchListByIdAsync(UpdateWatchListRequest,CancellationToken)"/> call.
/// </summary>
public sealed class UpdateWatchListRequest : Validation.IRequest
{
private readonly List<String> _assets = new();
/// <summary>
/// Creates new instance of <see cref="UpdateWatchListRequest"/> object.
/// </summary>
/// <param name="watchListId">Unique watch list identifier.</param>
/// <param name="name">User defined watch list name.</param>
/// <param name="assets">List of asset symbols for new watch list.</param>
public UpdateWatchListRequest(
Guid watchListId,
String name,
IEnumerable<String> assets)
{
WatchListId = watchListId;
Name = name;
_assets.AddRange(
// ReSharper disable once NullCoalescingConditionIsAlwaysNotNullAccordingToAPIContract
(assets ?? Enumerable.Empty<String>())
.Distinct(StringComparer.Ordinal));
}
/// <summary>
/// Gets the target watch list unique identifier.
/// </summary>
[JsonIgnore]
public Guid WatchListId { get; }
/// <summary>
/// Gets the target watch list name.
/// </summary>
[JsonProperty(PropertyName = "name", Required = Required.Always)]
public String Name { get; }
/// <summary>
/// Gets list of asset symbols for new watch list.
/// </summary>
[JsonProperty(PropertyName = "symbols", Required = Required.Always)]
public IReadOnlyList<String> Assets => _assets;
IEnumerable<RequestValidationException?> Validation.IRequest.GetExceptions()
{
yield return Name.TryValidateWatchListName();
yield return Assets.TryValidateSymbolName();
}
}
| 34.188679 | 147 | 0.666115 | [
"Apache-2.0"
] | OlegRa/alpaca-trade-api-csharp | Alpaca.Markets/Parameters/UpdateWatchListRequest.cs | 1,814 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using wiseapp.Business;
namespace wiseapp.Repository
{
public interface IPersonRepository : IGenericRepository<Person>
{
Person GetById(long id);
}
}
| 19.2 | 67 | 0.75 | [
"CC0-1.0"
] | onthebeachh/wiseapp | wiseapp.Repository/IPersonRepository.cs | 290 | C# |
using System;
using System.Threading.Tasks;
namespace SqlRepoEx.Abstractions
{
public interface IExecuteSqlStatement<TReturn>
{
TReturn Go();
Task<TReturn> GoAsync();
IExecuteSqlStatement<TReturn> WithSql(string sql);
IExecuteSqlStatement<TReturn> UseConnectionProvider(IConnectionProvider connectionProvider);
}
} | 27.615385 | 100 | 0.732591 | [
"MIT"
] | AzThinker/SqlRepoEx | SqlRepo/Abstractions/IExecuteSqlStatement.cs | 359 | C# |
//
// System.Diagnostics.PerformanceCounterType.cs
//
// Authors:
// Jonathan Pryor (jonpryor@vt.edu)
//
// (C) 2002
//
//
// 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.ComponentModel;
namespace System.Diagnostics {
#if !NET_2_0
[Serializable]
#endif
[TypeConverter (typeof (AlphabeticalEnumConverter))]
public enum PerformanceCounterType {
NumberOfItemsHEX32=0x00000000,
NumberOfItemsHEX64=0x00000100,
NumberOfItems32=0x00010000,
NumberOfItems64=0x00010100,
CounterDelta32=0x00400400,
CounterDelta64=0x00400500,
SampleCounter=0x00410400,
CountPerTimeInterval32=0x00450400,
CountPerTimeInterval64=0x00450500,
RateOfCountsPerSecond32=0x10410400,
RateOfCountsPerSecond64=0x10410500,
RawFraction=0x20020400,
CounterTimer=0x20410500,
Timer100Ns=0x20510500,
SampleFraction=0x20C20400,
CounterTimerInverse=0x21410500,
Timer100NsInverse=0x21510500,
CounterMultiTimer=0x22410500,
CounterMultiTimer100Ns=0x22510500,
CounterMultiTimerInverse=0x23410500,
CounterMultiTimer100NsInverse=0x23510500,
AverageTimer32=0x30020400,
ElapsedTime=0x30240500,
AverageCount64=0x40020500,
SampleBase=0x40030401,
AverageBase=0x40030402,
RawBase=0x40030403,
CounterMultiBase=0x42030500
}
}
| 32.253521 | 73 | 0.787773 | [
"Apache-2.0"
] | CRivlaldo/mono | mcs/class/System/System.Diagnostics/PerformanceCounterType.cs | 2,290 | C# |
namespace SilverGym.Web.Tests
{
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Testing;
using Xunit;
public class WebTests : IClassFixture<WebApplicationFactory<Startup>>
{
private readonly WebApplicationFactory<Startup> server;
public WebTests(WebApplicationFactory<Startup> server)
{
this.server = server;
}
[Fact(Skip = "Example test. Disabled for CI.")]
public async Task IndexPageShouldReturnStatusCode200WithTitle()
{
var client = this.server.CreateClient();
var response = await client.GetAsync("/");
response.EnsureSuccessStatusCode();
var responseContent = await response.Content.ReadAsStringAsync();
Assert.Contains("<title>", responseContent);
}
[Fact(Skip = "Example test. Disabled for CI.")]
public async Task AccountManagePageRequiresAuthorization()
{
var client = this.server.CreateClient(new WebApplicationFactoryClientOptions { AllowAutoRedirect = false });
var response = await client.GetAsync("Identity/Account/Manage");
Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
}
}
}
| 33.605263 | 120 | 0.649961 | [
"MIT"
] | SilverGym2020-21/SilverGym | Tests/SilverGym.Web.Tests/WebTests.cs | 1,279 | C# |
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("Juniper.VeldridIntegration.AndroidSupport.Resource", IsApplication=false)]
namespace Juniper.VeldridIntegration.AndroidSupport
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
static Resource()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
public partial class Animation
{
// aapt resource value: 0x7F010000
public static int abc_fade_in = 2130771968;
// aapt resource value: 0x7F010001
public static int abc_fade_out = 2130771969;
// aapt resource value: 0x7F010002
public static int abc_grow_fade_in_from_bottom = 2130771970;
// aapt resource value: 0x7F010003
public static int abc_popup_enter = 2130771971;
// aapt resource value: 0x7F010004
public static int abc_popup_exit = 2130771972;
// aapt resource value: 0x7F010005
public static int abc_shrink_fade_out_from_bottom = 2130771973;
// aapt resource value: 0x7F010006
public static int abc_slide_in_bottom = 2130771974;
// aapt resource value: 0x7F010007
public static int abc_slide_in_top = 2130771975;
// aapt resource value: 0x7F010008
public static int abc_slide_out_bottom = 2130771976;
// aapt resource value: 0x7F010009
public static int abc_slide_out_top = 2130771977;
// aapt resource value: 0x7F01000A
public static int abc_tooltip_enter = 2130771978;
// aapt resource value: 0x7F01000B
public static int abc_tooltip_exit = 2130771979;
static Animation()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Animation()
{
}
}
public partial class Attribute
{
// aapt resource value: 0x7F020000
public static int actionBarDivider = 2130837504;
// aapt resource value: 0x7F020001
public static int actionBarItemBackground = 2130837505;
// aapt resource value: 0x7F020002
public static int actionBarPopupTheme = 2130837506;
// aapt resource value: 0x7F020003
public static int actionBarSize = 2130837507;
// aapt resource value: 0x7F020004
public static int actionBarSplitStyle = 2130837508;
// aapt resource value: 0x7F020005
public static int actionBarStyle = 2130837509;
// aapt resource value: 0x7F020006
public static int actionBarTabBarStyle = 2130837510;
// aapt resource value: 0x7F020007
public static int actionBarTabStyle = 2130837511;
// aapt resource value: 0x7F020008
public static int actionBarTabTextStyle = 2130837512;
// aapt resource value: 0x7F020009
public static int actionBarTheme = 2130837513;
// aapt resource value: 0x7F02000A
public static int actionBarWidgetTheme = 2130837514;
// aapt resource value: 0x7F02000B
public static int actionButtonStyle = 2130837515;
// aapt resource value: 0x7F02000C
public static int actionDropDownStyle = 2130837516;
// aapt resource value: 0x7F02000D
public static int actionLayout = 2130837517;
// aapt resource value: 0x7F02000E
public static int actionMenuTextAppearance = 2130837518;
// aapt resource value: 0x7F02000F
public static int actionMenuTextColor = 2130837519;
// aapt resource value: 0x7F020010
public static int actionModeBackground = 2130837520;
// aapt resource value: 0x7F020011
public static int actionModeCloseButtonStyle = 2130837521;
// aapt resource value: 0x7F020012
public static int actionModeCloseDrawable = 2130837522;
// aapt resource value: 0x7F020013
public static int actionModeCopyDrawable = 2130837523;
// aapt resource value: 0x7F020014
public static int actionModeCutDrawable = 2130837524;
// aapt resource value: 0x7F020015
public static int actionModeFindDrawable = 2130837525;
// aapt resource value: 0x7F020016
public static int actionModePasteDrawable = 2130837526;
// aapt resource value: 0x7F020017
public static int actionModePopupWindowStyle = 2130837527;
// aapt resource value: 0x7F020018
public static int actionModeSelectAllDrawable = 2130837528;
// aapt resource value: 0x7F020019
public static int actionModeShareDrawable = 2130837529;
// aapt resource value: 0x7F02001A
public static int actionModeSplitBackground = 2130837530;
// aapt resource value: 0x7F02001B
public static int actionModeStyle = 2130837531;
// aapt resource value: 0x7F02001C
public static int actionModeWebSearchDrawable = 2130837532;
// aapt resource value: 0x7F02001D
public static int actionOverflowButtonStyle = 2130837533;
// aapt resource value: 0x7F02001E
public static int actionOverflowMenuStyle = 2130837534;
// aapt resource value: 0x7F02001F
public static int actionProviderClass = 2130837535;
// aapt resource value: 0x7F020020
public static int actionViewClass = 2130837536;
// aapt resource value: 0x7F020021
public static int activityChooserViewStyle = 2130837537;
// aapt resource value: 0x7F020022
public static int alertDialogButtonGroupStyle = 2130837538;
// aapt resource value: 0x7F020023
public static int alertDialogCenterButtons = 2130837539;
// aapt resource value: 0x7F020024
public static int alertDialogStyle = 2130837540;
// aapt resource value: 0x7F020025
public static int alertDialogTheme = 2130837541;
// aapt resource value: 0x7F020026
public static int allowStacking = 2130837542;
// aapt resource value: 0x7F020027
public static int alpha = 2130837543;
// aapt resource value: 0x7F020028
public static int alphabeticModifiers = 2130837544;
// aapt resource value: 0x7F020029
public static int arrowHeadLength = 2130837545;
// aapt resource value: 0x7F02002A
public static int arrowShaftLength = 2130837546;
// aapt resource value: 0x7F02002B
public static int autoCompleteTextViewStyle = 2130837547;
// aapt resource value: 0x7F02002C
public static int autoSizeMaxTextSize = 2130837548;
// aapt resource value: 0x7F02002D
public static int autoSizeMinTextSize = 2130837549;
// aapt resource value: 0x7F02002E
public static int autoSizePresetSizes = 2130837550;
// aapt resource value: 0x7F02002F
public static int autoSizeStepGranularity = 2130837551;
// aapt resource value: 0x7F020030
public static int autoSizeTextType = 2130837552;
// aapt resource value: 0x7F020031
public static int background = 2130837553;
// aapt resource value: 0x7F020032
public static int backgroundSplit = 2130837554;
// aapt resource value: 0x7F020033
public static int backgroundStacked = 2130837555;
// aapt resource value: 0x7F020034
public static int backgroundTint = 2130837556;
// aapt resource value: 0x7F020035
public static int backgroundTintMode = 2130837557;
// aapt resource value: 0x7F020036
public static int barLength = 2130837558;
// aapt resource value: 0x7F020037
public static int borderlessButtonStyle = 2130837559;
// aapt resource value: 0x7F020038
public static int buttonBarButtonStyle = 2130837560;
// aapt resource value: 0x7F020039
public static int buttonBarNegativeButtonStyle = 2130837561;
// aapt resource value: 0x7F02003A
public static int buttonBarNeutralButtonStyle = 2130837562;
// aapt resource value: 0x7F02003B
public static int buttonBarPositiveButtonStyle = 2130837563;
// aapt resource value: 0x7F02003C
public static int buttonBarStyle = 2130837564;
// aapt resource value: 0x7F02003D
public static int buttonGravity = 2130837565;
// aapt resource value: 0x7F02003E
public static int buttonIconDimen = 2130837566;
// aapt resource value: 0x7F02003F
public static int buttonPanelSideLayout = 2130837567;
// aapt resource value: 0x7F020040
public static int buttonStyle = 2130837568;
// aapt resource value: 0x7F020041
public static int buttonStyleSmall = 2130837569;
// aapt resource value: 0x7F020042
public static int buttonTint = 2130837570;
// aapt resource value: 0x7F020043
public static int buttonTintMode = 2130837571;
// aapt resource value: 0x7F020044
public static int checkboxStyle = 2130837572;
// aapt resource value: 0x7F020045
public static int checkedTextViewStyle = 2130837573;
// aapt resource value: 0x7F020046
public static int closeIcon = 2130837574;
// aapt resource value: 0x7F020047
public static int closeItemLayout = 2130837575;
// aapt resource value: 0x7F020048
public static int collapseContentDescription = 2130837576;
// aapt resource value: 0x7F020049
public static int collapseIcon = 2130837577;
// aapt resource value: 0x7F02004A
public static int color = 2130837578;
// aapt resource value: 0x7F02004B
public static int colorAccent = 2130837579;
// aapt resource value: 0x7F02004C
public static int colorBackgroundFloating = 2130837580;
// aapt resource value: 0x7F02004D
public static int colorButtonNormal = 2130837581;
// aapt resource value: 0x7F02004E
public static int colorControlActivated = 2130837582;
// aapt resource value: 0x7F02004F
public static int colorControlHighlight = 2130837583;
// aapt resource value: 0x7F020050
public static int colorControlNormal = 2130837584;
// aapt resource value: 0x7F020051
public static int colorError = 2130837585;
// aapt resource value: 0x7F020052
public static int colorPrimary = 2130837586;
// aapt resource value: 0x7F020053
public static int colorPrimaryDark = 2130837587;
// aapt resource value: 0x7F020054
public static int colorSwitchThumbNormal = 2130837588;
// aapt resource value: 0x7F020055
public static int commitIcon = 2130837589;
// aapt resource value: 0x7F020056
public static int contentDescription = 2130837590;
// aapt resource value: 0x7F020057
public static int contentInsetEnd = 2130837591;
// aapt resource value: 0x7F020058
public static int contentInsetEndWithActions = 2130837592;
// aapt resource value: 0x7F020059
public static int contentInsetLeft = 2130837593;
// aapt resource value: 0x7F02005A
public static int contentInsetRight = 2130837594;
// aapt resource value: 0x7F02005B
public static int contentInsetStart = 2130837595;
// aapt resource value: 0x7F02005C
public static int contentInsetStartWithNavigation = 2130837596;
// aapt resource value: 0x7F02005D
public static int controlBackground = 2130837597;
// aapt resource value: 0x7F02005E
public static int coordinatorLayoutStyle = 2130837598;
// aapt resource value: 0x7F02005F
public static int customNavigationLayout = 2130837599;
// aapt resource value: 0x7F020060
public static int defaultQueryHint = 2130837600;
// aapt resource value: 0x7F020061
public static int dialogCornerRadius = 2130837601;
// aapt resource value: 0x7F020062
public static int dialogPreferredPadding = 2130837602;
// aapt resource value: 0x7F020063
public static int dialogTheme = 2130837603;
// aapt resource value: 0x7F020064
public static int displayOptions = 2130837604;
// aapt resource value: 0x7F020065
public static int divider = 2130837605;
// aapt resource value: 0x7F020066
public static int dividerHorizontal = 2130837606;
// aapt resource value: 0x7F020067
public static int dividerPadding = 2130837607;
// aapt resource value: 0x7F020068
public static int dividerVertical = 2130837608;
// aapt resource value: 0x7F020069
public static int drawableSize = 2130837609;
// aapt resource value: 0x7F02006A
public static int drawerArrowStyle = 2130837610;
// aapt resource value: 0x7F02006C
public static int dropdownListPreferredItemHeight = 2130837612;
// aapt resource value: 0x7F02006B
public static int dropDownListViewStyle = 2130837611;
// aapt resource value: 0x7F02006D
public static int editTextBackground = 2130837613;
// aapt resource value: 0x7F02006E
public static int editTextColor = 2130837614;
// aapt resource value: 0x7F02006F
public static int editTextStyle = 2130837615;
// aapt resource value: 0x7F020070
public static int elevation = 2130837616;
// aapt resource value: 0x7F020071
public static int expandActivityOverflowButtonDrawable = 2130837617;
// aapt resource value: 0x7F020072
public static int firstBaselineToTopHeight = 2130837618;
// aapt resource value: 0x7F020073
public static int font = 2130837619;
// aapt resource value: 0x7F020074
public static int fontFamily = 2130837620;
// aapt resource value: 0x7F020075
public static int fontProviderAuthority = 2130837621;
// aapt resource value: 0x7F020076
public static int fontProviderCerts = 2130837622;
// aapt resource value: 0x7F020077
public static int fontProviderFetchStrategy = 2130837623;
// aapt resource value: 0x7F020078
public static int fontProviderFetchTimeout = 2130837624;
// aapt resource value: 0x7F020079
public static int fontProviderPackage = 2130837625;
// aapt resource value: 0x7F02007A
public static int fontProviderQuery = 2130837626;
// aapt resource value: 0x7F02007B
public static int fontStyle = 2130837627;
// aapt resource value: 0x7F02007C
public static int fontVariationSettings = 2130837628;
// aapt resource value: 0x7F02007D
public static int fontWeight = 2130837629;
// aapt resource value: 0x7F02007E
public static int gapBetweenBars = 2130837630;
// aapt resource value: 0x7F02007F
public static int goIcon = 2130837631;
// aapt resource value: 0x7F020080
public static int height = 2130837632;
// aapt resource value: 0x7F020081
public static int hideOnContentScroll = 2130837633;
// aapt resource value: 0x7F020082
public static int homeAsUpIndicator = 2130837634;
// aapt resource value: 0x7F020083
public static int homeLayout = 2130837635;
// aapt resource value: 0x7F020084
public static int icon = 2130837636;
// aapt resource value: 0x7F020087
public static int iconifiedByDefault = 2130837639;
// aapt resource value: 0x7F020085
public static int iconTint = 2130837637;
// aapt resource value: 0x7F020086
public static int iconTintMode = 2130837638;
// aapt resource value: 0x7F020088
public static int imageButtonStyle = 2130837640;
// aapt resource value: 0x7F020089
public static int indeterminateProgressStyle = 2130837641;
// aapt resource value: 0x7F02008A
public static int initialActivityCount = 2130837642;
// aapt resource value: 0x7F02008B
public static int isLightTheme = 2130837643;
// aapt resource value: 0x7F02008C
public static int itemPadding = 2130837644;
// aapt resource value: 0x7F02008D
public static int keylines = 2130837645;
// aapt resource value: 0x7F02008E
public static int lastBaselineToBottomHeight = 2130837646;
// aapt resource value: 0x7F02008F
public static int layout = 2130837647;
// aapt resource value: 0x7F020090
public static int layout_anchor = 2130837648;
// aapt resource value: 0x7F020091
public static int layout_anchorGravity = 2130837649;
// aapt resource value: 0x7F020092
public static int layout_behavior = 2130837650;
// aapt resource value: 0x7F020093
public static int layout_dodgeInsetEdges = 2130837651;
// aapt resource value: 0x7F020094
public static int layout_insetEdge = 2130837652;
// aapt resource value: 0x7F020095
public static int layout_keyline = 2130837653;
// aapt resource value: 0x7F020096
public static int lineHeight = 2130837654;
// aapt resource value: 0x7F020097
public static int listChoiceBackgroundIndicator = 2130837655;
// aapt resource value: 0x7F020098
public static int listDividerAlertDialog = 2130837656;
// aapt resource value: 0x7F020099
public static int listItemLayout = 2130837657;
// aapt resource value: 0x7F02009A
public static int listLayout = 2130837658;
// aapt resource value: 0x7F02009B
public static int listMenuViewStyle = 2130837659;
// aapt resource value: 0x7F02009C
public static int listPopupWindowStyle = 2130837660;
// aapt resource value: 0x7F02009D
public static int listPreferredItemHeight = 2130837661;
// aapt resource value: 0x7F02009E
public static int listPreferredItemHeightLarge = 2130837662;
// aapt resource value: 0x7F02009F
public static int listPreferredItemHeightSmall = 2130837663;
// aapt resource value: 0x7F0200A0
public static int listPreferredItemPaddingLeft = 2130837664;
// aapt resource value: 0x7F0200A1
public static int listPreferredItemPaddingRight = 2130837665;
// aapt resource value: 0x7F0200A2
public static int logo = 2130837666;
// aapt resource value: 0x7F0200A3
public static int logoDescription = 2130837667;
// aapt resource value: 0x7F0200A4
public static int maxButtonHeight = 2130837668;
// aapt resource value: 0x7F0200A5
public static int measureWithLargestChild = 2130837669;
// aapt resource value: 0x7F0200A6
public static int multiChoiceItemLayout = 2130837670;
// aapt resource value: 0x7F0200A7
public static int navigationContentDescription = 2130837671;
// aapt resource value: 0x7F0200A8
public static int navigationIcon = 2130837672;
// aapt resource value: 0x7F0200A9
public static int navigationMode = 2130837673;
// aapt resource value: 0x7F0200AA
public static int numericModifiers = 2130837674;
// aapt resource value: 0x7F0200AB
public static int overlapAnchor = 2130837675;
// aapt resource value: 0x7F0200AC
public static int paddingBottomNoButtons = 2130837676;
// aapt resource value: 0x7F0200AD
public static int paddingEnd = 2130837677;
// aapt resource value: 0x7F0200AE
public static int paddingStart = 2130837678;
// aapt resource value: 0x7F0200AF
public static int paddingTopNoTitle = 2130837679;
// aapt resource value: 0x7F0200B0
public static int panelBackground = 2130837680;
// aapt resource value: 0x7F0200B1
public static int panelMenuListTheme = 2130837681;
// aapt resource value: 0x7F0200B2
public static int panelMenuListWidth = 2130837682;
// aapt resource value: 0x7F0200B3
public static int popupMenuStyle = 2130837683;
// aapt resource value: 0x7F0200B4
public static int popupTheme = 2130837684;
// aapt resource value: 0x7F0200B5
public static int popupWindowStyle = 2130837685;
// aapt resource value: 0x7F0200B6
public static int preserveIconSpacing = 2130837686;
// aapt resource value: 0x7F0200B7
public static int progressBarPadding = 2130837687;
// aapt resource value: 0x7F0200B8
public static int progressBarStyle = 2130837688;
// aapt resource value: 0x7F0200B9
public static int queryBackground = 2130837689;
// aapt resource value: 0x7F0200BA
public static int queryHint = 2130837690;
// aapt resource value: 0x7F0200BB
public static int radioButtonStyle = 2130837691;
// aapt resource value: 0x7F0200BC
public static int ratingBarStyle = 2130837692;
// aapt resource value: 0x7F0200BD
public static int ratingBarStyleIndicator = 2130837693;
// aapt resource value: 0x7F0200BE
public static int ratingBarStyleSmall = 2130837694;
// aapt resource value: 0x7F0200BF
public static int searchHintIcon = 2130837695;
// aapt resource value: 0x7F0200C0
public static int searchIcon = 2130837696;
// aapt resource value: 0x7F0200C1
public static int searchViewStyle = 2130837697;
// aapt resource value: 0x7F0200C2
public static int seekBarStyle = 2130837698;
// aapt resource value: 0x7F0200C3
public static int selectableItemBackground = 2130837699;
// aapt resource value: 0x7F0200C4
public static int selectableItemBackgroundBorderless = 2130837700;
// aapt resource value: 0x7F0200C5
public static int showAsAction = 2130837701;
// aapt resource value: 0x7F0200C6
public static int showDividers = 2130837702;
// aapt resource value: 0x7F0200C7
public static int showText = 2130837703;
// aapt resource value: 0x7F0200C8
public static int showTitle = 2130837704;
// aapt resource value: 0x7F0200C9
public static int singleChoiceItemLayout = 2130837705;
// aapt resource value: 0x7F0200CA
public static int spinBars = 2130837706;
// aapt resource value: 0x7F0200CB
public static int spinnerDropDownItemStyle = 2130837707;
// aapt resource value: 0x7F0200CC
public static int spinnerStyle = 2130837708;
// aapt resource value: 0x7F0200CD
public static int splitTrack = 2130837709;
// aapt resource value: 0x7F0200CE
public static int srcCompat = 2130837710;
// aapt resource value: 0x7F0200CF
public static int state_above_anchor = 2130837711;
// aapt resource value: 0x7F0200D0
public static int statusBarBackground = 2130837712;
// aapt resource value: 0x7F0200D1
public static int subMenuArrow = 2130837713;
// aapt resource value: 0x7F0200D2
public static int submitBackground = 2130837714;
// aapt resource value: 0x7F0200D3
public static int subtitle = 2130837715;
// aapt resource value: 0x7F0200D4
public static int subtitleTextAppearance = 2130837716;
// aapt resource value: 0x7F0200D5
public static int subtitleTextColor = 2130837717;
// aapt resource value: 0x7F0200D6
public static int subtitleTextStyle = 2130837718;
// aapt resource value: 0x7F0200D7
public static int suggestionRowLayout = 2130837719;
// aapt resource value: 0x7F0200D8
public static int switchMinWidth = 2130837720;
// aapt resource value: 0x7F0200D9
public static int switchPadding = 2130837721;
// aapt resource value: 0x7F0200DA
public static int switchStyle = 2130837722;
// aapt resource value: 0x7F0200DB
public static int switchTextAppearance = 2130837723;
// aapt resource value: 0x7F0200DC
public static int textAllCaps = 2130837724;
// aapt resource value: 0x7F0200DD
public static int textAppearanceLargePopupMenu = 2130837725;
// aapt resource value: 0x7F0200DE
public static int textAppearanceListItem = 2130837726;
// aapt resource value: 0x7F0200DF
public static int textAppearanceListItemSecondary = 2130837727;
// aapt resource value: 0x7F0200E0
public static int textAppearanceListItemSmall = 2130837728;
// aapt resource value: 0x7F0200E1
public static int textAppearancePopupMenuHeader = 2130837729;
// aapt resource value: 0x7F0200E2
public static int textAppearanceSearchResultSubtitle = 2130837730;
// aapt resource value: 0x7F0200E3
public static int textAppearanceSearchResultTitle = 2130837731;
// aapt resource value: 0x7F0200E4
public static int textAppearanceSmallPopupMenu = 2130837732;
// aapt resource value: 0x7F0200E5
public static int textColorAlertDialogListItem = 2130837733;
// aapt resource value: 0x7F0200E6
public static int textColorSearchUrl = 2130837734;
// aapt resource value: 0x7F0200E7
public static int theme = 2130837735;
// aapt resource value: 0x7F0200E8
public static int thickness = 2130837736;
// aapt resource value: 0x7F0200E9
public static int thumbTextPadding = 2130837737;
// aapt resource value: 0x7F0200EA
public static int thumbTint = 2130837738;
// aapt resource value: 0x7F0200EB
public static int thumbTintMode = 2130837739;
// aapt resource value: 0x7F0200EC
public static int tickMark = 2130837740;
// aapt resource value: 0x7F0200ED
public static int tickMarkTint = 2130837741;
// aapt resource value: 0x7F0200EE
public static int tickMarkTintMode = 2130837742;
// aapt resource value: 0x7F0200EF
public static int tint = 2130837743;
// aapt resource value: 0x7F0200F0
public static int tintMode = 2130837744;
// aapt resource value: 0x7F0200F1
public static int title = 2130837745;
// aapt resource value: 0x7F0200F2
public static int titleMargin = 2130837746;
// aapt resource value: 0x7F0200F3
public static int titleMarginBottom = 2130837747;
// aapt resource value: 0x7F0200F4
public static int titleMarginEnd = 2130837748;
// aapt resource value: 0x7F0200F7
public static int titleMargins = 2130837751;
// aapt resource value: 0x7F0200F5
public static int titleMarginStart = 2130837749;
// aapt resource value: 0x7F0200F6
public static int titleMarginTop = 2130837750;
// aapt resource value: 0x7F0200F8
public static int titleTextAppearance = 2130837752;
// aapt resource value: 0x7F0200F9
public static int titleTextColor = 2130837753;
// aapt resource value: 0x7F0200FA
public static int titleTextStyle = 2130837754;
// aapt resource value: 0x7F0200FB
public static int toolbarNavigationButtonStyle = 2130837755;
// aapt resource value: 0x7F0200FC
public static int toolbarStyle = 2130837756;
// aapt resource value: 0x7F0200FD
public static int tooltipForegroundColor = 2130837757;
// aapt resource value: 0x7F0200FE
public static int tooltipFrameBackground = 2130837758;
// aapt resource value: 0x7F0200FF
public static int tooltipText = 2130837759;
// aapt resource value: 0x7F020100
public static int track = 2130837760;
// aapt resource value: 0x7F020101
public static int trackTint = 2130837761;
// aapt resource value: 0x7F020102
public static int trackTintMode = 2130837762;
// aapt resource value: 0x7F020103
public static int ttcIndex = 2130837763;
// aapt resource value: 0x7F020104
public static int viewInflaterClass = 2130837764;
// aapt resource value: 0x7F020105
public static int voiceIcon = 2130837765;
// aapt resource value: 0x7F020106
public static int windowActionBar = 2130837766;
// aapt resource value: 0x7F020107
public static int windowActionBarOverlay = 2130837767;
// aapt resource value: 0x7F020108
public static int windowActionModeOverlay = 2130837768;
// aapt resource value: 0x7F020109
public static int windowFixedHeightMajor = 2130837769;
// aapt resource value: 0x7F02010A
public static int windowFixedHeightMinor = 2130837770;
// aapt resource value: 0x7F02010B
public static int windowFixedWidthMajor = 2130837771;
// aapt resource value: 0x7F02010C
public static int windowFixedWidthMinor = 2130837772;
// aapt resource value: 0x7F02010D
public static int windowMinWidthMajor = 2130837773;
// aapt resource value: 0x7F02010E
public static int windowMinWidthMinor = 2130837774;
// aapt resource value: 0x7F02010F
public static int windowNoTitle = 2130837775;
static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Attribute()
{
}
}
public partial class Boolean
{
// aapt resource value: 0x7F030000
public static int abc_action_bar_embed_tabs = 2130903040;
// aapt resource value: 0x7F030001
public static int abc_allow_stacked_button_bar = 2130903041;
// aapt resource value: 0x7F030002
public static int abc_config_actionMenuItemAllCaps = 2130903042;
static Boolean()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Boolean()
{
}
}
public partial class Color
{
// aapt resource value: 0x7F040000
public static int abc_background_cache_hint_selector_material_dark = 2130968576;
// aapt resource value: 0x7F040001
public static int abc_background_cache_hint_selector_material_light = 2130968577;
// aapt resource value: 0x7F040002
public static int abc_btn_colored_borderless_text_material = 2130968578;
// aapt resource value: 0x7F040003
public static int abc_btn_colored_text_material = 2130968579;
// aapt resource value: 0x7F040004
public static int abc_color_highlight_material = 2130968580;
// aapt resource value: 0x7F040005
public static int abc_hint_foreground_material_dark = 2130968581;
// aapt resource value: 0x7F040006
public static int abc_hint_foreground_material_light = 2130968582;
// aapt resource value: 0x7F040007
public static int abc_input_method_navigation_guard = 2130968583;
// aapt resource value: 0x7F040008
public static int abc_primary_text_disable_only_material_dark = 2130968584;
// aapt resource value: 0x7F040009
public static int abc_primary_text_disable_only_material_light = 2130968585;
// aapt resource value: 0x7F04000A
public static int abc_primary_text_material_dark = 2130968586;
// aapt resource value: 0x7F04000B
public static int abc_primary_text_material_light = 2130968587;
// aapt resource value: 0x7F04000C
public static int abc_search_url_text = 2130968588;
// aapt resource value: 0x7F04000D
public static int abc_search_url_text_normal = 2130968589;
// aapt resource value: 0x7F04000E
public static int abc_search_url_text_pressed = 2130968590;
// aapt resource value: 0x7F04000F
public static int abc_search_url_text_selected = 2130968591;
// aapt resource value: 0x7F040010
public static int abc_secondary_text_material_dark = 2130968592;
// aapt resource value: 0x7F040011
public static int abc_secondary_text_material_light = 2130968593;
// aapt resource value: 0x7F040012
public static int abc_tint_btn_checkable = 2130968594;
// aapt resource value: 0x7F040013
public static int abc_tint_default = 2130968595;
// aapt resource value: 0x7F040014
public static int abc_tint_edittext = 2130968596;
// aapt resource value: 0x7F040015
public static int abc_tint_seek_thumb = 2130968597;
// aapt resource value: 0x7F040016
public static int abc_tint_spinner = 2130968598;
// aapt resource value: 0x7F040017
public static int abc_tint_switch_track = 2130968599;
// aapt resource value: 0x7F040018
public static int accent_material_dark = 2130968600;
// aapt resource value: 0x7F040019
public static int accent_material_light = 2130968601;
// aapt resource value: 0x7F04001A
public static int background_floating_material_dark = 2130968602;
// aapt resource value: 0x7F04001B
public static int background_floating_material_light = 2130968603;
// aapt resource value: 0x7F04001C
public static int background_material_dark = 2130968604;
// aapt resource value: 0x7F04001D
public static int background_material_light = 2130968605;
// aapt resource value: 0x7F04001E
public static int bright_foreground_disabled_material_dark = 2130968606;
// aapt resource value: 0x7F04001F
public static int bright_foreground_disabled_material_light = 2130968607;
// aapt resource value: 0x7F040020
public static int bright_foreground_inverse_material_dark = 2130968608;
// aapt resource value: 0x7F040021
public static int bright_foreground_inverse_material_light = 2130968609;
// aapt resource value: 0x7F040022
public static int bright_foreground_material_dark = 2130968610;
// aapt resource value: 0x7F040023
public static int bright_foreground_material_light = 2130968611;
// aapt resource value: 0x7F040024
public static int button_material_dark = 2130968612;
// aapt resource value: 0x7F040025
public static int button_material_light = 2130968613;
// aapt resource value: 0x7F040026
public static int dim_foreground_disabled_material_dark = 2130968614;
// aapt resource value: 0x7F040027
public static int dim_foreground_disabled_material_light = 2130968615;
// aapt resource value: 0x7F040028
public static int dim_foreground_material_dark = 2130968616;
// aapt resource value: 0x7F040029
public static int dim_foreground_material_light = 2130968617;
// aapt resource value: 0x7F04002A
public static int error_color_material_dark = 2130968618;
// aapt resource value: 0x7F04002B
public static int error_color_material_light = 2130968619;
// aapt resource value: 0x7F04002C
public static int foreground_material_dark = 2130968620;
// aapt resource value: 0x7F04002D
public static int foreground_material_light = 2130968621;
// aapt resource value: 0x7F04002E
public static int highlighted_text_material_dark = 2130968622;
// aapt resource value: 0x7F04002F
public static int highlighted_text_material_light = 2130968623;
// aapt resource value: 0x7F040030
public static int material_blue_grey_800 = 2130968624;
// aapt resource value: 0x7F040031
public static int material_blue_grey_900 = 2130968625;
// aapt resource value: 0x7F040032
public static int material_blue_grey_950 = 2130968626;
// aapt resource value: 0x7F040033
public static int material_deep_teal_200 = 2130968627;
// aapt resource value: 0x7F040034
public static int material_deep_teal_500 = 2130968628;
// aapt resource value: 0x7F040035
public static int material_grey_100 = 2130968629;
// aapt resource value: 0x7F040036
public static int material_grey_300 = 2130968630;
// aapt resource value: 0x7F040037
public static int material_grey_50 = 2130968631;
// aapt resource value: 0x7F040038
public static int material_grey_600 = 2130968632;
// aapt resource value: 0x7F040039
public static int material_grey_800 = 2130968633;
// aapt resource value: 0x7F04003A
public static int material_grey_850 = 2130968634;
// aapt resource value: 0x7F04003B
public static int material_grey_900 = 2130968635;
// aapt resource value: 0x7F04003C
public static int notification_action_color_filter = 2130968636;
// aapt resource value: 0x7F04003D
public static int notification_icon_bg_color = 2130968637;
// aapt resource value: 0x7F04003E
public static int primary_dark_material_dark = 2130968638;
// aapt resource value: 0x7F04003F
public static int primary_dark_material_light = 2130968639;
// aapt resource value: 0x7F040040
public static int primary_material_dark = 2130968640;
// aapt resource value: 0x7F040041
public static int primary_material_light = 2130968641;
// aapt resource value: 0x7F040042
public static int primary_text_default_material_dark = 2130968642;
// aapt resource value: 0x7F040043
public static int primary_text_default_material_light = 2130968643;
// aapt resource value: 0x7F040044
public static int primary_text_disabled_material_dark = 2130968644;
// aapt resource value: 0x7F040045
public static int primary_text_disabled_material_light = 2130968645;
// aapt resource value: 0x7F040046
public static int ripple_material_dark = 2130968646;
// aapt resource value: 0x7F040047
public static int ripple_material_light = 2130968647;
// aapt resource value: 0x7F040048
public static int secondary_text_default_material_dark = 2130968648;
// aapt resource value: 0x7F040049
public static int secondary_text_default_material_light = 2130968649;
// aapt resource value: 0x7F04004A
public static int secondary_text_disabled_material_dark = 2130968650;
// aapt resource value: 0x7F04004B
public static int secondary_text_disabled_material_light = 2130968651;
// aapt resource value: 0x7F04004C
public static int switch_thumb_disabled_material_dark = 2130968652;
// aapt resource value: 0x7F04004D
public static int switch_thumb_disabled_material_light = 2130968653;
// aapt resource value: 0x7F04004E
public static int switch_thumb_material_dark = 2130968654;
// aapt resource value: 0x7F04004F
public static int switch_thumb_material_light = 2130968655;
// aapt resource value: 0x7F040050
public static int switch_thumb_normal_material_dark = 2130968656;
// aapt resource value: 0x7F040051
public static int switch_thumb_normal_material_light = 2130968657;
// aapt resource value: 0x7F040052
public static int tooltip_background_dark = 2130968658;
// aapt resource value: 0x7F040053
public static int tooltip_background_light = 2130968659;
static Color()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Color()
{
}
}
public partial class Dimension
{
// aapt resource value: 0x7F050000
public static int abc_action_bar_content_inset_material = 2131034112;
// aapt resource value: 0x7F050001
public static int abc_action_bar_content_inset_with_nav = 2131034113;
// aapt resource value: 0x7F050002
public static int abc_action_bar_default_height_material = 2131034114;
// aapt resource value: 0x7F050003
public static int abc_action_bar_default_padding_end_material = 2131034115;
// aapt resource value: 0x7F050004
public static int abc_action_bar_default_padding_start_material = 2131034116;
// aapt resource value: 0x7F050005
public static int abc_action_bar_elevation_material = 2131034117;
// aapt resource value: 0x7F050006
public static int abc_action_bar_icon_vertical_padding_material = 2131034118;
// aapt resource value: 0x7F050007
public static int abc_action_bar_overflow_padding_end_material = 2131034119;
// aapt resource value: 0x7F050008
public static int abc_action_bar_overflow_padding_start_material = 2131034120;
// aapt resource value: 0x7F050009
public static int abc_action_bar_stacked_max_height = 2131034121;
// aapt resource value: 0x7F05000A
public static int abc_action_bar_stacked_tab_max_width = 2131034122;
// aapt resource value: 0x7F05000B
public static int abc_action_bar_subtitle_bottom_margin_material = 2131034123;
// aapt resource value: 0x7F05000C
public static int abc_action_bar_subtitle_top_margin_material = 2131034124;
// aapt resource value: 0x7F05000D
public static int abc_action_button_min_height_material = 2131034125;
// aapt resource value: 0x7F05000E
public static int abc_action_button_min_width_material = 2131034126;
// aapt resource value: 0x7F05000F
public static int abc_action_button_min_width_overflow_material = 2131034127;
// aapt resource value: 0x7F050010
public static int abc_alert_dialog_button_bar_height = 2131034128;
// aapt resource value: 0x7F050011
public static int abc_alert_dialog_button_dimen = 2131034129;
// aapt resource value: 0x7F050012
public static int abc_button_inset_horizontal_material = 2131034130;
// aapt resource value: 0x7F050013
public static int abc_button_inset_vertical_material = 2131034131;
// aapt resource value: 0x7F050014
public static int abc_button_padding_horizontal_material = 2131034132;
// aapt resource value: 0x7F050015
public static int abc_button_padding_vertical_material = 2131034133;
// aapt resource value: 0x7F050016
public static int abc_cascading_menus_min_smallest_width = 2131034134;
// aapt resource value: 0x7F050017
public static int abc_config_prefDialogWidth = 2131034135;
// aapt resource value: 0x7F050018
public static int abc_control_corner_material = 2131034136;
// aapt resource value: 0x7F050019
public static int abc_control_inset_material = 2131034137;
// aapt resource value: 0x7F05001A
public static int abc_control_padding_material = 2131034138;
// aapt resource value: 0x7F05001B
public static int abc_dialog_corner_radius_material = 2131034139;
// aapt resource value: 0x7F05001C
public static int abc_dialog_fixed_height_major = 2131034140;
// aapt resource value: 0x7F05001D
public static int abc_dialog_fixed_height_minor = 2131034141;
// aapt resource value: 0x7F05001E
public static int abc_dialog_fixed_width_major = 2131034142;
// aapt resource value: 0x7F05001F
public static int abc_dialog_fixed_width_minor = 2131034143;
// aapt resource value: 0x7F050020
public static int abc_dialog_list_padding_bottom_no_buttons = 2131034144;
// aapt resource value: 0x7F050021
public static int abc_dialog_list_padding_top_no_title = 2131034145;
// aapt resource value: 0x7F050022
public static int abc_dialog_min_width_major = 2131034146;
// aapt resource value: 0x7F050023
public static int abc_dialog_min_width_minor = 2131034147;
// aapt resource value: 0x7F050024
public static int abc_dialog_padding_material = 2131034148;
// aapt resource value: 0x7F050025
public static int abc_dialog_padding_top_material = 2131034149;
// aapt resource value: 0x7F050026
public static int abc_dialog_title_divider_material = 2131034150;
// aapt resource value: 0x7F050027
public static int abc_disabled_alpha_material_dark = 2131034151;
// aapt resource value: 0x7F050028
public static int abc_disabled_alpha_material_light = 2131034152;
// aapt resource value: 0x7F050029
public static int abc_dropdownitem_icon_width = 2131034153;
// aapt resource value: 0x7F05002A
public static int abc_dropdownitem_text_padding_left = 2131034154;
// aapt resource value: 0x7F05002B
public static int abc_dropdownitem_text_padding_right = 2131034155;
// aapt resource value: 0x7F05002C
public static int abc_edit_text_inset_bottom_material = 2131034156;
// aapt resource value: 0x7F05002D
public static int abc_edit_text_inset_horizontal_material = 2131034157;
// aapt resource value: 0x7F05002E
public static int abc_edit_text_inset_top_material = 2131034158;
// aapt resource value: 0x7F05002F
public static int abc_floating_window_z = 2131034159;
// aapt resource value: 0x7F050030
public static int abc_list_item_padding_horizontal_material = 2131034160;
// aapt resource value: 0x7F050031
public static int abc_panel_menu_list_width = 2131034161;
// aapt resource value: 0x7F050032
public static int abc_progress_bar_height_material = 2131034162;
// aapt resource value: 0x7F050033
public static int abc_search_view_preferred_height = 2131034163;
// aapt resource value: 0x7F050034
public static int abc_search_view_preferred_width = 2131034164;
// aapt resource value: 0x7F050035
public static int abc_seekbar_track_background_height_material = 2131034165;
// aapt resource value: 0x7F050036
public static int abc_seekbar_track_progress_height_material = 2131034166;
// aapt resource value: 0x7F050037
public static int abc_select_dialog_padding_start_material = 2131034167;
// aapt resource value: 0x7F050038
public static int abc_switch_padding = 2131034168;
// aapt resource value: 0x7F050039
public static int abc_text_size_body_1_material = 2131034169;
// aapt resource value: 0x7F05003A
public static int abc_text_size_body_2_material = 2131034170;
// aapt resource value: 0x7F05003B
public static int abc_text_size_button_material = 2131034171;
// aapt resource value: 0x7F05003C
public static int abc_text_size_caption_material = 2131034172;
// aapt resource value: 0x7F05003D
public static int abc_text_size_display_1_material = 2131034173;
// aapt resource value: 0x7F05003E
public static int abc_text_size_display_2_material = 2131034174;
// aapt resource value: 0x7F05003F
public static int abc_text_size_display_3_material = 2131034175;
// aapt resource value: 0x7F050040
public static int abc_text_size_display_4_material = 2131034176;
// aapt resource value: 0x7F050041
public static int abc_text_size_headline_material = 2131034177;
// aapt resource value: 0x7F050042
public static int abc_text_size_large_material = 2131034178;
// aapt resource value: 0x7F050043
public static int abc_text_size_medium_material = 2131034179;
// aapt resource value: 0x7F050044
public static int abc_text_size_menu_header_material = 2131034180;
// aapt resource value: 0x7F050045
public static int abc_text_size_menu_material = 2131034181;
// aapt resource value: 0x7F050046
public static int abc_text_size_small_material = 2131034182;
// aapt resource value: 0x7F050047
public static int abc_text_size_subhead_material = 2131034183;
// aapt resource value: 0x7F050048
public static int abc_text_size_subtitle_material_toolbar = 2131034184;
// aapt resource value: 0x7F050049
public static int abc_text_size_title_material = 2131034185;
// aapt resource value: 0x7F05004A
public static int abc_text_size_title_material_toolbar = 2131034186;
// aapt resource value: 0x7F05004B
public static int compat_button_inset_horizontal_material = 2131034187;
// aapt resource value: 0x7F05004C
public static int compat_button_inset_vertical_material = 2131034188;
// aapt resource value: 0x7F05004D
public static int compat_button_padding_horizontal_material = 2131034189;
// aapt resource value: 0x7F05004E
public static int compat_button_padding_vertical_material = 2131034190;
// aapt resource value: 0x7F05004F
public static int compat_control_corner_material = 2131034191;
// aapt resource value: 0x7F050050
public static int compat_notification_large_icon_max_height = 2131034192;
// aapt resource value: 0x7F050051
public static int compat_notification_large_icon_max_width = 2131034193;
// aapt resource value: 0x7F050052
public static int disabled_alpha_material_dark = 2131034194;
// aapt resource value: 0x7F050053
public static int disabled_alpha_material_light = 2131034195;
// aapt resource value: 0x7F050054
public static int highlight_alpha_material_colored = 2131034196;
// aapt resource value: 0x7F050055
public static int highlight_alpha_material_dark = 2131034197;
// aapt resource value: 0x7F050056
public static int highlight_alpha_material_light = 2131034198;
// aapt resource value: 0x7F050057
public static int hint_alpha_material_dark = 2131034199;
// aapt resource value: 0x7F050058
public static int hint_alpha_material_light = 2131034200;
// aapt resource value: 0x7F050059
public static int hint_pressed_alpha_material_dark = 2131034201;
// aapt resource value: 0x7F05005A
public static int hint_pressed_alpha_material_light = 2131034202;
// aapt resource value: 0x7F05005B
public static int notification_action_icon_size = 2131034203;
// aapt resource value: 0x7F05005C
public static int notification_action_text_size = 2131034204;
// aapt resource value: 0x7F05005D
public static int notification_big_circle_margin = 2131034205;
// aapt resource value: 0x7F05005E
public static int notification_content_margin_start = 2131034206;
// aapt resource value: 0x7F05005F
public static int notification_large_icon_height = 2131034207;
// aapt resource value: 0x7F050060
public static int notification_large_icon_width = 2131034208;
// aapt resource value: 0x7F050061
public static int notification_main_column_padding_top = 2131034209;
// aapt resource value: 0x7F050062
public static int notification_media_narrow_margin = 2131034210;
// aapt resource value: 0x7F050063
public static int notification_right_icon_size = 2131034211;
// aapt resource value: 0x7F050064
public static int notification_right_side_padding_top = 2131034212;
// aapt resource value: 0x7F050065
public static int notification_small_icon_background_padding = 2131034213;
// aapt resource value: 0x7F050066
public static int notification_small_icon_size_as_large = 2131034214;
// aapt resource value: 0x7F050067
public static int notification_subtext_size = 2131034215;
// aapt resource value: 0x7F050068
public static int notification_top_pad = 2131034216;
// aapt resource value: 0x7F050069
public static int notification_top_pad_large_text = 2131034217;
// aapt resource value: 0x7F05006A
public static int tooltip_corner_radius = 2131034218;
// aapt resource value: 0x7F05006B
public static int tooltip_horizontal_padding = 2131034219;
// aapt resource value: 0x7F05006C
public static int tooltip_margin = 2131034220;
// aapt resource value: 0x7F05006D
public static int tooltip_precise_anchor_extra_offset = 2131034221;
// aapt resource value: 0x7F05006E
public static int tooltip_precise_anchor_threshold = 2131034222;
// aapt resource value: 0x7F05006F
public static int tooltip_vertical_padding = 2131034223;
// aapt resource value: 0x7F050070
public static int tooltip_y_offset_non_touch = 2131034224;
// aapt resource value: 0x7F050071
public static int tooltip_y_offset_touch = 2131034225;
static Dimension()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Dimension()
{
}
}
public partial class Drawable
{
// aapt resource value: 0x7F060000
public static int abc_ab_share_pack_mtrl_alpha = 2131099648;
// aapt resource value: 0x7F060001
public static int abc_action_bar_item_background_material = 2131099649;
// aapt resource value: 0x7F060002
public static int abc_btn_borderless_material = 2131099650;
// aapt resource value: 0x7F060003
public static int abc_btn_check_material = 2131099651;
// aapt resource value: 0x7F060004
public static int abc_btn_check_to_on_mtrl_000 = 2131099652;
// aapt resource value: 0x7F060005
public static int abc_btn_check_to_on_mtrl_015 = 2131099653;
// aapt resource value: 0x7F060006
public static int abc_btn_colored_material = 2131099654;
// aapt resource value: 0x7F060007
public static int abc_btn_default_mtrl_shape = 2131099655;
// aapt resource value: 0x7F060008
public static int abc_btn_radio_material = 2131099656;
// aapt resource value: 0x7F060009
public static int abc_btn_radio_to_on_mtrl_000 = 2131099657;
// aapt resource value: 0x7F06000A
public static int abc_btn_radio_to_on_mtrl_015 = 2131099658;
// aapt resource value: 0x7F06000B
public static int abc_btn_switch_to_on_mtrl_00001 = 2131099659;
// aapt resource value: 0x7F06000C
public static int abc_btn_switch_to_on_mtrl_00012 = 2131099660;
// aapt resource value: 0x7F06000D
public static int abc_cab_background_internal_bg = 2131099661;
// aapt resource value: 0x7F06000E
public static int abc_cab_background_top_material = 2131099662;
// aapt resource value: 0x7F06000F
public static int abc_cab_background_top_mtrl_alpha = 2131099663;
// aapt resource value: 0x7F060010
public static int abc_control_background_material = 2131099664;
// aapt resource value: 0x7F060011
public static int abc_dialog_material_background = 2131099665;
// aapt resource value: 0x7F060012
public static int abc_edit_text_material = 2131099666;
// aapt resource value: 0x7F060013
public static int abc_ic_ab_back_material = 2131099667;
// aapt resource value: 0x7F060014
public static int abc_ic_arrow_drop_right_black_24dp = 2131099668;
// aapt resource value: 0x7F060015
public static int abc_ic_clear_material = 2131099669;
// aapt resource value: 0x7F060016
public static int abc_ic_commit_search_api_mtrl_alpha = 2131099670;
// aapt resource value: 0x7F060017
public static int abc_ic_go_search_api_material = 2131099671;
// aapt resource value: 0x7F060018
public static int abc_ic_menu_copy_mtrl_am_alpha = 2131099672;
// aapt resource value: 0x7F060019
public static int abc_ic_menu_cut_mtrl_alpha = 2131099673;
// aapt resource value: 0x7F06001A
public static int abc_ic_menu_overflow_material = 2131099674;
// aapt resource value: 0x7F06001B
public static int abc_ic_menu_paste_mtrl_am_alpha = 2131099675;
// aapt resource value: 0x7F06001C
public static int abc_ic_menu_selectall_mtrl_alpha = 2131099676;
// aapt resource value: 0x7F06001D
public static int abc_ic_menu_share_mtrl_alpha = 2131099677;
// aapt resource value: 0x7F06001E
public static int abc_ic_search_api_material = 2131099678;
// aapt resource value: 0x7F06001F
public static int abc_ic_star_black_16dp = 2131099679;
// aapt resource value: 0x7F060020
public static int abc_ic_star_black_36dp = 2131099680;
// aapt resource value: 0x7F060021
public static int abc_ic_star_black_48dp = 2131099681;
// aapt resource value: 0x7F060022
public static int abc_ic_star_half_black_16dp = 2131099682;
// aapt resource value: 0x7F060023
public static int abc_ic_star_half_black_36dp = 2131099683;
// aapt resource value: 0x7F060024
public static int abc_ic_star_half_black_48dp = 2131099684;
// aapt resource value: 0x7F060025
public static int abc_ic_voice_search_api_material = 2131099685;
// aapt resource value: 0x7F060026
public static int abc_item_background_holo_dark = 2131099686;
// aapt resource value: 0x7F060027
public static int abc_item_background_holo_light = 2131099687;
// aapt resource value: 0x7F060028
public static int abc_list_divider_material = 2131099688;
// aapt resource value: 0x7F060029
public static int abc_list_divider_mtrl_alpha = 2131099689;
// aapt resource value: 0x7F06002A
public static int abc_list_focused_holo = 2131099690;
// aapt resource value: 0x7F06002B
public static int abc_list_longpressed_holo = 2131099691;
// aapt resource value: 0x7F06002C
public static int abc_list_pressed_holo_dark = 2131099692;
// aapt resource value: 0x7F06002D
public static int abc_list_pressed_holo_light = 2131099693;
// aapt resource value: 0x7F06002E
public static int abc_list_selector_background_transition_holo_dark = 2131099694;
// aapt resource value: 0x7F06002F
public static int abc_list_selector_background_transition_holo_light = 2131099695;
// aapt resource value: 0x7F060030
public static int abc_list_selector_disabled_holo_dark = 2131099696;
// aapt resource value: 0x7F060031
public static int abc_list_selector_disabled_holo_light = 2131099697;
// aapt resource value: 0x7F060032
public static int abc_list_selector_holo_dark = 2131099698;
// aapt resource value: 0x7F060033
public static int abc_list_selector_holo_light = 2131099699;
// aapt resource value: 0x7F060034
public static int abc_menu_hardkey_panel_mtrl_mult = 2131099700;
// aapt resource value: 0x7F060035
public static int abc_popup_background_mtrl_mult = 2131099701;
// aapt resource value: 0x7F060036
public static int abc_ratingbar_indicator_material = 2131099702;
// aapt resource value: 0x7F060037
public static int abc_ratingbar_material = 2131099703;
// aapt resource value: 0x7F060038
public static int abc_ratingbar_small_material = 2131099704;
// aapt resource value: 0x7F060039
public static int abc_scrubber_control_off_mtrl_alpha = 2131099705;
// aapt resource value: 0x7F06003A
public static int abc_scrubber_control_to_pressed_mtrl_000 = 2131099706;
// aapt resource value: 0x7F06003B
public static int abc_scrubber_control_to_pressed_mtrl_005 = 2131099707;
// aapt resource value: 0x7F06003C
public static int abc_scrubber_primary_mtrl_alpha = 2131099708;
// aapt resource value: 0x7F06003D
public static int abc_scrubber_track_mtrl_alpha = 2131099709;
// aapt resource value: 0x7F06003E
public static int abc_seekbar_thumb_material = 2131099710;
// aapt resource value: 0x7F06003F
public static int abc_seekbar_tick_mark_material = 2131099711;
// aapt resource value: 0x7F060040
public static int abc_seekbar_track_material = 2131099712;
// aapt resource value: 0x7F060041
public static int abc_spinner_mtrl_am_alpha = 2131099713;
// aapt resource value: 0x7F060042
public static int abc_spinner_textfield_background_material = 2131099714;
// aapt resource value: 0x7F060043
public static int abc_switch_thumb_material = 2131099715;
// aapt resource value: 0x7F060044
public static int abc_switch_track_mtrl_alpha = 2131099716;
// aapt resource value: 0x7F060045
public static int abc_tab_indicator_material = 2131099717;
// aapt resource value: 0x7F060046
public static int abc_tab_indicator_mtrl_alpha = 2131099718;
// aapt resource value: 0x7F06004E
public static int abc_textfield_activated_mtrl_alpha = 2131099726;
// aapt resource value: 0x7F06004F
public static int abc_textfield_default_mtrl_alpha = 2131099727;
// aapt resource value: 0x7F060050
public static int abc_textfield_search_activated_mtrl_alpha = 2131099728;
// aapt resource value: 0x7F060051
public static int abc_textfield_search_default_mtrl_alpha = 2131099729;
// aapt resource value: 0x7F060052
public static int abc_textfield_search_material = 2131099730;
// aapt resource value: 0x7F060047
public static int abc_text_cursor_material = 2131099719;
// aapt resource value: 0x7F060048
public static int abc_text_select_handle_left_mtrl_dark = 2131099720;
// aapt resource value: 0x7F060049
public static int abc_text_select_handle_left_mtrl_light = 2131099721;
// aapt resource value: 0x7F06004A
public static int abc_text_select_handle_middle_mtrl_dark = 2131099722;
// aapt resource value: 0x7F06004B
public static int abc_text_select_handle_middle_mtrl_light = 2131099723;
// aapt resource value: 0x7F06004C
public static int abc_text_select_handle_right_mtrl_dark = 2131099724;
// aapt resource value: 0x7F06004D
public static int abc_text_select_handle_right_mtrl_light = 2131099725;
// aapt resource value: 0x7F060053
public static int abc_vector_test = 2131099731;
// aapt resource value: 0x7F060054
public static int notification_action_background = 2131099732;
// aapt resource value: 0x7F060055
public static int notification_bg = 2131099733;
// aapt resource value: 0x7F060056
public static int notification_bg_low = 2131099734;
// aapt resource value: 0x7F060057
public static int notification_bg_low_normal = 2131099735;
// aapt resource value: 0x7F060058
public static int notification_bg_low_pressed = 2131099736;
// aapt resource value: 0x7F060059
public static int notification_bg_normal = 2131099737;
// aapt resource value: 0x7F06005A
public static int notification_bg_normal_pressed = 2131099738;
// aapt resource value: 0x7F06005B
public static int notification_icon_background = 2131099739;
// aapt resource value: 0x7F06005C
public static int notification_template_icon_bg = 2131099740;
// aapt resource value: 0x7F06005D
public static int notification_template_icon_low_bg = 2131099741;
// aapt resource value: 0x7F06005E
public static int notification_tile_bg = 2131099742;
// aapt resource value: 0x7F06005F
public static int notify_panel_notification_icon_bg = 2131099743;
// aapt resource value: 0x7F060060
public static int tooltip_frame_dark = 2131099744;
// aapt resource value: 0x7F060061
public static int tooltip_frame_light = 2131099745;
static Drawable()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Drawable()
{
}
}
public partial class Id
{
// aapt resource value: 0x7F070017
public static int actions = 2131165207;
// aapt resource value: 0x7F070006
public static int action_bar = 2131165190;
// aapt resource value: 0x7F070007
public static int action_bar_activity_content = 2131165191;
// aapt resource value: 0x7F070008
public static int action_bar_container = 2131165192;
// aapt resource value: 0x7F070009
public static int action_bar_root = 2131165193;
// aapt resource value: 0x7F07000A
public static int action_bar_spinner = 2131165194;
// aapt resource value: 0x7F07000B
public static int action_bar_subtitle = 2131165195;
// aapt resource value: 0x7F07000C
public static int action_bar_title = 2131165196;
// aapt resource value: 0x7F07000D
public static int action_container = 2131165197;
// aapt resource value: 0x7F07000E
public static int action_context_bar = 2131165198;
// aapt resource value: 0x7F07000F
public static int action_divider = 2131165199;
// aapt resource value: 0x7F070010
public static int action_image = 2131165200;
// aapt resource value: 0x7F070011
public static int action_menu_divider = 2131165201;
// aapt resource value: 0x7F070012
public static int action_menu_presenter = 2131165202;
// aapt resource value: 0x7F070013
public static int action_mode_bar = 2131165203;
// aapt resource value: 0x7F070014
public static int action_mode_bar_stub = 2131165204;
// aapt resource value: 0x7F070015
public static int action_mode_close_button = 2131165205;
// aapt resource value: 0x7F070016
public static int action_text = 2131165206;
// aapt resource value: 0x7F070018
public static int activity_chooser_view_content = 2131165208;
// aapt resource value: 0x7F070019
public static int add = 2131165209;
// aapt resource value: 0x7F07001A
public static int alertTitle = 2131165210;
// aapt resource value: 0x7F07001B
public static int all = 2131165211;
// aapt resource value: 0x7F070000
public static int ALT = 2131165184;
// aapt resource value: 0x7F07001C
public static int always = 2131165212;
// aapt resource value: 0x7F07001D
public static int async = 2131165213;
// aapt resource value: 0x7F07001E
public static int beginning = 2131165214;
// aapt resource value: 0x7F07001F
public static int blocking = 2131165215;
// aapt resource value: 0x7F070020
public static int bottom = 2131165216;
// aapt resource value: 0x7F070021
public static int buttonPanel = 2131165217;
// aapt resource value: 0x7F070022
public static int center = 2131165218;
// aapt resource value: 0x7F070023
public static int center_horizontal = 2131165219;
// aapt resource value: 0x7F070024
public static int center_vertical = 2131165220;
// aapt resource value: 0x7F070025
public static int checkbox = 2131165221;
// aapt resource value: 0x7F070026
public static int chronometer = 2131165222;
// aapt resource value: 0x7F070027
public static int clip_horizontal = 2131165223;
// aapt resource value: 0x7F070028
public static int clip_vertical = 2131165224;
// aapt resource value: 0x7F070029
public static int collapseActionView = 2131165225;
// aapt resource value: 0x7F07002A
public static int content = 2131165226;
// aapt resource value: 0x7F07002B
public static int contentPanel = 2131165227;
// aapt resource value: 0x7F070001
public static int CTRL = 2131165185;
// aapt resource value: 0x7F07002C
public static int custom = 2131165228;
// aapt resource value: 0x7F07002D
public static int customPanel = 2131165229;
// aapt resource value: 0x7F07002E
public static int decor_content_parent = 2131165230;
// aapt resource value: 0x7F07002F
public static int default_activity_button = 2131165231;
// aapt resource value: 0x7F070030
public static int disableHome = 2131165232;
// aapt resource value: 0x7F070031
public static int edit_query = 2131165233;
// aapt resource value: 0x7F070032
public static int end = 2131165234;
// aapt resource value: 0x7F070034
public static int expanded_menu = 2131165236;
// aapt resource value: 0x7F070033
public static int expand_activities_button = 2131165235;
// aapt resource value: 0x7F070035
public static int fill = 2131165237;
// aapt resource value: 0x7F070036
public static int fill_horizontal = 2131165238;
// aapt resource value: 0x7F070037
public static int fill_vertical = 2131165239;
// aapt resource value: 0x7F070038
public static int forever = 2131165240;
// aapt resource value: 0x7F070002
public static int FUNCTION = 2131165186;
// aapt resource value: 0x7F070039
public static int group_divider = 2131165241;
// aapt resource value: 0x7F07003A
public static int home = 2131165242;
// aapt resource value: 0x7F07003B
public static int homeAsUp = 2131165243;
// aapt resource value: 0x7F07003C
public static int icon = 2131165244;
// aapt resource value: 0x7F07003D
public static int icon_group = 2131165245;
// aapt resource value: 0x7F07003E
public static int ifRoom = 2131165246;
// aapt resource value: 0x7F07003F
public static int image = 2131165247;
// aapt resource value: 0x7F070040
public static int info = 2131165248;
// aapt resource value: 0x7F070041
public static int italic = 2131165249;
// aapt resource value: 0x7F070042
public static int left = 2131165250;
// aapt resource value: 0x7F070043
public static int line1 = 2131165251;
// aapt resource value: 0x7F070044
public static int line3 = 2131165252;
// aapt resource value: 0x7F070045
public static int listMode = 2131165253;
// aapt resource value: 0x7F070046
public static int list_item = 2131165254;
// aapt resource value: 0x7F070047
public static int message = 2131165255;
// aapt resource value: 0x7F070003
public static int META = 2131165187;
// aapt resource value: 0x7F070048
public static int middle = 2131165256;
// aapt resource value: 0x7F070049
public static int multiply = 2131165257;
// aapt resource value: 0x7F07004A
public static int never = 2131165258;
// aapt resource value: 0x7F07004B
public static int none = 2131165259;
// aapt resource value: 0x7F07004C
public static int normal = 2131165260;
// aapt resource value: 0x7F07004D
public static int notification_background = 2131165261;
// aapt resource value: 0x7F07004E
public static int notification_main_column = 2131165262;
// aapt resource value: 0x7F07004F
public static int notification_main_column_container = 2131165263;
// aapt resource value: 0x7F070050
public static int parentPanel = 2131165264;
// aapt resource value: 0x7F070051
public static int progress_circular = 2131165265;
// aapt resource value: 0x7F070052
public static int progress_horizontal = 2131165266;
// aapt resource value: 0x7F070053
public static int radio = 2131165267;
// aapt resource value: 0x7F070054
public static int right = 2131165268;
// aapt resource value: 0x7F070055
public static int right_icon = 2131165269;
// aapt resource value: 0x7F070056
public static int right_side = 2131165270;
// aapt resource value: 0x7F070057
public static int screen = 2131165271;
// aapt resource value: 0x7F070058
public static int scrollIndicatorDown = 2131165272;
// aapt resource value: 0x7F070059
public static int scrollIndicatorUp = 2131165273;
// aapt resource value: 0x7F07005A
public static int scrollView = 2131165274;
// aapt resource value: 0x7F07005B
public static int search_badge = 2131165275;
// aapt resource value: 0x7F07005C
public static int search_bar = 2131165276;
// aapt resource value: 0x7F07005D
public static int search_button = 2131165277;
// aapt resource value: 0x7F07005E
public static int search_close_btn = 2131165278;
// aapt resource value: 0x7F07005F
public static int search_edit_frame = 2131165279;
// aapt resource value: 0x7F070060
public static int search_go_btn = 2131165280;
// aapt resource value: 0x7F070061
public static int search_mag_icon = 2131165281;
// aapt resource value: 0x7F070062
public static int search_plate = 2131165282;
// aapt resource value: 0x7F070063
public static int search_src_text = 2131165283;
// aapt resource value: 0x7F070064
public static int search_voice_btn = 2131165284;
// aapt resource value: 0x7F070065
public static int select_dialog_listview = 2131165285;
// aapt resource value: 0x7F070004
public static int SHIFT = 2131165188;
// aapt resource value: 0x7F070066
public static int shortcut = 2131165286;
// aapt resource value: 0x7F070067
public static int showCustom = 2131165287;
// aapt resource value: 0x7F070068
public static int showHome = 2131165288;
// aapt resource value: 0x7F070069
public static int showTitle = 2131165289;
// aapt resource value: 0x7F07006A
public static int spacer = 2131165290;
// aapt resource value: 0x7F07006B
public static int split_action_bar = 2131165291;
// aapt resource value: 0x7F07006C
public static int src_atop = 2131165292;
// aapt resource value: 0x7F07006D
public static int src_in = 2131165293;
// aapt resource value: 0x7F07006E
public static int src_over = 2131165294;
// aapt resource value: 0x7F07006F
public static int start = 2131165295;
// aapt resource value: 0x7F070070
public static int submenuarrow = 2131165296;
// aapt resource value: 0x7F070071
public static int submit_area = 2131165297;
// aapt resource value: 0x7F070005
public static int SYM = 2131165189;
// aapt resource value: 0x7F070072
public static int tabMode = 2131165298;
// aapt resource value: 0x7F070073
public static int tag_transition_group = 2131165299;
// aapt resource value: 0x7F070074
public static int tag_unhandled_key_event_manager = 2131165300;
// aapt resource value: 0x7F070075
public static int tag_unhandled_key_listeners = 2131165301;
// aapt resource value: 0x7F070076
public static int text = 2131165302;
// aapt resource value: 0x7F070077
public static int text2 = 2131165303;
// aapt resource value: 0x7F070078
public static int textSpacerNoButtons = 2131165304;
// aapt resource value: 0x7F070079
public static int textSpacerNoTitle = 2131165305;
// aapt resource value: 0x7F07007A
public static int time = 2131165306;
// aapt resource value: 0x7F07007B
public static int title = 2131165307;
// aapt resource value: 0x7F07007C
public static int titleDividerNoCustom = 2131165308;
// aapt resource value: 0x7F07007D
public static int title_template = 2131165309;
// aapt resource value: 0x7F07007E
public static int top = 2131165310;
// aapt resource value: 0x7F07007F
public static int topPanel = 2131165311;
// aapt resource value: 0x7F070080
public static int uniform = 2131165312;
// aapt resource value: 0x7F070081
public static int up = 2131165313;
// aapt resource value: 0x7F070082
public static int useLogo = 2131165314;
// aapt resource value: 0x7F070083
public static int withText = 2131165315;
// aapt resource value: 0x7F070084
public static int wrap_content = 2131165316;
static Id()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Id()
{
}
}
public partial class Integer
{
// aapt resource value: 0x7F080000
public static int abc_config_activityDefaultDur = 2131230720;
// aapt resource value: 0x7F080001
public static int abc_config_activityShortDur = 2131230721;
// aapt resource value: 0x7F080002
public static int cancel_button_image_alpha = 2131230722;
// aapt resource value: 0x7F080003
public static int config_tooltipAnimTime = 2131230723;
// aapt resource value: 0x7F080004
public static int status_bar_notification_info_maxnum = 2131230724;
static Integer()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Integer()
{
}
}
public partial class Layout
{
// aapt resource value: 0x7F090000
public static int abc_action_bar_title_item = 2131296256;
// aapt resource value: 0x7F090001
public static int abc_action_bar_up_container = 2131296257;
// aapt resource value: 0x7F090002
public static int abc_action_menu_item_layout = 2131296258;
// aapt resource value: 0x7F090003
public static int abc_action_menu_layout = 2131296259;
// aapt resource value: 0x7F090004
public static int abc_action_mode_bar = 2131296260;
// aapt resource value: 0x7F090005
public static int abc_action_mode_close_item_material = 2131296261;
// aapt resource value: 0x7F090006
public static int abc_activity_chooser_view = 2131296262;
// aapt resource value: 0x7F090007
public static int abc_activity_chooser_view_list_item = 2131296263;
// aapt resource value: 0x7F090008
public static int abc_alert_dialog_button_bar_material = 2131296264;
// aapt resource value: 0x7F090009
public static int abc_alert_dialog_material = 2131296265;
// aapt resource value: 0x7F09000A
public static int abc_alert_dialog_title_material = 2131296266;
// aapt resource value: 0x7F09000B
public static int abc_cascading_menu_item_layout = 2131296267;
// aapt resource value: 0x7F09000C
public static int abc_dialog_title_material = 2131296268;
// aapt resource value: 0x7F09000D
public static int abc_expanded_menu_layout = 2131296269;
// aapt resource value: 0x7F09000E
public static int abc_list_menu_item_checkbox = 2131296270;
// aapt resource value: 0x7F09000F
public static int abc_list_menu_item_icon = 2131296271;
// aapt resource value: 0x7F090010
public static int abc_list_menu_item_layout = 2131296272;
// aapt resource value: 0x7F090011
public static int abc_list_menu_item_radio = 2131296273;
// aapt resource value: 0x7F090012
public static int abc_popup_menu_header_item_layout = 2131296274;
// aapt resource value: 0x7F090013
public static int abc_popup_menu_item_layout = 2131296275;
// aapt resource value: 0x7F090014
public static int abc_screen_content_include = 2131296276;
// aapt resource value: 0x7F090015
public static int abc_screen_simple = 2131296277;
// aapt resource value: 0x7F090016
public static int abc_screen_simple_overlay_action_mode = 2131296278;
// aapt resource value: 0x7F090017
public static int abc_screen_toolbar = 2131296279;
// aapt resource value: 0x7F090018
public static int abc_search_dropdown_item_icons_2line = 2131296280;
// aapt resource value: 0x7F090019
public static int abc_search_view = 2131296281;
// aapt resource value: 0x7F09001A
public static int abc_select_dialog_material = 2131296282;
// aapt resource value: 0x7F09001B
public static int abc_tooltip = 2131296283;
// aapt resource value: 0x7F09001C
public static int notification_action = 2131296284;
// aapt resource value: 0x7F09001D
public static int notification_action_tombstone = 2131296285;
// aapt resource value: 0x7F09001E
public static int notification_template_custom_big = 2131296286;
// aapt resource value: 0x7F09001F
public static int notification_template_icon_group = 2131296287;
// aapt resource value: 0x7F090020
public static int notification_template_part_chronometer = 2131296288;
// aapt resource value: 0x7F090021
public static int notification_template_part_time = 2131296289;
// aapt resource value: 0x7F090022
public static int select_dialog_item_material = 2131296290;
// aapt resource value: 0x7F090023
public static int select_dialog_multichoice_material = 2131296291;
// aapt resource value: 0x7F090024
public static int select_dialog_singlechoice_material = 2131296292;
// aapt resource value: 0x7F090025
public static int support_simple_spinner_dropdown_item = 2131296293;
static Layout()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Layout()
{
}
}
public partial class String
{
// aapt resource value: 0x7F0A0000
public static int abc_action_bar_home_description = 2131361792;
// aapt resource value: 0x7F0A0001
public static int abc_action_bar_up_description = 2131361793;
// aapt resource value: 0x7F0A0002
public static int abc_action_menu_overflow_description = 2131361794;
// aapt resource value: 0x7F0A0003
public static int abc_action_mode_done = 2131361795;
// aapt resource value: 0x7F0A0005
public static int abc_activitychooserview_choose_application = 2131361797;
// aapt resource value: 0x7F0A0004
public static int abc_activity_chooser_view_see_all = 2131361796;
// aapt resource value: 0x7F0A0006
public static int abc_capital_off = 2131361798;
// aapt resource value: 0x7F0A0007
public static int abc_capital_on = 2131361799;
// aapt resource value: 0x7F0A0008
public static int abc_font_family_body_1_material = 2131361800;
// aapt resource value: 0x7F0A0009
public static int abc_font_family_body_2_material = 2131361801;
// aapt resource value: 0x7F0A000A
public static int abc_font_family_button_material = 2131361802;
// aapt resource value: 0x7F0A000B
public static int abc_font_family_caption_material = 2131361803;
// aapt resource value: 0x7F0A000C
public static int abc_font_family_display_1_material = 2131361804;
// aapt resource value: 0x7F0A000D
public static int abc_font_family_display_2_material = 2131361805;
// aapt resource value: 0x7F0A000E
public static int abc_font_family_display_3_material = 2131361806;
// aapt resource value: 0x7F0A000F
public static int abc_font_family_display_4_material = 2131361807;
// aapt resource value: 0x7F0A0010
public static int abc_font_family_headline_material = 2131361808;
// aapt resource value: 0x7F0A0011
public static int abc_font_family_menu_material = 2131361809;
// aapt resource value: 0x7F0A0012
public static int abc_font_family_subhead_material = 2131361810;
// aapt resource value: 0x7F0A0013
public static int abc_font_family_title_material = 2131361811;
// aapt resource value: 0x7F0A0014
public static int abc_menu_alt_shortcut_label = 2131361812;
// aapt resource value: 0x7F0A0015
public static int abc_menu_ctrl_shortcut_label = 2131361813;
// aapt resource value: 0x7F0A0016
public static int abc_menu_delete_shortcut_label = 2131361814;
// aapt resource value: 0x7F0A0017
public static int abc_menu_enter_shortcut_label = 2131361815;
// aapt resource value: 0x7F0A0018
public static int abc_menu_function_shortcut_label = 2131361816;
// aapt resource value: 0x7F0A0019
public static int abc_menu_meta_shortcut_label = 2131361817;
// aapt resource value: 0x7F0A001A
public static int abc_menu_shift_shortcut_label = 2131361818;
// aapt resource value: 0x7F0A001B
public static int abc_menu_space_shortcut_label = 2131361819;
// aapt resource value: 0x7F0A001C
public static int abc_menu_sym_shortcut_label = 2131361820;
// aapt resource value: 0x7F0A001D
public static int abc_prepend_shortcut_label = 2131361821;
// aapt resource value: 0x7F0A001F
public static int abc_searchview_description_clear = 2131361823;
// aapt resource value: 0x7F0A0020
public static int abc_searchview_description_query = 2131361824;
// aapt resource value: 0x7F0A0021
public static int abc_searchview_description_search = 2131361825;
// aapt resource value: 0x7F0A0022
public static int abc_searchview_description_submit = 2131361826;
// aapt resource value: 0x7F0A0023
public static int abc_searchview_description_voice = 2131361827;
// aapt resource value: 0x7F0A001E
public static int abc_search_hint = 2131361822;
// aapt resource value: 0x7F0A0024
public static int abc_shareactionprovider_share_with = 2131361828;
// aapt resource value: 0x7F0A0025
public static int abc_shareactionprovider_share_with_application = 2131361829;
// aapt resource value: 0x7F0A0026
public static int abc_toolbar_collapse_description = 2131361830;
// aapt resource value: 0x7F0A0027
public static int app_name = 2131361831;
// aapt resource value: 0x7F0A0028
public static int hello = 2131361832;
// aapt resource value: 0x7F0A0029
public static int search_menu_title = 2131361833;
// aapt resource value: 0x7F0A002A
public static int status_bar_notification_info_overflow = 2131361834;
static String()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private String()
{
}
}
public partial class Style
{
// aapt resource value: 0x7F0B0000
public static int AlertDialog_AppCompat = 2131427328;
// aapt resource value: 0x7F0B0001
public static int AlertDialog_AppCompat_Light = 2131427329;
// aapt resource value: 0x7F0B0002
public static int Animation_AppCompat_Dialog = 2131427330;
// aapt resource value: 0x7F0B0003
public static int Animation_AppCompat_DropDownUp = 2131427331;
// aapt resource value: 0x7F0B0004
public static int Animation_AppCompat_Tooltip = 2131427332;
// aapt resource value: 0x7F0B0005
public static int Base_AlertDialog_AppCompat = 2131427333;
// aapt resource value: 0x7F0B0006
public static int Base_AlertDialog_AppCompat_Light = 2131427334;
// aapt resource value: 0x7F0B0007
public static int Base_Animation_AppCompat_Dialog = 2131427335;
// aapt resource value: 0x7F0B0008
public static int Base_Animation_AppCompat_DropDownUp = 2131427336;
// aapt resource value: 0x7F0B0009
public static int Base_Animation_AppCompat_Tooltip = 2131427337;
// aapt resource value: 0x7F0B000B
public static int Base_DialogWindowTitleBackground_AppCompat = 2131427339;
// aapt resource value: 0x7F0B000A
public static int Base_DialogWindowTitle_AppCompat = 2131427338;
// aapt resource value: 0x7F0B000C
public static int Base_TextAppearance_AppCompat = 2131427340;
// aapt resource value: 0x7F0B000D
public static int Base_TextAppearance_AppCompat_Body1 = 2131427341;
// aapt resource value: 0x7F0B000E
public static int Base_TextAppearance_AppCompat_Body2 = 2131427342;
// aapt resource value: 0x7F0B000F
public static int Base_TextAppearance_AppCompat_Button = 2131427343;
// aapt resource value: 0x7F0B0010
public static int Base_TextAppearance_AppCompat_Caption = 2131427344;
// aapt resource value: 0x7F0B0011
public static int Base_TextAppearance_AppCompat_Display1 = 2131427345;
// aapt resource value: 0x7F0B0012
public static int Base_TextAppearance_AppCompat_Display2 = 2131427346;
// aapt resource value: 0x7F0B0013
public static int Base_TextAppearance_AppCompat_Display3 = 2131427347;
// aapt resource value: 0x7F0B0014
public static int Base_TextAppearance_AppCompat_Display4 = 2131427348;
// aapt resource value: 0x7F0B0015
public static int Base_TextAppearance_AppCompat_Headline = 2131427349;
// aapt resource value: 0x7F0B0016
public static int Base_TextAppearance_AppCompat_Inverse = 2131427350;
// aapt resource value: 0x7F0B0017
public static int Base_TextAppearance_AppCompat_Large = 2131427351;
// aapt resource value: 0x7F0B0018
public static int Base_TextAppearance_AppCompat_Large_Inverse = 2131427352;
// aapt resource value: 0x7F0B0019
public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131427353;
// aapt resource value: 0x7F0B001A
public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131427354;
// aapt resource value: 0x7F0B001B
public static int Base_TextAppearance_AppCompat_Medium = 2131427355;
// aapt resource value: 0x7F0B001C
public static int Base_TextAppearance_AppCompat_Medium_Inverse = 2131427356;
// aapt resource value: 0x7F0B001D
public static int Base_TextAppearance_AppCompat_Menu = 2131427357;
// aapt resource value: 0x7F0B001E
public static int Base_TextAppearance_AppCompat_SearchResult = 2131427358;
// aapt resource value: 0x7F0B001F
public static int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 2131427359;
// aapt resource value: 0x7F0B0020
public static int Base_TextAppearance_AppCompat_SearchResult_Title = 2131427360;
// aapt resource value: 0x7F0B0021
public static int Base_TextAppearance_AppCompat_Small = 2131427361;
// aapt resource value: 0x7F0B0022
public static int Base_TextAppearance_AppCompat_Small_Inverse = 2131427362;
// aapt resource value: 0x7F0B0023
public static int Base_TextAppearance_AppCompat_Subhead = 2131427363;
// aapt resource value: 0x7F0B0024
public static int Base_TextAppearance_AppCompat_Subhead_Inverse = 2131427364;
// aapt resource value: 0x7F0B0025
public static int Base_TextAppearance_AppCompat_Title = 2131427365;
// aapt resource value: 0x7F0B0026
public static int Base_TextAppearance_AppCompat_Title_Inverse = 2131427366;
// aapt resource value: 0x7F0B0027
public static int Base_TextAppearance_AppCompat_Tooltip = 2131427367;
// aapt resource value: 0x7F0B0028
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131427368;
// aapt resource value: 0x7F0B0029
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131427369;
// aapt resource value: 0x7F0B002A
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131427370;
// aapt resource value: 0x7F0B002B
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 2131427371;
// aapt resource value: 0x7F0B002C
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131427372;
// aapt resource value: 0x7F0B002D
public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131427373;
// aapt resource value: 0x7F0B002E
public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 2131427374;
// aapt resource value: 0x7F0B002F
public static int Base_TextAppearance_AppCompat_Widget_Button = 2131427375;
// aapt resource value: 0x7F0B0030
public static int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131427376;
// aapt resource value: 0x7F0B0031
public static int Base_TextAppearance_AppCompat_Widget_Button_Colored = 2131427377;
// aapt resource value: 0x7F0B0032
public static int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 2131427378;
// aapt resource value: 0x7F0B0033
public static int Base_TextAppearance_AppCompat_Widget_DropDownItem = 2131427379;
// aapt resource value: 0x7F0B0034
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131427380;
// aapt resource value: 0x7F0B0035
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131427381;
// aapt resource value: 0x7F0B0036
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131427382;
// aapt resource value: 0x7F0B0037
public static int Base_TextAppearance_AppCompat_Widget_Switch = 2131427383;
// aapt resource value: 0x7F0B0038
public static int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131427384;
// aapt resource value: 0x7F0B0039
public static int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131427385;
// aapt resource value: 0x7F0B003A
public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131427386;
// aapt resource value: 0x7F0B003B
public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 2131427387;
// aapt resource value: 0x7F0B004A
public static int Base_ThemeOverlay_AppCompat = 2131427402;
// aapt resource value: 0x7F0B004B
public static int Base_ThemeOverlay_AppCompat_ActionBar = 2131427403;
// aapt resource value: 0x7F0B004C
public static int Base_ThemeOverlay_AppCompat_Dark = 2131427404;
// aapt resource value: 0x7F0B004D
public static int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 2131427405;
// aapt resource value: 0x7F0B004E
public static int Base_ThemeOverlay_AppCompat_Dialog = 2131427406;
// aapt resource value: 0x7F0B004F
public static int Base_ThemeOverlay_AppCompat_Dialog_Alert = 2131427407;
// aapt resource value: 0x7F0B0050
public static int Base_ThemeOverlay_AppCompat_Light = 2131427408;
// aapt resource value: 0x7F0B003C
public static int Base_Theme_AppCompat = 2131427388;
// aapt resource value: 0x7F0B003D
public static int Base_Theme_AppCompat_CompactMenu = 2131427389;
// aapt resource value: 0x7F0B003E
public static int Base_Theme_AppCompat_Dialog = 2131427390;
// aapt resource value: 0x7F0B0042
public static int Base_Theme_AppCompat_DialogWhenLarge = 2131427394;
// aapt resource value: 0x7F0B003F
public static int Base_Theme_AppCompat_Dialog_Alert = 2131427391;
// aapt resource value: 0x7F0B0040
public static int Base_Theme_AppCompat_Dialog_FixedSize = 2131427392;
// aapt resource value: 0x7F0B0041
public static int Base_Theme_AppCompat_Dialog_MinWidth = 2131427393;
// aapt resource value: 0x7F0B0043
public static int Base_Theme_AppCompat_Light = 2131427395;
// aapt resource value: 0x7F0B0044
public static int Base_Theme_AppCompat_Light_DarkActionBar = 2131427396;
// aapt resource value: 0x7F0B0045
public static int Base_Theme_AppCompat_Light_Dialog = 2131427397;
// aapt resource value: 0x7F0B0049
public static int Base_Theme_AppCompat_Light_DialogWhenLarge = 2131427401;
// aapt resource value: 0x7F0B0046
public static int Base_Theme_AppCompat_Light_Dialog_Alert = 2131427398;
// aapt resource value: 0x7F0B0047
public static int Base_Theme_AppCompat_Light_Dialog_FixedSize = 2131427399;
// aapt resource value: 0x7F0B0048
public static int Base_Theme_AppCompat_Light_Dialog_MinWidth = 2131427400;
// aapt resource value: 0x7F0B0055
public static int Base_V21_ThemeOverlay_AppCompat_Dialog = 2131427413;
// aapt resource value: 0x7F0B0051
public static int Base_V21_Theme_AppCompat = 2131427409;
// aapt resource value: 0x7F0B0052
public static int Base_V21_Theme_AppCompat_Dialog = 2131427410;
// aapt resource value: 0x7F0B0053
public static int Base_V21_Theme_AppCompat_Light = 2131427411;
// aapt resource value: 0x7F0B0054
public static int Base_V21_Theme_AppCompat_Light_Dialog = 2131427412;
// aapt resource value: 0x7F0B0056
public static int Base_V22_Theme_AppCompat = 2131427414;
// aapt resource value: 0x7F0B0057
public static int Base_V22_Theme_AppCompat_Light = 2131427415;
// aapt resource value: 0x7F0B0058
public static int Base_V23_Theme_AppCompat = 2131427416;
// aapt resource value: 0x7F0B0059
public static int Base_V23_Theme_AppCompat_Light = 2131427417;
// aapt resource value: 0x7F0B005A
public static int Base_V26_Theme_AppCompat = 2131427418;
// aapt resource value: 0x7F0B005B
public static int Base_V26_Theme_AppCompat_Light = 2131427419;
// aapt resource value: 0x7F0B005C
public static int Base_V26_Widget_AppCompat_Toolbar = 2131427420;
// aapt resource value: 0x7F0B005D
public static int Base_V28_Theme_AppCompat = 2131427421;
// aapt resource value: 0x7F0B005E
public static int Base_V28_Theme_AppCompat_Light = 2131427422;
// aapt resource value: 0x7F0B0063
public static int Base_V7_ThemeOverlay_AppCompat_Dialog = 2131427427;
// aapt resource value: 0x7F0B005F
public static int Base_V7_Theme_AppCompat = 2131427423;
// aapt resource value: 0x7F0B0060
public static int Base_V7_Theme_AppCompat_Dialog = 2131427424;
// aapt resource value: 0x7F0B0061
public static int Base_V7_Theme_AppCompat_Light = 2131427425;
// aapt resource value: 0x7F0B0062
public static int Base_V7_Theme_AppCompat_Light_Dialog = 2131427426;
// aapt resource value: 0x7F0B0064
public static int Base_V7_Widget_AppCompat_AutoCompleteTextView = 2131427428;
// aapt resource value: 0x7F0B0065
public static int Base_V7_Widget_AppCompat_EditText = 2131427429;
// aapt resource value: 0x7F0B0066
public static int Base_V7_Widget_AppCompat_Toolbar = 2131427430;
// aapt resource value: 0x7F0B0067
public static int Base_Widget_AppCompat_ActionBar = 2131427431;
// aapt resource value: 0x7F0B0068
public static int Base_Widget_AppCompat_ActionBar_Solid = 2131427432;
// aapt resource value: 0x7F0B0069
public static int Base_Widget_AppCompat_ActionBar_TabBar = 2131427433;
// aapt resource value: 0x7F0B006A
public static int Base_Widget_AppCompat_ActionBar_TabText = 2131427434;
// aapt resource value: 0x7F0B006B
public static int Base_Widget_AppCompat_ActionBar_TabView = 2131427435;
// aapt resource value: 0x7F0B006C
public static int Base_Widget_AppCompat_ActionButton = 2131427436;
// aapt resource value: 0x7F0B006D
public static int Base_Widget_AppCompat_ActionButton_CloseMode = 2131427437;
// aapt resource value: 0x7F0B006E
public static int Base_Widget_AppCompat_ActionButton_Overflow = 2131427438;
// aapt resource value: 0x7F0B006F
public static int Base_Widget_AppCompat_ActionMode = 2131427439;
// aapt resource value: 0x7F0B0070
public static int Base_Widget_AppCompat_ActivityChooserView = 2131427440;
// aapt resource value: 0x7F0B0071
public static int Base_Widget_AppCompat_AutoCompleteTextView = 2131427441;
// aapt resource value: 0x7F0B0072
public static int Base_Widget_AppCompat_Button = 2131427442;
// aapt resource value: 0x7F0B0078
public static int Base_Widget_AppCompat_ButtonBar = 2131427448;
// aapt resource value: 0x7F0B0079
public static int Base_Widget_AppCompat_ButtonBar_AlertDialog = 2131427449;
// aapt resource value: 0x7F0B0073
public static int Base_Widget_AppCompat_Button_Borderless = 2131427443;
// aapt resource value: 0x7F0B0074
public static int Base_Widget_AppCompat_Button_Borderless_Colored = 2131427444;
// aapt resource value: 0x7F0B0075
public static int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131427445;
// aapt resource value: 0x7F0B0076
public static int Base_Widget_AppCompat_Button_Colored = 2131427446;
// aapt resource value: 0x7F0B0077
public static int Base_Widget_AppCompat_Button_Small = 2131427447;
// aapt resource value: 0x7F0B007A
public static int Base_Widget_AppCompat_CompoundButton_CheckBox = 2131427450;
// aapt resource value: 0x7F0B007B
public static int Base_Widget_AppCompat_CompoundButton_RadioButton = 2131427451;
// aapt resource value: 0x7F0B007C
public static int Base_Widget_AppCompat_CompoundButton_Switch = 2131427452;
// aapt resource value: 0x7F0B007D
public static int Base_Widget_AppCompat_DrawerArrowToggle = 2131427453;
// aapt resource value: 0x7F0B007E
public static int Base_Widget_AppCompat_DrawerArrowToggle_Common = 2131427454;
// aapt resource value: 0x7F0B007F
public static int Base_Widget_AppCompat_DropDownItem_Spinner = 2131427455;
// aapt resource value: 0x7F0B0080
public static int Base_Widget_AppCompat_EditText = 2131427456;
// aapt resource value: 0x7F0B0081
public static int Base_Widget_AppCompat_ImageButton = 2131427457;
// aapt resource value: 0x7F0B0082
public static int Base_Widget_AppCompat_Light_ActionBar = 2131427458;
// aapt resource value: 0x7F0B0083
public static int Base_Widget_AppCompat_Light_ActionBar_Solid = 2131427459;
// aapt resource value: 0x7F0B0084
public static int Base_Widget_AppCompat_Light_ActionBar_TabBar = 2131427460;
// aapt resource value: 0x7F0B0085
public static int Base_Widget_AppCompat_Light_ActionBar_TabText = 2131427461;
// aapt resource value: 0x7F0B0086
public static int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131427462;
// aapt resource value: 0x7F0B0087
public static int Base_Widget_AppCompat_Light_ActionBar_TabView = 2131427463;
// aapt resource value: 0x7F0B0088
public static int Base_Widget_AppCompat_Light_PopupMenu = 2131427464;
// aapt resource value: 0x7F0B0089
public static int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 2131427465;
// aapt resource value: 0x7F0B008A
public static int Base_Widget_AppCompat_ListMenuView = 2131427466;
// aapt resource value: 0x7F0B008B
public static int Base_Widget_AppCompat_ListPopupWindow = 2131427467;
// aapt resource value: 0x7F0B008C
public static int Base_Widget_AppCompat_ListView = 2131427468;
// aapt resource value: 0x7F0B008D
public static int Base_Widget_AppCompat_ListView_DropDown = 2131427469;
// aapt resource value: 0x7F0B008E
public static int Base_Widget_AppCompat_ListView_Menu = 2131427470;
// aapt resource value: 0x7F0B008F
public static int Base_Widget_AppCompat_PopupMenu = 2131427471;
// aapt resource value: 0x7F0B0090
public static int Base_Widget_AppCompat_PopupMenu_Overflow = 2131427472;
// aapt resource value: 0x7F0B0091
public static int Base_Widget_AppCompat_PopupWindow = 2131427473;
// aapt resource value: 0x7F0B0092
public static int Base_Widget_AppCompat_ProgressBar = 2131427474;
// aapt resource value: 0x7F0B0093
public static int Base_Widget_AppCompat_ProgressBar_Horizontal = 2131427475;
// aapt resource value: 0x7F0B0094
public static int Base_Widget_AppCompat_RatingBar = 2131427476;
// aapt resource value: 0x7F0B0095
public static int Base_Widget_AppCompat_RatingBar_Indicator = 2131427477;
// aapt resource value: 0x7F0B0096
public static int Base_Widget_AppCompat_RatingBar_Small = 2131427478;
// aapt resource value: 0x7F0B0097
public static int Base_Widget_AppCompat_SearchView = 2131427479;
// aapt resource value: 0x7F0B0098
public static int Base_Widget_AppCompat_SearchView_ActionBar = 2131427480;
// aapt resource value: 0x7F0B0099
public static int Base_Widget_AppCompat_SeekBar = 2131427481;
// aapt resource value: 0x7F0B009A
public static int Base_Widget_AppCompat_SeekBar_Discrete = 2131427482;
// aapt resource value: 0x7F0B009B
public static int Base_Widget_AppCompat_Spinner = 2131427483;
// aapt resource value: 0x7F0B009C
public static int Base_Widget_AppCompat_Spinner_Underlined = 2131427484;
// aapt resource value: 0x7F0B009D
public static int Base_Widget_AppCompat_TextView_SpinnerItem = 2131427485;
// aapt resource value: 0x7F0B009E
public static int Base_Widget_AppCompat_Toolbar = 2131427486;
// aapt resource value: 0x7F0B009F
public static int Base_Widget_AppCompat_Toolbar_Button_Navigation = 2131427487;
// aapt resource value: 0x7F0B00A0
public static int Platform_AppCompat = 2131427488;
// aapt resource value: 0x7F0B00A1
public static int Platform_AppCompat_Light = 2131427489;
// aapt resource value: 0x7F0B00A2
public static int Platform_ThemeOverlay_AppCompat = 2131427490;
// aapt resource value: 0x7F0B00A3
public static int Platform_ThemeOverlay_AppCompat_Dark = 2131427491;
// aapt resource value: 0x7F0B00A4
public static int Platform_ThemeOverlay_AppCompat_Light = 2131427492;
// aapt resource value: 0x7F0B00A5
public static int Platform_V21_AppCompat = 2131427493;
// aapt resource value: 0x7F0B00A6
public static int Platform_V21_AppCompat_Light = 2131427494;
// aapt resource value: 0x7F0B00A7
public static int Platform_V25_AppCompat = 2131427495;
// aapt resource value: 0x7F0B00A8
public static int Platform_V25_AppCompat_Light = 2131427496;
// aapt resource value: 0x7F0B00A9
public static int Platform_Widget_AppCompat_Spinner = 2131427497;
// aapt resource value: 0x7F0B00AA
public static int RtlOverlay_DialogWindowTitle_AppCompat = 2131427498;
// aapt resource value: 0x7F0B00AB
public static int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 2131427499;
// aapt resource value: 0x7F0B00AC
public static int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 2131427500;
// aapt resource value: 0x7F0B00AD
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem = 2131427501;
// aapt resource value: 0x7F0B00AE
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 2131427502;
// aapt resource value: 0x7F0B00AF
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_Shortcut = 2131427503;
// aapt resource value: 0x7F0B00B0
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_SubmenuArrow = 2131427504;
// aapt resource value: 0x7F0B00B1
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 2131427505;
// aapt resource value: 0x7F0B00B2
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_Title = 2131427506;
// aapt resource value: 0x7F0B00B8
public static int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 2131427512;
// aapt resource value: 0x7F0B00B3
public static int RtlOverlay_Widget_AppCompat_Search_DropDown = 2131427507;
// aapt resource value: 0x7F0B00B4
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 2131427508;
// aapt resource value: 0x7F0B00B5
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 2131427509;
// aapt resource value: 0x7F0B00B6
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 2131427510;
// aapt resource value: 0x7F0B00B7
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 2131427511;
// aapt resource value: 0x7F0B00B9
public static int RtlUnderlay_Widget_AppCompat_ActionButton = 2131427513;
// aapt resource value: 0x7F0B00BA
public static int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 2131427514;
// aapt resource value: 0x7F0B00BB
public static int TextAppearance_AppCompat = 2131427515;
// aapt resource value: 0x7F0B00BC
public static int TextAppearance_AppCompat_Body1 = 2131427516;
// aapt resource value: 0x7F0B00BD
public static int TextAppearance_AppCompat_Body2 = 2131427517;
// aapt resource value: 0x7F0B00BE
public static int TextAppearance_AppCompat_Button = 2131427518;
// aapt resource value: 0x7F0B00BF
public static int TextAppearance_AppCompat_Caption = 2131427519;
// aapt resource value: 0x7F0B00C0
public static int TextAppearance_AppCompat_Display1 = 2131427520;
// aapt resource value: 0x7F0B00C1
public static int TextAppearance_AppCompat_Display2 = 2131427521;
// aapt resource value: 0x7F0B00C2
public static int TextAppearance_AppCompat_Display3 = 2131427522;
// aapt resource value: 0x7F0B00C3
public static int TextAppearance_AppCompat_Display4 = 2131427523;
// aapt resource value: 0x7F0B00C4
public static int TextAppearance_AppCompat_Headline = 2131427524;
// aapt resource value: 0x7F0B00C5
public static int TextAppearance_AppCompat_Inverse = 2131427525;
// aapt resource value: 0x7F0B00C6
public static int TextAppearance_AppCompat_Large = 2131427526;
// aapt resource value: 0x7F0B00C7
public static int TextAppearance_AppCompat_Large_Inverse = 2131427527;
// aapt resource value: 0x7F0B00C8
public static int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 2131427528;
// aapt resource value: 0x7F0B00C9
public static int TextAppearance_AppCompat_Light_SearchResult_Title = 2131427529;
// aapt resource value: 0x7F0B00CA
public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131427530;
// aapt resource value: 0x7F0B00CB
public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131427531;
// aapt resource value: 0x7F0B00CC
public static int TextAppearance_AppCompat_Medium = 2131427532;
// aapt resource value: 0x7F0B00CD
public static int TextAppearance_AppCompat_Medium_Inverse = 2131427533;
// aapt resource value: 0x7F0B00CE
public static int TextAppearance_AppCompat_Menu = 2131427534;
// aapt resource value: 0x7F0B00CF
public static int TextAppearance_AppCompat_SearchResult_Subtitle = 2131427535;
// aapt resource value: 0x7F0B00D0
public static int TextAppearance_AppCompat_SearchResult_Title = 2131427536;
// aapt resource value: 0x7F0B00D1
public static int TextAppearance_AppCompat_Small = 2131427537;
// aapt resource value: 0x7F0B00D2
public static int TextAppearance_AppCompat_Small_Inverse = 2131427538;
// aapt resource value: 0x7F0B00D3
public static int TextAppearance_AppCompat_Subhead = 2131427539;
// aapt resource value: 0x7F0B00D4
public static int TextAppearance_AppCompat_Subhead_Inverse = 2131427540;
// aapt resource value: 0x7F0B00D5
public static int TextAppearance_AppCompat_Title = 2131427541;
// aapt resource value: 0x7F0B00D6
public static int TextAppearance_AppCompat_Title_Inverse = 2131427542;
// aapt resource value: 0x7F0B00D7
public static int TextAppearance_AppCompat_Tooltip = 2131427543;
// aapt resource value: 0x7F0B00D8
public static int TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131427544;
// aapt resource value: 0x7F0B00D9
public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131427545;
// aapt resource value: 0x7F0B00DA
public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131427546;
// aapt resource value: 0x7F0B00DB
public static int TextAppearance_AppCompat_Widget_ActionBar_Title = 2131427547;
// aapt resource value: 0x7F0B00DC
public static int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131427548;
// aapt resource value: 0x7F0B00DD
public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131427549;
// aapt resource value: 0x7F0B00DE
public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 2131427550;
// aapt resource value: 0x7F0B00DF
public static int TextAppearance_AppCompat_Widget_ActionMode_Title = 2131427551;
// aapt resource value: 0x7F0B00E0
public static int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 2131427552;
// aapt resource value: 0x7F0B00E1
public static int TextAppearance_AppCompat_Widget_Button = 2131427553;
// aapt resource value: 0x7F0B00E2
public static int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131427554;
// aapt resource value: 0x7F0B00E3
public static int TextAppearance_AppCompat_Widget_Button_Colored = 2131427555;
// aapt resource value: 0x7F0B00E4
public static int TextAppearance_AppCompat_Widget_Button_Inverse = 2131427556;
// aapt resource value: 0x7F0B00E5
public static int TextAppearance_AppCompat_Widget_DropDownItem = 2131427557;
// aapt resource value: 0x7F0B00E6
public static int TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131427558;
// aapt resource value: 0x7F0B00E7
public static int TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131427559;
// aapt resource value: 0x7F0B00E8
public static int TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131427560;
// aapt resource value: 0x7F0B00E9
public static int TextAppearance_AppCompat_Widget_Switch = 2131427561;
// aapt resource value: 0x7F0B00EA
public static int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131427562;
// aapt resource value: 0x7F0B00EB
public static int TextAppearance_Compat_Notification = 2131427563;
// aapt resource value: 0x7F0B00EC
public static int TextAppearance_Compat_Notification_Info = 2131427564;
// aapt resource value: 0x7F0B00ED
public static int TextAppearance_Compat_Notification_Line2 = 2131427565;
// aapt resource value: 0x7F0B00EE
public static int TextAppearance_Compat_Notification_Time = 2131427566;
// aapt resource value: 0x7F0B00EF
public static int TextAppearance_Compat_Notification_Title = 2131427567;
// aapt resource value: 0x7F0B00F0
public static int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131427568;
// aapt resource value: 0x7F0B00F1
public static int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131427569;
// aapt resource value: 0x7F0B00F2
public static int TextAppearance_Widget_AppCompat_Toolbar_Title = 2131427570;
// aapt resource value: 0x7F0B0108
public static int ThemeOverlay_AppCompat = 2131427592;
// aapt resource value: 0x7F0B0109
public static int ThemeOverlay_AppCompat_ActionBar = 2131427593;
// aapt resource value: 0x7F0B010A
public static int ThemeOverlay_AppCompat_Dark = 2131427594;
// aapt resource value: 0x7F0B010B
public static int ThemeOverlay_AppCompat_Dark_ActionBar = 2131427595;
// aapt resource value: 0x7F0B010C
public static int ThemeOverlay_AppCompat_Dialog = 2131427596;
// aapt resource value: 0x7F0B010D
public static int ThemeOverlay_AppCompat_Dialog_Alert = 2131427597;
// aapt resource value: 0x7F0B010E
public static int ThemeOverlay_AppCompat_Light = 2131427598;
// aapt resource value: 0x7F0B00F3
public static int Theme_AppCompat = 2131427571;
// aapt resource value: 0x7F0B00F4
public static int Theme_AppCompat_CompactMenu = 2131427572;
// aapt resource value: 0x7F0B00F5
public static int Theme_AppCompat_DayNight = 2131427573;
// aapt resource value: 0x7F0B00F6
public static int Theme_AppCompat_DayNight_DarkActionBar = 2131427574;
// aapt resource value: 0x7F0B00F7
public static int Theme_AppCompat_DayNight_Dialog = 2131427575;
// aapt resource value: 0x7F0B00FA
public static int Theme_AppCompat_DayNight_DialogWhenLarge = 2131427578;
// aapt resource value: 0x7F0B00F8
public static int Theme_AppCompat_DayNight_Dialog_Alert = 2131427576;
// aapt resource value: 0x7F0B00F9
public static int Theme_AppCompat_DayNight_Dialog_MinWidth = 2131427577;
// aapt resource value: 0x7F0B00FB
public static int Theme_AppCompat_DayNight_NoActionBar = 2131427579;
// aapt resource value: 0x7F0B00FC
public static int Theme_AppCompat_Dialog = 2131427580;
// aapt resource value: 0x7F0B00FF
public static int Theme_AppCompat_DialogWhenLarge = 2131427583;
// aapt resource value: 0x7F0B00FD
public static int Theme_AppCompat_Dialog_Alert = 2131427581;
// aapt resource value: 0x7F0B00FE
public static int Theme_AppCompat_Dialog_MinWidth = 2131427582;
// aapt resource value: 0x7F0B0100
public static int Theme_AppCompat_Light = 2131427584;
// aapt resource value: 0x7F0B0101
public static int Theme_AppCompat_Light_DarkActionBar = 2131427585;
// aapt resource value: 0x7F0B0102
public static int Theme_AppCompat_Light_Dialog = 2131427586;
// aapt resource value: 0x7F0B0105
public static int Theme_AppCompat_Light_DialogWhenLarge = 2131427589;
// aapt resource value: 0x7F0B0103
public static int Theme_AppCompat_Light_Dialog_Alert = 2131427587;
// aapt resource value: 0x7F0B0104
public static int Theme_AppCompat_Light_Dialog_MinWidth = 2131427588;
// aapt resource value: 0x7F0B0106
public static int Theme_AppCompat_Light_NoActionBar = 2131427590;
// aapt resource value: 0x7F0B0107
public static int Theme_AppCompat_NoActionBar = 2131427591;
// aapt resource value: 0x7F0B010F
public static int Widget_AppCompat_ActionBar = 2131427599;
// aapt resource value: 0x7F0B0110
public static int Widget_AppCompat_ActionBar_Solid = 2131427600;
// aapt resource value: 0x7F0B0111
public static int Widget_AppCompat_ActionBar_TabBar = 2131427601;
// aapt resource value: 0x7F0B0112
public static int Widget_AppCompat_ActionBar_TabText = 2131427602;
// aapt resource value: 0x7F0B0113
public static int Widget_AppCompat_ActionBar_TabView = 2131427603;
// aapt resource value: 0x7F0B0114
public static int Widget_AppCompat_ActionButton = 2131427604;
// aapt resource value: 0x7F0B0115
public static int Widget_AppCompat_ActionButton_CloseMode = 2131427605;
// aapt resource value: 0x7F0B0116
public static int Widget_AppCompat_ActionButton_Overflow = 2131427606;
// aapt resource value: 0x7F0B0117
public static int Widget_AppCompat_ActionMode = 2131427607;
// aapt resource value: 0x7F0B0118
public static int Widget_AppCompat_ActivityChooserView = 2131427608;
// aapt resource value: 0x7F0B0119
public static int Widget_AppCompat_AutoCompleteTextView = 2131427609;
// aapt resource value: 0x7F0B011A
public static int Widget_AppCompat_Button = 2131427610;
// aapt resource value: 0x7F0B0120
public static int Widget_AppCompat_ButtonBar = 2131427616;
// aapt resource value: 0x7F0B0121
public static int Widget_AppCompat_ButtonBar_AlertDialog = 2131427617;
// aapt resource value: 0x7F0B011B
public static int Widget_AppCompat_Button_Borderless = 2131427611;
// aapt resource value: 0x7F0B011C
public static int Widget_AppCompat_Button_Borderless_Colored = 2131427612;
// aapt resource value: 0x7F0B011D
public static int Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131427613;
// aapt resource value: 0x7F0B011E
public static int Widget_AppCompat_Button_Colored = 2131427614;
// aapt resource value: 0x7F0B011F
public static int Widget_AppCompat_Button_Small = 2131427615;
// aapt resource value: 0x7F0B0122
public static int Widget_AppCompat_CompoundButton_CheckBox = 2131427618;
// aapt resource value: 0x7F0B0123
public static int Widget_AppCompat_CompoundButton_RadioButton = 2131427619;
// aapt resource value: 0x7F0B0124
public static int Widget_AppCompat_CompoundButton_Switch = 2131427620;
// aapt resource value: 0x7F0B0125
public static int Widget_AppCompat_DrawerArrowToggle = 2131427621;
// aapt resource value: 0x7F0B0126
public static int Widget_AppCompat_DropDownItem_Spinner = 2131427622;
// aapt resource value: 0x7F0B0127
public static int Widget_AppCompat_EditText = 2131427623;
// aapt resource value: 0x7F0B0128
public static int Widget_AppCompat_ImageButton = 2131427624;
// aapt resource value: 0x7F0B0129
public static int Widget_AppCompat_Light_ActionBar = 2131427625;
// aapt resource value: 0x7F0B012A
public static int Widget_AppCompat_Light_ActionBar_Solid = 2131427626;
// aapt resource value: 0x7F0B012B
public static int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 2131427627;
// aapt resource value: 0x7F0B012C
public static int Widget_AppCompat_Light_ActionBar_TabBar = 2131427628;
// aapt resource value: 0x7F0B012D
public static int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 2131427629;
// aapt resource value: 0x7F0B012E
public static int Widget_AppCompat_Light_ActionBar_TabText = 2131427630;
// aapt resource value: 0x7F0B012F
public static int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131427631;
// aapt resource value: 0x7F0B0130
public static int Widget_AppCompat_Light_ActionBar_TabView = 2131427632;
// aapt resource value: 0x7F0B0131
public static int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 2131427633;
// aapt resource value: 0x7F0B0132
public static int Widget_AppCompat_Light_ActionButton = 2131427634;
// aapt resource value: 0x7F0B0133
public static int Widget_AppCompat_Light_ActionButton_CloseMode = 2131427635;
// aapt resource value: 0x7F0B0134
public static int Widget_AppCompat_Light_ActionButton_Overflow = 2131427636;
// aapt resource value: 0x7F0B0135
public static int Widget_AppCompat_Light_ActionMode_Inverse = 2131427637;
// aapt resource value: 0x7F0B0136
public static int Widget_AppCompat_Light_ActivityChooserView = 2131427638;
// aapt resource value: 0x7F0B0137
public static int Widget_AppCompat_Light_AutoCompleteTextView = 2131427639;
// aapt resource value: 0x7F0B0138
public static int Widget_AppCompat_Light_DropDownItem_Spinner = 2131427640;
// aapt resource value: 0x7F0B0139
public static int Widget_AppCompat_Light_ListPopupWindow = 2131427641;
// aapt resource value: 0x7F0B013A
public static int Widget_AppCompat_Light_ListView_DropDown = 2131427642;
// aapt resource value: 0x7F0B013B
public static int Widget_AppCompat_Light_PopupMenu = 2131427643;
// aapt resource value: 0x7F0B013C
public static int Widget_AppCompat_Light_PopupMenu_Overflow = 2131427644;
// aapt resource value: 0x7F0B013D
public static int Widget_AppCompat_Light_SearchView = 2131427645;
// aapt resource value: 0x7F0B013E
public static int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 2131427646;
// aapt resource value: 0x7F0B013F
public static int Widget_AppCompat_ListMenuView = 2131427647;
// aapt resource value: 0x7F0B0140
public static int Widget_AppCompat_ListPopupWindow = 2131427648;
// aapt resource value: 0x7F0B0141
public static int Widget_AppCompat_ListView = 2131427649;
// aapt resource value: 0x7F0B0142
public static int Widget_AppCompat_ListView_DropDown = 2131427650;
// aapt resource value: 0x7F0B0143
public static int Widget_AppCompat_ListView_Menu = 2131427651;
// aapt resource value: 0x7F0B0144
public static int Widget_AppCompat_PopupMenu = 2131427652;
// aapt resource value: 0x7F0B0145
public static int Widget_AppCompat_PopupMenu_Overflow = 2131427653;
// aapt resource value: 0x7F0B0146
public static int Widget_AppCompat_PopupWindow = 2131427654;
// aapt resource value: 0x7F0B0147
public static int Widget_AppCompat_ProgressBar = 2131427655;
// aapt resource value: 0x7F0B0148
public static int Widget_AppCompat_ProgressBar_Horizontal = 2131427656;
// aapt resource value: 0x7F0B0149
public static int Widget_AppCompat_RatingBar = 2131427657;
// aapt resource value: 0x7F0B014A
public static int Widget_AppCompat_RatingBar_Indicator = 2131427658;
// aapt resource value: 0x7F0B014B
public static int Widget_AppCompat_RatingBar_Small = 2131427659;
// aapt resource value: 0x7F0B014C
public static int Widget_AppCompat_SearchView = 2131427660;
// aapt resource value: 0x7F0B014D
public static int Widget_AppCompat_SearchView_ActionBar = 2131427661;
// aapt resource value: 0x7F0B014E
public static int Widget_AppCompat_SeekBar = 2131427662;
// aapt resource value: 0x7F0B014F
public static int Widget_AppCompat_SeekBar_Discrete = 2131427663;
// aapt resource value: 0x7F0B0150
public static int Widget_AppCompat_Spinner = 2131427664;
// aapt resource value: 0x7F0B0151
public static int Widget_AppCompat_Spinner_DropDown = 2131427665;
// aapt resource value: 0x7F0B0152
public static int Widget_AppCompat_Spinner_DropDown_ActionBar = 2131427666;
// aapt resource value: 0x7F0B0153
public static int Widget_AppCompat_Spinner_Underlined = 2131427667;
// aapt resource value: 0x7F0B0154
public static int Widget_AppCompat_TextView_SpinnerItem = 2131427668;
// aapt resource value: 0x7F0B0155
public static int Widget_AppCompat_Toolbar = 2131427669;
// aapt resource value: 0x7F0B0156
public static int Widget_AppCompat_Toolbar_Button_Navigation = 2131427670;
// aapt resource value: 0x7F0B0157
public static int Widget_Compat_NotificationActionContainer = 2131427671;
// aapt resource value: 0x7F0B0158
public static int Widget_Compat_NotificationActionText = 2131427672;
// aapt resource value: 0x7F0B0159
public static int Widget_Support_CoordinatorLayout = 2131427673;
static Style()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Style()
{
}
}
public partial class Styleable
{
// aapt resource value: { 0x7F020031,0x7F020032,0x7F020033,0x7F020057,0x7F020058,0x7F020059,0x7F02005A,0x7F02005B,0x7F02005C,0x7F02005F,0x7F020064,0x7F020065,0x7F020070,0x7F020080,0x7F020081,0x7F020082,0x7F020083,0x7F020084,0x7F020089,0x7F02008C,0x7F0200A2,0x7F0200A9,0x7F0200B4,0x7F0200B7,0x7F0200B8,0x7F0200D3,0x7F0200D6,0x7F0200F1,0x7F0200FA }
public static int[] ActionBar = new int[] {
2130837553,
2130837554,
2130837555,
2130837591,
2130837592,
2130837593,
2130837594,
2130837595,
2130837596,
2130837599,
2130837604,
2130837605,
2130837616,
2130837632,
2130837633,
2130837634,
2130837635,
2130837636,
2130837641,
2130837644,
2130837666,
2130837673,
2130837684,
2130837687,
2130837688,
2130837715,
2130837718,
2130837745,
2130837754};
// aapt resource value: { 0x10100B3 }
public static int[] ActionBarLayout = new int[] {
16842931};
// aapt resource value: 0
public static int ActionBarLayout_android_layout_gravity = 0;
// aapt resource value: 0
public static int ActionBar_background = 0;
// aapt resource value: 1
public static int ActionBar_backgroundSplit = 1;
// aapt resource value: 2
public static int ActionBar_backgroundStacked = 2;
// aapt resource value: 3
public static int ActionBar_contentInsetEnd = 3;
// aapt resource value: 4
public static int ActionBar_contentInsetEndWithActions = 4;
// aapt resource value: 5
public static int ActionBar_contentInsetLeft = 5;
// aapt resource value: 6
public static int ActionBar_contentInsetRight = 6;
// aapt resource value: 7
public static int ActionBar_contentInsetStart = 7;
// aapt resource value: 8
public static int ActionBar_contentInsetStartWithNavigation = 8;
// aapt resource value: 9
public static int ActionBar_customNavigationLayout = 9;
// aapt resource value: 10
public static int ActionBar_displayOptions = 10;
// aapt resource value: 11
public static int ActionBar_divider = 11;
// aapt resource value: 12
public static int ActionBar_elevation = 12;
// aapt resource value: 13
public static int ActionBar_height = 13;
// aapt resource value: 14
public static int ActionBar_hideOnContentScroll = 14;
// aapt resource value: 15
public static int ActionBar_homeAsUpIndicator = 15;
// aapt resource value: 16
public static int ActionBar_homeLayout = 16;
// aapt resource value: 17
public static int ActionBar_icon = 17;
// aapt resource value: 18
public static int ActionBar_indeterminateProgressStyle = 18;
// aapt resource value: 19
public static int ActionBar_itemPadding = 19;
// aapt resource value: 20
public static int ActionBar_logo = 20;
// aapt resource value: 21
public static int ActionBar_navigationMode = 21;
// aapt resource value: 22
public static int ActionBar_popupTheme = 22;
// aapt resource value: 23
public static int ActionBar_progressBarPadding = 23;
// aapt resource value: 24
public static int ActionBar_progressBarStyle = 24;
// aapt resource value: 25
public static int ActionBar_subtitle = 25;
// aapt resource value: 26
public static int ActionBar_subtitleTextStyle = 26;
// aapt resource value: 27
public static int ActionBar_title = 27;
// aapt resource value: 28
public static int ActionBar_titleTextStyle = 28;
// aapt resource value: { 0x101013F }
public static int[] ActionMenuItemView = new int[] {
16843071};
// aapt resource value: 0
public static int ActionMenuItemView_android_minWidth = 0;
// aapt resource value: { 0xFFFFFFFF }
public static int[] ActionMenuView = new int[] {
-1};
// aapt resource value: { 0x7F020031,0x7F020032,0x7F020047,0x7F020080,0x7F0200D6,0x7F0200FA }
public static int[] ActionMode = new int[] {
2130837553,
2130837554,
2130837575,
2130837632,
2130837718,
2130837754};
// aapt resource value: 0
public static int ActionMode_background = 0;
// aapt resource value: 1
public static int ActionMode_backgroundSplit = 1;
// aapt resource value: 2
public static int ActionMode_closeItemLayout = 2;
// aapt resource value: 3
public static int ActionMode_height = 3;
// aapt resource value: 4
public static int ActionMode_subtitleTextStyle = 4;
// aapt resource value: 5
public static int ActionMode_titleTextStyle = 5;
// aapt resource value: { 0x7F020071,0x7F02008A }
public static int[] ActivityChooserView = new int[] {
2130837617,
2130837642};
// aapt resource value: 0
public static int ActivityChooserView_expandActivityOverflowButtonDrawable = 0;
// aapt resource value: 1
public static int ActivityChooserView_initialActivityCount = 1;
// aapt resource value: { 0x10100F2,0x7F02003E,0x7F02003F,0x7F020099,0x7F02009A,0x7F0200A6,0x7F0200C8,0x7F0200C9 }
public static int[] AlertDialog = new int[] {
16842994,
2130837566,
2130837567,
2130837657,
2130837658,
2130837670,
2130837704,
2130837705};
// aapt resource value: 0
public static int AlertDialog_android_layout = 0;
// aapt resource value: 1
public static int AlertDialog_buttonIconDimen = 1;
// aapt resource value: 2
public static int AlertDialog_buttonPanelSideLayout = 2;
// aapt resource value: 3
public static int AlertDialog_listItemLayout = 3;
// aapt resource value: 4
public static int AlertDialog_listLayout = 4;
// aapt resource value: 5
public static int AlertDialog_multiChoiceItemLayout = 5;
// aapt resource value: 6
public static int AlertDialog_showTitle = 6;
// aapt resource value: 7
public static int AlertDialog_singleChoiceItemLayout = 7;
// aapt resource value: { 0x101011C,0x1010194,0x1010195,0x1010196,0x101030C,0x101030D }
public static int[] AnimatedStateListDrawableCompat = new int[] {
16843036,
16843156,
16843157,
16843158,
16843532,
16843533};
// aapt resource value: 3
public static int AnimatedStateListDrawableCompat_android_constantSize = 3;
// aapt resource value: 0
public static int AnimatedStateListDrawableCompat_android_dither = 0;
// aapt resource value: 4
public static int AnimatedStateListDrawableCompat_android_enterFadeDuration = 4;
// aapt resource value: 5
public static int AnimatedStateListDrawableCompat_android_exitFadeDuration = 5;
// aapt resource value: 2
public static int AnimatedStateListDrawableCompat_android_variablePadding = 2;
// aapt resource value: 1
public static int AnimatedStateListDrawableCompat_android_visible = 1;
// aapt resource value: { 0x10100D0,0x1010199 }
public static int[] AnimatedStateListDrawableItem = new int[] {
16842960,
16843161};
// aapt resource value: 1
public static int AnimatedStateListDrawableItem_android_drawable = 1;
// aapt resource value: 0
public static int AnimatedStateListDrawableItem_android_id = 0;
// aapt resource value: { 0x1010199,0x1010449,0x101044A,0x101044B }
public static int[] AnimatedStateListDrawableTransition = new int[] {
16843161,
16843849,
16843850,
16843851};
// aapt resource value: 0
public static int AnimatedStateListDrawableTransition_android_drawable = 0;
// aapt resource value: 2
public static int AnimatedStateListDrawableTransition_android_fromId = 2;
// aapt resource value: 3
public static int AnimatedStateListDrawableTransition_android_reversible = 3;
// aapt resource value: 1
public static int AnimatedStateListDrawableTransition_android_toId = 1;
// aapt resource value: { 0x1010119,0x7F0200CE,0x7F0200EF,0x7F0200F0 }
public static int[] AppCompatImageView = new int[] {
16843033,
2130837710,
2130837743,
2130837744};
// aapt resource value: 0
public static int AppCompatImageView_android_src = 0;
// aapt resource value: 1
public static int AppCompatImageView_srcCompat = 1;
// aapt resource value: 2
public static int AppCompatImageView_tint = 2;
// aapt resource value: 3
public static int AppCompatImageView_tintMode = 3;
// aapt resource value: { 0x1010142,0x7F0200EC,0x7F0200ED,0x7F0200EE }
public static int[] AppCompatSeekBar = new int[] {
16843074,
2130837740,
2130837741,
2130837742};
// aapt resource value: 0
public static int AppCompatSeekBar_android_thumb = 0;
// aapt resource value: 1
public static int AppCompatSeekBar_tickMark = 1;
// aapt resource value: 2
public static int AppCompatSeekBar_tickMarkTint = 2;
// aapt resource value: 3
public static int AppCompatSeekBar_tickMarkTintMode = 3;
// aapt resource value: { 0x1010034,0x101016D,0x101016E,0x101016F,0x1010170,0x1010392,0x1010393 }
public static int[] AppCompatTextHelper = new int[] {
16842804,
16843117,
16843118,
16843119,
16843120,
16843666,
16843667};
// aapt resource value: 2
public static int AppCompatTextHelper_android_drawableBottom = 2;
// aapt resource value: 6
public static int AppCompatTextHelper_android_drawableEnd = 6;
// aapt resource value: 3
public static int AppCompatTextHelper_android_drawableLeft = 3;
// aapt resource value: 4
public static int AppCompatTextHelper_android_drawableRight = 4;
// aapt resource value: 5
public static int AppCompatTextHelper_android_drawableStart = 5;
// aapt resource value: 1
public static int AppCompatTextHelper_android_drawableTop = 1;
// aapt resource value: 0
public static int AppCompatTextHelper_android_textAppearance = 0;
// aapt resource value: { 0x1010034,0x7F02002C,0x7F02002D,0x7F02002E,0x7F02002F,0x7F020030,0x7F020072,0x7F020074,0x7F02008E,0x7F020096,0x7F0200DC }
public static int[] AppCompatTextView = new int[] {
16842804,
2130837548,
2130837549,
2130837550,
2130837551,
2130837552,
2130837618,
2130837620,
2130837646,
2130837654,
2130837724};
// aapt resource value: 0
public static int AppCompatTextView_android_textAppearance = 0;
// aapt resource value: 1
public static int AppCompatTextView_autoSizeMaxTextSize = 1;
// aapt resource value: 2
public static int AppCompatTextView_autoSizeMinTextSize = 2;
// aapt resource value: 3
public static int AppCompatTextView_autoSizePresetSizes = 3;
// aapt resource value: 4
public static int AppCompatTextView_autoSizeStepGranularity = 4;
// aapt resource value: 5
public static int AppCompatTextView_autoSizeTextType = 5;
// aapt resource value: 6
public static int AppCompatTextView_firstBaselineToTopHeight = 6;
// aapt resource value: 7
public static int AppCompatTextView_fontFamily = 7;
// aapt resource value: 8
public static int AppCompatTextView_lastBaselineToBottomHeight = 8;
// aapt resource value: 9
public static int AppCompatTextView_lineHeight = 9;
// aapt resource value: 10
public static int AppCompatTextView_textAllCaps = 10;
// aapt resource value: { 0x1010057,0x10100AE,0x7F020000,0x7F020001,0x7F020002,0x7F020003,0x7F020004,0x7F020005,0x7F020006,0x7F020007,0x7F020008,0x7F020009,0x7F02000A,0x7F02000B,0x7F02000C,0x7F02000E,0x7F02000F,0x7F020010,0x7F020011,0x7F020012,0x7F020013,0x7F020014,0x7F020015,0x7F020016,0x7F020017,0x7F020018,0x7F020019,0x7F02001A,0x7F02001B,0x7F02001C,0x7F02001D,0x7F02001E,0x7F020021,0x7F020022,0x7F020023,0x7F020024,0x7F020025,0x7F02002B,0x7F020037,0x7F020038,0x7F020039,0x7F02003A,0x7F02003B,0x7F02003C,0x7F020040,0x7F020041,0x7F020044,0x7F020045,0x7F02004B,0x7F02004C,0x7F02004D,0x7F02004E,0x7F02004F,0x7F020050,0x7F020051,0x7F020052,0x7F020053,0x7F020054,0x7F02005D,0x7F020061,0x7F020062,0x7F020063,0x7F020066,0x7F020068,0x7F02006B,0x7F02006C,0x7F02006D,0x7F02006E,0x7F02006F,0x7F020082,0x7F020088,0x7F020097,0x7F020098,0x7F02009B,0x7F02009C,0x7F02009D,0x7F02009E,0x7F02009F,0x7F0200A0,0x7F0200A1,0x7F0200B0,0x7F0200B1,0x7F0200B2,0x7F0200B3,0x7F0200B5,0x7F0200BB,0x7F0200BC,0x7F0200BD,0x7F0200BE,0x7F0200C1,0x7F0200C2,0x7F0200C3,0x7F0200C4,0x7F0200CB,0x7F0200CC,0x7F0200DA,0x7F0200DD,0x7F0200DE,0x7F0200DF,0x7F0200E0,0x7F0200E1,0x7F0200E2,0x7F0200E3,0x7F0200E4,0x7F0200E5,0x7F0200E6,0x7F0200FB,0x7F0200FC,0x7F0200FD,0x7F0200FE,0x7F020104,0x7F020106,0x7F020107,0x7F020108,0x7F020109,0x7F02010A,0x7F02010B,0x7F02010C,0x7F02010D,0x7F02010E,0x7F02010F }
public static int[] AppCompatTheme = new int[] {
16842839,
16842926,
2130837504,
2130837505,
2130837506,
2130837507,
2130837508,
2130837509,
2130837510,
2130837511,
2130837512,
2130837513,
2130837514,
2130837515,
2130837516,
2130837518,
2130837519,
2130837520,
2130837521,
2130837522,
2130837523,
2130837524,
2130837525,
2130837526,
2130837527,
2130837528,
2130837529,
2130837530,
2130837531,
2130837532,
2130837533,
2130837534,
2130837537,
2130837538,
2130837539,
2130837540,
2130837541,
2130837547,
2130837559,
2130837560,
2130837561,
2130837562,
2130837563,
2130837564,
2130837568,
2130837569,
2130837572,
2130837573,
2130837579,
2130837580,
2130837581,
2130837582,
2130837583,
2130837584,
2130837585,
2130837586,
2130837587,
2130837588,
2130837597,
2130837601,
2130837602,
2130837603,
2130837606,
2130837608,
2130837611,
2130837612,
2130837613,
2130837614,
2130837615,
2130837634,
2130837640,
2130837655,
2130837656,
2130837659,
2130837660,
2130837661,
2130837662,
2130837663,
2130837664,
2130837665,
2130837680,
2130837681,
2130837682,
2130837683,
2130837685,
2130837691,
2130837692,
2130837693,
2130837694,
2130837697,
2130837698,
2130837699,
2130837700,
2130837707,
2130837708,
2130837722,
2130837725,
2130837726,
2130837727,
2130837728,
2130837729,
2130837730,
2130837731,
2130837732,
2130837733,
2130837734,
2130837755,
2130837756,
2130837757,
2130837758,
2130837764,
2130837766,
2130837767,
2130837768,
2130837769,
2130837770,
2130837771,
2130837772,
2130837773,
2130837774,
2130837775};
// aapt resource value: 2
public static int AppCompatTheme_actionBarDivider = 2;
// aapt resource value: 3
public static int AppCompatTheme_actionBarItemBackground = 3;
// aapt resource value: 4
public static int AppCompatTheme_actionBarPopupTheme = 4;
// aapt resource value: 5
public static int AppCompatTheme_actionBarSize = 5;
// aapt resource value: 6
public static int AppCompatTheme_actionBarSplitStyle = 6;
// aapt resource value: 7
public static int AppCompatTheme_actionBarStyle = 7;
// aapt resource value: 8
public static int AppCompatTheme_actionBarTabBarStyle = 8;
// aapt resource value: 9
public static int AppCompatTheme_actionBarTabStyle = 9;
// aapt resource value: 10
public static int AppCompatTheme_actionBarTabTextStyle = 10;
// aapt resource value: 11
public static int AppCompatTheme_actionBarTheme = 11;
// aapt resource value: 12
public static int AppCompatTheme_actionBarWidgetTheme = 12;
// aapt resource value: 13
public static int AppCompatTheme_actionButtonStyle = 13;
// aapt resource value: 14
public static int AppCompatTheme_actionDropDownStyle = 14;
// aapt resource value: 15
public static int AppCompatTheme_actionMenuTextAppearance = 15;
// aapt resource value: 16
public static int AppCompatTheme_actionMenuTextColor = 16;
// aapt resource value: 17
public static int AppCompatTheme_actionModeBackground = 17;
// aapt resource value: 18
public static int AppCompatTheme_actionModeCloseButtonStyle = 18;
// aapt resource value: 19
public static int AppCompatTheme_actionModeCloseDrawable = 19;
// aapt resource value: 20
public static int AppCompatTheme_actionModeCopyDrawable = 20;
// aapt resource value: 21
public static int AppCompatTheme_actionModeCutDrawable = 21;
// aapt resource value: 22
public static int AppCompatTheme_actionModeFindDrawable = 22;
// aapt resource value: 23
public static int AppCompatTheme_actionModePasteDrawable = 23;
// aapt resource value: 24
public static int AppCompatTheme_actionModePopupWindowStyle = 24;
// aapt resource value: 25
public static int AppCompatTheme_actionModeSelectAllDrawable = 25;
// aapt resource value: 26
public static int AppCompatTheme_actionModeShareDrawable = 26;
// aapt resource value: 27
public static int AppCompatTheme_actionModeSplitBackground = 27;
// aapt resource value: 28
public static int AppCompatTheme_actionModeStyle = 28;
// aapt resource value: 29
public static int AppCompatTheme_actionModeWebSearchDrawable = 29;
// aapt resource value: 30
public static int AppCompatTheme_actionOverflowButtonStyle = 30;
// aapt resource value: 31
public static int AppCompatTheme_actionOverflowMenuStyle = 31;
// aapt resource value: 32
public static int AppCompatTheme_activityChooserViewStyle = 32;
// aapt resource value: 33
public static int AppCompatTheme_alertDialogButtonGroupStyle = 33;
// aapt resource value: 34
public static int AppCompatTheme_alertDialogCenterButtons = 34;
// aapt resource value: 35
public static int AppCompatTheme_alertDialogStyle = 35;
// aapt resource value: 36
public static int AppCompatTheme_alertDialogTheme = 36;
// aapt resource value: 1
public static int AppCompatTheme_android_windowAnimationStyle = 1;
// aapt resource value: 0
public static int AppCompatTheme_android_windowIsFloating = 0;
// aapt resource value: 37
public static int AppCompatTheme_autoCompleteTextViewStyle = 37;
// aapt resource value: 38
public static int AppCompatTheme_borderlessButtonStyle = 38;
// aapt resource value: 39
public static int AppCompatTheme_buttonBarButtonStyle = 39;
// aapt resource value: 40
public static int AppCompatTheme_buttonBarNegativeButtonStyle = 40;
// aapt resource value: 41
public static int AppCompatTheme_buttonBarNeutralButtonStyle = 41;
// aapt resource value: 42
public static int AppCompatTheme_buttonBarPositiveButtonStyle = 42;
// aapt resource value: 43
public static int AppCompatTheme_buttonBarStyle = 43;
// aapt resource value: 44
public static int AppCompatTheme_buttonStyle = 44;
// aapt resource value: 45
public static int AppCompatTheme_buttonStyleSmall = 45;
// aapt resource value: 46
public static int AppCompatTheme_checkboxStyle = 46;
// aapt resource value: 47
public static int AppCompatTheme_checkedTextViewStyle = 47;
// aapt resource value: 48
public static int AppCompatTheme_colorAccent = 48;
// aapt resource value: 49
public static int AppCompatTheme_colorBackgroundFloating = 49;
// aapt resource value: 50
public static int AppCompatTheme_colorButtonNormal = 50;
// aapt resource value: 51
public static int AppCompatTheme_colorControlActivated = 51;
// aapt resource value: 52
public static int AppCompatTheme_colorControlHighlight = 52;
// aapt resource value: 53
public static int AppCompatTheme_colorControlNormal = 53;
// aapt resource value: 54
public static int AppCompatTheme_colorError = 54;
// aapt resource value: 55
public static int AppCompatTheme_colorPrimary = 55;
// aapt resource value: 56
public static int AppCompatTheme_colorPrimaryDark = 56;
// aapt resource value: 57
public static int AppCompatTheme_colorSwitchThumbNormal = 57;
// aapt resource value: 58
public static int AppCompatTheme_controlBackground = 58;
// aapt resource value: 59
public static int AppCompatTheme_dialogCornerRadius = 59;
// aapt resource value: 60
public static int AppCompatTheme_dialogPreferredPadding = 60;
// aapt resource value: 61
public static int AppCompatTheme_dialogTheme = 61;
// aapt resource value: 62
public static int AppCompatTheme_dividerHorizontal = 62;
// aapt resource value: 63
public static int AppCompatTheme_dividerVertical = 63;
// aapt resource value: 65
public static int AppCompatTheme_dropdownListPreferredItemHeight = 65;
// aapt resource value: 64
public static int AppCompatTheme_dropDownListViewStyle = 64;
// aapt resource value: 66
public static int AppCompatTheme_editTextBackground = 66;
// aapt resource value: 67
public static int AppCompatTheme_editTextColor = 67;
// aapt resource value: 68
public static int AppCompatTheme_editTextStyle = 68;
// aapt resource value: 69
public static int AppCompatTheme_homeAsUpIndicator = 69;
// aapt resource value: 70
public static int AppCompatTheme_imageButtonStyle = 70;
// aapt resource value: 71
public static int AppCompatTheme_listChoiceBackgroundIndicator = 71;
// aapt resource value: 72
public static int AppCompatTheme_listDividerAlertDialog = 72;
// aapt resource value: 73
public static int AppCompatTheme_listMenuViewStyle = 73;
// aapt resource value: 74
public static int AppCompatTheme_listPopupWindowStyle = 74;
// aapt resource value: 75
public static int AppCompatTheme_listPreferredItemHeight = 75;
// aapt resource value: 76
public static int AppCompatTheme_listPreferredItemHeightLarge = 76;
// aapt resource value: 77
public static int AppCompatTheme_listPreferredItemHeightSmall = 77;
// aapt resource value: 78
public static int AppCompatTheme_listPreferredItemPaddingLeft = 78;
// aapt resource value: 79
public static int AppCompatTheme_listPreferredItemPaddingRight = 79;
// aapt resource value: 80
public static int AppCompatTheme_panelBackground = 80;
// aapt resource value: 81
public static int AppCompatTheme_panelMenuListTheme = 81;
// aapt resource value: 82
public static int AppCompatTheme_panelMenuListWidth = 82;
// aapt resource value: 83
public static int AppCompatTheme_popupMenuStyle = 83;
// aapt resource value: 84
public static int AppCompatTheme_popupWindowStyle = 84;
// aapt resource value: 85
public static int AppCompatTheme_radioButtonStyle = 85;
// aapt resource value: 86
public static int AppCompatTheme_ratingBarStyle = 86;
// aapt resource value: 87
public static int AppCompatTheme_ratingBarStyleIndicator = 87;
// aapt resource value: 88
public static int AppCompatTheme_ratingBarStyleSmall = 88;
// aapt resource value: 89
public static int AppCompatTheme_searchViewStyle = 89;
// aapt resource value: 90
public static int AppCompatTheme_seekBarStyle = 90;
// aapt resource value: 91
public static int AppCompatTheme_selectableItemBackground = 91;
// aapt resource value: 92
public static int AppCompatTheme_selectableItemBackgroundBorderless = 92;
// aapt resource value: 93
public static int AppCompatTheme_spinnerDropDownItemStyle = 93;
// aapt resource value: 94
public static int AppCompatTheme_spinnerStyle = 94;
// aapt resource value: 95
public static int AppCompatTheme_switchStyle = 95;
// aapt resource value: 96
public static int AppCompatTheme_textAppearanceLargePopupMenu = 96;
// aapt resource value: 97
public static int AppCompatTheme_textAppearanceListItem = 97;
// aapt resource value: 98
public static int AppCompatTheme_textAppearanceListItemSecondary = 98;
// aapt resource value: 99
public static int AppCompatTheme_textAppearanceListItemSmall = 99;
// aapt resource value: 100
public static int AppCompatTheme_textAppearancePopupMenuHeader = 100;
// aapt resource value: 101
public static int AppCompatTheme_textAppearanceSearchResultSubtitle = 101;
// aapt resource value: 102
public static int AppCompatTheme_textAppearanceSearchResultTitle = 102;
// aapt resource value: 103
public static int AppCompatTheme_textAppearanceSmallPopupMenu = 103;
// aapt resource value: 104
public static int AppCompatTheme_textColorAlertDialogListItem = 104;
// aapt resource value: 105
public static int AppCompatTheme_textColorSearchUrl = 105;
// aapt resource value: 106
public static int AppCompatTheme_toolbarNavigationButtonStyle = 106;
// aapt resource value: 107
public static int AppCompatTheme_toolbarStyle = 107;
// aapt resource value: 108
public static int AppCompatTheme_tooltipForegroundColor = 108;
// aapt resource value: 109
public static int AppCompatTheme_tooltipFrameBackground = 109;
// aapt resource value: 110
public static int AppCompatTheme_viewInflaterClass = 110;
// aapt resource value: 111
public static int AppCompatTheme_windowActionBar = 111;
// aapt resource value: 112
public static int AppCompatTheme_windowActionBarOverlay = 112;
// aapt resource value: 113
public static int AppCompatTheme_windowActionModeOverlay = 113;
// aapt resource value: 114
public static int AppCompatTheme_windowFixedHeightMajor = 114;
// aapt resource value: 115
public static int AppCompatTheme_windowFixedHeightMinor = 115;
// aapt resource value: 116
public static int AppCompatTheme_windowFixedWidthMajor = 116;
// aapt resource value: 117
public static int AppCompatTheme_windowFixedWidthMinor = 117;
// aapt resource value: 118
public static int AppCompatTheme_windowMinWidthMajor = 118;
// aapt resource value: 119
public static int AppCompatTheme_windowMinWidthMinor = 119;
// aapt resource value: 120
public static int AppCompatTheme_windowNoTitle = 120;
// aapt resource value: { 0x7F020026 }
public static int[] ButtonBarLayout = new int[] {
2130837542};
// aapt resource value: 0
public static int ButtonBarLayout_allowStacking = 0;
// aapt resource value: { 0x10101A5,0x101031F,0x7F020027 }
public static int[] ColorStateListItem = new int[] {
16843173,
16843551,
2130837543};
// aapt resource value: 2
public static int ColorStateListItem_alpha = 2;
// aapt resource value: 1
public static int ColorStateListItem_android_alpha = 1;
// aapt resource value: 0
public static int ColorStateListItem_android_color = 0;
// aapt resource value: { 0x1010107,0x7F020042,0x7F020043 }
public static int[] CompoundButton = new int[] {
16843015,
2130837570,
2130837571};
// aapt resource value: 0
public static int CompoundButton_android_button = 0;
// aapt resource value: 1
public static int CompoundButton_buttonTint = 1;
// aapt resource value: 2
public static int CompoundButton_buttonTintMode = 2;
// aapt resource value: { 0x7F02008D,0x7F0200D0 }
public static int[] CoordinatorLayout = new int[] {
2130837645,
2130837712};
// aapt resource value: 0
public static int CoordinatorLayout_keylines = 0;
// aapt resource value: { 0x10100B3,0x7F020090,0x7F020091,0x7F020092,0x7F020093,0x7F020094,0x7F020095 }
public static int[] CoordinatorLayout_Layout = new int[] {
16842931,
2130837648,
2130837649,
2130837650,
2130837651,
2130837652,
2130837653};
// aapt resource value: 0
public static int CoordinatorLayout_Layout_android_layout_gravity = 0;
// aapt resource value: 1
public static int CoordinatorLayout_Layout_layout_anchor = 1;
// aapt resource value: 2
public static int CoordinatorLayout_Layout_layout_anchorGravity = 2;
// aapt resource value: 3
public static int CoordinatorLayout_Layout_layout_behavior = 3;
// aapt resource value: 4
public static int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4;
// aapt resource value: 5
public static int CoordinatorLayout_Layout_layout_insetEdge = 5;
// aapt resource value: 6
public static int CoordinatorLayout_Layout_layout_keyline = 6;
// aapt resource value: 1
public static int CoordinatorLayout_statusBarBackground = 1;
// aapt resource value: { 0x7F020029,0x7F02002A,0x7F020036,0x7F02004A,0x7F020069,0x7F02007E,0x7F0200CA,0x7F0200E8 }
public static int[] DrawerArrowToggle = new int[] {
2130837545,
2130837546,
2130837558,
2130837578,
2130837609,
2130837630,
2130837706,
2130837736};
// aapt resource value: 0
public static int DrawerArrowToggle_arrowHeadLength = 0;
// aapt resource value: 1
public static int DrawerArrowToggle_arrowShaftLength = 1;
// aapt resource value: 2
public static int DrawerArrowToggle_barLength = 2;
// aapt resource value: 3
public static int DrawerArrowToggle_color = 3;
// aapt resource value: 4
public static int DrawerArrowToggle_drawableSize = 4;
// aapt resource value: 5
public static int DrawerArrowToggle_gapBetweenBars = 5;
// aapt resource value: 6
public static int DrawerArrowToggle_spinBars = 6;
// aapt resource value: 7
public static int DrawerArrowToggle_thickness = 7;
// aapt resource value: { 0x7F020075,0x7F020076,0x7F020077,0x7F020078,0x7F020079,0x7F02007A }
public static int[] FontFamily = new int[] {
2130837621,
2130837622,
2130837623,
2130837624,
2130837625,
2130837626};
// aapt resource value: { 0x1010532,0x1010533,0x101053F,0x101056F,0x1010570,0x7F020073,0x7F02007B,0x7F02007C,0x7F02007D,0x7F020103 }
public static int[] FontFamilyFont = new int[] {
16844082,
16844083,
16844095,
16844143,
16844144,
2130837619,
2130837627,
2130837628,
2130837629,
2130837763};
// aapt resource value: 0
public static int FontFamilyFont_android_font = 0;
// aapt resource value: 2
public static int FontFamilyFont_android_fontStyle = 2;
// aapt resource value: 4
public static int FontFamilyFont_android_fontVariationSettings = 4;
// aapt resource value: 1
public static int FontFamilyFont_android_fontWeight = 1;
// aapt resource value: 3
public static int FontFamilyFont_android_ttcIndex = 3;
// aapt resource value: 5
public static int FontFamilyFont_font = 5;
// aapt resource value: 6
public static int FontFamilyFont_fontStyle = 6;
// aapt resource value: 7
public static int FontFamilyFont_fontVariationSettings = 7;
// aapt resource value: 8
public static int FontFamilyFont_fontWeight = 8;
// aapt resource value: 9
public static int FontFamilyFont_ttcIndex = 9;
// aapt resource value: 0
public static int FontFamily_fontProviderAuthority = 0;
// aapt resource value: 1
public static int FontFamily_fontProviderCerts = 1;
// aapt resource value: 2
public static int FontFamily_fontProviderFetchStrategy = 2;
// aapt resource value: 3
public static int FontFamily_fontProviderFetchTimeout = 3;
// aapt resource value: 4
public static int FontFamily_fontProviderPackage = 4;
// aapt resource value: 5
public static int FontFamily_fontProviderQuery = 5;
// aapt resource value: { 0x101019D,0x101019E,0x10101A1,0x10101A2,0x10101A3,0x10101A4,0x1010201,0x101020B,0x1010510,0x1010511,0x1010512,0x1010513 }
public static int[] GradientColor = new int[] {
16843165,
16843166,
16843169,
16843170,
16843171,
16843172,
16843265,
16843275,
16844048,
16844049,
16844050,
16844051};
// aapt resource value: { 0x10101A5,0x1010514 }
public static int[] GradientColorItem = new int[] {
16843173,
16844052};
// aapt resource value: 0
public static int GradientColorItem_android_color = 0;
// aapt resource value: 1
public static int GradientColorItem_android_offset = 1;
// aapt resource value: 7
public static int GradientColor_android_centerColor = 7;
// aapt resource value: 3
public static int GradientColor_android_centerX = 3;
// aapt resource value: 4
public static int GradientColor_android_centerY = 4;
// aapt resource value: 1
public static int GradientColor_android_endColor = 1;
// aapt resource value: 10
public static int GradientColor_android_endX = 10;
// aapt resource value: 11
public static int GradientColor_android_endY = 11;
// aapt resource value: 5
public static int GradientColor_android_gradientRadius = 5;
// aapt resource value: 0
public static int GradientColor_android_startColor = 0;
// aapt resource value: 8
public static int GradientColor_android_startX = 8;
// aapt resource value: 9
public static int GradientColor_android_startY = 9;
// aapt resource value: 6
public static int GradientColor_android_tileMode = 6;
// aapt resource value: 2
public static int GradientColor_android_type = 2;
// aapt resource value: { 0x10100AF,0x10100C4,0x1010126,0x1010127,0x1010128,0x7F020065,0x7F020067,0x7F0200A5,0x7F0200C6 }
public static int[] LinearLayoutCompat = new int[] {
16842927,
16842948,
16843046,
16843047,
16843048,
2130837605,
2130837607,
2130837669,
2130837702};
// aapt resource value: 2
public static int LinearLayoutCompat_android_baselineAligned = 2;
// aapt resource value: 3
public static int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
// aapt resource value: 0
public static int LinearLayoutCompat_android_gravity = 0;
// aapt resource value: 1
public static int LinearLayoutCompat_android_orientation = 1;
// aapt resource value: 4
public static int LinearLayoutCompat_android_weightSum = 4;
// aapt resource value: 5
public static int LinearLayoutCompat_divider = 5;
// aapt resource value: 6
public static int LinearLayoutCompat_dividerPadding = 6;
// aapt resource value: { 0x10100B3,0x10100F4,0x10100F5,0x1010181 }
public static int[] LinearLayoutCompat_Layout = new int[] {
16842931,
16842996,
16842997,
16843137};
// aapt resource value: 0
public static int LinearLayoutCompat_Layout_android_layout_gravity = 0;
// aapt resource value: 2
public static int LinearLayoutCompat_Layout_android_layout_height = 2;
// aapt resource value: 3
public static int LinearLayoutCompat_Layout_android_layout_weight = 3;
// aapt resource value: 1
public static int LinearLayoutCompat_Layout_android_layout_width = 1;
// aapt resource value: 7
public static int LinearLayoutCompat_measureWithLargestChild = 7;
// aapt resource value: 8
public static int LinearLayoutCompat_showDividers = 8;
// aapt resource value: { 0x10102AC,0x10102AD }
public static int[] ListPopupWindow = new int[] {
16843436,
16843437};
// aapt resource value: 0
public static int ListPopupWindow_android_dropDownHorizontalOffset = 0;
// aapt resource value: 1
public static int ListPopupWindow_android_dropDownVerticalOffset = 1;
// aapt resource value: { 0x101000E,0x10100D0,0x1010194,0x10101DE,0x10101DF,0x10101E0 }
public static int[] MenuGroup = new int[] {
16842766,
16842960,
16843156,
16843230,
16843231,
16843232};
// aapt resource value: 5
public static int MenuGroup_android_checkableBehavior = 5;
// aapt resource value: 0
public static int MenuGroup_android_enabled = 0;
// aapt resource value: 1
public static int MenuGroup_android_id = 1;
// aapt resource value: 3
public static int MenuGroup_android_menuCategory = 3;
// aapt resource value: 4
public static int MenuGroup_android_orderInCategory = 4;
// aapt resource value: 2
public static int MenuGroup_android_visible = 2;
// aapt resource value: { 0x1010002,0x101000E,0x10100D0,0x1010106,0x1010194,0x10101DE,0x10101DF,0x10101E1,0x10101E2,0x10101E3,0x10101E4,0x10101E5,0x101026F,0x7F02000D,0x7F02001F,0x7F020020,0x7F020028,0x7F020056,0x7F020085,0x7F020086,0x7F0200AA,0x7F0200C5,0x7F0200FF }
public static int[] MenuItem = new int[] {
16842754,
16842766,
16842960,
16843014,
16843156,
16843230,
16843231,
16843233,
16843234,
16843235,
16843236,
16843237,
16843375,
2130837517,
2130837535,
2130837536,
2130837544,
2130837590,
2130837637,
2130837638,
2130837674,
2130837701,
2130837759};
// aapt resource value: 13
public static int MenuItem_actionLayout = 13;
// aapt resource value: 14
public static int MenuItem_actionProviderClass = 14;
// aapt resource value: 15
public static int MenuItem_actionViewClass = 15;
// aapt resource value: 16
public static int MenuItem_alphabeticModifiers = 16;
// aapt resource value: 9
public static int MenuItem_android_alphabeticShortcut = 9;
// aapt resource value: 11
public static int MenuItem_android_checkable = 11;
// aapt resource value: 3
public static int MenuItem_android_checked = 3;
// aapt resource value: 1
public static int MenuItem_android_enabled = 1;
// aapt resource value: 0
public static int MenuItem_android_icon = 0;
// aapt resource value: 2
public static int MenuItem_android_id = 2;
// aapt resource value: 5
public static int MenuItem_android_menuCategory = 5;
// aapt resource value: 10
public static int MenuItem_android_numericShortcut = 10;
// aapt resource value: 12
public static int MenuItem_android_onClick = 12;
// aapt resource value: 6
public static int MenuItem_android_orderInCategory = 6;
// aapt resource value: 7
public static int MenuItem_android_title = 7;
// aapt resource value: 8
public static int MenuItem_android_titleCondensed = 8;
// aapt resource value: 4
public static int MenuItem_android_visible = 4;
// aapt resource value: 17
public static int MenuItem_contentDescription = 17;
// aapt resource value: 18
public static int MenuItem_iconTint = 18;
// aapt resource value: 19
public static int MenuItem_iconTintMode = 19;
// aapt resource value: 20
public static int MenuItem_numericModifiers = 20;
// aapt resource value: 21
public static int MenuItem_showAsAction = 21;
// aapt resource value: 22
public static int MenuItem_tooltipText = 22;
// aapt resource value: { 0x10100AE,0x101012C,0x101012D,0x101012E,0x101012F,0x1010130,0x1010131,0x7F0200B6,0x7F0200D1 }
public static int[] MenuView = new int[] {
16842926,
16843052,
16843053,
16843054,
16843055,
16843056,
16843057,
2130837686,
2130837713};
// aapt resource value: 4
public static int MenuView_android_headerBackground = 4;
// aapt resource value: 2
public static int MenuView_android_horizontalDivider = 2;
// aapt resource value: 5
public static int MenuView_android_itemBackground = 5;
// aapt resource value: 6
public static int MenuView_android_itemIconDisabledAlpha = 6;
// aapt resource value: 1
public static int MenuView_android_itemTextAppearance = 1;
// aapt resource value: 3
public static int MenuView_android_verticalDivider = 3;
// aapt resource value: 0
public static int MenuView_android_windowAnimationStyle = 0;
// aapt resource value: 7
public static int MenuView_preserveIconSpacing = 7;
// aapt resource value: 8
public static int MenuView_subMenuArrow = 8;
// aapt resource value: { 0x1010176,0x10102C9,0x7F0200AB }
public static int[] PopupWindow = new int[] {
16843126,
16843465,
2130837675};
// aapt resource value: { 0x7F0200CF }
public static int[] PopupWindowBackgroundState = new int[] {
2130837711};
// aapt resource value: 0
public static int PopupWindowBackgroundState_state_above_anchor = 0;
// aapt resource value: 1
public static int PopupWindow_android_popupAnimationStyle = 1;
// aapt resource value: 0
public static int PopupWindow_android_popupBackground = 0;
// aapt resource value: 2
public static int PopupWindow_overlapAnchor = 2;
// aapt resource value: { 0x7F0200AC,0x7F0200AF }
public static int[] RecycleListView = new int[] {
2130837676,
2130837679};
// aapt resource value: 0
public static int RecycleListView_paddingBottomNoButtons = 0;
// aapt resource value: 1
public static int RecycleListView_paddingTopNoTitle = 1;
// aapt resource value: { 0x10100DA,0x101011F,0x1010220,0x1010264,0x7F020046,0x7F020055,0x7F020060,0x7F02007F,0x7F020087,0x7F02008F,0x7F0200B9,0x7F0200BA,0x7F0200BF,0x7F0200C0,0x7F0200D2,0x7F0200D7,0x7F020105 }
public static int[] SearchView = new int[] {
16842970,
16843039,
16843296,
16843364,
2130837574,
2130837589,
2130837600,
2130837631,
2130837639,
2130837647,
2130837689,
2130837690,
2130837695,
2130837696,
2130837714,
2130837719,
2130837765};
// aapt resource value: 0
public static int SearchView_android_focusable = 0;
// aapt resource value: 3
public static int SearchView_android_imeOptions = 3;
// aapt resource value: 2
public static int SearchView_android_inputType = 2;
// aapt resource value: 1
public static int SearchView_android_maxWidth = 1;
// aapt resource value: 4
public static int SearchView_closeIcon = 4;
// aapt resource value: 5
public static int SearchView_commitIcon = 5;
// aapt resource value: 6
public static int SearchView_defaultQueryHint = 6;
// aapt resource value: 7
public static int SearchView_goIcon = 7;
// aapt resource value: 8
public static int SearchView_iconifiedByDefault = 8;
// aapt resource value: 9
public static int SearchView_layout = 9;
// aapt resource value: 10
public static int SearchView_queryBackground = 10;
// aapt resource value: 11
public static int SearchView_queryHint = 11;
// aapt resource value: 12
public static int SearchView_searchHintIcon = 12;
// aapt resource value: 13
public static int SearchView_searchIcon = 13;
// aapt resource value: 14
public static int SearchView_submitBackground = 14;
// aapt resource value: 15
public static int SearchView_suggestionRowLayout = 15;
// aapt resource value: 16
public static int SearchView_voiceIcon = 16;
// aapt resource value: { 0x10100B2,0x1010176,0x101017B,0x1010262,0x7F0200B4 }
public static int[] Spinner = new int[] {
16842930,
16843126,
16843131,
16843362,
2130837684};
// aapt resource value: 3
public static int Spinner_android_dropDownWidth = 3;
// aapt resource value: 0
public static int Spinner_android_entries = 0;
// aapt resource value: 1
public static int Spinner_android_popupBackground = 1;
// aapt resource value: 2
public static int Spinner_android_prompt = 2;
// aapt resource value: 4
public static int Spinner_popupTheme = 4;
// aapt resource value: { 0x101011C,0x1010194,0x1010195,0x1010196,0x101030C,0x101030D }
public static int[] StateListDrawable = new int[] {
16843036,
16843156,
16843157,
16843158,
16843532,
16843533};
// aapt resource value: { 0x1010199 }
public static int[] StateListDrawableItem = new int[] {
16843161};
// aapt resource value: 0
public static int StateListDrawableItem_android_drawable = 0;
// aapt resource value: 3
public static int StateListDrawable_android_constantSize = 3;
// aapt resource value: 0
public static int StateListDrawable_android_dither = 0;
// aapt resource value: 4
public static int StateListDrawable_android_enterFadeDuration = 4;
// aapt resource value: 5
public static int StateListDrawable_android_exitFadeDuration = 5;
// aapt resource value: 2
public static int StateListDrawable_android_variablePadding = 2;
// aapt resource value: 1
public static int StateListDrawable_android_visible = 1;
// aapt resource value: { 0x1010124,0x1010125,0x1010142,0x7F0200C7,0x7F0200CD,0x7F0200D8,0x7F0200D9,0x7F0200DB,0x7F0200E9,0x7F0200EA,0x7F0200EB,0x7F020100,0x7F020101,0x7F020102 }
public static int[] SwitchCompat = new int[] {
16843044,
16843045,
16843074,
2130837703,
2130837709,
2130837720,
2130837721,
2130837723,
2130837737,
2130837738,
2130837739,
2130837760,
2130837761,
2130837762};
// aapt resource value: 1
public static int SwitchCompat_android_textOff = 1;
// aapt resource value: 0
public static int SwitchCompat_android_textOn = 0;
// aapt resource value: 2
public static int SwitchCompat_android_thumb = 2;
// aapt resource value: 3
public static int SwitchCompat_showText = 3;
// aapt resource value: 4
public static int SwitchCompat_splitTrack = 4;
// aapt resource value: 5
public static int SwitchCompat_switchMinWidth = 5;
// aapt resource value: 6
public static int SwitchCompat_switchPadding = 6;
// aapt resource value: 7
public static int SwitchCompat_switchTextAppearance = 7;
// aapt resource value: 8
public static int SwitchCompat_thumbTextPadding = 8;
// aapt resource value: 9
public static int SwitchCompat_thumbTint = 9;
// aapt resource value: 10
public static int SwitchCompat_thumbTintMode = 10;
// aapt resource value: 11
public static int SwitchCompat_track = 11;
// aapt resource value: 12
public static int SwitchCompat_trackTint = 12;
// aapt resource value: 13
public static int SwitchCompat_trackTintMode = 13;
// aapt resource value: { 0x1010095,0x1010096,0x1010097,0x1010098,0x101009A,0x101009B,0x1010161,0x1010162,0x1010163,0x1010164,0x10103AC,0x7F020074,0x7F0200DC }
public static int[] TextAppearance = new int[] {
16842901,
16842902,
16842903,
16842904,
16842906,
16842907,
16843105,
16843106,
16843107,
16843108,
16843692,
2130837620,
2130837724};
// aapt resource value: 10
public static int TextAppearance_android_fontFamily = 10;
// aapt resource value: 6
public static int TextAppearance_android_shadowColor = 6;
// aapt resource value: 7
public static int TextAppearance_android_shadowDx = 7;
// aapt resource value: 8
public static int TextAppearance_android_shadowDy = 8;
// aapt resource value: 9
public static int TextAppearance_android_shadowRadius = 9;
// aapt resource value: 3
public static int TextAppearance_android_textColor = 3;
// aapt resource value: 4
public static int TextAppearance_android_textColorHint = 4;
// aapt resource value: 5
public static int TextAppearance_android_textColorLink = 5;
// aapt resource value: 0
public static int TextAppearance_android_textSize = 0;
// aapt resource value: 2
public static int TextAppearance_android_textStyle = 2;
// aapt resource value: 1
public static int TextAppearance_android_typeface = 1;
// aapt resource value: 11
public static int TextAppearance_fontFamily = 11;
// aapt resource value: 12
public static int TextAppearance_textAllCaps = 12;
// aapt resource value: { 0x10100AF,0x1010140,0x7F02003D,0x7F020048,0x7F020049,0x7F020057,0x7F020058,0x7F020059,0x7F02005A,0x7F02005B,0x7F02005C,0x7F0200A2,0x7F0200A3,0x7F0200A4,0x7F0200A7,0x7F0200A8,0x7F0200B4,0x7F0200D3,0x7F0200D4,0x7F0200D5,0x7F0200F1,0x7F0200F2,0x7F0200F3,0x7F0200F4,0x7F0200F5,0x7F0200F6,0x7F0200F7,0x7F0200F8,0x7F0200F9 }
public static int[] Toolbar = new int[] {
16842927,
16843072,
2130837565,
2130837576,
2130837577,
2130837591,
2130837592,
2130837593,
2130837594,
2130837595,
2130837596,
2130837666,
2130837667,
2130837668,
2130837671,
2130837672,
2130837684,
2130837715,
2130837716,
2130837717,
2130837745,
2130837746,
2130837747,
2130837748,
2130837749,
2130837750,
2130837751,
2130837752,
2130837753};
// aapt resource value: 0
public static int Toolbar_android_gravity = 0;
// aapt resource value: 1
public static int Toolbar_android_minHeight = 1;
// aapt resource value: 2
public static int Toolbar_buttonGravity = 2;
// aapt resource value: 3
public static int Toolbar_collapseContentDescription = 3;
// aapt resource value: 4
public static int Toolbar_collapseIcon = 4;
// aapt resource value: 5
public static int Toolbar_contentInsetEnd = 5;
// aapt resource value: 6
public static int Toolbar_contentInsetEndWithActions = 6;
// aapt resource value: 7
public static int Toolbar_contentInsetLeft = 7;
// aapt resource value: 8
public static int Toolbar_contentInsetRight = 8;
// aapt resource value: 9
public static int Toolbar_contentInsetStart = 9;
// aapt resource value: 10
public static int Toolbar_contentInsetStartWithNavigation = 10;
// aapt resource value: 11
public static int Toolbar_logo = 11;
// aapt resource value: 12
public static int Toolbar_logoDescription = 12;
// aapt resource value: 13
public static int Toolbar_maxButtonHeight = 13;
// aapt resource value: 14
public static int Toolbar_navigationContentDescription = 14;
// aapt resource value: 15
public static int Toolbar_navigationIcon = 15;
// aapt resource value: 16
public static int Toolbar_popupTheme = 16;
// aapt resource value: 17
public static int Toolbar_subtitle = 17;
// aapt resource value: 18
public static int Toolbar_subtitleTextAppearance = 18;
// aapt resource value: 19
public static int Toolbar_subtitleTextColor = 19;
// aapt resource value: 20
public static int Toolbar_title = 20;
// aapt resource value: 21
public static int Toolbar_titleMargin = 21;
// aapt resource value: 22
public static int Toolbar_titleMarginBottom = 22;
// aapt resource value: 23
public static int Toolbar_titleMarginEnd = 23;
// aapt resource value: 26
public static int Toolbar_titleMargins = 26;
// aapt resource value: 24
public static int Toolbar_titleMarginStart = 24;
// aapt resource value: 25
public static int Toolbar_titleMarginTop = 25;
// aapt resource value: 27
public static int Toolbar_titleTextAppearance = 27;
// aapt resource value: 28
public static int Toolbar_titleTextColor = 28;
// aapt resource value: { 0x1010000,0x10100DA,0x7F0200AD,0x7F0200AE,0x7F0200E7 }
public static int[] View = new int[] {
16842752,
16842970,
2130837677,
2130837678,
2130837735};
// aapt resource value: { 0x10100D4,0x7F020034,0x7F020035 }
public static int[] ViewBackgroundHelper = new int[] {
16842964,
2130837556,
2130837557};
// aapt resource value: 0
public static int ViewBackgroundHelper_android_background = 0;
// aapt resource value: 1
public static int ViewBackgroundHelper_backgroundTint = 1;
// aapt resource value: 2
public static int ViewBackgroundHelper_backgroundTintMode = 2;
// aapt resource value: { 0x10100D0,0x10100F2,0x10100F3 }
public static int[] ViewStubCompat = new int[] {
16842960,
16842994,
16842995};
// aapt resource value: 0
public static int ViewStubCompat_android_id = 0;
// aapt resource value: 2
public static int ViewStubCompat_android_inflatedId = 2;
// aapt resource value: 1
public static int ViewStubCompat_android_layout = 1;
// aapt resource value: 1
public static int View_android_focusable = 1;
// aapt resource value: 0
public static int View_android_theme = 0;
// aapt resource value: 2
public static int View_paddingEnd = 2;
// aapt resource value: 3
public static int View_paddingStart = 3;
// aapt resource value: 4
public static int View_theme = 4;
static Styleable()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Styleable()
{
}
}
}
}
#pragma warning restore 1591
| 32.659841 | 1,359 | 0.73596 | [
"MIT"
] | capnmidnight/Juniper | src/Juniper.Veldrid.Android/Resources/Resource.designer.cs | 177,049 | C# |
// LICENCE: The Code Project Open License (CPOL) 1.02
// LICENCE TO DOWNLOAD: http://www.codeproject.com/info/CPOL.zip
// AUTHOR(S): SACHA BARBER, IAN P JOHNSON
// WHERE TO FIND ORIGINAL: http://www.codeproject.com/Articles/651464/Expression-API-Cookbook
namespace RabbitDB.ChangeTracker
{
/// <summary>
/// Defines different types of component trackers
/// </summary>
internal enum ComponentTrackerType
{
/// <summary>
/// A node tracker monitors one property on an object
/// </summary>
Node,
/// <summary>
/// List tracker monitors a list for changes
/// </summary>
List,
/// <summary>
/// Leaf tracker will monitor all properties on an object
/// </summary>
Leaf
}
} | 24.310345 | 93 | 0.683688 | [
"Apache-2.0"
] | PowerMogli/Rabbit.Db | src/RabbitDB.Entity/ChangeTracker/ComponentTrackerType.cs | 707 | C# |
/* Copyright (C) 2008-2015 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov
*
* 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.Runtime.InteropServices;
namespace Alphaleonis.Win32.Security
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal struct TokenPrivileges
{
internal uint PrivilegeCount;
internal Luid Luid;
internal uint Attributes;
}
}
| 43.529412 | 82 | 0.742568 | [
"MIT"
] | OpenDataSpace/AlphaFS | AlphaFS/Security/Structures/TokenPrivileges.cs | 1,480 | C# |
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace AvePoint.Migration.Api.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
public partial class BoxPlanSettingsModel
{
/// <summary>
/// Initializes a new instance of the BoxPlanSettingsModel class.
/// </summary>
public BoxPlanSettingsModel()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the BoxPlanSettingsModel class.
/// </summary>
/// <param name="nameLabel">Large migration projects are often phased
/// over several waves, each containing multiple plans.
/// To easily generate migration reports for each project or wave, we
/// recommend the Example name format Business Unit_Wave_Plan</param>
/// <param name="migrateVersions">whether to migrate versions of source
/// file in Box</param>
/// <param name="policyId">the id of migration policy</param>
/// <param name="databaseId">the id of migration database</param>
/// <param name="schedule">the schedule for the migration</param>
public BoxPlanSettingsModel(PlanNameLabel nameLabel, bool? migrateVersions = default(bool?), string policyId = default(string), string databaseId = default(string), ScheduleModel schedule = default(ScheduleModel))
{
MigrateVersions = migrateVersions;
NameLabel = nameLabel;
PolicyId = policyId;
DatabaseId = databaseId;
Schedule = schedule;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets whether to migrate versions of source file in Box
/// </summary>
[JsonProperty(PropertyName = "migrateVersions")]
public bool? MigrateVersions { get; set; }
/// <summary>
/// Gets or sets large migration projects are often phased over several
/// waves, each containing multiple plans.
/// To easily generate migration reports for each project or wave, we
/// recommend the Example name format Business Unit_Wave_Plan
/// </summary>
[JsonProperty(PropertyName = "nameLabel")]
public PlanNameLabel NameLabel { get; set; }
/// <summary>
/// Gets or sets the id of migration policy
/// </summary>
[JsonProperty(PropertyName = "policyId")]
public string PolicyId { get; set; }
/// <summary>
/// Gets or sets the id of migration database
/// </summary>
[JsonProperty(PropertyName = "databaseId")]
public string DatabaseId { get; set; }
/// <summary>
/// Gets or sets the schedule for the migration
/// </summary>
[JsonProperty(PropertyName = "schedule")]
public ScheduleModel Schedule { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (NameLabel == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "NameLabel");
}
if (NameLabel != null)
{
NameLabel.Validate();
}
if (Schedule != null)
{
Schedule.Validate();
}
}
}
}
| 35.896226 | 221 | 0.588436 | [
"MIT"
] | AvePoint/FLY-Migration | WebAPI/CSharp/FLY 4.1/FLY/Models/BoxPlanSettingsModel.cs | 3,805 | C# |
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Utils;
using osu.Game.Graphics;
using osu.Game.Rulesets.Objects.Drawables;
using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.Taiko.Skinning.Default;
using osu.Game.Skinning;
using osuTK;
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{
public class DrawableDrumRoll : DrawableTaikoStrongableHitObject<DrumRoll, DrumRoll.StrongNestedHit>
{
/// <summary>
/// Number of rolling hits required to reach the dark/final colour.
/// </summary>
private const int rolling_hits_for_engaged_colour = 5;
/// <summary>
/// Rolling number of tick hits. This increases for hits and decreases for misses.
/// </summary>
private int rollingHits;
private Container tickContainer;
private Color4 colourIdle;
private Color4 colourEngaged;
public DrawableDrumRoll(DrumRoll drumRoll)
: base(drumRoll)
{
RelativeSizeAxes = Axes.Y;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
colourIdle = colours.YellowDark;
colourEngaged = colours.YellowDarker;
Content.Add(tickContainer = new Container
{
RelativeSizeAxes = Axes.Both,
Depth = float.MinValue
});
}
protected override void LoadComplete()
{
base.LoadComplete();
OnNewResult += onNewResult;
}
protected override void RecreatePieces()
{
base.RecreatePieces();
updateColour();
}
protected override void AddNestedHitObject(DrawableHitObject hitObject)
{
base.AddNestedHitObject(hitObject);
switch (hitObject)
{
case DrawableDrumRollTick tick:
tickContainer.Add(tick);
break;
}
}
protected override void ClearNestedHitObjects()
{
base.ClearNestedHitObjects();
tickContainer.Clear();
}
protected override DrawableHitObject CreateNestedHitObject(HitObject hitObject)
{
switch (hitObject)
{
case DrumRollTick tick:
return new DrawableDrumRollTick(tick);
}
return base.CreateNestedHitObject(hitObject);
}
protected override SkinnableDrawable CreateMainPiece() => new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.DrumRollBody),
_ => new ElongatedCirclePiece());
public override bool OnPressed(TaikoAction action) => false;
private void onNewResult(DrawableHitObject obj, JudgementResult result)
{
if (!(obj is DrawableDrumRollTick))
return;
if (result.IsHit)
rollingHits++;
else
rollingHits--;
rollingHits = Math.Clamp(rollingHits, 0, rolling_hits_for_engaged_colour);
updateColour();
}
protected override void CheckForResult(bool userTriggered, double timeOffset)
{
if (userTriggered)
return;
if (timeOffset < 0)
return;
int countHit = NestedHitObjects.Count(o => o.IsHit);
if (countHit >= HitObject.RequiredGoodHits)
{
ApplyResult(r => r.Type = countHit >= HitObject.RequiredGreatHits ? HitResult.Great : HitResult.Ok);
}
else
ApplyResult(r => r.Type = r.Judgement.MinResult);
}
protected override void UpdateHitStateTransforms(ArmedState state)
{
switch (state)
{
case ArmedState.Hit:
case ArmedState.Miss:
this.FadeOut(100);
break;
}
}
protected override void Update()
{
base.Update();
OriginPosition = new Vector2(DrawHeight);
Content.X = DrawHeight / 2;
}
protected override DrawableStrongNestedHit CreateStrongNestedHit(DrumRoll.StrongNestedHit hitObject) => new StrongNestedHit(hitObject, this);
private void updateColour()
{
Color4 newColour = Interpolation.ValueAt((float)rollingHits / rolling_hits_for_engaged_colour, colourIdle, colourEngaged, 0, 1);
(MainPiece.Drawable as IHasAccentColour)?.FadeAccent(newColour, 100);
}
private class StrongNestedHit : DrawableStrongNestedHit
{
public StrongNestedHit(DrumRoll.StrongNestedHit nestedHit, DrawableDrumRoll drumRoll)
: base(nestedHit, drumRoll)
{
}
protected override void CheckForResult(bool userTriggered, double timeOffset)
{
if (!MainObject.Judged)
return;
ApplyResult(r => r.Type = MainObject.IsHit ? r.Judgement.MaxResult : r.Judgement.MinResult);
}
public override bool OnPressed(TaikoAction action) => false;
}
}
}
| 31.396739 | 150 | 0.574 | [
"MIT"
] | hornyyy/Osu-Toy | osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableDrumRoll.cs | 5,779 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace AE_RemapExceed
{
public partial class OKDialog : Form
{
public OKDialog()
{
InitializeComponent();
}
public int Interval
{
get { return timer1.Interval; }
set { timer1.Interval = value; }
}
public void SetPos(int x, int y)
{
this.Left = x;
this.Top = y;
}
public void execute(int tm,string cmt)
{
label1.Text = cmt;
timer1.Interval = tm;
timer1.Enabled = true;
this.ShowDialog();
}
private void timer1_Tick(object sender, EventArgs e)
{
this.Close();
}
private void OKDialog_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Rectangle rct = new Rectangle(0, 0, this.Width-1, this.Height-1);
Pen p = new Pen(Color.Black, 1);
try
{
g.DrawRectangle(p, rct);
}
finally
{
p.Dispose();
}
}
private void OKDialog_Click(object sender, EventArgs e)
{
this.Close();
}
private void OKDialog_KeyDown(object sender, KeyEventArgs e)
{
this.Close();
}
}
}
| 16.676056 | 68 | 0.654561 | [
"MIT"
] | bryful/AE_Remap_Drei | sample/AE_RemapExceed/AE_RemapExceed/Dialog/OKDialog.cs | 1,186 | C# |
namespace In.ProjectEKA.HipService.DataFlow
{
using HipLibrary.Patient;
using Task = System.Threading.Tasks.Task;
public class DataFlowMessageHandler
{
private readonly ICollect collect;
private readonly DataFlowClient dataFlowClient;
private readonly DataEntryFactory dataEntryFactory;
public DataFlowMessageHandler(
ICollect collect,
DataFlowClient dataFlowClient,
DataEntryFactory dataEntryFactory)
{
this.collect = collect;
this.dataFlowClient = dataFlowClient;
this.dataEntryFactory = dataEntryFactory;
}
public async Task HandleDataFlowMessage(HipLibrary.Patient.Model.DataRequest dataRequest)
{
var sentKeyMaterial = dataRequest.KeyMaterial;
var data = await collect.CollectData(dataRequest).ConfigureAwait(false);
var encryptedEntries = data.FlatMap(entries =>
dataEntryFactory.Process(entries, sentKeyMaterial, dataRequest.TransactionId));
encryptedEntries.MatchSome(async entries =>
await dataFlowClient.SendDataToHiu(dataRequest,
entries.Entries,
entries.KeyMaterial).ConfigureAwait(false));
}
}
} | 38.088235 | 97 | 0.658687 | [
"MIT"
] | Ziyuan-TW/hip-service | src/In.ProjectEKA.HipService/DataFlow/DataFlowMessageHandler.cs | 1,295 | 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 OptimizeOfficeDoc.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OptimizeOfficeDoc.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
| 38.763889 | 183 | 0.604801 | [
"MIT"
] | jhilgeman/OptimizeOfficeDoc | OptimizeOfficeDoc/Properties/Resources.Designer.cs | 2,793 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
using Microsoft.AzureStack.Management.Update.Admin;
using Models = Microsoft.AzureStack.Management.Update.Admin.Models;
using System.Linq;
using Xunit;
namespace Update.Tests
{
public class Updates : UpdateTestBase
{
void ValidateUpdate(Models.Update update) {
Assert.True(ValidResource(update));
Assert.NotNull(update.DateAvailable);
Assert.NotNull(update.Description);
Assert.NotNull(update.InstalledDate);
Assert.NotNull(update.KbLink);
Assert.NotNull(update.MinVersionRequired);
Assert.NotNull(update.PackagePath);
Assert.NotNull(update.PackageSizeInMb);
Assert.NotNull(update.PackageType);
Assert.NotNull(update.Publisher);
Assert.NotNull(update.State);
Assert.NotNull(update.UpdateName);
Assert.NotNull(update.UpdateOemFile);
Assert.NotNull(update.Version);
}
void AssertAreSame(Models.Update expected, Models.Update found) {
Assert.True(ResourceAreSame(expected, found));
if (expected != null)
{
Assert.Equal(expected.DateAvailable, found.DateAvailable);
Assert.Equal(expected.Description, found.Description);
Assert.Equal(expected.InstalledDate, found.InstalledDate);
Assert.Equal(expected.KbLink, found.KbLink);
Assert.Equal(expected.MinVersionRequired, found.MinVersionRequired);
Assert.Equal(expected.PackagePath, found.PackagePath);
Assert.Equal(expected.PackageSizeInMb, found.PackageSizeInMb);
Assert.Equal(expected.PackageType, found.PackageType);
Assert.Equal(expected.Publisher, found.Publisher);
Assert.Equal(expected.State, found.State);
Assert.Equal(expected.KbLink, found.KbLink);
Assert.Equal(expected.UpdateName, found.UpdateName);
Assert.Equal(expected.UpdateOemFile, found.UpdateOemFile);
Assert.Equal(expected.Version, found.Version);
}
}
[Fact]
public void TestListUpdates() {
RunTest((client) => {
var updateLocations = client.UpdateLocations.List("System.Redmond");
updateLocations.ForEach((updateLocation) => {
var updates = client.Updates.List("System.Redmond", updateLocation.Name);
updates.ForEach(ValidateUpdate);
Common.WriteIEnumerableToFile(updates, "TestListUpdates.txt");
});
});
}
[Fact]
public void TestGetUpdate() {
RunTest((client) => {
var updateLocation = client.UpdateLocations.List("System.Redmond").FirstOrDefault();
Assert.NotNull(updateLocation);
var update = client.Updates.List("System.Redmond", updateLocation.Name).FirstOrDefault();
if (update != null)
{
var returned = client.Updates.Get("System.Redmond", updateLocation.Name, update.Name);
AssertAreSame(update, returned);
}
});
}
[Fact]
public void TestGetAllUpdates() {
RunTest((client) => {
var updateLocations = client.UpdateLocations.List("System.Redmond");
updateLocations.ForEach((updateLocation) => {
var updates = client.Updates.List("System.Redmond", updateLocation.Name);
updates.ForEach((update) => {
var returned = client.Updates.Get("System.Redmond", updateLocation.Name, update.Name);
AssertAreSame(update, returned);
});
});
});
}
}
}
| 42.260417 | 110 | 0.589105 | [
"MIT"
] | 0rland0Wats0n/azure-sdk-for-net | sdk/azurestack/Microsoft.AzureStack.Management.Update.Admin/tests/src/Updates.Test.cs | 4,059 | C# |
using System;
using System.Linq;
using System.Collections.Generic;
using System.Reactive.Concurrency;
using FluentAssertions;
using Microsoft.Reactive.Testing;
using Xunit;
using FsCheck.Xunit;
using FsCheck;
namespace Toggl.Foundation.Tests
{
public sealed class TimeServiceTests
{
public sealed class TheCurrentTimeObservableProperty
{
private readonly TimeService timeService;
private readonly TestScheduler testScheduler = new TestScheduler();
public TheCurrentTimeObservableProperty()
{
timeService = new TimeService(testScheduler);
}
[Fact, LogIfTooSlow]
public void ReturnsTheSameObjectsRegardlessOfTheTimeTheObserversSubscribed()
{
var firstStep = 500;
var secondStep = 3500;
var expectedNumberOfMessages = (firstStep + secondStep) / 1000;
var firstObserver = testScheduler.CreateObserver<DateTimeOffset>();
var secondObserver = testScheduler.CreateObserver<DateTimeOffset>();
timeService.CurrentDateTimeObservable.Subscribe(firstObserver);
testScheduler.AdvanceBy(TimeSpan.FromMilliseconds(firstStep).Ticks);
timeService.CurrentDateTimeObservable.Subscribe(secondObserver);
testScheduler.AdvanceBy(TimeSpan.FromMilliseconds(secondStep).Ticks);
secondObserver.Messages
.Should().HaveCount(expectedNumberOfMessages)
.And.BeEquivalentTo(firstObserver.Messages);
}
[Fact, LogIfTooSlow]
public void PublishesCurrentTimeFlooredToTheCurrentSecond()
{
DateTimeOffset roundedNow = default(DateTimeOffset);
timeService.CurrentDateTimeObservable.Subscribe(time => roundedNow = time);
testScheduler.AdvanceBy(TimeSpan.FromSeconds(1).Ticks);
roundedNow.Should().NotBe(default(DateTimeOffset));
roundedNow.Millisecond.Should().Be(0);
}
[Fact, LogIfTooSlow]
public void ReturnsCurrentTimeFlooredToTheCurrentSecond()
{
DateTimeOffset roundedNow = timeService.CurrentDateTime;
roundedNow.Millisecond.Should().Be(0);
}
}
public sealed class TheMidnightObservableProperty
{
private TimeService timeService;
private TestScheduler testScheduler;
private void reset(DateTimeOffset? now = null)
{
testScheduler = new TestScheduler();
testScheduler.AdvanceTo((now ?? DateTimeOffset.UtcNow).Ticks);
timeService = new TimeService(testScheduler);
}
[Fact, LogIfTooSlow]
public void EmitsFirstValueAtTheNearestMidnightInTheLocalTimeZone()
{
reset();
int numberOfEmitedValues = 0;
DateTimeOffset? lastEmitted = null;
var now = timeService.CurrentDateTime;
timeService.MidnightObservable.Subscribe(midnight =>
{
numberOfEmitedValues++;
lastEmitted = midnight;
});
testScheduler.AdvanceBy(TimeSpan.FromHours(24).Ticks);
numberOfEmitedValues.Should().Be(1);
lastEmitted.Should().NotBeNull();
lastEmitted.Should().Be(nextLocalMidnight(now));
}
[Fact, LogIfTooSlow]
public void EmitsSecondValueExcatly24HoursAfterTheNearestMidnight()
{
reset();
int numberOfEmitedValues = 0;
DateTimeOffset? lastEmitted = null;
var now = timeService.CurrentDateTime;
timeService.MidnightObservable.Subscribe(midnight =>
{
numberOfEmitedValues++;
lastEmitted = midnight;
});
testScheduler.AdvanceBy(TimeSpan.FromDays(2).Ticks);
numberOfEmitedValues.Should().Be(2);
lastEmitted.Should().NotBeNull();
lastEmitted.Should().Be(nextLocalMidnight(now).AddHours(24));
}
[Fact, LogIfTooSlow]
public void SubscriberDoesNotReceiveAnyValueEmittedBeforeItSubscribed()
{
reset();
int numberOfEmitedValues = 0;
DateTimeOffset? firstEmitted = null;
testScheduler.AdvanceBy(TimeSpan.FromDays(2).Ticks);
var timeBeforeSubscription = testScheduler.Now.ToLocalTime();
timeService.MidnightObservable.Subscribe(midnight =>
{
numberOfEmitedValues++;
firstEmitted = firstEmitted ?? midnight;
});
testScheduler.AdvanceBy(TimeSpan.FromDays(2).Ticks);
numberOfEmitedValues.Should().Be(2);
firstEmitted.Should().BeAfter(timeBeforeSubscription);
}
[Theory, LogIfTooSlow]
[InlineData(2)]
[InlineData(3)]
[InlineData(4)]
public void EmitsSeveralDaysInARowExactlyAtMidnightEvenWhenTheTimeChangesDueToDaylightSavingTime(int numberOfDays)
{
reset(new DateTimeOffset(2017, 10, 26, 12, 34, 56, TimeSpan.Zero));
var emittedDateTimes = new List<DateTimeOffset>();
timeService.MidnightObservable.Subscribe(emittedDateTimes.Add);
testScheduler.AdvanceBy(numberOfDays * ticksPerDay);
emittedDateTimes.Count.Should().Be(numberOfDays);
emittedDateTimes
.Select(midnight => midnight.ToLocalTime())
.Should()
.OnlyContain(midnight => midnight.Hour == 0 && midnight.Minute == 0 && midnight.Second == 0);
}
[Fact, LogIfTooSlow]
public void SchedulerNowReturnsUtcTime()
{
var utcNow = DateTimeOffset.UtcNow;
var currentThreadSchedulerNow = Scheduler.CurrentThread.Now;
var defaultSchedulerNow = Scheduler.Default.Now;
var immediateSchedulerNow = Scheduler.Immediate.Now;
var schedulerNow = Scheduler.Now;
currentThreadSchedulerNow.Should().BeCloseTo(utcNow, 1000);
defaultSchedulerNow.Should().BeCloseTo(utcNow, 1000);
immediateSchedulerNow.Should().BeCloseTo(utcNow, 1000);
schedulerNow.Should().BeCloseTo(utcNow, 1000);
}
private DateTimeOffset nextLocalMidnight(DateTimeOffset now)
{
var dayFromNow = now.ToLocalTime().AddDays(1);
var date = new DateTime(dayFromNow.Year, dayFromNow.Month, dayFromNow.Day);
return new DateTimeOffset(date, TimeZoneInfo.Local.GetUtcOffset(date)).ToUniversalTime();
}
private long ticksPerDay => TimeSpan.FromDays(1).Ticks;
}
public sealed class TheRunAfterDelayMethod
{
private readonly TimeService timeService;
private readonly TestScheduler scheduler;
public TheRunAfterDelayMethod()
{
scheduler = new TestScheduler();
timeService = new TimeService(scheduler);
}
[Property]
public void RunsTheActionAfterSpecifiedDelay(PositiveInt delaySeconds)
{
var delay = TimeSpan.FromSeconds(delaySeconds.Get);
var actionWasInvoked = false;
Action action = () => actionWasInvoked = true;
timeService.RunAfterDelay(delay, action);
scheduler.AdvanceBy(delay.Ticks);
actionWasInvoked.Should().BeTrue();
}
[Property]
public void DoesNotRunTheActionAfterSpecifiedDelay(PositiveInt delaySeconds)
{
var delay = TimeSpan.FromSeconds(delaySeconds.Get);
var actionWasInvoked = false;
Action action = () => actionWasInvoked = true;
timeService.RunAfterDelay(delay, action);
scheduler.AdvanceBy(delay.Ticks - 1);
actionWasInvoked.Should().BeFalse();
}
}
}
}
| 38.63964 | 126 | 0.579506 | [
"BSD-3-Clause"
] | HectorRPC/Toggl2Excel | Toggl.Foundation.Tests/TimeServiceTests.cs | 8,580 | C# |
using UnityEngine;
using UnityEngine.UI;
namespace SCore.Loading
{
/// <summary>
/// Display servic loading information by image bar
/// </summary>
[RequireComponent(typeof(ServiceLoader))]
public class ServiceLoaderProgressBar : MonoBehaviour
{
public Image progressBar;
// Use this for initialization
private void Start()
{
GetComponent<ServiceLoader>().OnSyncStepLoadingEvent += OnSyncStepLoadingEvent;
}
// Update is called once per frame
private void Update()
{
}
public void OnSyncStepLoadingEvent(int step, int maxstep)
{
if (progressBar != null)
progressBar.fillAmount = (float)step / (float)maxstep;
}
}
} | 25.258065 | 91 | 0.606641 | [
"MIT"
] | AlekseySimonenko/SCore | ServiceLoader/View/ServiceLoaderProgressBar.cs | 785 | 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 medialive-2017-10-14.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.MediaLive.Model
{
/// <summary>
/// Response to a batch update schedule call.
/// </summary>
public partial class BatchUpdateScheduleResponse : AmazonWebServiceResponse
{
private BatchScheduleActionCreateResult _creates;
private BatchScheduleActionDeleteResult _deletes;
/// <summary>
/// Gets and sets the property Creates. Schedule actions created in the schedule.
/// </summary>
public BatchScheduleActionCreateResult Creates
{
get { return this._creates; }
set { this._creates = value; }
}
// Check to see if Creates property is set
internal bool IsSetCreates()
{
return this._creates != null;
}
/// <summary>
/// Gets and sets the property Deletes. Schedule actions deleted from the schedule.
/// </summary>
public BatchScheduleActionDeleteResult Deletes
{
get { return this._deletes; }
set { this._deletes = value; }
}
// Check to see if Deletes property is set
internal bool IsSetDeletes()
{
return this._deletes != null;
}
}
} | 30.478261 | 107 | 0.653352 | [
"Apache-2.0"
] | ourobouros/aws-sdk-net | sdk/src/Services/MediaLive/Generated/Model/BatchUpdateScheduleResponse.cs | 2,103 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager;
using Azure.ResourceManager.ServiceBus.Models;
namespace Azure.ResourceManager.ServiceBus
{
/// <summary> A class to add extension methods to SubscriptionResource. </summary>
internal partial class SubscriptionResourceExtensionClient : ArmResource
{
private ClientDiagnostics _serviceBusNamespaceNamespacesClientDiagnostics;
private NamespacesRestOperations _serviceBusNamespaceNamespacesRestClient;
private ClientDiagnostics _namespacesClientDiagnostics;
private NamespacesRestOperations _namespacesRestClient;
/// <summary> Initializes a new instance of the <see cref="SubscriptionResourceExtensionClient"/> class for mocking. </summary>
protected SubscriptionResourceExtensionClient()
{
}
/// <summary> Initializes a new instance of the <see cref="SubscriptionResourceExtensionClient"/> class. </summary>
/// <param name="client"> The client parameters to use in these operations. </param>
/// <param name="id"> The identifier of the resource that is the target of operations. </param>
internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id)
{
}
private ClientDiagnostics ServiceBusNamespaceNamespacesClientDiagnostics => _serviceBusNamespaceNamespacesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceBus", ServiceBusNamespaceResource.ResourceType.Namespace, Diagnostics);
private NamespacesRestOperations ServiceBusNamespaceNamespacesRestClient => _serviceBusNamespaceNamespacesRestClient ??= new NamespacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ServiceBusNamespaceResource.ResourceType));
private ClientDiagnostics NamespacesClientDiagnostics => _namespacesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceBus", ProviderConstants.DefaultProviderNamespace, Diagnostics);
private NamespacesRestOperations NamespacesRestClient => _namespacesRestClient ??= new NamespacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
private string GetApiVersionOrNull(ResourceType resourceType)
{
TryGetApiVersion(resourceType, out string apiVersion);
return apiVersion;
}
/// <summary>
/// Gets all the available namespaces within the subscription, irrespective of the resource groups.
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces
/// Operation Id: Namespaces_List
/// </summary>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> An async collection of <see cref="ServiceBusNamespaceResource" /> that may take multiple service requests to iterate over. </returns>
public virtual AsyncPageable<ServiceBusNamespaceResource> GetServiceBusNamespacesAsync(CancellationToken cancellationToken = default)
{
async Task<Page<ServiceBusNamespaceResource>> FirstPageFunc(int? pageSizeHint)
{
using var scope = ServiceBusNamespaceNamespacesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceBusNamespaces");
scope.Start();
try
{
var response = await ServiceBusNamespaceNamespacesRestClient.ListAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value.Select(value => new ServiceBusNamespaceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
async Task<Page<ServiceBusNamespaceResource>> NextPageFunc(string nextLink, int? pageSizeHint)
{
using var scope = ServiceBusNamespaceNamespacesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceBusNamespaces");
scope.Start();
try
{
var response = await ServiceBusNamespaceNamespacesRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value.Select(value => new ServiceBusNamespaceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
}
/// <summary>
/// Gets all the available namespaces within the subscription, irrespective of the resource groups.
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces
/// Operation Id: Namespaces_List
/// </summary>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> A collection of <see cref="ServiceBusNamespaceResource" /> that may take multiple service requests to iterate over. </returns>
public virtual Pageable<ServiceBusNamespaceResource> GetServiceBusNamespaces(CancellationToken cancellationToken = default)
{
Page<ServiceBusNamespaceResource> FirstPageFunc(int? pageSizeHint)
{
using var scope = ServiceBusNamespaceNamespacesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceBusNamespaces");
scope.Start();
try
{
var response = ServiceBusNamespaceNamespacesRestClient.List(Id.SubscriptionId, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value.Select(value => new ServiceBusNamespaceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
Page<ServiceBusNamespaceResource> NextPageFunc(string nextLink, int? pageSizeHint)
{
using var scope = ServiceBusNamespaceNamespacesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceBusNamespaces");
scope.Start();
try
{
var response = ServiceBusNamespaceNamespacesRestClient.ListNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value.Select(value => new ServiceBusNamespaceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
}
/// <summary>
/// Check the give namespace name availability.
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability
/// Operation Id: Namespaces_CheckNameAvailability
/// </summary>
/// <param name="parameters"> Parameters to check availability of the given namespace name. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
public virtual async Task<Response<CheckNameAvailabilityResult>> CheckServiceBusNameAvailabilityAsync(CheckNameAvailability parameters, CancellationToken cancellationToken = default)
{
using var scope = NamespacesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckServiceBusNameAvailability");
scope.Start();
try
{
var response = await NamespacesRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, parameters, cancellationToken).ConfigureAwait(false);
return response;
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
/// <summary>
/// Check the give namespace name availability.
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability
/// Operation Id: Namespaces_CheckNameAvailability
/// </summary>
/// <param name="parameters"> Parameters to check availability of the given namespace name. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
public virtual Response<CheckNameAvailabilityResult> CheckServiceBusNameAvailability(CheckNameAvailability parameters, CancellationToken cancellationToken = default)
{
using var scope = NamespacesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckServiceBusNameAvailability");
scope.Start();
try
{
var response = NamespacesRestClient.CheckNameAvailability(Id.SubscriptionId, parameters, cancellationToken);
return response;
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
}
}
| 54.538462 | 268 | 0.671368 | [
"MIT"
] | AikoBB/azure-sdk-for-net | sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs | 9,926 | C# |
using System.Collections.Generic;
namespace EliteJournalReader.Events
{
public class CreateSuitLoadoutEvent : JournalEvent<CreateSuitLoadoutEvent.CreateSuitLoadoutEventArgs>
{
public CreateSuitLoadoutEvent() : base("CreateSuitLoadout") { }
public class CreateSuitLoadoutEventArgs : JournalEventArgs
{
public long SuitID { get; set; }
public string SuitName { get; set; }
public long LoadoutID { get; set; }
public string LoadoutName { get; set; }
public List<SuitModule> Modules { get; set; }
public string[] SuitMods { get; set; }
}
}
} | 34.473684 | 105 | 0.638168 | [
"MIT"
] | WarmedxMints/EliteJournalReader | EliteJournalReader/Events/CreateSuitLoadoutEvent.cs | 655 | C# |
namespace Demo.Core.Configuration
{
public class AppConfigurationService
{
public const string SectionName = "Configuration";
public string ConnectionString { get; set; }
}
}
| 17.25 | 58 | 0.671498 | [
"MIT"
] | nikneem/generic-api-with-az-devops-pipeline-and-arm | src/Demo.Core/Configuration/AppConfigurationService.cs | 209 | C# |
namespace Tavis.OpenApi
{
using SharpYaml.Serialization;
using System.IO;
using System.Linq;
public static class YamlHelper
{
public static string GetScalarValue(this YamlNode node)
{
var scalarNode = node as YamlScalarNode;
if (scalarNode == null) throw new DomainParseException($"Expected scalar at line {node.Start.Line}");
return scalarNode.Value;
}
public static YamlNode ParseYaml(string yaml)
{
var reader = new StringReader(yaml);
var yamlStream = new YamlStream();
yamlStream.Load(reader);
var yamlDocument = yamlStream.Documents.First();
return yamlDocument.RootNode;
}
}
}
| 23.78125 | 113 | 0.604468 | [
"Apache-2.0"
] | tavis-software/Tavis.OpenApi | src/OpenApi/Nodes/YamlHelper.cs | 763 | 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.AzureNative.Network.V20200701.Outputs
{
/// <summary>
/// Virtual Network Tap resource.
/// </summary>
[OutputType]
public sealed class VirtualNetworkTapResponse
{
/// <summary>
/// The reference to the private IP address on the internal Load Balancer that will receive the tap.
/// </summary>
public readonly Outputs.FrontendIPConfigurationResponse? DestinationLoadBalancerFrontEndIPConfiguration;
/// <summary>
/// The reference to the private IP Address of the collector nic that will receive the tap.
/// </summary>
public readonly Outputs.NetworkInterfaceIPConfigurationResponse? DestinationNetworkInterfaceIPConfiguration;
/// <summary>
/// The VXLAN destination port that will receive the tapped traffic.
/// </summary>
public readonly int? DestinationPort;
/// <summary>
/// A unique read-only string that changes whenever the resource is updated.
/// </summary>
public readonly string Etag;
/// <summary>
/// Resource ID.
/// </summary>
public readonly string? Id;
/// <summary>
/// Resource location.
/// </summary>
public readonly string? Location;
/// <summary>
/// Resource name.
/// </summary>
public readonly string Name;
/// <summary>
/// Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
/// </summary>
public readonly ImmutableArray<Outputs.NetworkInterfaceTapConfigurationResponse> NetworkInterfaceTapConfigurations;
/// <summary>
/// The provisioning state of the virtual network tap resource.
/// </summary>
public readonly string ProvisioningState;
/// <summary>
/// The resource GUID property of the virtual network tap resource.
/// </summary>
public readonly string ResourceGuid;
/// <summary>
/// Resource tags.
/// </summary>
public readonly ImmutableDictionary<string, string>? Tags;
/// <summary>
/// Resource type.
/// </summary>
public readonly string Type;
[OutputConstructor]
private VirtualNetworkTapResponse(
Outputs.FrontendIPConfigurationResponse? destinationLoadBalancerFrontEndIPConfiguration,
Outputs.NetworkInterfaceIPConfigurationResponse? destinationNetworkInterfaceIPConfiguration,
int? destinationPort,
string etag,
string? id,
string? location,
string name,
ImmutableArray<Outputs.NetworkInterfaceTapConfigurationResponse> networkInterfaceTapConfigurations,
string provisioningState,
string resourceGuid,
ImmutableDictionary<string, string>? tags,
string type)
{
DestinationLoadBalancerFrontEndIPConfiguration = destinationLoadBalancerFrontEndIPConfiguration;
DestinationNetworkInterfaceIPConfiguration = destinationNetworkInterfaceIPConfiguration;
DestinationPort = destinationPort;
Etag = etag;
Id = id;
Location = location;
Name = name;
NetworkInterfaceTapConfigurations = networkInterfaceTapConfigurations;
ProvisioningState = provisioningState;
ResourceGuid = resourceGuid;
Tags = tags;
Type = type;
}
}
}
| 35.513761 | 123 | 0.638078 | [
"Apache-2.0"
] | polivbr/pulumi-azure-native | sdk/dotnet/Network/V20200701/Outputs/VirtualNetworkTapResponse.cs | 3,871 | C# |
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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 Microsoft.Azure.Commands.DataLakeStore.Models;
using Microsoft.Azure.Commands.DataLakeStore.Properties;
using Microsoft.Azure.Management.DataLake.Store.Models;
using System.Management.Automation;
namespace Microsoft.Azure.Commands.DataLakeStore
{
[Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeStoreItem", SupportsShouldProcess = true), OutputType(typeof(bool))]
[Alias("Remove-AdlStoreItem")]
public class RemoveAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase
{
[Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true,
HelpMessage = "The DataLakeStore account to execute the filesystem operation in")]
[ValidateNotNullOrEmpty]
[Alias("AccountName")]
public string Account { get; set; }
[Parameter(ValueFromPipelineByPropertyName = true, Position = 1, Mandatory = true,
HelpMessage = "The path in the specified Data Lake account to remove the file or folder. " +
"In the format '/folder/file.txt', " +
"where the first '/' after the DNS indicates the root of the file system.")]
[ValidateNotNull]
public DataLakeStorePathInstance[] Paths { get; set; }
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = false,
HelpMessage = "Indicates the user wants a recursive delete of the folder.")]
public SwitchParameter Recurse { get; set; }
[Parameter(ValueFromPipelineByPropertyName = true, Position = 3, Mandatory = false,
HelpMessage =
"Indicates the user wants to remove all of the contents of the folder, but not the folder itself")]
public SwitchParameter Clean { get; set; }
[Parameter(ValueFromPipelineByPropertyName = true, Position = 4, Mandatory = false,
HelpMessage =
"Indicates the delete should be immediately performed with no confirmation or prompting. Use carefully."
)]
public SwitchParameter Force { get; set; }
[Parameter(ValueFromPipelineByPropertyName = true, Position = 5, Mandatory = false,
HelpMessage =
"Indicates the delete should be immediately performed with no confirmation or prompting. Use carefully."
)]
public SwitchParameter PassThru { get; set; }
public override void ExecuteCmdlet()
{
bool[] success = { true };
foreach (var path in Paths)
{
FileType testClean;
var pathExists = DataLakeStoreFileSystemClient.TestFileOrFolderExistence(path.TransformedPath,
Account, out testClean);
ConfirmAction(
Force.IsPresent,
string.Format(Resources.RemovingDataLakeStoreItem, path.OriginalPath),
string.Format(Resources.RemoveDataLakeStoreItem, path.OriginalPath),
path.OriginalPath,
() =>
{
success[0] =
success[0] &&
DataLakeStoreFileSystemClient.DeleteFileOrFolder(path.TransformedPath, Account,
Recurse);
if (pathExists && testClean == FileType.DIRECTORY && Clean)
{
// recreate the directory as an empty directory if clean was specified.
DataLakeStoreFileSystemClient.CreateDirectory(path.TransformedPath, Account);
}
if (PassThru)
{
WriteObject(success[0]);
}
});
}
}
}
} | 49.734043 | 121 | 0.580107 | [
"MIT"
] | athipp/azure-powershell | src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItem.cs | 4,584 | C# |
namespace PizzaMario.Models
{
public class BaseModel
{
public int Id { get; set; }
}
} | 15.285714 | 35 | 0.579439 | [
"MIT"
] | Yaaappee/PizzaMario | PizzaMario/Models/BaseModel.cs | 109 | C# |
using AccidentalFish.Foundations.Resources.Abstractions.Blobs;
namespace AccidentalFish.Foundations.Resources.Abstractions.Queues
{
/// <summary>
/// A large message queue combines a blob store and a queue (with references to the blobs) to allow for the queueing
/// of items of a greater size than typically supported by standard queues. The penalty for this is that each enqueue /
/// dequeue operation requires two storage requests - one to access queue item containing the blob reference and another to
/// upload / download the blob.
///
/// Large message queues are interchangeable with standard IAsyncQueue types as this interface simply
/// extends the basic IAsyncQueue interface to expose the underlying blob repository and queue of
/// a large message queue.
/// </summary>
/// <typeparam name="T">Type of queue message</typeparam>
public interface ILargeMessageQueue<T> : IAsyncQueue<T> where T : class
{
/// <summary>
/// The queue that contains references to the blobs
/// </summary>
IAsyncQueue<LargeMessageReference> ReferenceQueue { get; }
/// <summary>
/// The blob repository that contains the message
/// </summary>
IAsyncBlockBlobRepository BlobRepository { get; }
}
}
| 45.310345 | 127 | 0.695586 | [
"MIT"
] | JTOne123/AccidentalFish.Foundations | Source/AccidentalFish.Foundations.Resources.Abstractions/Queues/ILargeMessageQueue.cs | 1,316 | C# |
using System;
using System.Collections.Generic;
using Networker.PacketHandlers;
namespace Networker
{
public class ModuleBuilder : IModuleBuilder
{
private IModule _module;
private readonly Dictionary<int, Type> _handlers;
public ModuleBuilder()
{
_handlers = new Dictionary<int, Type>();
_module = new Module();
}
public Dictionary<int, Type> GetRegisteredTypes()
{
return _handlers;
}
public IModule Build(IServiceProvider serviceProvider)
{
foreach (var handler in _handlers)
{
_module.PacketHandlers.Add(handler.Key, serviceProvider.GetService(handler.Value) as IPacketHandler);
}
return _module;
}
public void RegisterHandler<T>(int packetIdentifier) where T : IPacketHandler
{
_handlers.Add(packetIdentifier, typeof(T));
}
public void RegisterHandler(int packetIdentifier, Action<IPacketContext> action)
{
_module.PacketHandlers.Add(packetIdentifier, new FunctionHandler(action));
}
}
} | 27.255814 | 117 | 0.611775 | [
"MIT"
] | erictuvesson/Networker | Networker/ModuleBuilder.cs | 1,174 | C# |
namespace OnlineStore.Models.Common
{
public class ModelConstants
{
public const string CategoryListPath = @"OnlineStore.Models\Common\CategoryList.json";
public const int CategoryNameMinLength = 3;
public const int UsernameMinLength = 3;
public const int UsernameMaxLength = 30;
public const string UserPasswordPattern = @"^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{4,}$";
public const string UserPasswordErrorMsg = "Password must be minimum four characters, at least one letter and one number";
public const int UserNameMinLength = 2;
public const int ProductNameMinLength = 3;
public const int ProductDescriptionMinLength = 5;
public const string ProductPriceMinValueAsString = "0.01";
public const string ProductPriceMaxValueAsString = "1000000.0";
}
}
| 42.55 | 130 | 0.689777 | [
"MIT"
] | msotiroff/Online-Store | src/OnlineStore.Models/Common/ModelConstants.cs | 853 | C# |
using System;
using System.Collections.Generic;
using Wikitools.Lib.Contracts;
using Wikitools.Lib.Primitives;
namespace Wikitools.AzureDevOps;
public record ValidWikiPagesStatsForMonth(ValidWikiPagesStats Stats)
: ValidWikiPagesStats(ValidStatsForMonth(Stats))
{
public ValidWikiPagesStatsForMonth(IEnumerable<WikiPageStats> stats, DateDay startDay, DateDay endDay)
: this(new ValidWikiPagesStats(stats, startDay, endDay)) { }
public ValidWikiPagesStatsForMonth(IEnumerable<WikiPageStats> stats, DateMonth month)
// kj2 I need to introduce some type like DaySpan, which is a pair of (DateDay start, DateDay end)
// use it here (instead of passing the two days separately do month.DaySpan)
// in many places including computations that do things like "-pageViewsForDays+1".
// In fact, pageViewsForDays should be of that type itself.
// kj2 also: rename existing DayRange substrings to DaySpan.
: this(new ValidWikiPagesStats(stats, month.FirstDay, month.LastDay)) { }
public new ValidWikiPagesStatsForMonth Trim(DateTime currentDate, int daysFrom, int daysTo)
=> new ValidWikiPagesStatsForMonth(
Trim(
currentDate.AddDays(daysFrom),
currentDate.AddDays(daysTo)));
public DateMonth Month => Stats.StartDay.AsDateMonth();
public bool DaySpanIsForEntireMonth
=> Stats.StartDay == Month.FirstDay
&& Stats.EndDay == Month.LastDay;
private static ValidWikiPagesStats ValidStatsForMonth(ValidWikiPagesStats stats)
{
Contract.Assert(stats.DaySpanIsWithinOneMonth());
return stats;
}
} | 42.717949 | 106 | 0.722089 | [
"MIT"
] | konrad-jamrozik/dotnet-lib | azuredevops/ValidWikiPagesStatsForMonth.cs | 1,668 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Player : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
sr = GetComponent<SpriteRenderer>();
anim = GetComponent<Animator>();
rb = GetComponent<Rigidbody2D>();
boxCollider = GetComponent<BoxCollider2D>();
asrc = GetComponent<AudioSource>();
}
// Update is called once per frame
void Update()
{
// Act if were not dead
if (lifes > 0)
{
// Make sure we cant jump/dash multiple times
if (!isDoingAction)
{
if (Input.GetKeyDown(KeyCode.Space))
{
StartCoroutine(Jump());
}
if (Input.GetKeyDown(KeyCode.C))
{
StartCoroutine(Dash());
}
// Debug only
if (Input.GetKeyDown(KeyCode.E))
{
StartCoroutine(ReceiveDamage());
}
}
// Keep moving to the right indefinitely
transform.position = Vector2.MoveTowards(transform.position, new Vector2((transform.position.x + speed), transform.position.y), maxDelta);
// Update points
points += pointsPerSecond * (Time.deltaTime);
}
}
//---------------------------------------------------------------------------------------------
IEnumerator ReceiveDamage()
{
// Reduce life
lifes--;
// Check if were still alive
// Dead
if (lifes <= 0)
{
// Play dead animation
anim.SetBool("isDead", true);
// Play dead sound
DeathSound();
// Animation duration
yield return new WaitForSeconds(1.5f); ;
// Save high score
int highscore = PlayerPrefs.GetInt("highscore", 0);
int currentScore = Mathf.FloorToInt(points);
if (currentScore > highscore)
{
PlayerPrefs.SetInt("highscore", currentScore);
}
// Show end of game menu
endMenu.ShowEndGamePanel(currentScore);
}
// Not dead
else
{
// Make sure we dont get hurt for a while
invulnerable = true;
// Play damage sound
DamageSound();
// Red is the universal color for pain
sr.color = Color.red;
yield return new WaitForSeconds(0.25f);
// Return to our regular color but with reduced opacity to indicate were in god mode
sr.color = new Color(1f, 1f, 1f, 0.5f);
yield return new WaitForSeconds(2f);
// After a couple of seconds god mode is over
sr.color = new Color(1f, 1f, 1f);
invulnerable = false;
}
}
//---------------------------------------------------------------------------------------------
IEnumerator Dash()
{
// Save original collider size and offset
Vector2 originalSize = boxCollider.size;
Vector2 originalOffset = boxCollider.offset;
// Set action flag
isDoingAction = true;
// Reduce collider in half since were crouching
boxCollider.size = new Vector2(boxCollider.size.x, boxCollider.size.y * 0.5f);
boxCollider.offset = new Vector2(boxCollider.offset.x, boxCollider.offset.y - boxCollider.size.y * 0.5f);
// Set animation
anim.SetInteger("currentAnimation", 2);
// Animation duration
yield return new WaitForSeconds(0.5f);
// Set back to run animation
anim.SetInteger("currentAnimation", 0);
// Return collider to original form
boxCollider.size = originalSize;
boxCollider.offset = originalOffset;
// Set action flag
isDoingAction = false;
}
//---------------------------------------------------------------------------------------------
IEnumerator Jump()
{
// Set action flag
isDoingAction = true;
// Add force to jump
rb.AddForce(Vector2.up * jumpForce, ForceMode2D.Impulse);
// Set animation
anim.SetInteger("currentAnimation", 1);
// Animation duration
yield return new WaitForSeconds(1f);
// Set back to run animation
anim.SetInteger("currentAnimation", 0);
// Set action flag
isDoingAction = false;
}
//---------------------------------------------------------------------------------------------
private void OnCollisionEnter2D(Collision2D collision)
{
if(collision.gameObject.tag == "Obstacle")
{
Destroy(collision.gameObject);
if(!invulnerable)
StartCoroutine("ReceiveDamage");
}
else if(collision.gameObject.tag == "Collectable")
{
asrc.PlayOneShot(collision.gameObject.GetComponent<Collectable>().audioClip);
collision.gameObject.GetComponent<Collectable>().Collect(this);
}
}
// Buffs and pickups //////////////////////////////////////////////////////////////////////////
public void CloverPickup()
{
StartCoroutine(CloverPickupCoroutine());
}
//---------------------------------------------------------------------------------------------
IEnumerator CloverPickupCoroutine()
{
// Clover makes us invulnerable because its good luck?
invulnerable = true;
// Regular color but with reduced opacity to indicate were in god mode
sr.color = new Color(1f, 1f, 1f, 0.5f);
yield return new WaitForSeconds(4f);
// After a couple of seconds god mode is over
sr.color = new Color(1f, 1f, 1f);
invulnerable = false;
}
//---------------------------------------------------------------------------------------------
public void PotionPickup()
{
StartCoroutine(PotionPickupCoroutine());
}
//---------------------------------------------------------------------------------------------
IEnumerator PotionPickupCoroutine()
{
// Potion makes us get more points because magic
pointsPerSecond *= 2;
// Buff cooldown
yield return new WaitForSeconds(4f);
// After a couple of seconds return to regular ratio
pointsPerSecond /= 2;
}
// Audio player ///////////////////////////////////////////////////////////////////////////////
public void FootstepSound()
{
asrc.PlayOneShot(footstep);
}
//---------------------------------------------------------------------------------------------
public void DamageSound()
{
asrc.PlayOneShot(damage);
}
//---------------------------------------------------------------------------------------------
public void DashSound()
{
asrc.PlayOneShot(dash);
}
//---------------------------------------------------------------------------------------------
public void DeathSound()
{
asrc.PlayOneShot(death);
}
// Data ///////////////////////////////////////////////////////////////////////////////////////
public int lifes = 3;
public bool invulnerable; // Has received damage recently and is now cheating
private bool isDoingAction = false;
public float points = 0;
private int pointsPerSecond = 5;
// Movement variables
private float speed = 0.1f;
private float maxDelta = 0.025f;
private float jumpForce = 15f;
// Components /////////////////////////////////////////////////////////////////////////////////
SpriteRenderer sr;
Animator anim;
Rigidbody2D rb;
BoxCollider2D boxCollider;
AudioSource asrc;
// Audio clips ////////////////////////////////////////////////////////////////////////////////
public AudioClip footstep;
public AudioClip damage;
public AudioClip death;
public AudioClip dash;
// References /////////////////////////////////////////////////////////////////////////////////
public EndGameMenu endMenu;
}
| 29.852518 | 150 | 0.469334 | [
"MIT"
] | rimorD/InfiniteRunner | Assets/Scripts/Player.cs | 8,299 | C# |
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
namespace RuriLib.CaptchaServices
{
/// <summary>
/// Represent a captcha-solving service.
/// </summary>
public abstract class CaptchaService
{
/// <summary>
/// The busy status of the service.
/// </summary>
public enum CaptchaStatus
{
/// <summary>No captcha is being solved.</summary>
Idle,
/// <summary>A captcha is being solved.</summary>
Processing,
/// <summary>A captcha was solved.</summary>
Completed
}
/// <summary>The API key to access the captcha service.</summary>
public string ApiKey { get; set; }
/// <summary>The username to access the captcha service.</summary>
public string User { get; set; }
/// <summary>The password to access the captcha service.</summary>
public string Pass { get; set; }
/// <summary>The custom server's domain.</summary>
public string Domain { get; set; }
/// <summary>The custom server's port.</summary>
public int Port { get; set; }
/// <summary>The maximum time to wait for captcha completion.</summary>
public int Timeout { get; set; }
/// <summary>The id of the captcha-solving task being performed on the remote server, used to periodically query the status of the task.</summary>
public dynamic TaskId { get; set; }
/// <summary>The status of the captcha service.</summary>
public CaptchaStatus Status { get; set; }
/// <summary>
/// Creates a captcha service that authenticates via API key.
/// </summary>
/// <param name="apiKey">The API key of the account</param>
/// <param name="timeout">The maximum time to wait for captcha completion</param>
public CaptchaService(string apiKey, int timeout)
{
ApiKey = apiKey;
Timeout = timeout;
Status = CaptchaStatus.Idle;
}
/// <summary>
/// Creates a captcha service that authenticates via username and password.
/// </summary>
/// <param name="user">The username of the account</param>
/// <param name="pass">The password of the account</param>
/// <param name="timeout">The maximum time to wait for captcha completion</param>
public CaptchaService(string user, string pass, int timeout)
{
User = user;
Pass = pass;
Timeout = timeout;
Status = CaptchaStatus.Idle;
}
/// <summary>
/// Creates a captcha service that authenticates via api key on a custom server.
/// </summary>
/// <param name="apiKey">The API key of your account</param>
/// <param name="domain">The server's domain</param>
/// <param name="port">The server's port</param>
/// <param name="timeout">The maximum time to wait for captcha completion</param>
public CaptchaService(string apiKey, string domain, int port, int timeout)
{
ApiKey = apiKey;
Domain = domain;
Port = port;
Timeout = timeout;
}
/// <summary>
/// Gets the remaining balance in the account.
/// </summary>
/// <returns>The balance of the account</returns>
public virtual double GetBalance()
{
return 0;
}
/// <summary>
/// Solves a reCaptcha challenge for a given site.
/// </summary>
/// <param name="siteKey">The SiteKey found in the page's source code</param>
/// <param name="siteUrl">The URL of the site to solve a reCaptcha for</param>
/// <returns>The g-recaptcha-response of the challenge</returns>
public virtual string SolveRecaptcha(string siteKey, string siteUrl)
{
return string.Empty;
}
/// <summary>
/// Solves an image captcha challenge.
/// </summary>
/// <param name="image">The bitmap image of the challenge</param>
/// <returns>The text written in the image</returns>
public virtual string SolveCaptcha(Bitmap image)
{
return string.Empty;
}
/// <summary>
/// Gets the base64-encoded string from an image.
/// </summary>
/// <param name="image">The bitmap image</param>
/// <param name="format">The format of the bitmap image</param>
/// <returns>The base64-encoded string</returns>
protected string GetBase64(Bitmap image, ImageFormat format)
{
MemoryStream stream = new MemoryStream();
image.Save(stream, format);
byte[] imageBytes = stream.ToArray();
return Convert.ToBase64String(imageBytes);
}
/// <summary>
/// Gets a memory stream from an image.
/// </summary>
/// <param name="image">The bitmap image</param>
/// <param name="format">The format of the bitmap image</param>
/// <returns>The memory stream</returns>
protected Stream GetStream(Bitmap image, ImageFormat format)
{
Stream stream = new MemoryStream();
image.Save(stream, format);
return stream;
}
/// <summary>
/// Gets the bytes from an image.
/// </summary>
/// <param name="image">The bitmap image</param>
/// <returns>The bytes of the image</returns>
protected byte[] GetBytes(Bitmap image)
{
ImageConverter converter = new ImageConverter();
return (byte[])converter.ConvertTo(image, typeof(byte[]));
}
/// <summary>
/// Performs a synchronous POST request that returns a string.
/// </summary>
/// <param name="client">The HttpClient that performs the async request</param>
/// <param name="url">The URL to call</param>
/// <param name="content">The content that needs to be posted</param>
/// <returns>The response as a string</returns>
protected string PostSync(HttpClient client, string url, HttpContent content)
{
return Task.Run(() =>
Task.Run(() =>
client.PostAsync(url, content))
.Result.Content.ReadAsStringAsync())
.Result;
}
/// <summary>
/// Performs a synchronous POST request that returns a byte array.
/// </summary>
/// <param name="client">The HttpClient that performs the async request</param>
/// <param name="url">The URL to call</param>
/// <param name="content">The content that needs to be posted</param>
/// <returns>The response as a byte array</returns>
protected byte[] PostSync2(HttpClient client, string url, HttpContent content)
{
return Task.Run(() =>
Task.Run(() =>
client.PostAsync(url, content))
.Result.Content.ReadAsByteArrayAsync())
.Result;
}
/// <summary>
/// Performs a synchronous POST request that returns a stream.
/// </summary>
/// <param name="client">The HttpClient that performs the async request</param>
/// <param name="url">The URL to call</param>
/// <param name="content">The content that needs to be posted</param>
/// <returns>The response as a stream</returns>
protected Stream PostSync3(HttpClient client, string url, HttpContent content)
{
return Task.Run(() =>
Task.Run(() =>
client.PostAsync(url, content))
.Result.Content.ReadAsStreamAsync())
.Result;
}
/// <summary>
/// URL encodes a long string.
/// </summary>
/// <param name="longString">The string to encode</param>
/// <returns>The encoded string</returns>
protected string EscapeLongString(string longString)
{
var escaped = "";
int maxChunkSize = 200;
for (int i = 0; i < longString.Length; i += maxChunkSize)
escaped += Uri.EscapeDataString(longString.Substring(i, Math.Min(maxChunkSize, longString.Length - i)));
return escaped;
}
}
}
| 38.039823 | 154 | 0.562522 | [
"MIT"
] | 541n7215/KickOff | RuriLib/CaptchaServices/CaptchaService.cs | 8,599 | C# |
using Microsoft.VisualStudio.TestTools.UnitTesting;
using com.freeclimb.api.call;
using com.freeclimb.api;
using com.freeclimb;
using com.freeclimb.api.message;
namespace freeclimb_cs_sdk_test.api.call
{
[TestClass]
public class MessageTest
{
[TestMethod]
public void MakeMessageFromJsonTest()
{
string json = "{\"uri\" : \"/Accounts/AC736ca2078721a9a41fb47f07bf40d9e21cb304da/Messages/MM16ac1bcbd6f4895c89a798571e89e1e715892924\", \"revision\" : 1, \"dateCreated\" : \"Thu, 23 Jun 2016 17:30:06 GMT\", \"dateUpdated\" : \"Thu, 23 Jun 2016 17:30:06 GMT\", \"messageId\" : \"MM16ac1bcbd6f4895c89a798571e89e1e715892924\", \"accountId\" : \"AC736ca2078721a9a41fb47f07bf40d9e21cb304da\", \"from\" : \"+12248806205\", \"to\" : \"+18475978014\", \"text\" : \"Hello World\", \"direction\" : \"inbound\", \"status\" : \"received\", \"notificationUrl\" : \"http://server/msgNotif\"}";
Message msg = Message.fromJson(json);
Assert.IsNotNull(msg);
Assert.IsNotNull(msg.getUri);
Assert.AreEqual(msg.getUri, "/Accounts/AC736ca2078721a9a41fb47f07bf40d9e21cb304da/Messages/MM16ac1bcbd6f4895c89a798571e89e1e715892924");
Assert.AreEqual(msg.getRevision, 1);
Assert.IsNotNull(msg.getDateCreated);
Assert.IsNotNull(msg.getDateUpdated);
Assert.AreEqual(msg.getText, "Hello World");
Assert.AreEqual(msg.getTo, "+18475978014");
Assert.AreEqual(msg.getFrom, "+12248806205");
Assert.AreEqual(msg.getDirection, com.freeclimb.EMessageDirection.Inbound);
Assert.AreEqual(msg.getStatus, com.freeclimb.EMessageStatus.Received);
Assert.AreEqual(msg.getNotificationUrl, "http://server/msgNotif");
}
}
}
| 51.342857 | 591 | 0.670562 | [
"MIT"
] | Anedumgottil/csharp-sdk | freeclimb-cs-sdk-test/api/message/MessageTest.cs | 1,799 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using Trady.Analysis.Infrastructure;
namespace Trady.Analysis.Indicator
{
public class PositiveDifference<TInput, TOutput> : NumericAnalyzableBase<TInput, decimal?, TOutput>
{
public int PeriodCount { get; }
private DifferenceByTuple _diff;
public PositiveDifference(IEnumerable<TInput> inputs, Func<TInput, decimal?> inputMapper, int periodCount = 1) : base(inputs, inputMapper)
{
PeriodCount = periodCount;
_diff = new DifferenceByTuple(inputs.Select(inputMapper).ToList(), periodCount);
}
protected override decimal? ComputeByIndexImpl(IReadOnlyList<decimal?> mappedInputs, int index)
=> _diff[index].HasValue ? Math.Max(_diff[index].Value, 0) : default(decimal?);
}
public class PositiveDifferenceByTuple : PositiveDifference<decimal?, decimal?>
{
public PositiveDifferenceByTuple(IEnumerable<decimal?> inputs, int periodCount = 1)
: base(inputs, i => i, periodCount)
{
}
}
}
| 35.387097 | 146 | 0.682771 | [
"Apache-2.0"
] | Partiolainen/Trady | Trady.Analysis/Indicator/PositiveDifference.cs | 1,099 | C# |
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.Json;
using DBInline.Classes;
using NUnit.Framework.Internal.Execution;
namespace DBInline.Test
{
public class TestBase
{
/// <summary>
/// Place credentials in Environment.CurrentDirectory + "credentials\\data.json")
/// </summary>
[SetUp]
public void Setup()
{
if (ContextController.Connected) return;
var path = Path.Combine(Environment.CurrentDirectory, "credentials\\data.json");
if (!File.Exists(path))
{
File.WriteAllText(path,
JsonSerializer.Serialize(new List<DatabaseCredentials> {new DatabaseCredentials()}));
throw new Exception($"No Database Credentials found, file has been created at {path}");
}
var credentials = JsonSerializer.Deserialize<DatabaseCredentials[]>(
File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "credentials\\data.json")));
//TODO Move names to json
ContextController.AddContext("postgres", credentials.First().Type, credentials.First().GetConnectionString(),true);
ContextController.AddContext("MsSql", credentials.Last().Type, credentials.Last().GetConnectionString());
}
protected const string Customers = "dbinline_generated_table";
protected const string Employees = "dbinline_generated_table2";
}
}
| 36.209302 | 127 | 0.646757 | [
"MIT"
] | NicoZweifel/DBInline | DBInline.Test/TestBase.cs | 1,557 | C# |
using System;
using HGMF2018.Core;
using HGMF2018.Droid;
using Xamarin.Forms;
[assembly: Dependency(typeof(VersionRetrievalService))]
namespace HGMF2018.Droid
{
public class VersionRetrievalService : IVersionRetrievalService
{
public string Version
{
get
{
var context = Forms.Context;
return context.PackageManager.GetPackageInfo(context.PackageName, 0).VersionName;
}
}
}
}
| 22.904762 | 97 | 0.634096 | [
"MIT"
] | jsauve/HGMF2018 | App/HGMF2018.Droid/Services/VersionRetrievalService.cs | 481 | C# |
using System;
namespace Deform
{
public enum Category : byte
{
Normal,
Noise,
Mask,
Utility
}
/// <summary>
/// Add this attribute to deformers to have them recognised by the deformer creation window.
/// </summary>
[AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class DeformerAttribute : Attribute
{
public string Name;
public string Description;
public Category Category;
public Type Type;
public float XRotation;
public float YRotation;
public float ZRotation;
}
} | 20.222222 | 93 | 0.727106 | [
"MIT"
] | NeatWolf/Deform | Code/Runtime/Core/DeformerAttribute.cs | 548 | C# |
// Copyright 2017 the original author or authors.
//
// 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 Xunit;
namespace Steeltoe.Discovery.Consul.Discovery.Test
{
public class ConsulDiscoveryOptionsTest
{
[Fact]
public void Constructor_InitsDefaults()
{
ConsulDiscoveryOptions opts = new ConsulDiscoveryOptions();
Assert.True(opts.Register);
Assert.True(opts.RegisterHealthCheck);
Assert.Null(opts.DefaultQueryTag);
Assert.Equal("zone", opts.DefaultZoneMetadataName);
Assert.True(opts.Deregister);
Assert.True(opts.Enabled);
Assert.True(opts.FailFast);
Assert.Equal("30m", opts.HealthCheckCriticalTimeout);
Assert.Equal("10s", opts.HealthCheckInterval);
Assert.Equal("/actuator/health", opts.HealthCheckPath);
Assert.Equal("10s", opts.HealthCheckTimeout);
Assert.False(opts.HealthCheckTlsSkipVerify);
Assert.Null(opts.HealthCheckUrl);
Assert.NotNull(opts.Heartbeat);
Assert.NotNull(opts.HostName);
Assert.Null(opts.InstanceGroup);
Assert.Null(opts.InstanceZone);
Assert.NotNull(opts.IpAddress);
Assert.False(opts.PreferIpAddress);
Assert.False(opts.PreferAgentAddress);
Assert.False(opts.QueryPassing);
Assert.Equal("http", opts.Scheme);
Assert.Null(opts.ServiceName);
Assert.Null(opts.Tags);
}
}
}
| 39.480769 | 75 | 0.655626 | [
"ECL-2.0",
"Apache-2.0"
] | qazuc88/Discovery | test/Steeltoe.Discovery.ConsulBase.Test/Discovery/ConsulDiscoveryOptionsTest.cs | 2,055 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.