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
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #nullable disable namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; /// <summary> /// Specifies what messages to output for the System.Diagnostics.Debug, System.Diagnostics.Trace /// and System.Diagnostics.TraceSwitch classes. /// </summary> public partial interface IPlatformEqtTrace { // This is added to ensure that tracing for testhost/datacollector should not be instantiated if not enabled via --diag switch. bool DoNotInitialize { get; set; } /// <summary> /// Adds the message to the trace log. /// The line becomes: /// [I, PID, ThreadID, 2003/06/11 11:56:07.445] CallingAssemblyName: message. /// </summary> /// <param name="level">Trace level.</param> /// <param name="message">The message to add to trace.</param> void WriteLine(PlatformTraceLevel level, string message); /// <summary> /// Initializes the verbose tracing with custom log file /// And overrides if any trace is set before /// </summary> /// <param name="customLogFile"> /// A custom log file for trace messages. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> bool InitializeVerboseTrace(string customLogFile); /// <summary> /// Initializes the tracing with custom log file and trace level. /// Overrides if any trace is set before. /// </summary> /// <param name="customLogFile">Custom log file for trace messages.</param> /// <param name="traceLevel">Trace level.</param> /// <returns>Trace initialized flag.</returns> bool InitializeTrace(string customLogFile, PlatformTraceLevel traceLevel); /// <summary> /// Gets a value indicating if tracing is enabled for a trace level. /// </summary> /// <param name="traceLevel">Trace level.</param> /// <returns>True if tracing is enabled.</returns> bool ShouldTrace(PlatformTraceLevel traceLevel); /// <summary> /// Gets file path for trace log file. /// </summary> /// <returns>True if tracing is enabled.</returns> string GetLogFile(); /// <summary> /// Sets platform specific trace value for tracing verbosity. /// </summary> /// <param name="value"> /// The value. /// </param> void SetTraceLevel(PlatformTraceLevel value); /// <summary> /// Gets platform specific trace value for tracing verbosity. /// </summary> /// <returns> /// The <see cref="PlatformTraceLevel"/>. /// </returns> PlatformTraceLevel GetTraceLevel(); }
33.7625
131
0.654943
[ "MIT" ]
Evangelink/vstest
src/Microsoft.TestPlatform.PlatformAbstractions/Interfaces/Tracing/IPlatformEqtTrace.cs
2,703
C#
//----------------------------------------------------------------------- // <copyright file="AssemblyInfo.cs" company="Moritz Jökel"> // Copyright (c) Moritz Jökel. All Rights Reserved. // Licensed under Creative Commons Zero v1.0 Universal // </copyright> //----------------------------------------------------------------------- using System.Reflection; using System.Resources; using System.Runtime.InteropServices; // Allgemeine Informationen über eine Assembly werden über die folgenden // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, // die einer Assembly zugeordnet sind. [assembly: AssemblyTitle("DiveraFMSConnect")] [assembly: AssemblyDescription("Kopplung der FMS-Statusdaten von Divera 24/7 und Feuersoftware Connect.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Moritz Jökel")] [assembly: AssemblyProduct("DiveraFMSConnect")] [assembly: AssemblyCopyright("Copyright © Moritz Jökel 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly // für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. [assembly: ComVisible(false)] // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird [assembly: Guid("309a0602-6ca2-4247-b239-793de6500519")] // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: // // Hauptversion // Nebenversion // Buildnummer // Revision // // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.1.0")] [assembly: AssemblyFileVersion("1.0.1.0")] [assembly: NeutralResourcesLanguage("en")]
44
106
0.706566
[ "CC0-1.0" ]
MrzJkl/DiveraFMSConnect
DiveraFMSConnect/Properties/AssemblyInfo.cs
1,999
C#
using Interface.Base; public class RuntimeContext : IContext { private IInjector injector; public IInjector Injector { set { injector = value; } } public void Setup() { } }
14.105263
40
0.481343
[ "Apache-2.0" ]
TypeMonad/tinyMVC
Assets/Scripts/Application/RuntimeModules/RuntimeContext.cs
270
C#
using System.ComponentModel.DataAnnotations; namespace DropzoneField.Settings { public class DropzoneFieldSettings { public const int DefaultMaxWidth = 1024; public const int DefaultFileLimit = 5; private int _maxWidth; private int _fileLimit; public string Hint { get; set; } public string MediaFolder { get; set; } [Range(0, 2048)] public int MaxWidth { get { return _maxWidth != 0 ? _maxWidth : DefaultMaxWidth; } set { _maxWidth = value; } } [Range(0, 50)] public int FileLimit { get { return _fileLimit != 0 ? _fileLimit : DefaultFileLimit; } set { _fileLimit = value; } } } }
23.090909
75
0.568241
[ "BSD-3-Clause" ]
planetClaire/Orchard-LETS
src/Orchard.Web/Modules/DropzoneField/Settings/DropzoneFieldSettings.cs
764
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; public class TokenAnimationMovement : MonoBehaviour { private Vector3 destination; private Animator anim; private float time_to_reach_target = 0.4f; float t =0; private void Awake() { anim = GetComponent<Animator>(); } public void SetDestPos(Vector3 dst) { t = 0; destination = dst; StartMovement(); } public void SetIdleAnimation(bool state) { anim.SetBool("start", state); } public void StartMovement() { anim.SetBool("jump", true); StartCoroutine("MoveToPos"); //anim.SetBool("jump",false); } IEnumerator MoveToPos() { float start_time = Time.time; t += Time.deltaTime / time_to_reach_target; while (transform.position.x != destination.x || transform.position.z != destination.z || transform.position.y <= destination.y) { float x = Mathf.MoveTowards(transform.position.x, destination.x, t); float z = Mathf.MoveTowards(transform.position.z, destination.z, t); float y = 3 * Mathf.Sin(Mathf.PI * ((Time.time - start_time) / time_to_reach_target)); transform.position = new Vector3(x,y, z); yield return null; } transform.position = new Vector3(transform.position.x,destination.y,transform.position.z); anim.SetBool("jump", false); } }
26.963636
135
0.618341
[ "MIT" ]
GerardClotet/Networking
New York Walk - Networking/Assets/Scripts/NetworkPhoton/Utils/TokenAnimationMovement.cs
1,483
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class LightController : MonoBehaviour { public GameObject pivot; public GameObject light; public Vector3 rotation; public Slider SunY, SunZ; public Text SunYText, SunZText; private void Start() { SunY.maxValue = 360; SunY.minValue = 0; SunZ.maxValue = 180; SunZ.minValue = 0; } private void Update() { light.transform.LookAt(transform); pivot.transform.rotation = Quaternion.Euler(rotation); rotation.y = SunY.value; rotation.z = SunZ.value; SunYText.text = rotation.y.ToString("f0"); SunZText.text = rotation.z.ToString("f0"); } }
22.611111
63
0.60688
[ "MIT" ]
WathikAhmed/chance-the-gardener-viewer
Assets/Scripts/Farmbot/LightController.cs
814
C#
#pragma checksum "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ff5b58ab61aff3380f3285272581cf7dbabf2529" // <auto-generated/> #pragma warning disable 1591 [assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Employees_Index), @"mvc.1.0.view", @"/Views/Employees/Index.cshtml")] [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/Views/Employees/Index.cshtml", typeof(AspNetCore.Views_Employees_Index))] namespace AspNetCore { #line hidden using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewFeatures; #line 1 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\_ViewImports.cshtml" using KLove_Test; #line default #line hidden #line 2 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\_ViewImports.cshtml" using KLove_Test.Models; #line default #line hidden [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"ff5b58ab61aff3380f3285272581cf7dbabf2529", @"/Views/Employees/Index.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"ea1d701e880b6ca65aef7bae44bbd54ddf135a5c", @"/Views/_ViewImports.cshtml")] public class Views_Employees_Index : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<IEnumerable<KLoveTest.Models.Employees>> { private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-action", "Create", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-action", "Edit", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-action", "Details", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-action", "Delete", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); #line hidden #pragma warning disable 0169 private string __tagHelperStringValueBuffer; #pragma warning restore 0169 private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager { get { if (__backed__tagHelperScopeManager == null) { __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); } return __backed__tagHelperScopeManager; } } private global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper; #pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { BeginContext(48, 2, true); WriteLiteral("\r\n"); EndContext(); #line 3 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" ViewData["Title"] = "Index"; #line default #line hidden BeginContext(91, 29, true); WriteLiteral("\r\n<h2>Index</h2>\r\n\r\n<p>\r\n "); EndContext(); BeginContext(120, 37, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "9a056afc6a7b477598b517fd2c5e639c", async() => { BeginContext(143, 10, true); WriteLiteral("Create New"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_0.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(157, 92, true); WriteLiteral("\r\n</p>\r\n<table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>\r\n "); EndContext(); BeginContext(250, 41, false); #line 16 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayNameFor(model => model.FName)); #line default #line hidden EndContext(); BeginContext(291, 55, true); WriteLiteral("\r\n </th>\r\n <th>\r\n "); EndContext(); BeginContext(347, 41, false); #line 19 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayNameFor(model => model.LName)); #line default #line hidden EndContext(); BeginContext(388, 55, true); WriteLiteral("\r\n </th>\r\n <th>\r\n "); EndContext(); BeginContext(444, 41, false); #line 22 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayNameFor(model => model.Phone)); #line default #line hidden EndContext(); BeginContext(485, 55, true); WriteLiteral("\r\n </th>\r\n <th>\r\n "); EndContext(); BeginContext(541, 43, false); #line 25 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayNameFor(model => model.Address)); #line default #line hidden EndContext(); BeginContext(584, 55, true); WriteLiteral("\r\n </th>\r\n <th>\r\n "); EndContext(); BeginContext(640, 40, false); #line 28 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayNameFor(model => model.City)); #line default #line hidden EndContext(); BeginContext(680, 55, true); WriteLiteral("\r\n </th>\r\n <th>\r\n "); EndContext(); BeginContext(736, 41, false); #line 31 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayNameFor(model => model.State)); #line default #line hidden EndContext(); BeginContext(777, 55, true); WriteLiteral("\r\n </th>\r\n <th>\r\n "); EndContext(); BeginContext(833, 43, false); #line 34 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayNameFor(model => model.Zipcode)); #line default #line hidden EndContext(); BeginContext(876, 55, true); WriteLiteral("\r\n </th>\r\n <th>\r\n "); EndContext(); BeginContext(932, 46, false); #line 37 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayNameFor(model => model.Department)); #line default #line hidden EndContext(); BeginContext(978, 86, true); WriteLiteral("\r\n </th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n"); EndContext(); #line 43 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" foreach (var item in Model) { #line default #line hidden BeginContext(1096, 48, true); WriteLiteral(" <tr>\r\n <td>\r\n "); EndContext(); BeginContext(1145, 40, false); #line 46 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayFor(modelItem => item.FName)); #line default #line hidden EndContext(); BeginContext(1185, 55, true); WriteLiteral("\r\n </td>\r\n <td>\r\n "); EndContext(); BeginContext(1241, 40, false); #line 49 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayFor(modelItem => item.LName)); #line default #line hidden EndContext(); BeginContext(1281, 55, true); WriteLiteral("\r\n </td>\r\n <td>\r\n "); EndContext(); BeginContext(1337, 40, false); #line 52 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayFor(modelItem => item.Phone)); #line default #line hidden EndContext(); BeginContext(1377, 55, true); WriteLiteral("\r\n </td>\r\n <td>\r\n "); EndContext(); BeginContext(1433, 42, false); #line 55 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayFor(modelItem => item.Address)); #line default #line hidden EndContext(); BeginContext(1475, 55, true); WriteLiteral("\r\n </td>\r\n <td>\r\n "); EndContext(); BeginContext(1531, 39, false); #line 58 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayFor(modelItem => item.City)); #line default #line hidden EndContext(); BeginContext(1570, 55, true); WriteLiteral("\r\n </td>\r\n <td>\r\n "); EndContext(); BeginContext(1626, 40, false); #line 61 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayFor(modelItem => item.State)); #line default #line hidden EndContext(); BeginContext(1666, 55, true); WriteLiteral("\r\n </td>\r\n <td>\r\n "); EndContext(); BeginContext(1722, 42, false); #line 64 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayFor(modelItem => item.Zipcode)); #line default #line hidden EndContext(); BeginContext(1764, 55, true); WriteLiteral("\r\n </td>\r\n <td>\r\n "); EndContext(); BeginContext(1820, 60, false); #line 67 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" Write(Html.DisplayFor(modelItem => item.Department.DepartmentName)); #line default #line hidden EndContext(); BeginContext(1880, 55, true); WriteLiteral("\r\n </td>\r\n <td>\r\n "); EndContext(); BeginContext(1935, 53, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "d116ec56e1174ab99ddc9647afda6251", async() => { BeginContext(1980, 4, true); WriteLiteral("Edit"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null) { throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); } BeginWriteTagHelperAttribute(); #line 70 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" WriteLiteral(item.id); #line default #line hidden __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer; __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(1988, 20, true); WriteLiteral(" |\r\n "); EndContext(); BeginContext(2008, 59, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "6aef4a72b8574779ae8b2c4da4259901", async() => { BeginContext(2056, 7, true); WriteLiteral("Details"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_2.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2); if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null) { throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); } BeginWriteTagHelperAttribute(); #line 71 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" WriteLiteral(item.id); #line default #line hidden __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer; __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(2067, 20, true); WriteLiteral(" |\r\n "); EndContext(); BeginContext(2087, 57, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "820831c806884192ac55530605db8899", async() => { BeginContext(2134, 6, true); WriteLiteral("Delete"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_3.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3); if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null) { throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); } BeginWriteTagHelperAttribute(); #line 72 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" WriteLiteral(item.id); #line default #line hidden __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer; __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(2144, 36, true); WriteLiteral("\r\n </td>\r\n </tr>\r\n"); EndContext(); #line 75 "C:\Users\Richard\source\repos\KLove Test\KLove Test\Views\Employees\Index.cshtml" } #line default #line hidden BeginContext(2183, 24, true); WriteLiteral(" </tbody>\r\n</table>\r\n"); EndContext(); } #pragma warning restore 1998 [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; } [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; } [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; } [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; } [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<IEnumerable<KLoveTest.Models.Employees>> Html { get; private set; } } } #pragma warning restore 1591
54.624352
300
0.656059
[ "MIT" ]
badcomics/KLove-Test
KLove Test/obj/Debug/netcoreapp2.1/Razor/Views/Employees/Index.g.cshtml.cs
21,085
C#
using System.Collections.Generic; using SmartStore.Core.Domain.Customers; using SmartStore.Core.Domain.Security; namespace SmartStore.Services.Security { public partial class StandardPermissionProvider : IPermissionProvider { //admin area permissions public static readonly PermissionRecord AccessAdminPanel = new PermissionRecord { Name = "Access admin area", SystemName = "AccessAdminPanel", Category = "Standard" }; public static readonly PermissionRecord AllowCustomerImpersonation = new PermissionRecord { Name = "Admin area. Allow Customer Impersonation", SystemName = "AllowCustomerImpersonation", Category = "Customers" }; public static readonly PermissionRecord ManageCatalog = new PermissionRecord { Name = "Admin area. Manage Catalog", SystemName = "ManageCatalog", Category = "Catalog" }; public static readonly PermissionRecord ManageCustomers = new PermissionRecord { Name = "Admin area. Manage Customers", SystemName = "ManageCustomers", Category = "Customers" }; public static readonly PermissionRecord ManageCustomerRoles = new PermissionRecord { Name = "Admin area. Manage Customer Roles", SystemName = "ManageCustomerRoles", Category = "Customers" }; public static readonly PermissionRecord ManageOrders = new PermissionRecord { Name = "Admin area. Manage Orders", SystemName = "ManageOrders", Category = "Orders" }; public static readonly PermissionRecord ManageGiftCards = new PermissionRecord { Name = "Admin area. Manage Gift Cards", SystemName = "ManageGiftCards", Category = "Orders" }; public static readonly PermissionRecord ManageReturnRequests = new PermissionRecord { Name = "Admin area. Manage Return Requests", SystemName = "ManageReturnRequests", Category = "Orders" }; public static readonly PermissionRecord ManageAffiliates = new PermissionRecord { Name = "Admin area. Manage Affiliates", SystemName = "ManageAffiliates", Category = "Promo" }; public static readonly PermissionRecord ManageCampaigns = new PermissionRecord { Name = "Admin area. Manage Campaigns", SystemName = "ManageCampaigns", Category = "Promo" }; public static readonly PermissionRecord ManageDiscounts = new PermissionRecord { Name = "Admin area. Manage Discounts", SystemName = "ManageDiscounts", Category = "Promo" }; public static readonly PermissionRecord ManageNewsletterSubscribers = new PermissionRecord { Name = "Admin area. Manage Newsletter Subscribers", SystemName = "ManageNewsletterSubscribers", Category = "Promo" }; public static readonly PermissionRecord ManagePolls = new PermissionRecord { Name = "Admin area. Manage Polls", SystemName = "ManagePolls", Category = "Content Management" }; public static readonly PermissionRecord ManageNews = new PermissionRecord { Name = "Admin area. Manage News", SystemName = "ManageNews", Category = "Content Management" }; public static readonly PermissionRecord ManageBlog = new PermissionRecord { Name = "Admin area. Manage Blog", SystemName = "ManageBlog", Category = "Content Management" }; public static readonly PermissionRecord ManageWidgets = new PermissionRecord { Name = "Admin area. Manage Widgets", SystemName = "ManageWidgets", Category = "Content Management" }; public static readonly PermissionRecord ManageTopics = new PermissionRecord { Name = "Admin area. Manage Topics", SystemName = "ManageTopics", Category = "Content Management" }; public static readonly PermissionRecord ManageForums = new PermissionRecord { Name = "Admin area. Manage Forums", SystemName = "ManageForums", Category = "Content Management" }; public static readonly PermissionRecord ManageMessageTemplates = new PermissionRecord { Name = "Admin area. Manage Message Templates", SystemName = "ManageMessageTemplates", Category = "Content Management" }; public static readonly PermissionRecord ManageCountries = new PermissionRecord { Name = "Admin area. Manage Countries", SystemName = "ManageCountries", Category = "Configuration" }; public static readonly PermissionRecord ManageLanguages = new PermissionRecord { Name = "Admin area. Manage Languages", SystemName = "ManageLanguages", Category = "Configuration" }; public static readonly PermissionRecord ManageSettings = new PermissionRecord { Name = "Admin area. Manage Settings", SystemName = "ManageSettings", Category = "Configuration" }; public static readonly PermissionRecord ManagePaymentMethods = new PermissionRecord { Name = "Admin area. Manage Payment Methods", SystemName = "ManagePaymentMethods", Category = "Configuration" }; public static readonly PermissionRecord ManageExternalAuthenticationMethods = new PermissionRecord { Name = "Admin area. Manage External Authentication Methods", SystemName = "ManageExternalAuthenticationMethods", Category = "Configuration" }; public static readonly PermissionRecord ManageTaxSettings = new PermissionRecord { Name = "Admin area. Manage Tax Settings", SystemName = "ManageTaxSettings", Category = "Configuration" }; public static readonly PermissionRecord ManageShippingSettings = new PermissionRecord { Name = "Admin area. Manage Shipping Settings", SystemName = "ManageShippingSettings", Category = "Configuration" }; public static readonly PermissionRecord ManageCurrencies = new PermissionRecord { Name = "Admin area. Manage Currencies", SystemName = "ManageCurrencies", Category = "Configuration" }; public static readonly PermissionRecord ManageDeliveryTimes = new PermissionRecord { Name = "Admin area. Manage Delivery Times", SystemName = "ManageDeliveryTimes", Category = "Configuration" }; public static readonly PermissionRecord ManageThemes = new PermissionRecord { Name = "Admin area. Manage Themes", SystemName = "ManageThemes", Category = "Configuration" }; public static readonly PermissionRecord ManageMeasures = new PermissionRecord { Name = "Admin area. Manage Measures", SystemName = "ManageMeasures", Category = "Configuration" }; public static readonly PermissionRecord ManageActivityLog = new PermissionRecord { Name = "Admin area. Manage Activity Log", SystemName = "ManageActivityLog", Category = "Configuration" }; public static readonly PermissionRecord ManageAcl = new PermissionRecord { Name = "Admin area. Manage ACL", SystemName = "ManageACL", Category = "Configuration" }; public static readonly PermissionRecord ManageEmailAccounts = new PermissionRecord { Name = "Admin area. Manage Email Accounts", SystemName = "ManageEmailAccounts", Category = "Configuration" }; public static readonly PermissionRecord ManageStores = new PermissionRecord { Name = "Admin area. Manage Stores", SystemName = "ManageStores", Category = "Configuration" }; public static readonly PermissionRecord ManagePlugins = new PermissionRecord { Name = "Admin area. Manage Plugins", SystemName = "ManagePlugins", Category = "Configuration" }; public static readonly PermissionRecord ManageSystemLog = new PermissionRecord { Name = "Admin area. Manage System Log", SystemName = "ManageSystemLog", Category = "Configuration" }; public static readonly PermissionRecord ManageMessageQueue = new PermissionRecord { Name = "Admin area. Manage Message Queue", SystemName = "ManageMessageQueue", Category = "Configuration" }; public static readonly PermissionRecord ManageMaintenance = new PermissionRecord { Name = "Admin area. Manage Maintenance", SystemName = "ManageMaintenance", Category = "Configuration" }; public static readonly PermissionRecord UploadPictures = new PermissionRecord { Name = "Admin area. Upload Pictures", SystemName = "UploadPictures", Category = "Configuration" }; public static readonly PermissionRecord ManageScheduleTasks = new PermissionRecord { Name = "Admin area. Manage Schedule Tasks", SystemName = "ManageScheduleTasks", Category = "Configuration" }; public static readonly PermissionRecord ManageExports = new PermissionRecord { Name = "Admin area. Manage Exports", SystemName = "ManageExports", Category = "Configuration" }; public static readonly PermissionRecord ManageImports = new PermissionRecord { Name = "Admin area. Manage Imports", SystemName = "ManageImports", Category = "Configuration" }; public static readonly PermissionRecord ManageUrlRecords = new PermissionRecord { Name = "Admin area. Manage Url Records", SystemName = "ManageUrlRecords", Category = "Configuration" }; //public store permissions public static readonly PermissionRecord DisplayPrices = new PermissionRecord { Name = "Public store. Display Prices", SystemName = "DisplayPrices", Category = "PublicStore" }; public static readonly PermissionRecord EnableShoppingCart = new PermissionRecord { Name = "Public store. Enable shopping cart", SystemName = "EnableShoppingCart", Category = "PublicStore" }; public static readonly PermissionRecord EnableWishlist = new PermissionRecord { Name = "Public store. Enable wishlist", SystemName = "EnableWishlist", Category = "PublicStore" }; public static readonly PermissionRecord PublicStoreAllowNavigation = new PermissionRecord { Name = "Public store. Allow navigation", SystemName = "PublicStoreAllowNavigation", Category = "PublicStore" }; public virtual IEnumerable<PermissionRecord> GetPermissions() { return new[] { AccessAdminPanel, AllowCustomerImpersonation, ManageCatalog, ManageCustomers, ManageCustomerRoles, ManageOrders, ManageGiftCards, ManageReturnRequests, ManageAffiliates, ManageCampaigns, ManageDiscounts, ManageNewsletterSubscribers, ManagePolls, ManageNews, ManageBlog, ManageWidgets, ManageTopics, ManageForums, ManageMessageTemplates, ManageCountries, ManageLanguages, ManageSettings, ManagePaymentMethods, ManageExternalAuthenticationMethods, ManageTaxSettings, ManageShippingSettings, ManageCurrencies, ManageDeliveryTimes, ManageThemes, ManageMeasures, ManageActivityLog, ManageAcl, ManageEmailAccounts, ManageStores, ManagePlugins, ManageSystemLog, ManageMessageQueue, ManageMaintenance, UploadPictures, ManageScheduleTasks, ManageExports, ManageImports, ManageUrlRecords, DisplayPrices, EnableShoppingCart, EnableWishlist, PublicStoreAllowNavigation, }; } public virtual IEnumerable<DefaultPermissionRecord> GetDefaultPermissions() { return new[] { new DefaultPermissionRecord { CustomerRoleSystemName = SystemCustomerRoleNames.Administrators, PermissionRecords = new[] { AccessAdminPanel, AllowCustomerImpersonation, ManageCatalog, ManageCustomers, ManageCustomerRoles, ManageOrders, ManageGiftCards, ManageReturnRequests, ManageAffiliates, ManageCampaigns, ManageDiscounts, ManageNewsletterSubscribers, ManagePolls, ManageNews, ManageBlog, ManageWidgets, ManageTopics, ManageForums, ManageMessageTemplates, ManageCountries, ManageLanguages, ManageSettings, ManagePaymentMethods, ManageExternalAuthenticationMethods, ManageTaxSettings, ManageShippingSettings, ManageCurrencies, ManageDeliveryTimes, ManageThemes, ManageMeasures, ManageActivityLog, ManageAcl, ManageEmailAccounts, ManageStores, ManagePlugins, ManageSystemLog, ManageMessageQueue, ManageMaintenance, UploadPictures, ManageScheduleTasks, ManageExports, ManageImports, ManageUrlRecords, DisplayPrices, EnableShoppingCart, EnableWishlist, PublicStoreAllowNavigation, } }, new DefaultPermissionRecord { CustomerRoleSystemName = SystemCustomerRoleNames.ForumModerators, PermissionRecords = new[] { DisplayPrices, EnableShoppingCart, EnableWishlist, PublicStoreAllowNavigation, } }, new DefaultPermissionRecord { CustomerRoleSystemName = SystemCustomerRoleNames.Guests, PermissionRecords = new[] { DisplayPrices, EnableShoppingCart, EnableWishlist, PublicStoreAllowNavigation, } }, new DefaultPermissionRecord { CustomerRoleSystemName = SystemCustomerRoleNames.Registered, PermissionRecords = new[] { DisplayPrices, EnableShoppingCart, EnableWishlist, PublicStoreAllowNavigation, } }, }; } } }
70.124402
251
0.641512
[ "MIT" ]
jenmcquade/csharp-snippets
SmartStoreNET-3.x/src/Libraries/SmartStore.Services/Security/StandardPermissionProvider.cs
14,656
C#
using Wyam.Common.Tracing; namespace Wyam.Razor { internal class SilentDiagnosticSource : System.Diagnostics.DiagnosticSource { public override void Write(string name, object value) { // Do nothing } public override bool IsEnabled(string name) => true; } }
22.5
79
0.64127
[ "MIT" ]
FBoucher/Wyam
src/extensions/Wyam.Razor/SilentDiagnosticSource.cs
317
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; public class HabitantSpawner : MonoBehaviour{ private CircleCollider2D circleCollider; public GameObject habitantPrefab; private float radius; public int numberOfHabitants = 4; private void Start() { circleCollider = GetComponent<CircleCollider2D>(); radius = circleCollider.radius + 0.05f; InvokeRepeating("GenerateHabitants", 0.5f, 3f); } private Vector3 RandomPositionInCircle(){ float angle = Random.Range (0f, Mathf.PI * 2); float x = Mathf.Sin (angle) * radius; float y = Mathf.Cos (angle) * radius; return new Vector3(x, y, 0); } private void GenerateHabitants(){ for (int i = 0; i < numberOfHabitants; i++){ Vector3 pos = RandomPositionInCircle(); Vector3 pos1 = new Vector3(pos.x*2, pos.y*2, 0f); Vector3 shootDirection = (pos1 - pos).normalized; GameObject habitant = Instantiate(habitantPrefab, pos, Quaternion.identity); habitant.GetComponent<HabitantController>().Setup(shootDirection); } } }
32.638889
88
0.645106
[ "MIT" ]
RichieSjt/Unity-projects
Unity Projects/Homework 7/Assets/Scripts/HabitantSpawner.cs
1,177
C#
using revghost; using revghost.Module; namespace PataNext.Export.Desktop; public class EntryModule : HostModule { public EntryModule(HostRunnerScope scope) : base(scope) { } protected override void OnInit() { LoadModule(sc => new PataNext.Game.Module(sc)); LoadModule(sc => new PataNext.Game.Client.Module(sc)); } }
21.058824
62
0.678771
[ "MIT" ]
guerro323/Patapon4Unity
src/PataNext.Export.Desktop/EntryModule.cs
358
C#
using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Net; using System.Text; using System.Web; namespace BitPayAPI { /// <summary> /// Based on BitPay API v0.3.1 - https://bitpay.com/downloads/bitpayApi.pdf /// Bitcoin: 1qQSVhPa3ivWCefGp6ZjjSjHUpGUnhiL1 /// </summary> public class BitPay { public string APIKey { get; set; } public string BaseURL { get; set; } public string CreateInvoiceURL { get; set; } public string GetInvoiceURL { get; set; } public string GetRatesURL { get; set; } public BitPay(string apiKey) { APIKey = apiKey; BaseURL = "https://bitpay.com/api"; CreateInvoiceURL = "/invoice"; GetInvoiceURL = "/invoice/"; GetRatesURL = "/rates"; } public InvoiceResponse CreateInvoice(InvoiceRequest request, Log log) { if (request.Price <= 0) throw new Exception("Price must be greater than zero."); if (String.IsNullOrEmpty(request.Currency)) throw new Exception("Currency must be specified."); log.RequestURL = BaseURL + CreateInvoiceURL; log.RequestData = JsonConvert.SerializeObject(request, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); log.ResponseData = PostJSON(log.RequestURL, log.RequestData, true); JObject obj = JObject.Parse(log.ResponseData); var errorObj = obj["error"]; if (errorObj != null) return new InvoiceResponse() { ErrorType = errorObj["type"].ToString(), ErrorMessage = errorObj["message"].ToString() }; return new InvoiceResponse() { Invoice = obj.ToObject<Invoice>() }; } public InvoiceResponse GetInvoice(string invoiceId, Log log) { log.RequestURL = BaseURL + GetInvoiceURL + invoiceId; log.ResponseData = GetJSON(log.RequestURL, true); JObject obj = JObject.Parse(log.ResponseData); var errorObj = obj["error"]; if (errorObj != null) return new InvoiceResponse() { ErrorType = errorObj["type"].ToString(), ErrorMessage = errorObj["message"].ToString() }; return new InvoiceResponse() { Invoice = obj.ToObject<Invoice>() }; } public static Invoice GetInvoiceFromJSON(string json) { return JsonConvert.DeserializeObject<Invoice>(json); } public List<ConversionRate> GetRates(Log log) { log.RequestURL = BaseURL + GetRatesURL; log.ResponseData = GetJSON(log.RequestURL, false); return JsonConvert.DeserializeObject<List<ConversionRate>>(log.ResponseData); } private string PostJSON(string url, string data, bool sendAPIKey) { using (WebClient wc = GetWebClient(sendAPIKey)) { wc.Headers.Add("Content-Type", "application/json"); return wc.UploadString(url, data); } } private string GetJSON(string url, bool sendAPIKey) { using (WebClient wc = GetWebClient(sendAPIKey)) { return wc.DownloadString(url); } } private WebClient GetWebClient(bool sendAPIKey) { WebClient wc = new WebClient(); if (sendAPIKey) { // setting WebClient.Credentials doesn't send the auth headers first time so force this manually wc.Headers[HttpRequestHeader.Authorization] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(APIKey + ":")); } wc.Headers[HttpRequestHeader.UserAgent] = "BitPay WebForms (https://github.com/timabbott83/bitpay-webforms)"; return wc; } } public class InvoiceRequest { [JsonProperty("price")] public decimal Price { get; set; } [JsonProperty("currency")] public string Currency { get; set; } [JsonProperty("postData")] public Dictionary<string, string> PosData { get; set; } [JsonProperty("notificationURL")] public string NotificationURL { get; set; } [JsonProperty("transactionSpeed")] public string TransactionSpeed { get; set; } [JsonProperty("fullNotifications")] public bool? FullNotifications { get; set; } [JsonProperty("notificationEmail")] public string NotifcationEmail { get; set; } [JsonProperty("redirectURL")] public string RedirectURL { get; set; } [JsonProperty("orderID")] public string OrderID { get; set; } [JsonProperty("itemDesc")] public string ItemDesc { get; set; } [JsonProperty("itemCode")] public string ItemCode { get; set; } [JsonProperty("physical")] public bool? Physical { get; set; } [JsonProperty("buyerName")] public string BuyerName { get; set; } [JsonProperty("buyerAddress1")] public string BuyerAddress1 { get; set; } [JsonProperty("buyerAddress2")] public string BuyerAddress2 { get; set; } [JsonProperty("buyerCity")] public string BuyerCity { get; set; } [JsonProperty("buyerState")] public string BuyerState { get; set; } [JsonProperty("buyerZip")] public string BuyerZip { get; set; } [JsonProperty("buyerCountry")] public string BuyerCountry { get; set; } [JsonProperty("buyerEmail")] public string BuyerEmail { get; set; } [JsonProperty("buyerPhone")] public string BuyerPhone { get; set; } public InvoiceRequest() { } } public class InvoiceResponse { public bool Success { get { return Invoice != null; } } public Invoice Invoice { get; set; } public string ErrorType { get; set; } public string ErrorMessage { get; set; } public InvoiceResponse() { } } public class Invoice { [JsonProperty("id")] public string Id { get; set; } [JsonProperty("url")] public string URL { get; set; } [JsonProperty("posData")] public Dictionary<string, string> PosData { get; set; } [JsonProperty("status")] [JsonConverter(typeof(StringEnumConverter))] public InvoiceStatus Status { get; set; } [JsonProperty("price")] public decimal Price { get; set; } [JsonProperty("currency")] public string Currency { get; set; } [JsonProperty("btcPrice")] public decimal BTCPrice { get; set; } [JsonProperty("invoiceTime")] [JsonConverter(typeof(JsonDateTimeConverter))] public DateTime InvoiceTime { get; set; } [JsonProperty("expirationTime")] [JsonConverter(typeof(JsonDateTimeConverter))] public DateTime ExpirationTime { get; set; } [JsonProperty("currentTime")] [JsonConverter(typeof(JsonDateTimeConverter))] public DateTime CurrentTime { get; set; } public Invoice() { } } public enum InvoiceStatus { New, Paid, Confirmed, Complete, Expired, Invalid } public class Log { public string RequestURL { get; internal set; } public string RequestData { get; internal set; } public string ResponseData { get; internal set; } public Log() { } } public class ConversionRate { [JsonProperty("code")] public string CurrencyCode { get; set; } [JsonProperty("name")] public string CurrencyName { get; set; } [JsonProperty("rate")] public decimal Rate { get; set; } public ConversionRate() { } } public class JsonDateTimeConverter : JsonConverter { public override bool CanConvert(Type objectType) { return objectType == typeof(DateTime); } public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { return new DateTime(1970, 1, 1).AddSeconds(Convert.ToDouble(reader.Value)); } public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { //throw new NotImplementedException(); } } }
29.415541
146
0.59033
[ "MIT" ]
zzc1308/bitpay-webforms
App_Code/Bitpay.cs
8,709
C#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. using System.Collections.Generic; using System.Threading.Tasks; namespace Microsoft.AspNet.SignalR.Hubs { /// <summary> /// Implementations of this interface are responsible for executing operation required to complete various stages /// hub processing such as connecting, reconnecting, disconnecting, invoking server-side hub methods, invoking /// client-side hub methods, authorizing hub clients and rejoining hub groups. /// </summary> public interface IHubPipelineInvoker { /// <summary> /// Invokes a server-side hub method. /// </summary> /// <param name="context">A description of the server-side hub method invocation.</param> /// <returns>An asynchronous operation giving the return value of the server-side hub method invocation.</returns> Task<object> Invoke(IHubIncomingInvokerContext context); /// <summary> /// Invokes a client-side hub method. /// </summary> /// <param name="context">A description of the client-side hub method invocation.</param> Task Send(IHubOutgoingInvokerContext context); /// <summary> /// To be called when a client connects to the <see cref="HubDispatcher"/> for each <see cref="IHub"/> the client /// connects to. By default, this results in the <see cref="IHub"/>'s OnConnected method being invoked. /// </summary> /// <param name="hub">A <see cref="IHub"/> the client is connected to.</param> Task Connect(IHub hub); /// <summary> /// To be called when a client reconnects to the <see cref="HubDispatcher"/> for each <see cref="IHub"/> the client /// connects to. By default, this results in the <see cref="IHub"/>'s OnReconnected method being invoked. /// </summary> /// <param name="hub">A <see cref="IHub"/> the client is reconnected to.</param> Task Reconnect(IHub hub); /// <summary> /// To be called when a client disconnects from the <see cref="HubDispatcher"/> for each <see cref="IHub"/> the client /// was connected to. By default, this results in the <see cref="IHub"/>'s OnDisconnected method being invoked. /// </summary> /// <param name="hub">A <see cref="IHub"/> the client was disconnected from.</param> Task Disconnect(IHub hub); /// <summary> /// To be called before a client subscribes to signals belonging to the hub described by the <see cref="HubDescriptor"/>. /// By default, the <see cref="AuthorizeModule"/> will look for attributes on the <see cref="IHub"/> to help determine if /// the client is authorized to subscribe to method invocations for the described hub. /// </summary> /// <param name="hubDescriptor">A description of the hub the client is attempting to connect to.</param> /// <param name="request"> /// The connect request being made by the client which should include the client's /// <see cref="System.Security.Principal.IPrincipal"/> User. /// </param> /// <returns>true, if the client is authorized to subscribe to client-side hub method invocations; false, otherwise.</returns> bool AuthorizeConnect(HubDescriptor hubDescriptor, IRequest request); /// <summary> /// This method determines which of the groups belonging to the hub described by the <see cref="HubDescriptor"/> the client should be /// allowed to rejoin. /// By default, clients that are reconnecting to the server will be removed from all groups they may have previously been a member of, /// because untrusted clients may claim to be a member of groups they were never authorized to join. /// </summary> /// <param name="hubDescriptor">A description of the hub for which the client is attempting to rejoin groups.</param> /// <param name="request">The reconnect request being made by the client that is attempting to rejoin groups.</param> /// <param name="groups"> /// The list of groups belonging to the relevant hub that the client claims to have been a member of before the reconnect. /// </param> /// <returns>A list of groups the client is allowed to rejoin.</returns> IList<string> RejoiningGroups(HubDescriptor hubDescriptor, IRequest request, IList<string> groups); } }
58.948052
142
0.664904
[ "Apache-2.0" ]
AlaShiban/SignalR
src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipelineInvoker.cs
4,541
C#
// Decompiled with JetBrains decompiler // Type: System.Fabric.Management.ServiceModel.ServiceTypeTypeServicePlacementPolicy // Assembly: System.Fabric.Management.ServiceModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 // MVID: C6D32D4D-966E-4EA3-BD3A-F4CF14D36DBC // Assembly location: C:\Git\ServiceFabricSdkContrib\ServiceFabricSdkContrib.MsBuild\bin\Debug\netstandard2.0\publish\runtimes\win\lib\netstandard2.0\System.Fabric.Management.ServiceModel.dll using System.CodeDom.Compiler; using System.Diagnostics; using System.Xml.Serialization; namespace System.Fabric.Management.ServiceModel { [GeneratedCode("xsd", "4.0.30319.17929")] [DebuggerStepThrough] [XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/2011/01/fabric")] public class ServiceTypeTypeServicePlacementPolicy { private string domainNameField; private ServiceTypeTypeServicePlacementPolicyType typeField; [XmlAttribute] public string DomainName { get { return this.domainNameField; } set { this.domainNameField = value; } } [XmlAttribute] public ServiceTypeTypeServicePlacementPolicyType Type { get { return this.typeField; } set { this.typeField = value; } } } }
27.9375
191
0.721104
[ "MIT" ]
aL3891/ServiceFabricSdk-Contrib
System.Fabric.Management.ServiceModel/ServiceTypeTypeServicePlacementPolicy.cs
1,343
C#
/* * Original author: Max Horowitz-Gelb <maxhg .at. washington.edu>, * MacCoss Lab, Department of Genome Sciences, UW * * Copyright 2014 University of Washington - Seattle, WA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Windows.Forms; using pwiz.Skyline.Model.DocSettings; using pwiz.Skyline.Properties; using pwiz.Skyline.Util; using ZedGraph; namespace pwiz.Skyline.SettingsUI { public partial class DiaIsolationWindowsGraphForm : FormEx { private const int TOTAL_CYCLES_SHOWN = 3; private const double Y_SCALE_MAX = TOTAL_CYCLES_SHOWN; private const double Y_SCALE_MIN = -0.25; private readonly double _smallesMz; private readonly List<BoxObj> _windows; private readonly List<BoxObj> _leftMargins; private readonly List<BoxObj> _rightMargins; private readonly double _largestMz; private readonly Color _marginColor = Color.Salmon; private readonly Color _windowColor = Color.SteelBlue; private readonly Color _overlapRayColor = Color.FromArgb(100,70,130,180); private readonly Color _gapColor = Color.Red; private readonly Color _overlapColor = Color.Orange; private readonly List<BoxObj> _gapBoxes; private readonly List<BoxObj> _overlapBoxes; private readonly List<BoxObj> _overlapRayBoxes; public DiaIsolationWindowsGraphForm(List<IsolationWindow> isolationWindows, bool usesMargins, object deconv, int windowsPerScan) { InitializeComponent(); Icon = Resources.Skyline; if (isolationWindows.Count == 0) return; bool overlap = Equals(deconv, EditIsolationSchemeDlg.DeconvolutionMethod.MSX_OVERLAP) || Equals(deconv, EditIsolationSchemeDlg.DeconvolutionMethod.OVERLAP) || Equals(deconv, EditIsolationSchemeDlg.DeconvolutionMethod.FAST_OVERLAP); //Setup Graph zgIsolationGraph.GraphPane.Title.Text = Resources.DiaIsolationWindowsGraphForm_DiaIsolationWindowsGraphForm_Measurement_Windows; zgIsolationGraph.GraphPane.XAxis.Title.Text = Resources.DiaIsolationWindowsGraphForm_DiaIsolationWindowsGraphForm_m_z; zgIsolationGraph.GraphPane.YAxis.Title.Text = Resources.DiaIsolationWindowsGraphForm_DiaIsolationWindowsGraphForm_Cycle; zgIsolationGraph.GraphPane.IsFontsScaled = false; zgIsolationGraph.GraphPane.YAxis.Scale.IsReverse = true; zgIsolationGraph.GraphPane.YAxisList[0].MajorTic.IsOpposite = false; zgIsolationGraph.GraphPane.YAxisList[0].MinorTic.IsOpposite = false; zgIsolationGraph.GraphPane.XAxis.MajorTic.IsOpposite = false; zgIsolationGraph.GraphPane.XAxis.MinorTic.IsOpposite = false; zgIsolationGraph.MasterPane.Border.IsVisible = false; zgIsolationGraph.GraphPane.YAxis.MajorGrid.IsZeroLine = false; zgIsolationGraph.GraphPane.Border.IsVisible = false; zgIsolationGraph.GraphPane.Chart.Border.IsVisible = false; //Draw Lines and rectangles _windows = new List<BoxObj>(20); _leftMargins = new List<BoxObj>(20); _rightMargins = new List<BoxObj>(20); _smallesMz = Double.MaxValue; _largestMz = 0; var isolationWindowArray = isolationWindows.ToArray(); // ReSharper int windowCount = isolationWindowArray.Length; for (int cycle = 0; cycle < TOTAL_CYCLES_SHOWN; cycle ++) { int firstIndex = overlap && cycle%2 == 1 ? windowCount/2 : 0; int stopIndex = overlap && cycle%2 == 0 ? windowCount/2 : windowCount; for (int i = firstIndex; i < stopIndex; i++) { IsolationWindow window = isolationWindowArray[i]; double windowY = cycle + (double) (i - firstIndex)/(stopIndex - firstIndex); double windowX = window.Start; double windowWidth = window.End - window.Start; double windowHeight = 1.0/(stopIndex - firstIndex); BoxObj windowBox = new BoxObj(windowX,windowY,windowWidth,windowHeight,_windowColor,_windowColor) { IsClippedToChartRect = true }; zgIsolationGraph.GraphPane.GraphObjList.Add(windowBox); _windows.Add(windowBox); if (usesMargins) { double marginLeftX = windowX - window.StartMargin ?? 0; double marginLeftWidth = window.StartMargin ?? 0; BoxObj marginLeftBox = new BoxObj(marginLeftX,windowY,marginLeftWidth,windowHeight,_marginColor,_marginColor) { IsClippedToChartRect = true }; zgIsolationGraph.GraphPane.GraphObjList.Add(marginLeftBox); _leftMargins.Add(marginLeftBox); double marginRightX = windowX + windowWidth; double marginRightWidth = window.EndMargin ?? window.StartMargin ?? 0; BoxObj marginRightBox = new BoxObj(marginRightX, windowY, marginRightWidth, windowHeight, _marginColor, _marginColor) { IsClippedToChartRect = true }; zgIsolationGraph.GraphPane.GraphObjList.Add(marginRightBox); _rightMargins.Add(marginRightBox); _largestMz = Math.Max(marginRightX + marginRightWidth, _largestMz); _smallesMz = Math.Min(marginLeftX,_smallesMz); } _largestMz = Math.Max(_largestMz, windowX + windowWidth); _smallesMz = Math.Min(_smallesMz, windowX); } } _overlapRayBoxes = overlap ? new List<BoxObj>() : null; _gapBoxes= new List<BoxObj>(); _overlapBoxes = new List<BoxObj>(); for (int cycle = 0; cycle < TOTAL_CYCLES_SHOWN; cycle ++) { int currentCycleStart; int currentCycleCount; int nextCycleStart; int nextCycleCount; if (overlap) { currentCycleStart = cycle * windowCount/2; currentCycleCount = windowCount/2; nextCycleStart = currentCycleStart + currentCycleCount; nextCycleCount = windowCount/2; } else { currentCycleStart = cycle * windowCount; currentCycleCount = windowCount; nextCycleStart = currentCycleStart + windowCount; nextCycleCount = windowCount; } List<BoxObj> currentCycleWindows = _windows.GetRange(currentCycleStart, currentCycleCount).OrderBy(o => Location.X).ToList(); List<BoxObj> nextCycleWindows = cycle < TOTAL_CYCLES_SHOWN - 1 ? _windows.GetRange(nextCycleStart, nextCycleCount).OrderBy(o => Location.X).ToList() : null; for (int i = 0; i < currentCycleWindows.Count; i++) { BoxObj currentCycleCurrentBox = currentCycleWindows.ElementAt(i); BoxObj currentCycleNextBox = i < currentCycleWindows.Count - 1 ? currentCycleWindows.ElementAt(i+1) : null; if (currentCycleNextBox != null) { checkGaps(currentCycleCurrentBox,currentCycleNextBox); checkOverlaps(currentCycleCurrentBox,currentCycleNextBox); } if (overlap && i%2 == 0 && nextCycleWindows != null) { int leftBoxIndex = cycle % 2 == 0 ? i : i - 1; BoxObj nextCycleLeftBox = leftBoxIndex >= 0 ? nextCycleWindows.ElementAt(leftBoxIndex) : null; int rightBoxIndex = cycle % 2 == 0 ? i + 1 : i; BoxObj nextCycleRightBox = rightBoxIndex < nextCycleWindows.Count ? nextCycleWindows.ElementAt(rightBoxIndex) : null; BoxObj rayBoxLeft = null; BoxObj rayBoxRight = null; if (nextCycleLeftBox != null) { rayBoxLeft = GetOverLapRay(currentCycleCurrentBox, nextCycleLeftBox); if (rayBoxLeft != null) { zgIsolationGraph.GraphPane.GraphObjList.Add(rayBoxLeft); _overlapRayBoxes.Add(rayBoxLeft); } } if (nextCycleRightBox != null) { rayBoxRight = GetOverLapRay(currentCycleCurrentBox, nextCycleRightBox); if (rayBoxRight != null) { zgIsolationGraph.GraphPane.GraphObjList.Add(rayBoxRight); _overlapRayBoxes.Add(rayBoxRight); } } if (rayBoxLeft != null && rayBoxRight == null) { rayBoxLeft.Location.X1 = currentCycleCurrentBox.Location.X1; rayBoxLeft.Location.Width = currentCycleCurrentBox.Location.Width; } else if (rayBoxRight != null && rayBoxLeft == null) { rayBoxRight.Location.X1 = currentCycleCurrentBox.Location.X1; rayBoxRight.Location.Width = currentCycleCurrentBox.Location.Width; } } } } zgIsolationGraph.GraphPane.XAxis.Scale.Min = _smallesMz; zgIsolationGraph.GraphPane.XAxis.Scale.Max = _largestMz; zgIsolationGraph.GraphPane.YAxis.Scale.Min = Y_SCALE_MIN; zgIsolationGraph.GraphPane.YAxis.Scale.Max = Y_SCALE_MAX; zgIsolationGraph.AxisChange(); zgIsolationGraph.Invalidate(); //Setup check boxes and color labels if (usesMargins) { cbMargin.Checked = true; } else { cbMargin.Hide(); labelMarginColor.Hide(); int width = cbMargin.Width; cbShowOverlapRays.Left -= width; labelOverlapColor.Left -= width; cbShowOverlapsSingle.Left -= width; labelSingleOverlapColor.Left -= width; cbShowGaps.Left -= width; labelGapColor.Left -= width; } cbShowGaps.Checked = true; cbShowOverlapsSingle.Checked = true; if (overlap) { cbShowOverlapRays.Checked = true; labelOverlapColor.Visible = true; } else { cbShowOverlapRays.Hide(); labelOverlapColor.Hide(); } labelMarginColor.BackColor = _marginColor; labelWindowColor.BackColor = _windowColor; labelGapColor.BackColor = _gapColor; labelSingleOverlapColor.BackColor = _overlapColor; labelOverlapColor.BackColor = _overlapRayColor; } private BoxObj GetOverLapRay(GraphObj top, GraphObj bottom) { if (bottom.Location.X2 > top.Location.X1 && bottom.Location.X2 <= top.Location.X2) { double x1 = Math.Max(top.Location.X1, bottom.Location.X1); double y1 = top.Location.Y1; double width = bottom.Location.X2 - x1; double height = bottom.Location.Y1 - top.Location.Y1; return new BoxObj(x1,y1,width,height, Color.FromArgb(0,0,0,0),_overlapRayColor) { IsClippedToChartRect = true }; } else if (bottom.Location.X1 < top.Location.X2 && bottom.Location.X1 >= top.Location.X1) { double x1 = bottom.Location.X1; double y1 = top.Location.Y1; double height = bottom.Location.Y1 - top.Location.Y1; double width = Math.Min(bottom.Location.X2, top.Location.X2) - x1; return new BoxObj(x1, y1, width, height, Color.FromArgb(0, 0, 0, 0), _overlapRayColor) { IsClippedToChartRect = true }; } else if (top.Location.X1 > bottom.Location.X1 && top.Location.X2 < bottom.Location.X2) { double x1 = top.Location.X1; double y1 = top.Location.Y1; double width = top.Location.Width; double height = bottom.Location.Y1 - top.Location.Y1; return new BoxObj(x1, y1, width, height, Color.FromArgb(0, 0, 0, 0), _overlapRayColor) { IsClippedToChartRect = true }; } else { return null; } } private void checkGaps(GraphObj current,GraphObj next) { if (current.Location.X2 < next.Location.X1) { double gapWidth = next.Location.X1 - current.Location.X2; BoxObj gapBox1 = new BoxObj(current.Location.X2, Math.Floor(current.Location.Y), gapWidth, 1, _gapColor, _gapColor) { IsClippedToChartRect = true }; zgIsolationGraph.GraphPane.GraphObjList.Add(gapBox1); _gapBoxes.Add(gapBox1); } } private void checkOverlaps(GraphObj current, GraphObj next) { if (current.Location.X2 > next.Location.X1) { double overlapWidth = current.Location.X2 - next.Location.X1; BoxObj overlapBox1 = new BoxObj(next.Location.X1, Math.Floor(current.Location.Y), overlapWidth, 1, _overlapColor, _overlapColor) { IsClippedToChartRect = true }; zgIsolationGraph.GraphPane.GraphObjList.Add(overlapBox1); _overlapBoxes.Add(overlapBox1); } } private void RescaleGraph() { if (zgIsolationGraph.GraphPane.XAxis.Scale.Min < _smallesMz) zgIsolationGraph.GraphPane.XAxis.Scale.Min = _smallesMz; if (zgIsolationGraph.GraphPane.XAxis.Scale.Max > _largestMz) zgIsolationGraph.GraphPane.XAxis.Scale.Max = _largestMz; zgIsolationGraph.GraphPane.YAxis.Scale.Max = Y_SCALE_MAX; zgIsolationGraph.GraphPane.YAxis.Scale.Min = Y_SCALE_MIN; zgIsolationGraph.Refresh(); } private void checkBox1_CheckedChanged(object sender, EventArgs e) { zgIsolationGraph.GraphPane.Title.Text = cbMargin.Checked ? Resources.DiaIsolationWindowsGraphForm_DiaIsolationWindowsGraphForm_Measurement_Windows : Resources.DiaIsolationWindowsGraphForm_checkBox1_CheckedChanged_Extraction_Windows; foreach (BoxObj margin in _leftMargins) { margin.IsVisible = cbMargin.Checked; } foreach (BoxObj margin in _rightMargins) { margin.IsVisible = cbMargin.Checked; } zgIsolationGraph.Refresh(); } private void zgIsolationWindow_ZoomEvent(ZedGraphControl sender, ZoomState oldstate, ZoomState newstate, PointF mousePosition) { RescaleGraph(); } private void zgIsolationGraph_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState) { ZedGraphHelper.BuildContextMenu(sender, menuStrip); } public void CloseButton() { btnClose.PerformClick(); } public List<BoxObj> LeftMargins { get { return _leftMargins; } } public List<BoxObj> RightMargins { get { return _rightMargins; } } public List<BoxObj> Windows { get { return _windows; } } public List<BoxObj> Gaps { get { return _gapBoxes; } } public List<BoxObj> Overlaps { get { return _overlapBoxes; } } public int CyclesPerGraph { get { return TOTAL_CYCLES_SHOWN; } } private void zgIsolationGraph_ScrollEvent(object sender, ScrollEventArgs e) { RescaleGraph(); } private void cbShowGaps_CheckedChanged(object sender, EventArgs e) { foreach (BoxObj gap in _gapBoxes) gap.IsVisible = cbShowGaps.Checked; zgIsolationGraph.Refresh(); } private void cbShowOverlaps_CheckedChanged(object sender, EventArgs e) { foreach (BoxObj overlap in _overlapBoxes) overlap.IsVisible = cbShowOverlapsSingle.Checked; zgIsolationGraph.Refresh(); } private void cbShowOverlapRays_CheckedChanged(object sender, EventArgs e) { foreach (BoxObj box in _overlapRayBoxes) { box.IsVisible = cbShowOverlapRays.Checked; } zgIsolationGraph.Refresh(); } } }
44.273349
173
0.540749
[ "Apache-2.0" ]
shze/pwizard-deb
pwiz_tools/Skyline/SettingsUI/DiaIsolationWindowsGraphForm.cs
19,438
C#
using UnityEngine; using MessagePack; [MessagePackObject, System.Serializable] public class SampleMessagePackObject { [Key(0)] public int id; [Key(1)] public float value; [Key(2)] public string name; [IgnoreMember] public string ignored; [Key(3)] public Vector3 position; // NOTE: // public string keyLess; // This makes following error. // "all public members must mark KeyAttribute or IgnoreMemberAttribute." } public class SerializeDeserializeSample : MonoBehaviour { public SampleMessagePackObject serializedObject; public SampleMessagePackObject deserializedObject; byte[] serializedData; void Start() { serializedData = MessagePackSerializer.Serialize(serializedObject); deserializedObject = MessagePackSerializer.Deserialize<SampleMessagePackObject>(serializedData); } void OnGUI() { GUILayout.Label("SerializedObject Hash : " + serializedObject.GetHashCode()); GUILayout.Label("DeSerializedObject Hash : " + deserializedObject.GetHashCode()); } }
30.583333
104
0.697548
[ "BSD-3-Clause" ]
XJINE/Unity_MessagePackSample
Assets/SerializeDeserializeSample.cs
1,101
C#
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.Rancher2 { /// <summary> /// Provides a Rancher v2 Auth Config KeyCloak resource. This can be used to configure and enable Auth Config KeyCloak for Rancher v2 RKE clusters and retrieve their information. /// /// In addition to the built-in local auth, only one external auth config provider can be enabled at a time. /// /// &gt; This content is derived from https://github.com/terraform-providers/terraform-provider-rancher2/blob/master/website/docs/r/authConfigKeyCloak.html.markdown. /// </summary> public partial class AuthConfigKeycloak : Pulumi.CustomResource { /// <summary> /// Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string) /// </summary> [Output("accessMode")] public Output<string?> AccessMode { get; private set; } = null!; /// <summary> /// Allowed principal ids for auth. Required if `access_mode` is `required` or `restricted`. Ex: `keycloak_user://&lt;USER_ID&gt;` `keycloak_group://&lt;GROUP_ID&gt;` (list) /// </summary> [Output("allowedPrincipalIds")] public Output<ImmutableArray<string>> AllowedPrincipalIds { get; private set; } = null!; /// <summary> /// Annotations of the resource (map) /// </summary> [Output("annotations")] public Output<ImmutableDictionary<string, object>> Annotations { get; private set; } = null!; /// <summary> /// KeyCloak display name field (string) /// </summary> [Output("displayNameField")] public Output<string> DisplayNameField { get; private set; } = null!; /// <summary> /// Enable auth config provider. Default `true` (bool) /// </summary> [Output("enabled")] public Output<bool?> Enabled { get; private set; } = null!; /// <summary> /// KeyCloak group field (string) /// </summary> [Output("groupsField")] public Output<string> GroupsField { get; private set; } = null!; /// <summary> /// KeyCloak IDP metadata content (string) /// </summary> [Output("idpMetadataContent")] public Output<string> IdpMetadataContent { get; private set; } = null!; /// <summary> /// Labels of the resource (map) /// </summary> [Output("labels")] public Output<ImmutableDictionary<string, object>> Labels { get; private set; } = null!; /// <summary> /// (Computed) The name of the resource (string) /// </summary> [Output("name")] public Output<string> Name { get; private set; } = null!; /// <summary> /// Rancher url. Schema needs to be specified, `https://&lt;RANCHER_API_HOST&gt;` (string) /// </summary> [Output("rancherApiHost")] public Output<string> RancherApiHost { get; private set; } = null!; /// <summary> /// KeyCloak SP cert (string) /// </summary> [Output("spCert")] public Output<string> SpCert { get; private set; } = null!; /// <summary> /// KeyCloak SP key (string) /// </summary> [Output("spKey")] public Output<string> SpKey { get; private set; } = null!; /// <summary> /// (Computed) The type of the resource (string) /// </summary> [Output("type")] public Output<string> Type { get; private set; } = null!; /// <summary> /// KeyCloak UID field (string) /// </summary> [Output("uidField")] public Output<string> UidField { get; private set; } = null!; /// <summary> /// KeyCloak user name field (string) /// </summary> [Output("userNameField")] public Output<string> UserNameField { get; private set; } = null!; /// <summary> /// Create a AuthConfigKeycloak resource with the given unique name, arguments, and options. /// </summary> /// /// <param name="name">The unique name of the resource</param> /// <param name="args">The arguments used to populate this resource's properties</param> /// <param name="options">A bag of options that control this resource's behavior</param> public AuthConfigKeycloak(string name, AuthConfigKeycloakArgs args, CustomResourceOptions? options = null) : base("rancher2:index/authConfigKeycloak:AuthConfigKeycloak", name, args ?? ResourceArgs.Empty, MakeResourceOptions(options, "")) { } private AuthConfigKeycloak(string name, Input<string> id, AuthConfigKeycloakState? state = null, CustomResourceOptions? options = null) : base("rancher2:index/authConfigKeycloak:AuthConfigKeycloak", name, state, MakeResourceOptions(options, id)) { } private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id) { var defaultOptions = new CustomResourceOptions { Version = Utilities.Version, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. merged.Id = id ?? merged.Id; return merged; } /// <summary> /// Get an existing AuthConfigKeycloak resource's state with the given name, ID, and optional extra /// properties used to qualify the lookup. /// </summary> /// /// <param name="name">The unique name of the resulting resource.</param> /// <param name="id">The unique provider ID of the resource to lookup.</param> /// <param name="state">Any extra arguments used during the lookup.</param> /// <param name="options">A bag of options that control this resource's behavior</param> public static AuthConfigKeycloak Get(string name, Input<string> id, AuthConfigKeycloakState? state = null, CustomResourceOptions? options = null) { return new AuthConfigKeycloak(name, id, state, options); } } public sealed class AuthConfigKeycloakArgs : Pulumi.ResourceArgs { /// <summary> /// Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string) /// </summary> [Input("accessMode")] public Input<string>? AccessMode { get; set; } [Input("allowedPrincipalIds")] private InputList<string>? _allowedPrincipalIds; /// <summary> /// Allowed principal ids for auth. Required if `access_mode` is `required` or `restricted`. Ex: `keycloak_user://&lt;USER_ID&gt;` `keycloak_group://&lt;GROUP_ID&gt;` (list) /// </summary> public InputList<string> AllowedPrincipalIds { get => _allowedPrincipalIds ?? (_allowedPrincipalIds = new InputList<string>()); set => _allowedPrincipalIds = value; } [Input("annotations")] private InputMap<object>? _annotations; /// <summary> /// Annotations of the resource (map) /// </summary> public InputMap<object> Annotations { get => _annotations ?? (_annotations = new InputMap<object>()); set => _annotations = value; } /// <summary> /// KeyCloak display name field (string) /// </summary> [Input("displayNameField", required: true)] public Input<string> DisplayNameField { get; set; } = null!; /// <summary> /// Enable auth config provider. Default `true` (bool) /// </summary> [Input("enabled")] public Input<bool>? Enabled { get; set; } /// <summary> /// KeyCloak group field (string) /// </summary> [Input("groupsField", required: true)] public Input<string> GroupsField { get; set; } = null!; /// <summary> /// KeyCloak IDP metadata content (string) /// </summary> [Input("idpMetadataContent", required: true)] public Input<string> IdpMetadataContent { get; set; } = null!; [Input("labels")] private InputMap<object>? _labels; /// <summary> /// Labels of the resource (map) /// </summary> public InputMap<object> Labels { get => _labels ?? (_labels = new InputMap<object>()); set => _labels = value; } /// <summary> /// Rancher url. Schema needs to be specified, `https://&lt;RANCHER_API_HOST&gt;` (string) /// </summary> [Input("rancherApiHost", required: true)] public Input<string> RancherApiHost { get; set; } = null!; /// <summary> /// KeyCloak SP cert (string) /// </summary> [Input("spCert", required: true)] public Input<string> SpCert { get; set; } = null!; /// <summary> /// KeyCloak SP key (string) /// </summary> [Input("spKey", required: true)] public Input<string> SpKey { get; set; } = null!; /// <summary> /// KeyCloak UID field (string) /// </summary> [Input("uidField", required: true)] public Input<string> UidField { get; set; } = null!; /// <summary> /// KeyCloak user name field (string) /// </summary> [Input("userNameField", required: true)] public Input<string> UserNameField { get; set; } = null!; public AuthConfigKeycloakArgs() { } } public sealed class AuthConfigKeycloakState : Pulumi.ResourceArgs { /// <summary> /// Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string) /// </summary> [Input("accessMode")] public Input<string>? AccessMode { get; set; } [Input("allowedPrincipalIds")] private InputList<string>? _allowedPrincipalIds; /// <summary> /// Allowed principal ids for auth. Required if `access_mode` is `required` or `restricted`. Ex: `keycloak_user://&lt;USER_ID&gt;` `keycloak_group://&lt;GROUP_ID&gt;` (list) /// </summary> public InputList<string> AllowedPrincipalIds { get => _allowedPrincipalIds ?? (_allowedPrincipalIds = new InputList<string>()); set => _allowedPrincipalIds = value; } [Input("annotations")] private InputMap<object>? _annotations; /// <summary> /// Annotations of the resource (map) /// </summary> public InputMap<object> Annotations { get => _annotations ?? (_annotations = new InputMap<object>()); set => _annotations = value; } /// <summary> /// KeyCloak display name field (string) /// </summary> [Input("displayNameField")] public Input<string>? DisplayNameField { get; set; } /// <summary> /// Enable auth config provider. Default `true` (bool) /// </summary> [Input("enabled")] public Input<bool>? Enabled { get; set; } /// <summary> /// KeyCloak group field (string) /// </summary> [Input("groupsField")] public Input<string>? GroupsField { get; set; } /// <summary> /// KeyCloak IDP metadata content (string) /// </summary> [Input("idpMetadataContent")] public Input<string>? IdpMetadataContent { get; set; } [Input("labels")] private InputMap<object>? _labels; /// <summary> /// Labels of the resource (map) /// </summary> public InputMap<object> Labels { get => _labels ?? (_labels = new InputMap<object>()); set => _labels = value; } /// <summary> /// (Computed) The name of the resource (string) /// </summary> [Input("name")] public Input<string>? Name { get; set; } /// <summary> /// Rancher url. Schema needs to be specified, `https://&lt;RANCHER_API_HOST&gt;` (string) /// </summary> [Input("rancherApiHost")] public Input<string>? RancherApiHost { get; set; } /// <summary> /// KeyCloak SP cert (string) /// </summary> [Input("spCert")] public Input<string>? SpCert { get; set; } /// <summary> /// KeyCloak SP key (string) /// </summary> [Input("spKey")] public Input<string>? SpKey { get; set; } /// <summary> /// (Computed) The type of the resource (string) /// </summary> [Input("type")] public Input<string>? Type { get; set; } /// <summary> /// KeyCloak UID field (string) /// </summary> [Input("uidField")] public Input<string>? UidField { get; set; } /// <summary> /// KeyCloak user name field (string) /// </summary> [Input("userNameField")] public Input<string>? UserNameField { get; set; } public AuthConfigKeycloakState() { } } }
36.50134
182
0.571282
[ "ECL-2.0", "Apache-2.0" ]
mitchellmaler/pulumi-rancher2
sdk/dotnet/AuthConfigKeycloak.cs
13,615
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using WVisibility = Microsoft.UI.Xaml.Visibility; namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP { internal class TitleViewManager { readonly ITitleViewRendererController _titleViewRendererController; View TitleView => _titleViewRendererController.TitleView; CommandBar CommandBar => _titleViewRendererController.CommandBar; FrameworkElement TitleViewPresenter => _titleViewRendererController.TitleViewPresenter; public TitleViewManager(ITitleViewRendererController titleViewRendererController) { _titleViewRendererController = titleViewRendererController; if (TitleViewPresenter != null) { TitleViewPresenter.Loaded += OnTitleViewPresenterLoaded; } if (CommandBar != null) { CommandBar.LayoutUpdated += commandLayoutUpdated; CommandBar.Unloaded += commandBarUnloaded; } } internal void OnTitleViewPropertyChanged() { UpdateTitleViewWidth(); } void OnTitleViewPresenterLoaded(object sender, RoutedEventArgs e) { UpdateTitleViewWidth(); if (TitleViewPresenter != null) { TitleViewPresenter.Loaded -= OnTitleViewPresenterLoaded; } } void commandBarUnloaded(object sender, RoutedEventArgs e) { if (CommandBar != null) { CommandBar.LayoutUpdated -= commandLayoutUpdated; CommandBar.Unloaded -= commandBarUnloaded; } } void commandLayoutUpdated(object sender, object e) { UpdateTitleViewWidth(); } void UpdateTitleViewWidth() { if (TitleView == null || TitleViewPresenter == null || CommandBar == null) return; if (CommandBar.ActualWidth <= 0) return; double buttonWidth = 0; foreach (var item in CommandBar.GetDescendantsByName<Microsoft.UI.Xaml.Controls.Button>("MoreButton")) if (item.Visibility == WVisibility.Visible) buttonWidth += item.ActualWidth; if (!CommandBar.IsDynamicOverflowEnabled) foreach (var item in CommandBar.GetDescendantsByName<ItemsControl>("PrimaryItemsControl")) buttonWidth += item.ActualWidth; TitleViewPresenter.Width = CommandBar.ActualWidth - buttonWidth; UpdateVisibility(); } void UpdateVisibility() { if (TitleView == null) _titleViewRendererController.TitleViewVisibility = Visibility.Collapsed; else _titleViewRendererController.TitleViewVisibility = Visibility.Visible; } } }
26.574468
105
0.757006
[ "MIT" ]
10088/maui
src/Compatibility/Core/src/Windows/TitleViewManager.cs
2,498
C#
// Copyright 2012-2013 Chris Patterson // // 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. namespace FeatherVane.VaneConfigurators { using System; using System.Collections.Generic; using System.Linq; using Configurators; using VaneBuilders; public class VaneConfiguratorImpl<T> : VaneConfigurator<T>, VaneFactory<T> { readonly IList<VaneBuilderConfigurator<T>> _configurators; readonly Func<Vane<T>> _tailFactory; public VaneConfiguratorImpl(Func<Vane<T>> tailFactory) { _tailFactory = tailFactory; _configurators = new List<VaneBuilderConfigurator<T>>(); } public void Add(VaneBuilderConfigurator<T> vaneBuilderConfigurator) { _configurators.Add(vaneBuilderConfigurator); } IEnumerable<ValidateResult> Configurator.Validate() { if (_tailFactory == null) yield return this.Failure("TailFactory", "must not be null"); foreach (ValidateResult result in _configurators.SelectMany(x => x.Validate())) yield return result; } Vane<T> VaneFactory<T>.Create() { var builder = new VaneBuilderImpl<T>(_tailFactory); foreach (var configurator in _configurators) configurator.Configure(builder); return builder.Build(); } } }
33.711864
93
0.636501
[ "Apache-2.0" ]
phatboyg/FeatherVane
src/FeatherVane/Configuration/VaneConfigurators/VaneConfiguratorImpl.cs
1,991
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using API.Models; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Newtonsoft.Json.Serialization; namespace 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.AddControllers().AddJsonOptions(options => options.JsonSerializerOptions.PropertyNamingPolicy = null); services.AddDbContext<PaymentDetailContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DevConnection"))); services.AddCors(options => { options.AddPolicy("*", builder => { builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader(); }); }); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseRouting(); app.UseCors("*"); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); } } }
30.492537
123
0.631914
[ "MIT" ]
CaraLagumen/CaraForBP
API/Startup.cs
2,043
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. #nullable enable using System; using System.Collections.Generic; using System.Collections.Immutable; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.ErrorReporting; using Microsoft.CodeAnalysis.Host; using Microsoft.CodeAnalysis.Internal.Log; using Microsoft.CodeAnalysis.Notification; using Microsoft.CodeAnalysis.Remote.Diagnostics; using Microsoft.CodeAnalysis.Remote.Services; using Microsoft.CodeAnalysis.Serialization; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.LanguageServices.Telemetry; using Microsoft.VisualStudio.Telemetry; using Roslyn.Utilities; using RoslynLogger = Microsoft.CodeAnalysis.Internal.Log.Logger; namespace Microsoft.CodeAnalysis.Remote { /// <summary> /// Service that client will connect to to make service hub alive even when there is /// no other people calling service hub. /// /// basically, this is used to manage lifetime of the service hub. /// </summary> internal partial class RemoteHostService : ServiceBase, IRemoteHostService { private readonly static TimeSpan s_reportInterval = TimeSpan.FromMinutes(2); private readonly CancellationTokenSource _shutdownCancellationSource; // it is saved here more on debugging purpose. private static Func<FunctionId, bool> s_logChecker = _ => false; private string? _host; private int _primaryInstance; private PerformanceReporter? _performanceReporter; static RemoteHostService() { // this is the very first service which will be called from client (VS) // we set up logger here RoslynLogger.SetLogger(new EtwLogger(s_logChecker)); SetNativeDllSearchDirectories(); } public RemoteHostService(Stream stream, IServiceProvider serviceProvider) : base(serviceProvider, stream) { _shutdownCancellationSource = new CancellationTokenSource(); // this service provide a way for client to make sure remote host is alive StartService(); } public string Connect(string host, int uiCultureLCID, int cultureLCID, string? serializedSession, CancellationToken cancellationToken) { return RunService(() => { cancellationToken.ThrowIfCancellationRequested(); _primaryInstance = InstanceId; var existing = Interlocked.CompareExchange(ref _host, host, null); // serializedSession may be null for testing if (serializedSession != null) { SetGlobalContext(uiCultureLCID, cultureLCID, serializedSession); } if (existing != null && existing != host) { Log(TraceEventType.Error, $"{host} is given for {existing}"); } // log telemetry that service hub started RoslynLogger.Log(FunctionId.RemoteHost_Connect, KeyValueLogMessage.Create(SetSessionInfo)); if (serializedSession != null) { // Set this process's priority BelowNormal. // this should let us to freely try to use all resources possible without worrying about affecting // host's work such as responsiveness or build. Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.BelowNormal; } return _host; }, cancellationToken); } public void OnGlobalOperationStarted(string unused) { RunService(() => { var globalOperationNotificationService = GetGlobalOperationNotificationService(); globalOperationNotificationService?.OnStarted(); }, CancellationToken.None); } public void OnGlobalOperationStopped(IReadOnlyList<string> operations, bool cancelled) { RunService(() => { var globalOperationNotificationService = GetGlobalOperationNotificationService(); globalOperationNotificationService?.OnStopped(operations, cancelled); }, CancellationToken.None); } public void SetLoggingFunctionIds(List<string> loggerTypes, List<string> functionIds, CancellationToken cancellationToken) { RunService(() => { var functionIdType = typeof(FunctionId); var set = new HashSet<FunctionId>(); foreach (var functionIdString in functionIds) { cancellationToken.ThrowIfCancellationRequested(); try { set.Add((FunctionId)Enum.Parse(functionIdType, functionIdString.Trim(), ignoreCase: true)); } catch { // unknown functionId, move on continue; } } Func<FunctionId, bool> logChecker = id => set.Contains(id); lock (s_logChecker) { // holding onto it for debugging purpose s_logChecker = logChecker; } // we only support 2 types of loggers SetRoslynLogger(loggerTypes, () => new EtwLogger(logChecker)); SetRoslynLogger(loggerTypes, () => new TraceLogger(logChecker)); }, cancellationToken); } private static void SetRoslynLogger<T>(List<string> loggerTypes, Func<T> creator) where T : ILogger { if (loggerTypes.Contains(typeof(T).Name)) { RoslynLogger.SetLogger(AggregateLogger.AddOrReplace(creator(), RoslynLogger.GetLogger(), l => l is T)); } else { RoslynLogger.SetLogger(AggregateLogger.Remove(RoslynLogger.GetLogger(), l => l is T)); } } private void SetSessionInfo(Dictionary<string, object?> m) { m["Host"] = _host; m["InstanceId"] = _primaryInstance; } private void SetGlobalContext(int uiCultureLCID, int cultureLCID, string serializedSession) { var session = new TelemetrySession(serializedSession); session.Start(); EnsureCulture(uiCultureLCID, cultureLCID); // set roslyn loggers RoslynServices.SetTelemetrySession(session); RoslynLogger.SetLogger(AggregateLogger.Create(new VSTelemetryLogger(session), RoslynLogger.GetLogger())); // set both handler as NFW FatalError.Handler = ex => WatsonReporter.Report(ex, WatsonSeverity.Critical); FatalError.NonFatalHandler = ex => WatsonReporter.Report(ex); // start performance reporter var diagnosticAnalyzerPerformanceTracker = SolutionService.PrimaryWorkspace.Services.GetService<IPerformanceTrackerService>(); if (diagnosticAnalyzerPerformanceTracker != null) { var globalOperationNotificationService = SolutionService.PrimaryWorkspace.Services.GetService<IGlobalOperationNotificationService>(); _performanceReporter = new PerformanceReporter(Logger, diagnosticAnalyzerPerformanceTracker, globalOperationNotificationService, s_reportInterval, _shutdownCancellationSource.Token); } } private static void EnsureCulture(int uiCultureLCID, int cultureLCID) { // this follows what VS does // http://index/?leftProject=Microsoft.VisualStudio.Platform.AppDomainManager&leftSymbol=wok83tw8yxy7&file=VsAppDomainManager.cs&line=106 try { // set default culture for Roslyn OOP CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo(uiCultureLCID); CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(cultureLCID); } catch (Exception ex) when (ExpectedCultureIssue(ex)) { // ignore expected culture issue } } private static bool ExpectedCultureIssue(Exception ex) { // report exception WatsonReporter.Report(ex); // ignore expected exception return ex is ArgumentOutOfRangeException || ex is CultureNotFoundException; } private RemoteGlobalOperationNotificationService? GetGlobalOperationNotificationService() { var notificationService = SolutionService.PrimaryWorkspace.Services.GetService<IGlobalOperationNotificationService>() as RemoteGlobalOperationNotificationService; return notificationService; } [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] private static extern IntPtr AddDllDirectory(string directory); private static void SetNativeDllSearchDirectories() { if (PlatformInformation.IsWindows) { // Set LoadLibrary search directory to %VSINSTALLDIR%\Common7\IDE so that the compiler // can P/Invoke to Microsoft.DiaSymReader.Native when emitting Windows PDBs. // // The AppDomain base directory is specified in VisualStudio\Setup\codeAnalysisService.servicehub.service.json // to be the directory where devenv.exe is -- which is exactly the directory we need to add to the search paths: // // "appBasePath": "%VSAPPIDDIR%" // var loadDir = AppDomain.CurrentDomain.BaseDirectory; try { if (AddDllDirectory(loadDir) == IntPtr.Zero) { throw new Win32Exception(); } } catch (EntryPointNotFoundException) { // AddDllDirectory API might not be available on Windows 7. Environment.SetEnvironmentVariable("MICROSOFT_DIASYMREADER_NATIVE_ALT_LOAD_PATH", loadDir); } } } public Task SynchronizePrimaryWorkspaceAsync(PinnedSolutionInfo solutionInfo, Checksum checksum, int workspaceVersion, CancellationToken cancellationToken) { return RunServiceAsync(async () => { using (RoslynLogger.LogBlock(FunctionId.RemoteHostService_SynchronizePrimaryWorkspaceAsync, Checksum.GetChecksumLogInfo, checksum, cancellationToken)) { var solutionService = CreateSolutionService(solutionInfo); await solutionService.UpdatePrimaryWorkspaceAsync(checksum, workspaceVersion, cancellationToken).ConfigureAwait(false); } }, cancellationToken); } public Task SynchronizeGlobalAssetsAsync(PinnedSolutionInfo solutionInfo, Checksum[] checksums, CancellationToken cancellationToken) { return RunServiceAsync(async () => { using (RoslynLogger.LogBlock(FunctionId.RemoteHostService_SynchronizeGlobalAssetsAsync, Checksum.GetChecksumsLogInfo, checksums, cancellationToken)) { var assetProvider = SolutionService.CreateAssetProvider(solutionInfo, AssetStorage); var assets = await assetProvider.GetAssetsAsync<object>(checksums, cancellationToken).ConfigureAwait(false); foreach (var (checksum, value) in assets) { AssetStorage.TryAddGlobalAsset(checksum, value); } } }, cancellationToken); } public Task SynchronizeTextAsync(DocumentId documentId, Checksum baseTextChecksum, IEnumerable<TextChange> textChanges, CancellationToken cancellationToken) { return RunServiceAsync(async () => { using (RoslynLogger.LogBlock(FunctionId.RemoteHostService_SynchronizeTextAsync, Checksum.GetChecksumLogInfo, baseTextChecksum, cancellationToken)) { var service = SolutionService.PrimaryWorkspace.Services.GetService<ISerializerService>(); if (service == null) { return; } var text = await TryGetSourceTextAsync().ConfigureAwait(false); if (text == null) { // it won't bring in base text if it is not there already. // text needed will be pulled in when there is request return; } var newText = new WrappedText(text.WithChanges(textChanges)); var newChecksum = service.CreateChecksum(newText, cancellationToken); // save new text in the cache so that when asked, the data is most likely already there // // this cache is very short live. and new text created above is ChangedText which share // text data with original text except the changes. // so memory wise, this doesn't put too much pressure on the cache. it will not duplicates // same text multiple times. // // also, once the changes are picked up and put into Workspace, normal Workspace // caching logic will take care of the text AssetStorage.TryAddAsset(newChecksum, newText); } async Task<SourceText?> TryGetSourceTextAsync() { // check the cheap and fast one first. // see if the cache has the source text if (AssetStorage.TryGetAsset<SourceText>(baseTextChecksum, out var sourceText)) { return sourceText; } // do slower one // check whether existing solution has it var document = SolutionService.PrimaryWorkspace.CurrentSolution.GetDocument(documentId); if (document == null) { return null; } // check checksum whether it is there. // since we lazily synchronize whole solution (SynchronizePrimaryWorkspaceAsync) when things are idle, // soon or later this will get hit even if text changes got out of sync due to issues in VS side // such as file is first opened and there is no SourceText in memory yet. if (!document.State.TryGetStateChecksums(out var state) || !state.Text.Equals(baseTextChecksum)) { return null; } return await document.GetTextAsync(cancellationToken).ConfigureAwait(false); } }, cancellationToken); } /// <summary> /// workaround until (https://github.com/dotnet/roslyn/issues/26305) is fixed. /// /// this will always return whole file as changed. /// </summary> private class WrappedText : SourceText { private readonly SourceText _text; public WrappedText(SourceText text) { _text = text; } public override char this[int position] => _text[position]; public override Encoding? Encoding => _text.Encoding; public override int Length => _text.Length; public override SourceText GetSubText(TextSpan span) => _text.GetSubText(span); public override SourceText WithChanges(IEnumerable<TextChange> changes) => _text.WithChanges(changes); public override void Write(TextWriter writer, TextSpan span, CancellationToken cancellationToken = default) => _text.Write(writer, span, cancellationToken); public override void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count) => _text.CopyTo(sourceIndex, destination, destinationIndex, count); public override IReadOnlyList<TextChangeRange> GetChangeRanges(SourceText oldText) => ImmutableArray.Create(new TextChangeRange(new TextSpan(0, oldText.Length), _text.Length)); public override int GetHashCode() => _text.GetHashCode(); public override bool Equals(object obj) => _text.Equals(obj); public override string ToString() => _text.ToString(); public override string ToString(TextSpan span) => _text.ToString(span); } } }
44.238579
198
0.604016
[ "Apache-2.0" ]
Sliptory/roslyn
src/Workspaces/Remote/ServiceHub/Services/RemoteHostService.cs
17,432
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 clouddirectory-2017-01-11.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudDirectory.Model { /// <summary> /// A typed link attribute definition. /// </summary> public partial class TypedLinkAttributeDefinition { private TypedAttributeValue _defaultValue; private bool? _isImmutable; private string _name; private RequiredAttributeBehavior _requiredBehavior; private Dictionary<string, Rule> _rules = new Dictionary<string, Rule>(); private FacetAttributeType _type; /// <summary> /// Gets and sets the property DefaultValue. /// <para> /// The default value of the attribute (if configured). /// </para> /// </summary> public TypedAttributeValue DefaultValue { get { return this._defaultValue; } set { this._defaultValue = value; } } // Check to see if DefaultValue property is set internal bool IsSetDefaultValue() { return this._defaultValue != null; } /// <summary> /// Gets and sets the property IsImmutable. /// <para> /// Whether the attribute is mutable or not. /// </para> /// </summary> public bool IsImmutable { get { return this._isImmutable.GetValueOrDefault(); } set { this._isImmutable = value; } } // Check to see if IsImmutable property is set internal bool IsSetIsImmutable() { return this._isImmutable.HasValue; } /// <summary> /// Gets and sets the property Name. /// <para> /// The unique name of the typed link attribute. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=230)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property RequiredBehavior. /// <para> /// The required behavior of the <code>TypedLinkAttributeDefinition</code>. /// </para> /// </summary> [AWSProperty(Required=true)] public RequiredAttributeBehavior RequiredBehavior { get { return this._requiredBehavior; } set { this._requiredBehavior = value; } } // Check to see if RequiredBehavior property is set internal bool IsSetRequiredBehavior() { return this._requiredBehavior != null; } /// <summary> /// Gets and sets the property Rules. /// <para> /// Validation rules that are attached to the attribute definition. /// </para> /// </summary> public Dictionary<string, Rule> Rules { get { return this._rules; } set { this._rules = value; } } // Check to see if Rules property is set internal bool IsSetRules() { return this._rules != null && this._rules.Count > 0; } /// <summary> /// Gets and sets the property Type. /// <para> /// The type of the attribute. /// </para> /// </summary> [AWSProperty(Required=true)] public FacetAttributeType Type { get { return this._type; } set { this._type = value; } } // Check to see if Type property is set internal bool IsSetType() { return this._type != null; } } }
29.587097
112
0.573485
[ "Apache-2.0" ]
DetlefGolze/aws-sdk-net
sdk/src/Services/CloudDirectory/Generated/Model/TypedLinkAttributeDefinition.cs
4,586
C#
using Autofac; using System.Windows.Controls; using TianYiSdtdServerTools.Client.Services.UI; using TianYiSdtdServerTools.Client.ViewModels.ControlPanel; using TianYiSdtdServerTools.Client.Views.Services; namespace TianYiSdtdServerTools.Client.Views.PartialViews.ControlPanel { /// <summary> /// TelnetConsoleView.xaml 的交互逻辑 /// </summary> public partial class TelnetConsoleView : UserControl { public TelnetConsoleViewModel ViewModel { get; set; } public TelnetConsoleView() { InitializeComponent(); ViewModel = IocContainer.Resolve<TelnetConsoleViewModel>( new TypedParameter(typeof(IPlainTextBoxService), new PlainTextBoxService(textBox_TelnetData))); base.DataContext = ViewModel; } } }
29.777778
111
0.711443
[ "MIT" ]
1249993110/TianYiSdtdServerTools
Client/Views/PartialViews/ControlPanel/TelnetConsoleView.xaml.cs
816
C#
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; namespace WebAPIDatabase.Controllers { public class ValuesController : ApiController { private DBHelper mDBHelper = new DBHelper(); // GET api/values public IEnumerable<string> Get() { return new string[] { "value1", "value2" }; } // GET api/values/5 public string Get(int id) { return "value"; } // POST api/values public string Post([FromBody]int value) { return mDBHelper.getSp(value); } // PUT api/values/5 public void Put(int id, [FromBody]string value) { } // DELETE api/values/5 public void Delete(int id) { } } }
20.325581
55
0.549199
[ "Apache-2.0" ]
skbhati199/Web-API-.net-Database
WebAPIDatabase/Controllers/ValuesController.cs
876
C#
using System; namespace Axinom.Cpix { public sealed class ContentKey : Entity { /// <summary> /// Unique ID of the content key. /// </summary> public Guid Id { get; set; } /// <summary> /// Gets or sets the value of the content key. Must be 128 bits (16 bytes) long. /// Null if the content key was loaded from a CPIX document and could not be decrypted. /// </summary> public byte[] Value { get; set; } /// <summary> /// Gets whether the content key is a loaded encrypted content key. /// </summary> internal bool IsLoadedEncryptedKey { get; set; } internal override void ValidateLoadedEntity(CpixDocument document) { if (Id == Guid.Empty) throw new InvalidCpixDataException("A unique key ID must be provided for each content key."); // We skip length check if we do not have a value for an encrypted key (it will be read-only). if (IsLoadedEncryptedKey && Value != null && Value.Length != Constants.ContentKeyLengthInBytes) throw new InvalidCpixDataException($"A {Constants.ContentKeyLengthInBytes}-byte value must be provided for each new content key."); } internal override void ValidateNewEntity(CpixDocument document) { if (Id == Guid.Empty) throw new InvalidCpixDataException("A unique key ID must be provided for each content key."); if (Value == null || Value.Length != Constants.ContentKeyLengthInBytes) throw new InvalidCpixDataException($"A {Constants.ContentKeyLengthInBytes}-byte value must be provided for each new content key."); } } }
35.627907
135
0.70953
[ "MIT" ]
Heronyme/cpix
Cpix/ContentKey.cs
1,534
C#
using System.Collections; using EasyBlock.Core.Interfaces.HostFiles; namespace EasyBlock.Core.Tests { public class HostFileLineComparer : IComparer { public int Compare(object x, object y) { var left = x as IHostFileLine; var right = y as IHostFileLine; if (left == null && right == null) return 0; if (left == null || right == null) return 1; var areEqual = left.IsPrimary == right.IsPrimary && left.IsComment == right.IsComment && left.Data == right.Data && left.HostName == right.HostName && left.IPAddress == right.IPAddress; return areEqual ? 1 : 0; } } }
35.5
64
0.518566
[ "BSD-2-Clause" ]
fluffynuts/easyblock
source/EasyBlock.Core.Tests/HostFileLineComparer.cs
781
C#
/* The MIT License (MIT) Copyright (c) 2018 Helix Toolkit contributors */ using System.Collections.Generic; using System.Reflection; using System.Linq; #if !NETFX_CORE namespace HelixToolkit.Wpf.SharpDX #else #if CORE namespace HelixToolkit.SharpDX.Core #else namespace HelixToolkit.UWP #endif #endif { #if NETFX_CORE #else using System; using System.Reflection.Emit; #endif public static class CollectionExtensions { #if NETFX_CORE /// <summary> /// Gets the internal array of a <see cref="List{T}"/>. /// </summary> /// <typeparam name="T">The type of the elements.</typeparam> /// <param name="list">The respective list.</param> /// <returns>The internal array of the list.</returns> public static T[] GetInternalArray<T>(this List<T> list) { return list.ToArray(); } public static T[] GetArrayByType<T>(this IList<T> list) { T[] array; if (list is T[] t) { array = t; } else if (list is FastList<T> f) { array = f.Items; } else { array = list.ToArray(); } return array; } #else static class ArrayAccessor<T> { public static readonly Func<List<T>, T[]> Getter; static ArrayAccessor() { var dm = new DynamicMethod( "get", MethodAttributes.Static | MethodAttributes.Public, CallingConventions.Standard, typeof(T[]), new Type[] { typeof(List<T>) }, typeof(ArrayAccessor<T>), true); var il = dm.GetILGenerator(); il.Emit(OpCodes.Ldarg_0); // Load List<T> argument il.Emit(OpCodes.Ldfld, typeof(List<T>).GetField("_items", BindingFlags.NonPublic | BindingFlags.Instance)); // Replace argument by field il.Emit(OpCodes.Ret); // Return field Getter = (Func<List<T>, T[]>)dm.CreateDelegate(typeof(Func<List<T>, T[]>)); } } /// <summary> /// Gets the internal array of a <see cref="List{T}"/>. /// <para>Warning: Internal array length >= List.Count. Use with cautious.</para> /// </summary> /// <typeparam name="T">The type of the elements.</typeparam> /// <param name="list">The respective list.</param> /// <returns>The internal array of the list.</returns> public static T[] GetInternalArray<T>(this List<T> list) { return ArrayAccessor<T>.Getter(list); } public static T[] GetArrayByType<T>(this IList<T> list) { T[] array; if (list is T[] t) { array = t; } else if (list is FastList<T> f) { array = f.Items; } else if (list is List<T> l) { array = l.GetInternalArray(); } else { array = list.ToArray(); } return array; } #endif /// <summary> /// Tries to get a value from a <see cref="IDictionary{K,V}"/>. /// </summary> /// <typeparam name="K">The type of the key.</typeparam> /// <typeparam name="V">The type of the value.</typeparam> /// <param name="dict">The respective dictionary.</param> /// <param name="key">The respective key.</param> /// <returns>The value if exists, else <c>null</c>.</returns> public static V Get<K, V>(this IDictionary<K, V> dict, K key) { V val; if (dict.TryGetValue(key, out val)) { return val; } return default(V); } } }
29.430657
98
0.491319
[ "MIT" ]
JeremyAnsel/helix-toolkit
Source/HelixToolkit.SharpDX.Shared/Extensions/CollectionExtensions.cs
4,034
C#
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved. using UnityEngine; namespace HutongGames.PlayMaker.Actions { [ActionCategory(ActionCategory.Rect)] [Tooltip("Tests if 2 Rects overlap.")] public class RectOverlaps : FsmStateAction { [RequiredField] [Tooltip("First Rectangle.")] public FsmRect rect1; [RequiredField] [Tooltip("Second Rectangle.")] public FsmRect rect2; [Tooltip("Event to send if the Rects overlap.")] public FsmEvent trueEvent; [Tooltip("Event to send if the Rects do not overlap.")] public FsmEvent falseEvent; [UIHint(UIHint.Variable)] [Tooltip("Store the result in a variable.")] public FsmBool storeResult; //[ActionSection("")] [Tooltip("Repeat every frame.")] public bool everyFrame; public override void Reset() { rect1 = new FsmRect { UseVariable = true }; rect2 = new FsmRect { UseVariable = true }; storeResult = null; trueEvent = null; falseEvent = null; everyFrame = false; } public override void OnEnter() { DoRectOverlap(); if (!everyFrame) { Finish(); } } public override void OnUpdate() { DoRectOverlap(); } void DoRectOverlap() { if (rect1.IsNone || rect2.IsNone) { return; } var overlapping = Intersect(rect1.Value, rect2.Value); storeResult.Value = overlapping; Fsm.Event(overlapping ? trueEvent : falseEvent); } public static bool Intersect(Rect a, Rect b) { FlipNegative(ref a); FlipNegative(ref b); bool c1 = a.xMin < b.xMax; bool c2 = a.xMax > b.xMin; bool c3 = a.yMin < b.yMax; bool c4 = a.yMax > b.yMin; return c1 && c2 && c3 && c4; } public static void FlipNegative(ref Rect r) { if (r.width < 0) r.x -= (r.width *= -1); if (r.height < 0) r.y -= (r.height *= -1); } } }
22.244444
66
0.581918
[ "MIT" ]
517752548/UnityFramework
GameFrameWork/ThirdParty/PlayMaker/Actions/Rect/RectOverlaps.cs
2,004
C#
using System.Linq; using System.Xml.Linq; using Moq; using Should; using Xunit; namespace Cassette { public class AssetSerializer_Tests { readonly XElement containerElement; readonly XElement assetElement; readonly Mock<IAsset> asset; public AssetSerializer_Tests() { asset = new Mock<IAsset>(); asset.SetupGet(a => a.Path).Returns("~/asset"); asset.SetupGet(a => a.AssetCacheValidatorType).Returns(typeof(Caching.FileAssetCacheValidator)); asset.SetupGet(a => a.References).Returns(new[] { new AssetReference("~/asset", "~/bundle", 1, AssetReferenceType.DifferentBundle), new AssetReference("~/asset", "~/image.png", 2, AssetReferenceType.RawFilename), new AssetReference("~/asset", "http://example.com/", 3, AssetReferenceType.Url) }); containerElement = new XElement("Bundle"); var serializer = new AssetSerializer(containerElement); serializer.Serialize(asset.Object); assetElement = containerElement.Elements("Asset").FirstOrDefault(); } [Fact] public void ContainerElementContainsAssetElement() { assetElement.ShouldNotBeNull(); } [Fact] public void AssetElementPathAttributeEqualsManifestPath() { assetElement.Attribute("Path").Value.ShouldEqual("~/asset"); } [Fact] public void AssetElementAssetCacheValidatorTypeAttributeEqualsValidatorTypeName() { var typeName = typeof(Caching.FileAssetCacheValidator).AssemblyQualifiedName; assetElement.Attribute("AssetCacheValidatorType").Value.ShouldEqual(typeName); } [Fact] public void AssetElementContainsReferenceElements() { var elements = assetElement.Elements("Reference"); elements.Count().ShouldEqual(3); } [Fact] public void FirstReferenceElementEqualsFirstReferenceManifest() { var element = assetElement.Elements("Reference").ElementAt(0); element.Attribute("Path").Value.ShouldEqual("~/bundle"); element.Attribute("Type").Value.ShouldEqual("DifferentBundle"); element.Attribute("SourceLineNumber").Value.ShouldEqual("1"); } [Fact] public void SecondReferenceElementEqualsSecondReferenceManifest() { var element = assetElement.Elements("Reference").ElementAt(1); element.Attribute("Path").Value.ShouldEqual("~/image.png"); element.Attribute("Type").Value.ShouldEqual("RawFilename"); element.Attribute("SourceLineNumber").Value.ShouldEqual("2"); } [Fact] public void ThirdReferenceElementEqualsThirdReferenceManifest() { var element = assetElement.Elements("Reference").ElementAt(2); element.Attribute("Path").Value.ShouldEqual("http://example.com/"); element.Attribute("Type").Value.ShouldEqual("Url"); element.Attribute("SourceLineNumber").Value.ShouldEqual("3"); } } }
37.406977
108
0.622319
[ "MIT" ]
WS-QA/cassette
src/Cassette.UnitTests/AssetSerializer.cs
3,219
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BinaryTrees { public class SplayTree<K, V> where K : IComparable where V : IComparable { /// <summary> /// Inner class for nodes of this tree /// </summary> public class SplayTreeNode { public V Value; public SplayTreeNode lnode; public SplayTreeNode rnode; public K Key; public SplayTreeNode(K key, V value) { this.Value = value; this.Key = key; } } private SplayTreeNode root; // root of the BST public bool Contains(K key) { return Get(key) != null; } // return value associated with the given key // if no such value, return null public V Get(K key) { root = Splay(root, key); int cmp = key.CompareTo(root.Key); if (cmp == 0) return root.Value; else return default(V); } public void Insert(K key, V value) { // splay key to root if (root == null) { root = new SplayTreeNode(key, value); return; } root = Splay(root, key); int cmp = key.CompareTo(root.Key); // Insert new node at root if (cmp < 0) { SplayTreeNode n = new SplayTreeNode(key, value); n.lnode = root.lnode; n.rnode = root; root.lnode = null; root = n; } // Insert new node at root else if (cmp > 0) { SplayTreeNode n = new SplayTreeNode(key, value); n.rnode = root.rnode; n.lnode = root; root.rnode = null; root = n; } // It was a duplicate key. Simply replace the value else { root.Value = value; } } /* This splays the key, then does a slightly modified Hibbard deletion on * the root (if it is the node to be deleted; if it is not, the key was * not in the tree). The modification is that rather than swapping the * root (call it node A) with its successor, it's successor (call it SplayTreeNode B) * is moved to the root position by splaying for the deletion key in A's * rnode subtree. Finally, A's rnode child is made the new root's rnode * child. */ public void remove(K key) { if (root == null) return; // empty tree root = Splay(root, key); int cmp = key.CompareTo(root.Key); if (cmp == 0) { if (root.lnode == null) { root = root.rnode; } else { SplayTreeNode x = root.rnode; root = root.lnode; Splay(root, key); root.rnode = x; } } // else: it wasn't in the tree to remove } /*************************************************************************** * Splay tree function. * **********************************************************************/ // splay key in the tree rooted at SplayTreeNode h. If a node with that key exists, // it is splayed to the root of the tree. If it does not, the last node // along the search path for the key is splayed to the root. private SplayTreeNode Splay(SplayTreeNode h, K key) { if (h == null) return null; int cmp1 = key.CompareTo(h.Key); if (cmp1 < 0) { // key not in tree, so we're done if (h.lnode == null) { return h; } int cmp2 = key.CompareTo(h.lnode.Key); if (cmp2 < 0) { h.lnode.lnode = Splay(h.lnode.lnode, key); h = rotateRight(h); } else if (cmp2 > 0) { h.lnode.rnode = Splay(h.lnode.rnode, key); if (h.lnode.rnode != null) h.lnode = rotateLeft(h.lnode); } if (h.lnode == null) return h; else return rotateRight(h); } else if (cmp1 > 0) { // key not in tree, so we're done if (h.rnode == null) { return h; } int cmp2 = key.CompareTo(h.rnode.Key); if (cmp2 < 0) { h.rnode.lnode = Splay(h.rnode.lnode, key); if (h.rnode.lnode != null) h.rnode = rotateRight(h.rnode); } else if (cmp2 > 0) { h.rnode.rnode = Splay(h.rnode.rnode, key); h = rotateLeft(h); } if (h.rnode == null) return h; else return rotateLeft(h); } else return h; } /*************************************************************************** * Helper functions. ***************************************************************************/ // height of tree (1-node tree has height 0) public int height() { return height(root); } private int height(SplayTreeNode x) { if (x == null) return -1; return 1 + Math.Max(height(x.lnode), height(x.rnode)); } public int size() { return size(root); } private int size(SplayTreeNode x) { if (x == null) return 0; else return 1 + size(x.lnode) + size(x.rnode); } // rnode rotate private SplayTreeNode rotateRight(SplayTreeNode h) { SplayTreeNode x = h.lnode; h.lnode = x.rnode; x.rnode = h; return x; } // lnode rotate private SplayTreeNode rotateLeft(SplayTreeNode h) { SplayTreeNode x = h.rnode; h.rnode = x.lnode; x.lnode = h; return x; } } }
28.839827
93
0.41444
[ "MIT" ]
DeepGameAnalysis/dga-datalgo
SpatialAnalysis/Datalgo/Trees/Binary-Trees/SplayTree.cs
6,664
C#
using ULMClubManager.DTO.Enums; namespace ULMClubManager.DTO.Exceptions { /// <summary> /// Représente une exception pour un membre qui n'est pas en ordre de cotisation /// </summary> public class InvalidSubscriptionForBookingException : BusinessException { public InvalidSubscriptionForBookingException() : base(ContextError.RES, "BS_COTI_INVALID") { } protected InvalidSubscriptionForBookingException(ContextError context, string tokenError) : base(context, tokenError) { } public InvalidSubscriptionForBookingException(string message) : base(message) { } public InvalidSubscriptionForBookingException(string message, System.Exception innerException) : base(message, innerException) { } } }
27.935484
102
0.65358
[ "MIT" ]
Agatolies/ULMClubManager
src/ULMClubManager/ULMClubManager.DTO/Exceptions/InvalidSubscriptionForBookingException.cs
869
C#
using FluentAssertions; using System.Collections.Generic; using System.Threading.Tasks; using Timeline.Models.Http; using Xunit; using Xunit.Abstractions; namespace Timeline.Tests.IntegratedTests { public class SearchTest : IntegratedTestBase { public SearchTest(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } [Fact] public async Task TimelineSearch_Should_Work() { var client = await CreateClientAsUser(); { await client.TestPostAsync("timelines", new HttpTimelineCreateRequest { Name = "hahaha" }); await client.TestPostAsync("timelines", new HttpTimelineCreateRequest { Name = "bababa" }); await client.TestPatchAsync("timelines/bababa", new HttpTimelinePatchRequest { Title = "hahaha" }); await client.TestPostAsync("timelines", new HttpTimelineCreateRequest { Name = "gagaga" }); } { var res = await client.TestGetAsync<List<HttpTimeline>>("search/timelines?q=hah"); res.Should().HaveCount(2); res[0].Name.Should().Be("hahaha"); res[1].Name.Should().Be("bababa"); } { var res = await client.TestGetAsync<List<HttpTimeline>>("search/timelines?q=wuhu"); res.Should().BeEmpty(); } } [Fact] public async Task UserSearch_Should_Work() { var client = await CreateClientAsAdministrator(); { await client.TestPostAsync("users", new HttpUserPostRequest { Username = "hahaha", Password = "p" }); await client.TestPostAsync("users", new HttpUserPostRequest { Username = "bababa", Password = "p" }); await client.TestPatchAsync("users/bababa", new HttpUserPatchRequest { Nickname = "hahaha" }); await client.TestPostAsync("users", new HttpUserPostRequest { Username = "gagaga", Password = "p" }); } { var res = await client.TestGetAsync<List<HttpUser>>("search/users?q=hah"); res.Should().HaveCount(2); res[0].Username.Should().Be("hahaha"); res[1].Username.Should().Be("bababa"); } { var res = await client.TestGetAsync<List<HttpUser>>("search/users?q=wuhu"); res.Should().BeEmpty(); } } } }
37.794118
118
0.555642
[ "MIT" ]
crupest/Timeline
BackEnd/Timeline.Tests/IntegratedTests/SearchTest.cs
2,572
C#
/* * Copyright 2019 GridGain Systems, Inc. and Contributors. * * Licensed under the GridGain Community Edition License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license * * 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. */ namespace Apache.Ignite.Core.Impl.Binary.Metadata { using System.Collections.Generic; using System.Diagnostics; /// <summary> /// Metadata for particular type. /// </summary> internal class BinaryTypeHolder { /** Type ID. */ private readonly int _typeId; /** Type name. */ private readonly string _typeName; /** Affinity key field name. */ private readonly string _affKeyFieldName; /** Enum flag. */ private readonly bool _isEnum; /** Marshaller. */ private readonly Marshaller _marshaller; /** Collection of know field IDs. */ private volatile HashSet<int> _ids; /** Last known unmodifiable metadata which is given to the user. */ private volatile BinaryType _meta; /** Saved flag (set if type metadata was saved at least once). */ private volatile bool _saved; /// <summary> /// Constructor. /// </summary> /// <param name="typeId">Type ID.</param> /// <param name="typeName">Type name.</param> /// <param name="affKeyFieldName">Affinity key field name.</param> /// <param name="isEnum">Enum flag.</param> /// <param name="marshaller">The marshaller.</param> public BinaryTypeHolder(int typeId, string typeName, string affKeyFieldName, bool isEnum, Marshaller marshaller) { _typeId = typeId; _typeName = typeName; _affKeyFieldName = affKeyFieldName; _isEnum = isEnum; _marshaller = marshaller; } /// <summary> /// Get saved flag. /// </summary> /// <returns>True if type metadata was saved at least once.</returns> public bool Saved() { return _saved; } /// <summary> /// Currently cached field IDs. /// </summary> /// <returns>Cached field IDs.</returns> public ICollection<int> GetFieldIds() { var ids0 = _ids; if (_ids == null) { lock (this) { ids0 = _ids; if (ids0 == null) { ids0 = new HashSet<int>(); _ids = ids0; } } } return ids0; } /// <summary> /// Merge newly sent field metadatas into existing ones. /// </summary> /// <param name="meta">Binary type to merge.</param> public void Merge(BinaryType meta) { Debug.Assert(meta != null); _saved = true; var fieldsMap = meta.GetFieldsMap(); if (fieldsMap.Count == 0) { return; } lock (this) { // 1. Create copies of the old meta. var ids0 = _ids; BinaryType meta0 = _meta; var newIds = ids0 != null ? new HashSet<int>(ids0) : new HashSet<int>(); IDictionary<string, BinaryField> newFields = meta0 != null ? new Dictionary<string, BinaryField>(meta0.GetFieldsMap()) : new Dictionary<string, BinaryField>(fieldsMap.Count); // 2. Add new fields. foreach (var fieldMeta in fieldsMap) { int fieldId = BinaryUtils.FieldId(meta.TypeId, fieldMeta.Key, null, null); if (!newIds.Contains(fieldId)) { newIds.Add(fieldId); } if (!newFields.ContainsKey(fieldMeta.Key)) { newFields[fieldMeta.Key] = fieldMeta.Value; } } // 3. Assign new meta. Order is important here: meta must be assigned before field IDs. _meta = new BinaryType(_typeId, _typeName, newFields, _affKeyFieldName, _isEnum, meta.EnumValuesMap, _marshaller); _ids = newIds; } } } }
31.312102
103
0.526444
[ "CC0-1.0" ]
Diffblue-benchmarks/Gridgain-gridgain
modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryTypeHolder.cs
4,916
C#
using System; namespace TaskMonitor.ViewModels { // The ProcessInfoDetails class is used to collect data for each process // for a given resource group, and then displayed in the app Details pivot. public class ProcessInfoDetails { public int ProcessId { get; internal set; } public string ExecutableFileName { get; internal set; } public DateTimeOffset ProcessStartTime { get; internal set; } public TimeSpan KernelTime { get; internal set; } public TimeSpan UserTime { get; internal set; } public ulong NonPagedPoolSizeInBytes { get; internal set; } public ulong PagedPoolSizeInBytes { get; internal set; } public ulong PageFaultCount { get; internal set; } public ulong PageFileSizeInBytes { get; internal set; } public ulong PeakNonPagedPoolSizeInBytes { get; internal set; } public ulong PeakPagedPoolSizeInBytes { get; internal set; } public ulong PeakPageFileSizeInBytes { get; internal set; } public ulong PeakVirtualMemorySizeInBytes { get; internal set; } public ulong PeakWorkingSetSizeInBytes { get; internal set; } public ulong PrivatePageCount { get; internal set; } public ulong VirtualMemorySizeInBytes { get; internal set; } public ulong WorkingSetSizeInBytes { get; internal set; } public long BytesReadCount { get; internal set; } public long BytesWrittenCount { get; internal set; } public long OtherBytesCount { get; internal set; } public long OtherOperationCount { get; internal set; } public long ReadOperationCount { get; internal set; } public long WriteOperationCount { get; internal set; } public ProcessInfoDetails( uint pid, string name, DateTimeOffset start, TimeSpan kernel, TimeSpan user, ulong npp, ulong pp, ulong pFault, ulong pFile, ulong pNpp, ulong pPP, ulong ppFile, ulong pVirt, ulong pWSet, ulong ppc, ulong vm, ulong ws, long br, long bw, long ob, long oo, long ro, long wo) { ProcessId = (int)pid; ExecutableFileName = name; ProcessStartTime = start; KernelTime = kernel; UserTime = user; NonPagedPoolSizeInBytes = npp; PagedPoolSizeInBytes = pp; PageFaultCount = pFault; PageFileSizeInBytes = pFile; PeakNonPagedPoolSizeInBytes = pNpp; PeakPagedPoolSizeInBytes = pp; PeakPageFileSizeInBytes = ppFile; PeakVirtualMemorySizeInBytes = pVirt; PeakWorkingSetSizeInBytes = pWSet; PrivatePageCount = ppc; VirtualMemorySizeInBytes = vm; WorkingSetSizeInBytes = ws; BytesReadCount = br; BytesWrittenCount = bw; OtherBytesCount = ob; OtherOperationCount = oo; ReadOperationCount = ro; WriteOperationCount = wo; } } }
42.43662
153
0.641885
[ "MIT" ]
Bhaskers-Blu-Org2/AppModelSamples
Samples/UWPTaskMonitor/UWPTaskMonitor/ViewModels/ProcessInfoDetails.cs
3,015
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Blindspot.Core; using Blindspot.Core.Models; namespace Blindspot.ViewModels { public class PlaylistBufferItem : BufferItem { public PlaylistContainer.PlaylistInfo Model { get; set; } public PlaylistBufferItem(PlaylistContainer.PlaylistInfo info) { this.Model = info; } public override string ToString() { return Model.Name; } } }
21.04
70
0.642586
[ "BSD-2-Clause" ]
craigbrett17/Blindspot
Blindspot/ViewModels/PlaylistBufferItem.cs
528
C#
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ // **NOTE** This file was generated by a tool and any changes will be overwritten. // <auto-generated/> // Template Source: IMethodRequest.cs.tt namespace Microsoft.Graph { using System; using System.Collections.Generic; using System.IO; using System.Net.Http; using System.Threading; /// <summary> /// The interface IWorkbookFunctionsLenRequest. /// </summary> public partial interface IWorkbookFunctionsLenRequest : IBaseRequest { /// <summary> /// Gets the request body. /// </summary> WorkbookFunctionsLenRequestBody RequestBody { get; } /// <summary> /// Issues the POST request. /// </summary> System.Threading.Tasks.Task<WorkbookFunctionResult> PostAsync(); /// <summary> /// Issues the POST request. /// </summary> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The task to await for async call.</returns> System.Threading.Tasks.Task<WorkbookFunctionResult> PostAsync( CancellationToken cancellationToken); /// <summary> /// Adds the specified expand value to the request. /// </summary> /// <param name="value">The expand value.</param> /// <returns>The request object to send.</returns> IWorkbookFunctionsLenRequest Expand(string value); /// <summary> /// Adds the specified select value to the request. /// </summary> /// <param name="value">The select value.</param> /// <returns>The request object to send.</returns> IWorkbookFunctionsLenRequest Select(string value); } }
35.172414
153
0.583333
[ "MIT" ]
DamienTehDemon/msgraph-sdk-dotnet
src/Microsoft.Graph/Generated/requests/IWorkbookFunctionsLenRequest.cs
2,040
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 directconnect-2012-10-25.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.DirectConnect.Model { /// <summary> /// A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect location /// and the customer. /// </summary> public partial class CreatePrivateVirtualInterfaceResult : AmazonWebServiceResponse { private string _amazonAddress; private int? _asn; private string _authKey; private string _connectionId; private string _customerAddress; private string _customerRouterConfig; private string _location; private string _ownerAccount; private List<RouteFilterPrefix> _routeFilterPrefixes = new List<RouteFilterPrefix>(); private string _virtualGatewayId; private string _virtualInterfaceId; private string _virtualInterfaceName; private VirtualInterfaceState _virtualInterfaceState; private string _virtualInterfaceType; private int? _vlan; /// <summary> /// Gets and sets the property AmazonAddress. /// </summary> public string AmazonAddress { get { return this._amazonAddress; } set { this._amazonAddress = value; } } // Check to see if AmazonAddress property is set internal bool IsSetAmazonAddress() { return this._amazonAddress != null; } /// <summary> /// Gets and sets the property Asn. /// </summary> public int Asn { get { return this._asn.GetValueOrDefault(); } set { this._asn = value; } } // Check to see if Asn property is set internal bool IsSetAsn() { return this._asn.HasValue; } /// <summary> /// Gets and sets the property AuthKey. /// </summary> public string AuthKey { get { return this._authKey; } set { this._authKey = value; } } // Check to see if AuthKey property is set internal bool IsSetAuthKey() { return this._authKey != null; } /// <summary> /// Gets and sets the property ConnectionId. /// </summary> public string ConnectionId { get { return this._connectionId; } set { this._connectionId = value; } } // Check to see if ConnectionId property is set internal bool IsSetConnectionId() { return this._connectionId != null; } /// <summary> /// Gets and sets the property CustomerAddress. /// </summary> public string CustomerAddress { get { return this._customerAddress; } set { this._customerAddress = value; } } // Check to see if CustomerAddress property is set internal bool IsSetCustomerAddress() { return this._customerAddress != null; } /// <summary> /// Gets and sets the property CustomerRouterConfig. /// <para> /// Information for generating the customer router configuration. /// </para> /// </summary> public string CustomerRouterConfig { get { return this._customerRouterConfig; } set { this._customerRouterConfig = value; } } // Check to see if CustomerRouterConfig property is set internal bool IsSetCustomerRouterConfig() { return this._customerRouterConfig != null; } /// <summary> /// Gets and sets the property Location. /// </summary> public string Location { get { return this._location; } set { this._location = value; } } // Check to see if Location property is set internal bool IsSetLocation() { return this._location != null; } /// <summary> /// Gets and sets the property OwnerAccount. /// </summary> public string OwnerAccount { get { return this._ownerAccount; } set { this._ownerAccount = value; } } // Check to see if OwnerAccount property is set internal bool IsSetOwnerAccount() { return this._ownerAccount != null; } /// <summary> /// Gets and sets the property RouteFilterPrefixes. /// </summary> public List<RouteFilterPrefix> RouteFilterPrefixes { get { return this._routeFilterPrefixes; } set { this._routeFilterPrefixes = value; } } // Check to see if RouteFilterPrefixes property is set internal bool IsSetRouteFilterPrefixes() { return this._routeFilterPrefixes != null && this._routeFilterPrefixes.Count > 0; } /// <summary> /// Gets and sets the property VirtualGatewayId. /// </summary> public string VirtualGatewayId { get { return this._virtualGatewayId; } set { this._virtualGatewayId = value; } } // Check to see if VirtualGatewayId property is set internal bool IsSetVirtualGatewayId() { return this._virtualGatewayId != null; } /// <summary> /// Gets and sets the property VirtualInterfaceId. /// </summary> public string VirtualInterfaceId { get { return this._virtualInterfaceId; } set { this._virtualInterfaceId = value; } } // Check to see if VirtualInterfaceId property is set internal bool IsSetVirtualInterfaceId() { return this._virtualInterfaceId != null; } /// <summary> /// Gets and sets the property VirtualInterfaceName. /// </summary> public string VirtualInterfaceName { get { return this._virtualInterfaceName; } set { this._virtualInterfaceName = value; } } // Check to see if VirtualInterfaceName property is set internal bool IsSetVirtualInterfaceName() { return this._virtualInterfaceName != null; } /// <summary> /// Gets and sets the property VirtualInterfaceState. /// </summary> public VirtualInterfaceState VirtualInterfaceState { get { return this._virtualInterfaceState; } set { this._virtualInterfaceState = value; } } // Check to see if VirtualInterfaceState property is set internal bool IsSetVirtualInterfaceState() { return this._virtualInterfaceState != null; } /// <summary> /// Gets and sets the property VirtualInterfaceType. /// </summary> public string VirtualInterfaceType { get { return this._virtualInterfaceType; } set { this._virtualInterfaceType = value; } } // Check to see if VirtualInterfaceType property is set internal bool IsSetVirtualInterfaceType() { return this._virtualInterfaceType != null; } /// <summary> /// Gets and sets the property Vlan. /// </summary> public int Vlan { get { return this._vlan.GetValueOrDefault(); } set { this._vlan = value; } } // Check to see if Vlan property is set internal bool IsSetVlan() { return this._vlan.HasValue; } } }
30.188612
111
0.580927
[ "Apache-2.0" ]
ermshiperete/aws-sdk-net
AWSSDK_DotNet35/Amazon.DirectConnect/Model/CreatePrivateVirtualInterfaceResult.cs
8,483
C#
using System; namespace Wonka.Eth.Extensions.OpSource.ERC721 { public class WonkaEthERC721SafeTransferOpSource : WonkaEthERC721OpSource { public WonkaEthERC721SafeTransferOpSource(string psSourceId, string psSenderAddr, string psPwd, string psContractAddr, string psCustomOpMethodName, string psWeb3Url = "") : base(psSourceId, psSenderAddr, psPwd, psContractAddr, psCustomOpMethodName, psWeb3Url) { this.CustomOpDelegate = this.InvokeERC721SafeTransferFrom; // NOTE: Should we be setting this property at all? // public delegate CustomOperatorRule BuildCustomOpRuleDelegate(WonkaBizSource poSource, int pnRuleID); } } }
37.882353
174
0.805901
[ "MIT" ]
Nethereum/Wonka
WonkaSystem/WonkaEth/Extensions/OpSource/ERC721/WonkaEthERC721SafeTransferOpSource.cs
644
C#
namespace Task.Sample { using System; using System.Threading; using System.Xml.Linq; using TaskManager.Common; /// <summary> /// A sample module. /// </summary> public class TestModule2: ITaskModule { /// <summary> /// Executes some work. /// </summary> /// <returns>True if there is more work to be done, false otherwise.</returns> public bool Execute() { Console.WriteLine ("TaskModule2 starting..."); Thread.Sleep(250); Console.WriteLine ("TaskModule2 ended."); return false; } /// <summary> /// Configures the task with contents from the xml configuration file. /// </summary> /// <param name="xml">The xml node.</param> public void Configure(XElement xml) { } } }
21.411765
80
0.649725
[ "MIT" ]
giacomelli/TaskManager
src/Task.Sample/TestModule2.cs
730
C#
using System; namespace SIT.Web.Areas.HelpPage.ModelDescriptions { /// <summary> /// Describes a type model. /// </summary> public abstract class ModelDescription { public string Documentation { get; set; } public Type ModelType { get; set; } public string Name { get; set; } } }
20.625
50
0.612121
[ "MIT" ]
WS-and-Cloud/Issue-Tracker
SoftUniIssueTracker.Web/Areas/HelpPage/ModelDescriptions/ModelDescription.cs
330
C#
// Generated class v2.19.0.0, don't modify using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; using System.Text; namespace NHtmlUnit.Activex.Javascript.Msxml { public partial class XMLHTTPRequest : NHtmlUnit.Activex.Javascript.Msxml.MSXMLScriptable { static XMLHTTPRequest() { ObjectWrapper.RegisterWrapperCreator((com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLHTTPRequest o) => new XMLHTTPRequest(o)); } public XMLHTTPRequest(com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLHTTPRequest wrappedObject) : base(wrappedObject) {} public new com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLHTTPRequest WObj { get { return (com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLHTTPRequest)WrappedObject; } } public XMLHTTPRequest() : this(new com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLHTTPRequest()) {} public System.Int32 ReadyState { get { return WObj.getReadyState(); } } public System.String ResponseText { get { return WObj.getResponseText(); } } public System.Object ResponseXML { get { return WObj.getResponseXML(); } } public System.Int32 Status { get { return WObj.getStatus(); } } public System.String StatusText { get { return WObj.getStatusText(); } } public System.String AllResponseHeaders { get { return WObj.getAllResponseHeaders(); } } // Generating method code for abort public virtual void Abort() { WObj.abort(); } // Generating method code for getResponseHeader public virtual string GetResponseHeader(string header) { return WObj.getResponseHeader(header); } // Generating method code for open public virtual void Open(string method, object url, object asyncParam, object user, object password) { WObj.open(method, url, asyncParam, user, password); } // Generating method code for send public virtual void Send(object body) { WObj.send(body); } // Generating method code for setRequestHeader public virtual void SetRequestHeader(string name, string value) { WObj.setRequestHeader(name, value); } // Generating method code for getOnreadystatechange public virtual object GetOnreadystatechange() { return WObj.getOnreadystatechange(); } // Generating method code for setOnreadystatechange public virtual void SetOnreadystatechange(net.sourceforge.htmlunit.corejs.javascript.Function stateChangeHandler) { WObj.setOnreadystatechange(stateChangeHandler); } } }
25.227642
138
0.616178
[ "Apache-2.0" ]
JonAnders/NHtmlUnit
app/NHtmlUnit/Generated/Activex/Javascript/Msxml/XMLHTTPRequest.cs
3,103
C#
using System; using System.Collections.Generic; using System.Linq; using Core.Exceptions; using Core.Meta.Interfaces; namespace Core.Meta { /// <inheritdoc/> public readonly struct BebopSchema : ISchema { public BebopSchema(string nameSpace, Dictionary<string, IDefinition> definitions) { Namespace = nameSpace; Definitions = definitions; } /// <inheritdoc/> public string Namespace { get; } /// <inheritdoc/> public Dictionary<string, IDefinition> Definitions { get; } /// <inheritdoc/> public void Validate() { foreach (var definition in Definitions.Values) { if (Definitions.Values.Count(d => d.Name.Equals(definition.Name)) > 1) { throw new MultipleDefinitionsException(definition); } if (ReservedWords.Identifiers.Contains(definition.Name)) { throw new ReservedIdentifierException(definition.Name, definition.Span); } if (definition.IsReadOnly && !definition.IsStruct()) { throw new InvalidReadOnlyException(definition); } if (definition.OpcodeAttribute != null) { if (definition.IsEnum()) { throw new InvalidOpcodeAttributeUsageException(definition); } if (!definition.OpcodeAttribute.TryValidate(out var opcodeReason)) { throw new InvalidOpcodeAttributeValueException(definition, opcodeReason); } if (Definitions.Values.Count(d => d.OpcodeAttribute != null && d.OpcodeAttribute.Value.Equals(definition.OpcodeAttribute.Value)) > 1) { throw new DuplicateOpcodeException(definition); } } foreach (var field in definition.Fields) { if (ReservedWords.Identifiers.Contains(field.Name)) { throw new ReservedIdentifierException(field.Name, field.Span); } if (field.DeprecatedAttribute != null && definition.IsStruct()) { throw new InvalidDeprecatedAttributeUsageException(field); } switch (definition.Kind) { case AggregateKind.Enum when field.ConstantValue < 0: { throw new InvalidFieldException(field, "Enum values must start at 0"); } case AggregateKind.Enum when definition.Fields.Count(f => f.ConstantValue == field.ConstantValue) > 1: { throw new InvalidFieldException(field, "Enum value must be unique"); } case AggregateKind.Struct when field.Type is DefinedType dt && definition.Name.Equals(dt.Name): { throw new InvalidFieldException(field, "Struct contains itself"); } case AggregateKind.Message when definition.Fields.Count(f => f.ConstantValue == field.ConstantValue) > 1: { throw new InvalidFieldException(field, "Message index must be unique"); } case AggregateKind.Message when field.ConstantValue <= 0: { throw new InvalidFieldException(field, "Message member index must start at 1"); } case AggregateKind.Message when field.ConstantValue > definition.Fields.Count: { throw new InvalidFieldException(field, "Message index is greater than field count"); } default: break; } } } } } }
43
153
0.489767
[ "Apache-2.0" ]
MendelMonteiro/bebop
Core/Meta/BebopSchema.cs
4,302
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerAttackDamageLeft : MonoBehaviour { void Start() { } // Update is called once per frame void Update() { } private void OnTriggerEnter2D(Collider2D collision) { BaseStandardEnemy enemy = collision.gameObject.GetComponent<BaseStandardEnemy>(); if (enemy) { enemy.Damage(false); } else if (collision.gameObject.GetComponent<BaseEnemy>()) { collision.gameObject.GetComponent<BaseEnemy>().Damage(true); } } }
18.529412
89
0.62381
[ "MIT" ]
AGGP-NHTI/Vibin
Assets/Scripts/PlayerAttackDamageLeft.cs
632
C#
using System; using Elasticsearch.Net; using Nest; using Tests.Core.ManagedElasticsearch.Clusters; using Tests.Framework; using Tests.Framework.Integration; namespace Tests.Indices.IndexManagement.OpenCloseIndex.OpenIndex { public class OpenIndexApiTests : ApiIntegrationTestBase<WritableCluster, IOpenIndexResponse, IOpenIndexRequest, OpenIndexDescriptor, OpenIndexRequest> { public OpenIndexApiTests(WritableCluster cluster, EndpointUsage usage) : base(cluster, usage) { } protected override bool ExpectIsValid => true; protected override int ExpectStatusCode => 200; protected override Func<OpenIndexDescriptor, IOpenIndexRequest> Fluent => d => d .IgnoreUnavailable(); protected override HttpMethod HttpMethod => HttpMethod.POST; protected override OpenIndexRequest Initializer => new OpenIndexRequest(CallIsolatedValue) { IgnoreUnavailable = true }; protected override string UrlPath => $"/{CallIsolatedValue}/_open?ignore_unavailable=true"; protected override void IntegrationSetup(IElasticClient client, CallUniqueValues values) { foreach (var index in values.Values) { client.CreateIndex(index); client.ClusterHealth(h => h.WaitForStatus(WaitForStatus.Yellow).Index(index)); client.CloseIndex(index); } } protected override LazyResponses ClientUsage() => Calls( (client, f) => client.OpenIndex(CallIsolatedValue, f), (client, f) => client.OpenIndexAsync(CallIsolatedValue, f), (client, r) => client.OpenIndex(r), (client, r) => client.OpenIndexAsync(r) ); protected override OpenIndexDescriptor NewDescriptor() => new OpenIndexDescriptor(CallIsolatedValue); } }
33.08
121
0.770254
[ "Apache-2.0" ]
Henr1k80/elasticsearch-net
src/Tests/Tests/Indices/IndexManagement/OpenCloseIndex/OpenIndex/OpenIndexApiTests.cs
1,656
C#
namespace RippleDictionary { public class Ripple { #region Constructors public Ripple(Screen screen, Floor floor) { Screen = screen; Floor = floor; } #endregion #region Objects public Screen Screen; public Floor Floor; #endregion } }
18.105263
49
0.526163
[ "MIT" ]
Bhaskers-Blu-Org2/kinect-ripple
Ripple-V2/RippleDictionary/Ripple.cs
346
C#
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; namespace HandelNieruchomosciami.Controllers { public class HomeController : Controller { public IActionResult Index() { return View(); } public IActionResult Error() { ViewData["RequestId"] = Activity.Current?.Id ?? HttpContext.TraceIdentifier; return View(); } } }
21.666667
88
0.642308
[ "MIT" ]
przemexsoft/HandelNieruchomosciami
HandelNieruchomosciami/Controllers/HomeController.cs
520
C#
using System; using System.Collections.Generic; using WDE.Common.CoreVersion; using WDE.Common.Database; using WDE.Module.Attributes; namespace WoWDatabaseEditorCore.CoreVersion { [AutoRegister] [SingleInstance] public class UnspecifiedCoreVersion : ICoreVersion, IDatabaseFeatures, ISmartScriptFeatures, IConditionFeatures { public string Tag => "unspecified"; public string FriendlyName => "Unspecified"; public IDatabaseFeatures DatabaseFeatures => this; public ISmartScriptFeatures SmartScriptFeatures => this; public IConditionFeatures ConditionFeatures => this; public ISet<Type> UnsupportedTables => new HashSet<Type>(); public ISet<SmartScriptType> SupportedTypes => new HashSet<SmartScriptType>(); public string ConditionsFile => "SmartData/conditions.json"; public string ConditionGroupsFile => "SmartData/conditions_groups.json"; public string ConditionSourcesFile => "SmartData/condition_sources.json"; } }
41.12
115
0.736381
[ "Unlicense" ]
Crypticaz/WoWDatabaseEditor
WoWDatabaseEditor/CoreVersion/UnspecifiedCoreVersion.cs
1,028
C#
// Copyright(c) Microsoft Corporation // All rights reserved. // // Licensed under the Apache License, Version 2.0 (the License); you may not use // this file except in compliance with the License. You may obtain a copy of the // License at http://www.apache.org/licenses/LICENSE-2.0 // // THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS // OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY // IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, // MERCHANTABILITY OR NON-INFRINGEMENT. // // See the Apache Version 2.0 License for specific language governing // permissions and limitations under the License. using System.Collections.Generic; using Microsoft.Python.Core; using Microsoft.Python.Parsing; namespace Microsoft.Python.Analysis.Diagnostics { public sealed class DiagnosticsSeverityMap { private readonly Dictionary<string, Severity> _map = new Dictionary<string, Severity>(); public DiagnosticsSeverityMap() { } public DiagnosticsSeverityMap(string[] errors, string[] warnings, string[] information, string[] disabled) { _map.Clear(); // disabled > error > warning > information PopulateMap(information, Severity.Information); PopulateMap(warnings, Severity.Warning); PopulateMap(errors, Severity.Error); PopulateMap(disabled, Severity.Suppressed); void PopulateMap(string[] codes, Severity severity) { foreach (var code in codes.MaybeEnumerate()) { _map[code] = severity; } } } public Severity GetEffectiveSeverity(string code, Severity defaultSeverity) => _map.TryGetValue(code, out var severity) ? severity : defaultSeverity; } }
40.822222
116
0.689167
[ "Apache-2.0" ]
6paklata/python-language-server
src/Analysis/Ast/Impl/Diagnostics/DiagnosticsSeverityMap.cs
1,839
C#
// Copyright (c) 2012, Event Store LLP // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // Neither the name of the Event Store LLP nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 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; namespace EventStore.ClientAPI.SystemData { internal class InspectionResult { public readonly InspectionDecision Decision; public readonly Exception Error; public InspectionResult(InspectionDecision decision, Exception error = null) { Decision = decision; Error = error; } } }
43.772727
84
0.751298
[ "BSD-3-Clause" ]
eleks/EventStore
src/EventStore/EventStore.ClientAPI/SystemData/InspectionResult.cs
1,926
C#
/******************************************************************* * Copyright(c) #YEAR# #COMPANY# * All rights reserved. * * 文件名称: #SCRIPTFULLNAME# * 简要描述: * * 创建日期: #DATE# * 作者: #AUTHOR# * 说明: ******************************************************************/ using System; using System.Collections; using System.Collections.Generic; using SYJFramework; using UnityEngine; public class TestEvent : MonoBehaviour { void Start() { // 测试 通用事件 不用传数据 GameEntry.Event.CommonEvent.AddEventListener(CommonEventId.OnNoMsgEvent, (object data) => { Debug.Log("接收到了"); }); // 测试 通用事件 传数据 GameEntry.Event.CommonEvent.AddEventListener(CommonEventId.OnHasMsgEvent, (object data) => { Debug.Log("接收到了 "+ data.ToString()); }); // 测试 Socket 事件 传数据 GameEntry.Event.SocketEvent.AddEventListener(SysEventId.LoadDataTableComplete, (byte[] data) => { Debug.Log("接收到了 "+ System.Text.Encoding.UTF8.GetString(data)); }); } void Update() { // 测试 通用事件 不用传数据 if (Input.GetKeyDown(KeyCode.Space)) { GameEntry.Event.CommonEvent.Dispatch(CommonEventId.OnNoMsgEvent); } // 测试 通用事件 不用传数据 if (Input.GetKeyDown(KeyCode.A)) { GameEntry.Event.CommonEvent.Dispatch(CommonEventId.OnHasMsgEvent,"通用事件参数数据"); } // 测试 Socket 事件 传数据 if (Input.GetKeyDown(KeyCode.B)) { GameEntry.Event.SocketEvent.Dispatch(SysEventId.LoadDataTableComplete,System.Text.Encoding.UTF8.GetBytes("撒旦")); } } }
26.639344
124
0.559385
[ "Apache-2.0" ]
Oxford561/MyArchero
Assets/SYJFramework/Test/TestEvent.cs
1,815
C#
using Microsoft.CognitiveServices.Speech.Audio; using System; using System.Diagnostics; using System.IO; //from https://raw.githubusercontent.com/Azure-Samples/cognitive-services-speech-sdk/master/samples/csharp/sharedcontent/console/helper.cs namespace NetToolBox.SpeechRecognition.Azure { public static class AzureSpeechHelpers { public static AudioConfig OpenWavFile(string filename) { BinaryReader reader = new BinaryReader(File.OpenRead(filename)); return OpenWavFile(reader); } public static AudioConfig OpenWavFile(BinaryReader reader) { AudioStreamFormat format = readWaveHeader(reader); return AudioConfig.FromStreamInput(new BinaryAudioStreamReader(reader), format); } public static BinaryAudioStreamReader CreateWavReader(string filename) { BinaryReader reader = new BinaryReader(File.OpenRead(filename)); // read the wave header so that it won't get into the in the following readings AudioStreamFormat format = readWaveHeader(reader); return new BinaryAudioStreamReader(reader); } public static BinaryAudioStreamReader CreateBinaryFileReader(string filename) { BinaryReader reader = new BinaryReader(File.OpenRead(filename)); return new BinaryAudioStreamReader(reader); } public static AudioStreamFormat readWaveHeader(BinaryReader reader) { // Tag "RIFF" char[] data = new char[4]; reader.Read(data, 0, 4); Trace.Assert((data[0] == 'R') && (data[1] == 'I') && (data[2] == 'F') && (data[3] == 'F'), "Wrong wav header"); // Chunk size long fileSize = reader.ReadInt32(); // Subchunk, Wave Header // Subchunk, Format // Tag: "WAVE" reader.Read(data, 0, 4); Trace.Assert((data[0] == 'W') && (data[1] == 'A') && (data[2] == 'V') && (data[3] == 'E'), "Wrong wav tag in wav header"); // Tag: "fmt" reader.Read(data, 0, 4); Trace.Assert((data[0] == 'f') && (data[1] == 'm') && (data[2] == 't') && (data[3] == ' '), "Wrong format tag in wav header"); // chunk format size var formatSize = reader.ReadInt32(); var formatTag = reader.ReadUInt16(); var channels = reader.ReadUInt16(); var samplesPerSecond = reader.ReadUInt32(); var avgBytesPerSec = reader.ReadUInt32(); var blockAlign = reader.ReadUInt16(); var bitsPerSample = reader.ReadUInt16(); // Until now we have read 16 bytes in format, the rest is cbSize and is ignored for now. if (formatSize > 16) reader.ReadBytes((int)(formatSize - 16)); // Second Chunk, data // tag: data. reader.Read(data, 0, 4); Trace.Assert((data[0] == 'd') && (data[1] == 'a') && (data[2] == 't') && (data[3] == 'a'), "Wrong data tag in wav"); // data chunk size int dataSize = reader.ReadInt32(); // now, we have the format in the format parameter and the // reader set to the start of the body, i.e., the raw sample data return AudioStreamFormat.GetWaveFormatPCM(samplesPerSecond, (byte)bitsPerSample, (byte)channels); } } /// <summary> /// Adapter class to the native stream api. /// </summary> public sealed class BinaryAudioStreamReader : PullAudioInputStreamCallback { private System.IO.BinaryReader _reader; /// <summary> /// Creates and initializes an instance of BinaryAudioStreamReader. /// </summary> /// <param name="reader">The underlying stream to read the audio data from. Note: The stream contains the bare sample data, not the container (like wave header data, etc).</param> public BinaryAudioStreamReader(System.IO.BinaryReader reader) { _reader = reader; } /// <summary> /// Creates and initializes an instance of BinaryAudioStreamReader. /// </summary> /// <param name="stream">The underlying stream to read the audio data from. Note: The stream contains the bare sample data, not the container (like wave header data, etc).</param> public BinaryAudioStreamReader(System.IO.Stream stream) : this(new System.IO.BinaryReader(stream)) { } /// <summary> /// Reads binary data from the stream. /// </summary> /// <param name="dataBuffer">The buffer to fill</param> /// <param name="size">The size of data in the buffer.</param> /// <returns>The number of bytes filled, or 0 in case the stream hits its end and there is no more data available. /// If there is no data immediate available, Read() blocks until the next data becomes available.</returns> public override int Read(byte[] dataBuffer, uint size) { return _reader.Read(dataBuffer, 0, (int)size); } /// <summary> /// This method performs cleanup of resources. /// The Boolean parameter <paramref name="disposing"/> indicates whether the method is called from <see cref="IDisposable.Dispose"/> (if <paramref name="disposing"/> is true) or from the finalizer (if <paramref name="disposing"/> is false). /// Derived classes should override this method to dispose resource if needed. /// </summary> /// <param name="disposing">Flag to request disposal.</param> protected override void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { _reader.Dispose(); } disposed = true; base.Dispose(disposing); } private bool disposed = false; } /// <summary> /// Implements a custom class for PushAudioOutputStreamCallback. /// This is to receive the audio data when the synthesizer has produced audio data. /// </summary> public sealed class PushAudioOutputStreamSampleCallback : PushAudioOutputStreamCallback { private byte[] audioData; /// <summary> /// Constructor /// </summary> public PushAudioOutputStreamSampleCallback() { audioData = new byte[0]; } /// <summary> /// A callback which is invoked when the synthesizer has a output audio chunk to write out /// </summary> /// <param name="dataBuffer">The output audio chunk sent by synthesizer</param> /// <returns>Tell synthesizer how many bytes are received</returns> public override uint Write(byte[] dataBuffer) { int oldSize = audioData.Length; Array.Resize(ref audioData, oldSize + dataBuffer.Length); for (int i = 0; i < dataBuffer.Length; ++i) { audioData[oldSize + i] = dataBuffer[i]; } Console.WriteLine($"{dataBuffer.Length} bytes received."); return (uint)dataBuffer.Length; } /// <summary> /// A callback which is invoked when the synthesizer is about to close the stream /// </summary> public override void Close() { Console.WriteLine("Push audio output stream closed."); } /// <summary> /// Get the received audio data /// </summary> /// <returns>The received audio data in byte array</returns> public byte[] GetAudioData() { return audioData; } } }
39.115578
248
0.587102
[ "MIT" ]
npnelson/SpeechRecognition
src/NetToolBox.SpeechRecognition.Azure/AzureSpeechHelpers.cs
7,786
C#
using Microsoft.FSharp.Collections; using ProtoBuf.Serializers; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ProtoBuf.FSharp { /// <summary> /// Serialisation provider for F# Set unique collection /// </summary> /// <typeparam name="T">content of unique items within the Set</typeparam> public sealed class FSharpSetSerializer<T> : ExternalSerializer<FSharpSet<T>, T> { /// <inheritdoc/> protected override FSharpSet<T> AddRange(FSharpSet<T> values, ref ArraySegment<T> newValues, ISerializationContext context) { if (values == null || values.IsEmpty) { return SetModule.OfSeq(newValues); } if (newValues.Count == 1) { return SetModule.Add<T>(newValues.Array[newValues.Offset], values); } return SetModule.Union(values, SetModule.OfSeq(newValues)); } /// <inheritdoc/> protected override FSharpSet<T> Clear(FSharpSet<T> values, ISerializationContext context) { return SetModule.Empty<T>(); } /// <inheritdoc/> protected override int TryGetCount(FSharpSet<T> values) { return values is null ? 0 : values.Count; } } /// <summary> /// Factory class to provide consistent idiom with in-build protobuf collections. /// This class is the reason for implementation in C# rather than F#: /// static classes in F# are module, but module does not allow typeof-module /// </summary> public static class FSharpSetFactory { /// <summary>Create a map serializer that operates on FSharp Maps</summary> public static RepeatedSerializer<FSharpSet<T>, T> Create<T>() => new FSharpSetSerializer<T>(); } }
33.946429
131
0.623356
[ "Apache-2.0" ]
CommonGuy/protobuf-net
src/protobuf-net.FSharp/FSharpSetSerializer.cs
1,903
C#
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net.Http; using System.Net.Http.Headers; using System.Text; using System.Transactions; using BackendDotNet.Common.NHibernate; using BackendDotNet.Domain; using BackendDotNet.Dto; using BackendDotNet.Repository; using BackendDotNet.Service; using CsvHelper; namespace BackendDotNet.Service.Impl { public class StockServiceImpl : IStockService { private StockRepository stockRepository { get; set;} public StockServiceImpl ( StockRepository stockRepository ) { this.stockRepository = stockRepository; } public Object getHistoricalStockData(string symbol) { DateTime startDate = DateTime.Now.AddDays (-30); DateTime endDate = DateTime.Now; string strStartDate = startDate.ToString ("yyyy-MM-dd"); string strEndDate = endDate.ToString ("yyyy-MM-dd"); string yqlURL = "http://query.yahooapis.com/v1/public/yql"; string dataFormat = "&format=json&env=store://datatables.org/alltableswithkeys"; string parameters = "?q=select * from yahoo.finance.historicaldata where symbol =\"" + symbol + "\"and startDate=\"" + strStartDate + "\" and endDate=\"" + strEndDate + "\"" + dataFormat; HttpClient client = new HttpClient (); client.BaseAddress = new Uri ( yqlURL ); client.DefaultRequestHeaders.Accept.Add( new MediaTypeWithQualityHeaderValue("application/json")); HttpResponseMessage response = client.GetAsync ( parameters ).Result; if (response.IsSuccessStatusCode) { var responseData = response.Content.ReadAsAsync<Object> ().Result; return responseData; } else { return null; } } public IList<StockDto> ImportStocksByCSVFile(string file) { var stocks = new List<StockDto> (); var textReader = File.OpenText ( file ); var parser = new CsvParser (textReader); var rowNumber = 0; using( var uow = this.stockRepository.Uow ) { uow.OpenSession(); while( true ) { var stock = new Stock (); var row = parser.Read(); if (rowNumber == 0) { rowNumber++; continue; } else { if (row == null) { break; } else { stock.Symbol = row [0]; stock.Name = row [1]; stock.LastSale = row [2]; stock.MarketCap = row [3]; stock.IpoYear = row [4]; stock.Sector = row [5]; stock.Industry = row [6]; stock.Summary = row [7]; this.stockRepository.Add ( stock ); rowNumber++; } } } stocks = this.stockRepository.All ().ToList ().Select (x => new StockDto (x)).ToList (); uow.Commit (); } return stocks; } public List<StockDto> findStocksByWildCard(string phrase) { var stocks = new List<StockDto> (); using( var uow = this.stockRepository.Uow ) { uow.OpenSession (); if (!String.IsNullOrEmpty (phrase)) { StringBuilder sb = new StringBuilder (); sb.Append (phrase.ToUpper ()).Append ("%"); string searchPhrase = sb.ToString (); stocks = this.stockRepository.FindByWildCard (searchPhrase).ToList().Select( x => new StockDto(x)).ToList(); } uow.Commit (); } return stocks; } } }
28.339286
190
0.661626
[ "MIT" ]
Lucifer21123/fullstacksample
backend-dotnet/BackendDotNet/src/BackendDotNet.Library/Service/Impl/StockServiceImpl.cs
3,176
C#
using System; using System.IO; using System.Text; namespace ATLAS_MICRO_ASSEMBLER_8 { class Program { static void Main(string[] args) { // ATLAS CPU-16 MICRO-ASSEMBLER // WRITTEN BY HAYDEN B. - 2021 // Define microcode file string PATH = @"C:\Users\Hayden\Documents\GitHub\CPU-16\Microassembly\MICROCODE.hex"; File.Delete(PATH); File.WriteAllText(PATH, "v2.0 raw" + Environment.NewLine); // Define mnemonics // long TEST_T = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0000; long PC_ST = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0001; long OP1_ST = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0010; long OP2_ST = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0011; long IR_ST = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0100; long MDR_ST = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0101; long MEM_ST = 0b0_00_0_0_00_0_0_00_0_01_0_000_00_0_0000_000_00_0000_0110; long REG_ST = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0111; long F_DOUT = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0001_0000; long PC_DOUT = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0010_0000; long RSH_DOUT = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0100_0000; long SEX_DOUT = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0101_0000; long SWP_DOUT = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0110_0000; long WRD_DOUT = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0111_0000; long MDR_DOUT = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_1000_0000; long MEM_DOUT = 0b0_00_0_0_00_0_0_00_0_11_0_000_00_0_0000_000_00_1001_0000; long REG_DOUT = 0b0_00_0_0_01_0_0_00_0_00_0_000_00_0_0000_000_00_1010_0000; long PC_AOUT = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_01_0000_0000; long MAR_AOUT = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_10_0000_0000; long COND_N = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_001_00_0000_0000; long COND_Z = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_010_00_0000_0000; long COND_V = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_011_00_0000_0000; long COND_C = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_100_00_0000_0000; long ALU_ADD = 0b0_00_0_0_00_0_0_00_0_00_0_000_10_0_1001_000_00_0011_0000; long ALU_ADC = 0b0_00_0_0_00_0_0_00_0_00_0_000_01_0_1001_000_00_0011_0000; long ALU_SUB = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0110_000_00_0011_0000; long ALU_SBB = 0b0_00_0_0_00_0_0_00_0_00_0_000_01_0_0110_000_00_0011_0000; long ALU_AND = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_1_1011_000_00_0011_0000; long ALU_OR = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_1_1110_000_00_0011_0000; long ALU_XOR = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_1_0110_000_00_0011_0000; long ALU_NOT = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_1_0000_000_00_0011_0000; long ALU_LSH = 0b0_00_0_0_00_0_0_00_0_00_0_000_10_0_1100_000_00_0011_0000; long ALU_RSH = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0011_0000; long ALU_INC = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0011_0000; long ALU_DEC = 0b0_00_0_0_00_0_0_00_0_00_0_000_10_0_1111_000_00_0011_0000; long ALU_SEX = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0011_0000; long SEQ_INC = 0b0_00_0_0_00_0_0_00_0_00_0_001_00_0_0000_000_00_0000_0000; long SEQ_RS0 = 0b0_00_0_0_00_0_0_00_0_00_0_010_00_0_0000_000_00_0000_0000; long SEQ_RS1 = 0b0_00_0_0_00_0_0_00_0_00_0_110_00_0_0000_000_00_0000_0000; long PC_INC = 0b0_00_0_0_00_0_0_00_0_00_1_000_00_0_0000_000_00_0000_0000; long COND_NEG = 0b0_00_0_0_00_0_0_00_1_00_0_000_00_0_0000_000_00_0000_0000; long F_DIN = 0b0_00_0_0_00_0_0_01_0_00_0_000_00_0_0000_000_00_0000_0000; long F_ST = 0b0_00_0_0_00_0_0_10_0_00_0_000_00_0_0000_000_00_0000_0000; long STAT_ST = 0b0_00_0_0_00_0_1_00_0_00_0_000_00_0_0000_000_00_0000_0000; long MAR_ST = 0b0_00_0_0_00_1_0_00_0_00_0_000_00_0_0000_000_00_0000_0000; long REG2_SEL = 0b0_00_0_0_10_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0000; long TMP_CLR = 0b0_00_0_1_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0000; long IRQ_EN = 0b0_00_1_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0000; long HLT_ACK = 0b0_01_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0000; long IRQ_ACK = 0b0_00_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_1011_0000; long RST_ACK = 0b0_10_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0000; long SP_SEL= 0b0_10_0_0_00_0_0_00_0_00_0_000_00_0_0000_000_00_0000_0000; // Write your microcode here // {IRQ_EN|TMP_CLR|PC_AOUT|MEM_DOUT|IR_ST|SEQ_INC, PC_INC|SEQ_INC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; int instruction = 0; while (instruction < 768) { Console.WriteLine(instruction); int imode = 0; while (imode < 4) { int step = 0; while (step < 16) { if (imode!= 0) { if (imode == 2 && INTERRUPT_TABLE[instruction] == 1) { File.AppendAllText(PATH, INTERRUPT[step].ToString("X") + Environment.NewLine); } else { File.AppendAllText(PATH, (IRQ_EN | HLT_ACK).ToString("X") + Environment.NewLine); } } else { File.AppendAllText(PATH, TEMPLATE[instruction, step].ToString("X") + Environment.NewLine); } step++; } imode++; } instruction++; } } } }
104.661485
374
0.544563
[ "Apache-2.0" ]
AtlasCPU/CPU-16
Microassembly/CPU-16 Microassembler/CPU-16 Microassembler/Program.cs
121,200
C#
namespace IntersectionSim { partial class Form1 { /// <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.groupBox1 = new System.Windows.Forms.GroupBox(); this.pictureBox3 = new System.Windows.Forms.PictureBox(); this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.CurrTimeLabel = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.LaneGroup4 = new System.Windows.Forms.GroupBox(); this.ToWFromE = new System.Windows.Forms.NumericUpDown(); this.ToSFromE = new System.Windows.Forms.NumericUpDown(); this.ToEFromE = new System.Windows.Forms.NumericUpDown(); this.ToNFromE = new System.Windows.Forms.NumericUpDown(); this.label19 = new System.Windows.Forms.Label(); this.label20 = new System.Windows.Forms.Label(); this.CarPerMinE = new System.Windows.Forms.NumericUpDown(); this.label21 = new System.Windows.Forms.Label(); this.label22 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); this.CheckBoxEast = new System.Windows.Forms.CheckBox(); this.LaneGroup3 = new System.Windows.Forms.GroupBox(); this.ToWFromS = new System.Windows.Forms.NumericUpDown(); this.ToSFromS = new System.Windows.Forms.NumericUpDown(); this.ToEFromS = new System.Windows.Forms.NumericUpDown(); this.ToNFromS = new System.Windows.Forms.NumericUpDown(); this.label14 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); this.CarPerMinS = new System.Windows.Forms.NumericUpDown(); this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); this.CheckBoxSouth = new System.Windows.Forms.CheckBox(); this.LaneGroup2 = new System.Windows.Forms.GroupBox(); this.ToWFromW = new System.Windows.Forms.NumericUpDown(); this.ToSFromW = new System.Windows.Forms.NumericUpDown(); this.ToEFromW = new System.Windows.Forms.NumericUpDown(); this.ToNFromW = new System.Windows.Forms.NumericUpDown(); this.label7 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.CarPerMinW = new System.Windows.Forms.NumericUpDown(); this.label9 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.CheckBoxWest = new System.Windows.Forms.CheckBox(); this.label6 = new System.Windows.Forms.Label(); this.LaneGroup1 = new System.Windows.Forms.GroupBox(); this.ToWFromN = new System.Windows.Forms.NumericUpDown(); this.ToSFromN = new System.Windows.Forms.NumericUpDown(); this.ToEFromN = new System.Windows.Forms.NumericUpDown(); this.ToNFromN = new System.Windows.Forms.NumericUpDown(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.CarPerMinN = new System.Windows.Forms.NumericUpDown(); this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.CheckBoxNorth = new System.Windows.Forms.CheckBox(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this.label24 = new System.Windows.Forms.Label(); this.IntelligentRadio = new System.Windows.Forms.RadioButton(); this.ConventialRadio = new System.Windows.Forms.RadioButton(); this.ManualIterButton = new System.Windows.Forms.Button(); this.ResumeButton = new System.Windows.Forms.Button(); this.PauseButton = new System.Windows.Forms.Button(); this.label13 = new System.Windows.Forms.Label(); this.SpeedUpSelector = new System.Windows.Forms.NumericUpDown(); this.StartButton = new System.Windows.Forms.Button(); this.label12 = new System.Windows.Forms.Label(); this.SimulationDurationSelector = new System.Windows.Forms.NumericUpDown(); this.RunSampleButton = new System.Windows.Forms.Button(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label25 = new System.Windows.Forms.Label(); this.NumOfRunsSelector = new System.Windows.Forms.NumericUpDown(); this.MaxDurationSelector = new System.Windows.Forms.NumericUpDown(); this.label26 = new System.Windows.Forms.Label(); this.MinCpmSelector = new System.Windows.Forms.NumericUpDown(); this.label27 = new System.Windows.Forms.Label(); this.MaxCpmSelector = new System.Windows.Forms.NumericUpDown(); this.label28 = new System.Windows.Forms.Label(); this.MinDurationSelector = new System.Windows.Forms.NumericUpDown(); this.label29 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.groupBox2.SuspendLayout(); this.LaneGroup4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ToWFromE)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToSFromE)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToEFromE)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToNFromE)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.CarPerMinE)).BeginInit(); this.LaneGroup3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ToWFromS)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToSFromS)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToEFromS)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToNFromS)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.CarPerMinS)).BeginInit(); this.LaneGroup2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ToWFromW)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToSFromW)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToEFromW)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToNFromW)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.CarPerMinW)).BeginInit(); this.LaneGroup1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ToWFromN)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToSFromN)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToEFromN)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ToNFromN)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.CarPerMinN)).BeginInit(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.SpeedUpSelector)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.SimulationDurationSelector)).BeginInit(); this.groupBox3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.NumOfRunsSelector)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.MaxDurationSelector)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.MinCpmSelector)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.MaxCpmSelector)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.MinDurationSelector)).BeginInit(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Controls.Add(this.pictureBox3); this.groupBox1.Controls.Add(this.pictureBox2); this.groupBox1.Controls.Add(this.pictureBox1); this.groupBox1.Location = new System.Drawing.Point(13, 13); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(500, 500); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "Intersection Visualization"; // // pictureBox3 // this.pictureBox3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.pictureBox3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.pictureBox3.Image = global::IntersectionSim.Resource1.Roundabout_back; this.pictureBox3.ImageLocation = ""; this.pictureBox3.Location = new System.Drawing.Point(10, 12); this.pictureBox3.Margin = new System.Windows.Forms.Padding(0); this.pictureBox3.Name = "pictureBox3"; this.pictureBox3.Size = new System.Drawing.Size(486, 486); this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox3.TabIndex = 3; this.pictureBox3.TabStop = false; this.pictureBox3.WaitOnLoad = true; this.pictureBox3.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox3_Paint); // // pictureBox2 // this.pictureBox2.Image = global::IntersectionSim.Resource1.RoundaboutPictogram; this.pictureBox2.ImageLocation = ""; this.pictureBox2.Location = new System.Drawing.Point(225, 225); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new System.Drawing.Size(50, 50); this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox2.TabIndex = 2; this.pictureBox2.TabStop = false; this.pictureBox2.Visible = false; this.pictureBox2.WaitOnLoad = true; // // pictureBox1 // this.pictureBox1.ImageLocation = "http://www.titanic-nautical.com/images/Nautical-Facts-Information/Nautical-Units/" + "compass1.gif"; this.pictureBox1.Location = new System.Drawing.Point(419, 419); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(75, 75); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.TabIndex = 1; this.pictureBox1.TabStop = false; this.pictureBox1.Visible = false; // // CurrTimeLabel // this.CurrTimeLabel.AutoSize = true; this.CurrTimeLabel.Location = new System.Drawing.Point(72, 14); this.CurrTimeLabel.Name = "CurrTimeLabel"; this.CurrTimeLabel.Size = new System.Drawing.Size(62, 13); this.CurrTimeLabel.TabIndex = 0; this.CurrTimeLabel.Text = "Time: 0 sec"; // // groupBox2 // this.groupBox2.Controls.Add(this.LaneGroup4); this.groupBox2.Controls.Add(this.LaneGroup3); this.groupBox2.Controls.Add(this.LaneGroup2); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.LaneGroup1); this.groupBox2.Location = new System.Drawing.Point(519, 13); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(170, 620); this.groupBox2.TabIndex = 1; this.groupBox2.TabStop = false; this.groupBox2.Text = "Animated Simulation Settings"; // // LaneGroup4 // this.LaneGroup4.Controls.Add(this.ToWFromE); this.LaneGroup4.Controls.Add(this.ToSFromE); this.LaneGroup4.Controls.Add(this.ToEFromE); this.LaneGroup4.Controls.Add(this.ToNFromE); this.LaneGroup4.Controls.Add(this.label19); this.LaneGroup4.Controls.Add(this.label20); this.LaneGroup4.Controls.Add(this.CarPerMinE); this.LaneGroup4.Controls.Add(this.label21); this.LaneGroup4.Controls.Add(this.label22); this.LaneGroup4.Controls.Add(this.label23); this.LaneGroup4.Controls.Add(this.CheckBoxEast); this.LaneGroup4.Location = new System.Drawing.Point(6, 477); this.LaneGroup4.Name = "LaneGroup4"; this.LaneGroup4.Size = new System.Drawing.Size(160, 120); this.LaneGroup4.TabIndex = 17; this.LaneGroup4.TabStop = false; this.LaneGroup4.Text = "groupBox6"; // // ToWFromE // this.ToWFromE.Location = new System.Drawing.Point(109, 96); this.ToWFromE.Name = "ToWFromE"; this.ToWFromE.Size = new System.Drawing.Size(43, 20); this.ToWFromE.TabIndex = 15; this.ToWFromE.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToSFromE // this.ToSFromE.Location = new System.Drawing.Point(109, 76); this.ToSFromE.Name = "ToSFromE"; this.ToSFromE.Size = new System.Drawing.Size(43, 20); this.ToSFromE.TabIndex = 14; this.ToSFromE.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToEFromE // this.ToEFromE.Location = new System.Drawing.Point(109, 56); this.ToEFromE.Name = "ToEFromE"; this.ToEFromE.Size = new System.Drawing.Size(43, 20); this.ToEFromE.TabIndex = 13; this.ToEFromE.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToNFromE // this.ToNFromE.Location = new System.Drawing.Point(109, 36); this.ToNFromE.Name = "ToNFromE"; this.ToNFromE.Size = new System.Drawing.Size(43, 20); this.ToNFromE.TabIndex = 12; this.ToNFromE.Value = new decimal(new int[] { 25, 0, 0, 0}); // // label19 // this.label19.AutoSize = true; this.label19.Location = new System.Drawing.Point(6, 100); this.label19.Name = "label19"; this.label19.Size = new System.Drawing.Size(65, 13); this.label19.TabIndex = 11; this.label19.Text = "To West(%):"; // // label20 // this.label20.AutoSize = true; this.label20.Location = new System.Drawing.Point(6, 80); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(68, 13); this.label20.TabIndex = 10; this.label20.Text = "To South(%):"; // // CarPerMinE // this.CarPerMinE.Location = new System.Drawing.Point(109, 16); this.CarPerMinE.Name = "CarPerMinE"; this.CarPerMinE.Size = new System.Drawing.Size(43, 20); this.CarPerMinE.TabIndex = 2; this.CarPerMinE.Value = new decimal(new int[] { 10, 0, 0, 0}); // // label21 // this.label21.AutoSize = true; this.label21.Location = new System.Drawing.Point(6, 60); this.label21.Name = "label21"; this.label21.Size = new System.Drawing.Size(61, 13); this.label21.TabIndex = 9; this.label21.Text = "To East(%):"; // // label22 // this.label22.AutoSize = true; this.label22.Location = new System.Drawing.Point(6, 40); this.label22.Name = "label22"; this.label22.Size = new System.Drawing.Size(66, 13); this.label22.TabIndex = 8; this.label22.Text = "To North(%):"; // // label23 // this.label23.AutoSize = true; this.label23.Location = new System.Drawing.Point(6, 20); this.label23.Name = "label23"; this.label23.Size = new System.Drawing.Size(49, 13); this.label23.TabIndex = 7; this.label23.Text = "Cars/min"; // // CheckBoxEast // this.CheckBoxEast.AutoSize = true; this.CheckBoxEast.Location = new System.Drawing.Point(6, 0); this.CheckBoxEast.Name = "CheckBoxEast"; this.CheckBoxEast.Size = new System.Drawing.Size(74, 17); this.CheckBoxEast.TabIndex = 6; this.CheckBoxEast.Text = "East Lane"; this.CheckBoxEast.UseVisualStyleBackColor = true; // // LaneGroup3 // this.LaneGroup3.Controls.Add(this.ToWFromS); this.LaneGroup3.Controls.Add(this.ToSFromS); this.LaneGroup3.Controls.Add(this.ToEFromS); this.LaneGroup3.Controls.Add(this.ToNFromS); this.LaneGroup3.Controls.Add(this.label14); this.LaneGroup3.Controls.Add(this.label15); this.LaneGroup3.Controls.Add(this.CarPerMinS); this.LaneGroup3.Controls.Add(this.label16); this.LaneGroup3.Controls.Add(this.label17); this.LaneGroup3.Controls.Add(this.label18); this.LaneGroup3.Controls.Add(this.CheckBoxSouth); this.LaneGroup3.Location = new System.Drawing.Point(6, 351); this.LaneGroup3.Name = "LaneGroup3"; this.LaneGroup3.Size = new System.Drawing.Size(160, 120); this.LaneGroup3.TabIndex = 16; this.LaneGroup3.TabStop = false; this.LaneGroup3.Text = "groupBox5"; // // ToWFromS // this.ToWFromS.Location = new System.Drawing.Point(109, 96); this.ToWFromS.Name = "ToWFromS"; this.ToWFromS.Size = new System.Drawing.Size(43, 20); this.ToWFromS.TabIndex = 15; this.ToWFromS.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToSFromS // this.ToSFromS.Location = new System.Drawing.Point(109, 76); this.ToSFromS.Name = "ToSFromS"; this.ToSFromS.Size = new System.Drawing.Size(43, 20); this.ToSFromS.TabIndex = 14; this.ToSFromS.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToEFromS // this.ToEFromS.Location = new System.Drawing.Point(109, 56); this.ToEFromS.Name = "ToEFromS"; this.ToEFromS.Size = new System.Drawing.Size(43, 20); this.ToEFromS.TabIndex = 13; this.ToEFromS.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToNFromS // this.ToNFromS.Location = new System.Drawing.Point(109, 36); this.ToNFromS.Name = "ToNFromS"; this.ToNFromS.Size = new System.Drawing.Size(43, 20); this.ToNFromS.TabIndex = 12; this.ToNFromS.Value = new decimal(new int[] { 25, 0, 0, 0}); // // label14 // this.label14.AutoSize = true; this.label14.Location = new System.Drawing.Point(6, 100); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(65, 13); this.label14.TabIndex = 11; this.label14.Text = "To West(%):"; // // label15 // this.label15.AutoSize = true; this.label15.Location = new System.Drawing.Point(6, 80); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(68, 13); this.label15.TabIndex = 10; this.label15.Text = "To South(%):"; // // CarPerMinS // this.CarPerMinS.Location = new System.Drawing.Point(109, 16); this.CarPerMinS.Name = "CarPerMinS"; this.CarPerMinS.Size = new System.Drawing.Size(43, 20); this.CarPerMinS.TabIndex = 2; this.CarPerMinS.Value = new decimal(new int[] { 10, 0, 0, 0}); // // label16 // this.label16.AutoSize = true; this.label16.Location = new System.Drawing.Point(6, 60); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(61, 13); this.label16.TabIndex = 9; this.label16.Text = "To East(%):"; // // label17 // this.label17.AutoSize = true; this.label17.Location = new System.Drawing.Point(6, 40); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(66, 13); this.label17.TabIndex = 8; this.label17.Text = "To North(%):"; // // label18 // this.label18.AutoSize = true; this.label18.Location = new System.Drawing.Point(6, 20); this.label18.Name = "label18"; this.label18.Size = new System.Drawing.Size(49, 13); this.label18.TabIndex = 7; this.label18.Text = "Cars/min"; // // CheckBoxSouth // this.CheckBoxSouth.AutoSize = true; this.CheckBoxSouth.Location = new System.Drawing.Point(6, 0); this.CheckBoxSouth.Name = "CheckBoxSouth"; this.CheckBoxSouth.Size = new System.Drawing.Size(81, 17); this.CheckBoxSouth.TabIndex = 6; this.CheckBoxSouth.Text = "South Lane"; this.CheckBoxSouth.UseVisualStyleBackColor = true; // // LaneGroup2 // this.LaneGroup2.Controls.Add(this.ToWFromW); this.LaneGroup2.Controls.Add(this.ToSFromW); this.LaneGroup2.Controls.Add(this.ToEFromW); this.LaneGroup2.Controls.Add(this.ToNFromW); this.LaneGroup2.Controls.Add(this.label7); this.LaneGroup2.Controls.Add(this.label8); this.LaneGroup2.Controls.Add(this.CarPerMinW); this.LaneGroup2.Controls.Add(this.label9); this.LaneGroup2.Controls.Add(this.label10); this.LaneGroup2.Controls.Add(this.label11); this.LaneGroup2.Controls.Add(this.CheckBoxWest); this.LaneGroup2.Location = new System.Drawing.Point(6, 225); this.LaneGroup2.Name = "LaneGroup2"; this.LaneGroup2.Size = new System.Drawing.Size(160, 120); this.LaneGroup2.TabIndex = 9; this.LaneGroup2.TabStop = false; this.LaneGroup2.Text = "LaneGroup2"; // // ToWFromW // this.ToWFromW.Location = new System.Drawing.Point(109, 96); this.ToWFromW.Name = "ToWFromW"; this.ToWFromW.Size = new System.Drawing.Size(43, 20); this.ToWFromW.TabIndex = 15; this.ToWFromW.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToSFromW // this.ToSFromW.Location = new System.Drawing.Point(109, 76); this.ToSFromW.Name = "ToSFromW"; this.ToSFromW.Size = new System.Drawing.Size(43, 20); this.ToSFromW.TabIndex = 14; this.ToSFromW.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToEFromW // this.ToEFromW.Location = new System.Drawing.Point(109, 56); this.ToEFromW.Name = "ToEFromW"; this.ToEFromW.Size = new System.Drawing.Size(43, 20); this.ToEFromW.TabIndex = 13; this.ToEFromW.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToNFromW // this.ToNFromW.Location = new System.Drawing.Point(109, 36); this.ToNFromW.Name = "ToNFromW"; this.ToNFromW.Size = new System.Drawing.Size(43, 20); this.ToNFromW.TabIndex = 12; this.ToNFromW.Value = new decimal(new int[] { 25, 0, 0, 0}); // // label7 // this.label7.AutoSize = true; this.label7.Location = new System.Drawing.Point(6, 100); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(65, 13); this.label7.TabIndex = 11; this.label7.Text = "To West(%):"; // // label8 // this.label8.AutoSize = true; this.label8.Location = new System.Drawing.Point(6, 80); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(68, 13); this.label8.TabIndex = 10; this.label8.Text = "To South(%):"; // // CarPerMinW // this.CarPerMinW.Location = new System.Drawing.Point(109, 16); this.CarPerMinW.Name = "CarPerMinW"; this.CarPerMinW.Size = new System.Drawing.Size(43, 20); this.CarPerMinW.TabIndex = 2; this.CarPerMinW.Value = new decimal(new int[] { 10, 0, 0, 0}); // // label9 // this.label9.AutoSize = true; this.label9.Location = new System.Drawing.Point(6, 60); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(61, 13); this.label9.TabIndex = 9; this.label9.Text = "To East(%):"; // // label10 // this.label10.AutoSize = true; this.label10.Location = new System.Drawing.Point(6, 40); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(66, 13); this.label10.TabIndex = 8; this.label10.Text = "To North(%):"; // // label11 // this.label11.AutoSize = true; this.label11.Location = new System.Drawing.Point(6, 20); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(49, 13); this.label11.TabIndex = 7; this.label11.Text = "Cars/min"; // // CheckBoxWest // this.CheckBoxWest.AutoSize = true; this.CheckBoxWest.Location = new System.Drawing.Point(6, 0); this.CheckBoxWest.Name = "CheckBoxWest"; this.CheckBoxWest.Size = new System.Drawing.Size(78, 17); this.CheckBoxWest.TabIndex = 6; this.CheckBoxWest.Text = "West Lane"; this.CheckBoxWest.UseVisualStyleBackColor = true; // // label6 // this.label6.Location = new System.Drawing.Point(7, 20); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(159, 76); this.label6.TabIndex = 8; this.label6.Text = "Specify which lanes should have non-random car generation. Defaults are 15 cars/" + "min and 30/30/30/10(self)%"; // // LaneGroup1 // this.LaneGroup1.Controls.Add(this.ToWFromN); this.LaneGroup1.Controls.Add(this.ToSFromN); this.LaneGroup1.Controls.Add(this.ToEFromN); this.LaneGroup1.Controls.Add(this.ToNFromN); this.LaneGroup1.Controls.Add(this.label5); this.LaneGroup1.Controls.Add(this.label4); this.LaneGroup1.Controls.Add(this.CarPerMinN); this.LaneGroup1.Controls.Add(this.label3); this.LaneGroup1.Controls.Add(this.label2); this.LaneGroup1.Controls.Add(this.label1); this.LaneGroup1.Controls.Add(this.CheckBoxNorth); this.LaneGroup1.Location = new System.Drawing.Point(6, 99); this.LaneGroup1.Name = "LaneGroup1"; this.LaneGroup1.Size = new System.Drawing.Size(160, 120); this.LaneGroup1.TabIndex = 7; this.LaneGroup1.TabStop = false; this.LaneGroup1.Text = "groupBox3"; // // ToWFromN // this.ToWFromN.Location = new System.Drawing.Point(109, 96); this.ToWFromN.Name = "ToWFromN"; this.ToWFromN.Size = new System.Drawing.Size(43, 20); this.ToWFromN.TabIndex = 15; this.ToWFromN.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToSFromN // this.ToSFromN.Location = new System.Drawing.Point(109, 76); this.ToSFromN.Name = "ToSFromN"; this.ToSFromN.Size = new System.Drawing.Size(43, 20); this.ToSFromN.TabIndex = 14; this.ToSFromN.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToEFromN // this.ToEFromN.Location = new System.Drawing.Point(109, 56); this.ToEFromN.Name = "ToEFromN"; this.ToEFromN.Size = new System.Drawing.Size(43, 20); this.ToEFromN.TabIndex = 13; this.ToEFromN.Value = new decimal(new int[] { 25, 0, 0, 0}); // // ToNFromN // this.ToNFromN.Location = new System.Drawing.Point(109, 36); this.ToNFromN.Name = "ToNFromN"; this.ToNFromN.Size = new System.Drawing.Size(43, 20); this.ToNFromN.TabIndex = 12; this.ToNFromN.Value = new decimal(new int[] { 25, 0, 0, 0}); // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(6, 100); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(65, 13); this.label5.TabIndex = 11; this.label5.Text = "To West(%):"; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(6, 80); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(68, 13); this.label4.TabIndex = 10; this.label4.Text = "To South(%):"; // // CarPerMinN // this.CarPerMinN.Location = new System.Drawing.Point(109, 16); this.CarPerMinN.Name = "CarPerMinN"; this.CarPerMinN.Size = new System.Drawing.Size(43, 20); this.CarPerMinN.TabIndex = 2; this.CarPerMinN.Value = new decimal(new int[] { 10, 0, 0, 0}); // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(6, 60); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(61, 13); this.label3.TabIndex = 9; this.label3.Text = "To East(%):"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(6, 40); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(66, 13); this.label2.TabIndex = 8; this.label2.Text = "To North(%):"; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(6, 20); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(49, 13); this.label1.TabIndex = 7; this.label1.Text = "Cars/min"; // // CheckBoxNorth // this.CheckBoxNorth.AutoSize = true; this.CheckBoxNorth.Location = new System.Drawing.Point(6, 0); this.CheckBoxNorth.Name = "CheckBoxNorth"; this.CheckBoxNorth.Size = new System.Drawing.Size(79, 17); this.CheckBoxNorth.TabIndex = 6; this.CheckBoxNorth.Text = "North Lane"; this.CheckBoxNorth.UseVisualStyleBackColor = true; // // groupBox4 // this.groupBox4.Controls.Add(this.label24); this.groupBox4.Controls.Add(this.IntelligentRadio); this.groupBox4.Controls.Add(this.ConventialRadio); this.groupBox4.Controls.Add(this.CurrTimeLabel); this.groupBox4.Controls.Add(this.ManualIterButton); this.groupBox4.Controls.Add(this.ResumeButton); this.groupBox4.Controls.Add(this.PauseButton); this.groupBox4.Controls.Add(this.label13); this.groupBox4.Controls.Add(this.SpeedUpSelector); this.groupBox4.Controls.Add(this.StartButton); this.groupBox4.Controls.Add(this.label12); this.groupBox4.Controls.Add(this.SimulationDurationSelector); this.groupBox4.Location = new System.Drawing.Point(260, 520); this.groupBox4.Name = "groupBox4"; this.groupBox4.Size = new System.Drawing.Size(253, 113); this.groupBox4.TabIndex = 2; this.groupBox4.TabStop = false; this.groupBox4.Text = "Animated Simulation"; // // label24 // this.label24.AutoSize = true; this.label24.Location = new System.Drawing.Point(72, 41); this.label24.Name = "label24"; this.label24.Size = new System.Drawing.Size(88, 13); this.label24.TabIndex = 10; this.label24.Text = "Simulation Mode:"; // // IntelligentRadio // this.IntelligentRadio.AutoSize = true; this.IntelligentRadio.Checked = true; this.IntelligentRadio.Location = new System.Drawing.Point(75, 89); this.IntelligentRadio.Name = "IntelligentRadio"; this.IntelligentRadio.Size = new System.Drawing.Size(70, 17); this.IntelligentRadio.TabIndex = 9; this.IntelligentRadio.TabStop = true; this.IntelligentRadio.Text = "Intelligent"; this.IntelligentRadio.UseVisualStyleBackColor = true; // // ConventialRadio // this.ConventialRadio.AutoSize = true; this.ConventialRadio.Location = new System.Drawing.Point(75, 63); this.ConventialRadio.Name = "ConventialRadio"; this.ConventialRadio.Size = new System.Drawing.Size(87, 17); this.ConventialRadio.TabIndex = 8; this.ConventialRadio.Text = "Conventional"; this.ConventialRadio.UseVisualStyleBackColor = true; // // ManualIterButton // this.ManualIterButton.Enabled = false; this.ManualIterButton.Location = new System.Drawing.Point(168, 89); this.ManualIterButton.Name = "ManualIterButton"; this.ManualIterButton.Size = new System.Drawing.Size(75, 20); this.ManualIterButton.TabIndex = 7; this.ManualIterButton.Text = "Iterate"; this.ManualIterButton.UseVisualStyleBackColor = true; this.ManualIterButton.Click += new System.EventHandler(this.ManualIterButton_Click); // // ResumeButton // this.ResumeButton.Enabled = false; this.ResumeButton.Location = new System.Drawing.Point(168, 37); this.ResumeButton.Name = "ResumeButton"; this.ResumeButton.Size = new System.Drawing.Size(75, 20); this.ResumeButton.TabIndex = 6; this.ResumeButton.Text = "Animate"; this.ResumeButton.UseVisualStyleBackColor = true; this.ResumeButton.Click += new System.EventHandler(this.ResumeButton_Click); // // PauseButton // this.PauseButton.Enabled = false; this.PauseButton.Location = new System.Drawing.Point(168, 63); this.PauseButton.Name = "PauseButton"; this.PauseButton.Size = new System.Drawing.Size(75, 20); this.PauseButton.TabIndex = 5; this.PauseButton.Text = "Pause"; this.PauseButton.UseVisualStyleBackColor = true; this.PauseButton.Click += new System.EventHandler(this.PauseButton_Click); // // label13 // this.label13.AutoSize = true; this.label13.Location = new System.Drawing.Point(8, 66); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(58, 13); this.label13.TabIndex = 4; this.label13.Text = "Speed-Up:"; // // SpeedUpSelector // this.SpeedUpSelector.Location = new System.Drawing.Point(11, 86); this.SpeedUpSelector.Maximum = new decimal(new int[] { 999, 0, 0, 0}); this.SpeedUpSelector.Name = "SpeedUpSelector"; this.SpeedUpSelector.Size = new System.Drawing.Size(45, 20); this.SpeedUpSelector.TabIndex = 3; this.SpeedUpSelector.Value = new decimal(new int[] { 1, 0, 0, 0}); // // StartButton // this.StartButton.Location = new System.Drawing.Point(168, 11); this.StartButton.Name = "StartButton"; this.StartButton.Size = new System.Drawing.Size(75, 20); this.StartButton.TabIndex = 2; this.StartButton.Text = "Start"; this.StartButton.UseVisualStyleBackColor = true; this.StartButton.Click += new System.EventHandler(this.StartButton_Click); // // label12 // this.label12.AutoSize = true; this.label12.Location = new System.Drawing.Point(8, 14); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(50, 13); this.label12.TabIndex = 1; this.label12.Text = "Duration:"; // // SimulationDurationSelector // this.SimulationDurationSelector.Location = new System.Drawing.Point(11, 39); this.SimulationDurationSelector.Maximum = new decimal(new int[] { 1800, 0, 0, 0}); this.SimulationDurationSelector.Name = "SimulationDurationSelector"; this.SimulationDurationSelector.Size = new System.Drawing.Size(45, 20); this.SimulationDurationSelector.TabIndex = 0; this.SimulationDurationSelector.Value = new decimal(new int[] { 300, 0, 0, 0}); // // RunSampleButton // this.RunSampleButton.Location = new System.Drawing.Point(160, 63); this.RunSampleButton.Name = "RunSampleButton"; this.RunSampleButton.Size = new System.Drawing.Size(75, 43); this.RunSampleButton.TabIndex = 11; this.RunSampleButton.Text = "Run Sample Data Sets"; this.RunSampleButton.UseVisualStyleBackColor = true; this.RunSampleButton.Click += new System.EventHandler(this.RunSampleButton_Click); // // groupBox3 // this.groupBox3.Controls.Add(this.MinDurationSelector); this.groupBox3.Controls.Add(this.label29); this.groupBox3.Controls.Add(this.MaxCpmSelector); this.groupBox3.Controls.Add(this.label28); this.groupBox3.Controls.Add(this.MinCpmSelector); this.groupBox3.Controls.Add(this.label27); this.groupBox3.Controls.Add(this.MaxDurationSelector); this.groupBox3.Controls.Add(this.label26); this.groupBox3.Controls.Add(this.NumOfRunsSelector); this.groupBox3.Controls.Add(this.label25); this.groupBox3.Controls.Add(this.RunSampleButton); this.groupBox3.Location = new System.Drawing.Point(13, 520); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(241, 113); this.groupBox3.TabIndex = 3; this.groupBox3.TabStop = false; this.groupBox3.Text = "Run Randomized Data Sets"; // // label25 // this.label25.AutoSize = true; this.label25.Location = new System.Drawing.Point(157, 11); this.label25.Name = "label25"; this.label25.Size = new System.Drawing.Size(57, 13); this.label25.TabIndex = 13; this.label25.Text = "# of Runs:"; // // NumOfRunsSelector // this.NumOfRunsSelector.Location = new System.Drawing.Point(160, 28); this.NumOfRunsSelector.Minimum = new decimal(new int[] { 1, 0, 0, 0}); this.NumOfRunsSelector.Name = "NumOfRunsSelector"; this.NumOfRunsSelector.Size = new System.Drawing.Size(45, 20); this.NumOfRunsSelector.TabIndex = 14; this.NumOfRunsSelector.Value = new decimal(new int[] { 5, 0, 0, 0}); // // MaxDurationSelector // this.MaxDurationSelector.Location = new System.Drawing.Point(89, 86); this.MaxDurationSelector.Maximum = new decimal(new int[] { 1800, 0, 0, 0}); this.MaxDurationSelector.Minimum = new decimal(new int[] { 1, 0, 0, 0}); this.MaxDurationSelector.Name = "MaxDurationSelector"; this.MaxDurationSelector.Size = new System.Drawing.Size(45, 20); this.MaxDurationSelector.TabIndex = 16; this.MaxDurationSelector.Value = new decimal(new int[] { 180, 0, 0, 0}); // // label26 // this.label26.AutoSize = true; this.label26.Location = new System.Drawing.Point(10, 88); this.label26.Name = "label26"; this.label26.Size = new System.Drawing.Size(73, 13); this.label26.TabIndex = 15; this.label26.Text = "Max Duration:"; // // MinCpmSelector // this.MinCpmSelector.Location = new System.Drawing.Point(89, 13); this.MinCpmSelector.Maximum = new decimal(new int[] { 1800, 0, 0, 0}); this.MinCpmSelector.Minimum = new decimal(new int[] { 1, 0, 0, 0}); this.MinCpmSelector.Name = "MinCpmSelector"; this.MinCpmSelector.Size = new System.Drawing.Size(45, 20); this.MinCpmSelector.TabIndex = 18; this.MinCpmSelector.Value = new decimal(new int[] { 10, 0, 0, 0}); // // label27 // this.label27.AutoSize = true; this.label27.Location = new System.Drawing.Point(10, 15); this.label27.Name = "label27"; this.label27.Size = new System.Drawing.Size(67, 13); this.label27.TabIndex = 17; this.label27.Text = "Min Car/min:"; // // MaxCpmSelector // this.MaxCpmSelector.Location = new System.Drawing.Point(89, 37); this.MaxCpmSelector.Maximum = new decimal(new int[] { 1800, 0, 0, 0}); this.MaxCpmSelector.Minimum = new decimal(new int[] { 1, 0, 0, 0}); this.MaxCpmSelector.Name = "MaxCpmSelector"; this.MaxCpmSelector.Size = new System.Drawing.Size(45, 20); this.MaxCpmSelector.TabIndex = 20; this.MaxCpmSelector.Value = new decimal(new int[] { 25, 0, 0, 0}); // // label28 // this.label28.AutoSize = true; this.label28.Location = new System.Drawing.Point(10, 39); this.label28.Name = "label28"; this.label28.Size = new System.Drawing.Size(70, 13); this.label28.TabIndex = 19; this.label28.Text = "Max Car/min:"; // // MinDurationSelector // this.MinDurationSelector.Location = new System.Drawing.Point(89, 62); this.MinDurationSelector.Maximum = new decimal(new int[] { 1800, 0, 0, 0}); this.MinDurationSelector.Minimum = new decimal(new int[] { 1, 0, 0, 0}); this.MinDurationSelector.Name = "MinDurationSelector"; this.MinDurationSelector.Size = new System.Drawing.Size(45, 20); this.MinDurationSelector.TabIndex = 22; this.MinDurationSelector.Value = new decimal(new int[] { 60, 0, 0, 0}); // // label29 // this.label29.AutoSize = true; this.label29.Location = new System.Drawing.Point(10, 64); this.label29.Name = "label29"; this.label29.Size = new System.Drawing.Size(70, 13); this.label29.TabIndex = 21; this.label29.Text = "Min Duration:"; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(699, 641); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Name = "Form1"; this.Text = "IntersectionSim"; this.groupBox1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.groupBox2.ResumeLayout(false); this.LaneGroup4.ResumeLayout(false); this.LaneGroup4.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.ToWFromE)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToSFromE)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToEFromE)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToNFromE)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.CarPerMinE)).EndInit(); this.LaneGroup3.ResumeLayout(false); this.LaneGroup3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.ToWFromS)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToSFromS)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToEFromS)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToNFromS)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.CarPerMinS)).EndInit(); this.LaneGroup2.ResumeLayout(false); this.LaneGroup2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.ToWFromW)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToSFromW)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToEFromW)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToNFromW)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.CarPerMinW)).EndInit(); this.LaneGroup1.ResumeLayout(false); this.LaneGroup1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.ToWFromN)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToSFromN)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToEFromN)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ToNFromN)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.CarPerMinN)).EndInit(); this.groupBox4.ResumeLayout(false); this.groupBox4.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.SpeedUpSelector)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.SimulationDurationSelector)).EndInit(); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.NumOfRunsSelector)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.MaxDurationSelector)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.MinCpmSelector)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.MaxCpmSelector)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.MinDurationSelector)).EndInit(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; private System.Windows.Forms.GroupBox LaneGroup1; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label4; private System.Windows.Forms.NumericUpDown CarPerMinN; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; private System.Windows.Forms.CheckBox CheckBoxNorth; private System.Windows.Forms.NumericUpDown ToWFromN; private System.Windows.Forms.NumericUpDown ToSFromN; private System.Windows.Forms.NumericUpDown ToEFromN; private System.Windows.Forms.NumericUpDown ToNFromN; private System.Windows.Forms.GroupBox LaneGroup2; private System.Windows.Forms.NumericUpDown ToWFromW; private System.Windows.Forms.NumericUpDown ToSFromW; private System.Windows.Forms.NumericUpDown ToEFromW; private System.Windows.Forms.NumericUpDown ToNFromW; private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label8; private System.Windows.Forms.NumericUpDown CarPerMinW; private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label11; private System.Windows.Forms.CheckBox CheckBoxWest; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.Label label12; private System.Windows.Forms.NumericUpDown SimulationDurationSelector; private System.Windows.Forms.Button StartButton; private System.Windows.Forms.Label label13; private System.Windows.Forms.NumericUpDown SpeedUpSelector; private System.Windows.Forms.Label CurrTimeLabel; private System.Windows.Forms.Button PauseButton; private System.Windows.Forms.Button ResumeButton; private System.Windows.Forms.Button ManualIterButton; private System.Windows.Forms.GroupBox LaneGroup4; private System.Windows.Forms.NumericUpDown ToWFromE; private System.Windows.Forms.NumericUpDown ToSFromE; private System.Windows.Forms.NumericUpDown ToEFromE; private System.Windows.Forms.NumericUpDown ToNFromE; private System.Windows.Forms.Label label19; private System.Windows.Forms.Label label20; private System.Windows.Forms.NumericUpDown CarPerMinE; private System.Windows.Forms.Label label21; private System.Windows.Forms.Label label22; private System.Windows.Forms.Label label23; private System.Windows.Forms.CheckBox CheckBoxEast; private System.Windows.Forms.GroupBox LaneGroup3; private System.Windows.Forms.NumericUpDown ToWFromS; private System.Windows.Forms.NumericUpDown ToSFromS; private System.Windows.Forms.NumericUpDown ToEFromS; private System.Windows.Forms.NumericUpDown ToNFromS; private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label15; private System.Windows.Forms.NumericUpDown CarPerMinS; private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label17; private System.Windows.Forms.Label label18; private System.Windows.Forms.CheckBox CheckBoxSouth; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.PictureBox pictureBox2; private System.Windows.Forms.Label label24; private System.Windows.Forms.RadioButton IntelligentRadio; private System.Windows.Forms.RadioButton ConventialRadio; private System.Windows.Forms.PictureBox pictureBox3; private System.Windows.Forms.Button RunSampleButton; private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Label label25; private System.Windows.Forms.NumericUpDown NumOfRunsSelector; private System.Windows.Forms.NumericUpDown MaxDurationSelector; private System.Windows.Forms.Label label26; private System.Windows.Forms.NumericUpDown MinDurationSelector; private System.Windows.Forms.Label label29; private System.Windows.Forms.NumericUpDown MaxCpmSelector; private System.Windows.Forms.Label label28; private System.Windows.Forms.NumericUpDown MinCpmSelector; private System.Windows.Forms.Label label27; } }
45.637751
139
0.571253
[ "MIT" ]
FabioCZ/IntersectionSim
IntersectionSim/Form1.Designer.cs
56,821
C#
namespace ViceCity.Models.Guns { using System; using ViceCity.Models.Guns.Contracts; public abstract class Gun : IGun { private string name; private int bulletsPerBarrel; private int totalBullets; private int shootBullets; private int capacity; protected Gun(string name, int bulletsPerBarrel, int totalBullets, int ShootBullets) { this.Name = name; this.BulletsPerBarrel = bulletsPerBarrel; this.TotalBullets = totalBullets; this.shootBullets = ShootBullets; this.capacity = bulletsPerBarrel; } public string Name { get => this.name; private set { if (string.IsNullOrWhiteSpace(value)) { throw new ArgumentException("Name cannot be null or a white space!"); } this.name = value; } } public int BulletsPerBarrel { get => this.bulletsPerBarrel; protected set { if (value < 0) { throw new ArgumentException("Bullets cannot be below zero!"); } this.bulletsPerBarrel = value; } } public int TotalBullets { get => this.totalBullets; protected set { if (value < 0) { throw new ArgumentException("Total bullets cannot be below zero!"); } this.totalBullets = value; } } public bool CanFire => this.BulletsPerBarrel > 0; public int Fire() { this.BulletsPerBarrel -= shootBullets; if (this.BulletsPerBarrel <= 0) { if (TotalBullets < capacity && totalBullets > 0) { this.BulletsPerBarrel = TotalBullets; } else if (TotalBullets > capacity) { TotalBullets -= capacity; this.BulletsPerBarrel = capacity; } } return shootBullets; } } }
27.204545
93
0.451546
[ "MIT" ]
q2kPetrov/SoftUni
C# OOP/Exams/OOP Exam - 11 August 2019/1. Vice City - Structure/Models/Guns/Gun.cs
2,396
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents an authorization layer for methods. If enabled on a method, API Gateway /// will activate the authorizer when a client calls the method. /// /// <div class="seeAlso"> <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html">Use /// Lambda Function as Authorizer</a> <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html">Use /// Cognito User Pool as Authorizer</a> </div> /// </summary> public partial class UpdateAuthorizerResponse : AmazonWebServiceResponse { private string _authorizerCredentials; private int? _authorizerResultTtlInSeconds; private string _authorizerUri; private string _authType; private string _id; private string _identitySource; private string _identityValidationExpression; private string _name; private List<string> _providerarNs = new List<string>(); private AuthorizerType _type; /// <summary> /// Gets and sets the property AuthorizerCredentials. /// <para> /// Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. /// To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name /// (ARN). To use resource-based permissions on the Lambda function, specify null. /// </para> /// </summary> public string AuthorizerCredentials { get { return this._authorizerCredentials; } set { this._authorizerCredentials = value; } } // Check to see if AuthorizerCredentials property is set internal bool IsSetAuthorizerCredentials() { return this._authorizerCredentials != null; } /// <summary> /// Gets and sets the property AuthorizerResultTtlInSeconds. /// <para> /// The TTL in seconds of cached authorizer results. If it equals 0, authorization caching /// is disabled. If it is greater than 0, API Gateway will cache authorizer responses. /// If this field is not set, the default value is 300. The maximum value is 3600, or /// 1 hour. /// </para> /// </summary> public int AuthorizerResultTtlInSeconds { get { return this._authorizerResultTtlInSeconds.GetValueOrDefault(); } set { this._authorizerResultTtlInSeconds = value; } } // Check to see if AuthorizerResultTtlInSeconds property is set internal bool IsSetAuthorizerResultTtlInSeconds() { return this._authorizerResultTtlInSeconds.HasValue; } /// <summary> /// Gets and sets the property AuthorizerUri. /// <para> /// Specifies the authorizer's Uniform Resource Identifier (URI). For <code>TOKEN</code> /// or <code>REQUEST</code> authorizers, this must be a well-formed Lambda function URI, /// for example, <code>arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations</code>. /// In general, the URI has this form <code>arn:aws:apigateway:{region}:lambda:path/{service_api}</code>, /// where <code>{region}</code> is the same as the region hosting the Lambda function, /// <code>path</code> indicates that the remaining substring in the URI should be treated /// as the path to the resource, including the initial <code>/</code>. For Lambda functions, /// this is usually of the form <code>/2015-03-31/functions/[FunctionARN]/invocations</code>. /// </para> /// </summary> public string AuthorizerUri { get { return this._authorizerUri; } set { this._authorizerUri = value; } } // Check to see if AuthorizerUri property is set internal bool IsSetAuthorizerUri() { return this._authorizerUri != null; } /// <summary> /// Gets and sets the property AuthType. /// <para> /// Optional customer-defined field, used in OpenAPI imports and exports without functional /// impact. /// </para> /// </summary> public string AuthType { get { return this._authType; } set { this._authType = value; } } // Check to see if AuthType property is set internal bool IsSetAuthType() { return this._authType != null; } /// <summary> /// Gets and sets the property Id. /// <para> /// The identifier for the authorizer resource. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property IdentitySource. /// <para> /// The identity source for which authorization is requested. <ul><li>For a <code>TOKEN</code> /// or <code>COGNITO_USER_POOLS</code> authorizer, this is required and specifies the /// request header mapping expression for the custom header holding the authorization /// token submitted by the client. For example, if the token header name is <code>Auth</code>, /// the header mapping expression is <code>method.request.header.Auth</code>.</li><li>For /// the <code>REQUEST</code> authorizer, this is required when authorization caching is /// enabled. The value is a comma-separated string of one or more mapping expressions /// of the specified request parameters. For example, if an <code>Auth</code> header, /// a <code>Name</code> query string parameter are defined as identity sources, this value /// is <code>method.request.header.Auth, method.request.querystring.Name</code>. These /// parameters will be used to derive the authorization caching key and to perform runtime /// validation of the <code>REQUEST</code> authorizer by verifying all of the identity-related /// request parameters are present, not null and non-empty. Only when this is true does /// the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 /// Unauthorized response without calling the Lambda function. The valid value is a string /// of comma-separated mapping expressions of the specified request parameters. When the /// authorization caching is not enabled, this property is optional.</li></ul> /// </para> /// </summary> public string IdentitySource { get { return this._identitySource; } set { this._identitySource = value; } } // Check to see if IdentitySource property is set internal bool IsSetIdentitySource() { return this._identitySource != null; } /// <summary> /// Gets and sets the property IdentityValidationExpression. /// <para> /// A validation expression for the incoming identity token. For <code>TOKEN</code> authorizers, /// this value is a regular expression. For <code>COGNITO_USER_POOLS</code> authorizers, /// API Gateway will match the <code>aud</code> field of the incoming token from the client /// against the specified regular expression. It will invoke the authorizer's Lambda function /// when there is a match. Otherwise, it will return a 401 Unauthorized response without /// calling the Lambda function. The validation expression does not apply to the <code>REQUEST</code> /// authorizer. /// </para> /// </summary> public string IdentityValidationExpression { get { return this._identityValidationExpression; } set { this._identityValidationExpression = value; } } // Check to see if IdentityValidationExpression property is set internal bool IsSetIdentityValidationExpression() { return this._identityValidationExpression != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// [Required] The name of the authorizer. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property ProviderARNs. /// <para> /// A list of the Amazon Cognito user pool ARNs for the <code>COGNITO_USER_POOLS</code> /// authorizer. Each element is of this format: <code>arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}</code>. /// For a <code>TOKEN</code> or <code>REQUEST</code> authorizer, this is not defined. /// /// </para> /// </summary> public List<string> ProviderARNs { get { return this._providerarNs; } set { this._providerarNs = value; } } // Check to see if ProviderARNs property is set internal bool IsSetProviderARNs() { return this._providerarNs != null && this._providerarNs.Count > 0; } /// <summary> /// Gets and sets the property Type. /// <para> /// The authorizer type. Valid values are <code>TOKEN</code> for a Lambda function using /// a single authorization token submitted in a custom header, <code>REQUEST</code> for /// a Lambda function using incoming request parameters, and <code>COGNITO_USER_POOLS</code> /// for using an Amazon Cognito user pool. /// </para> /// </summary> public AuthorizerType Type { get { return this._type; } set { this._type = value; } } // Check to see if Type property is set internal bool IsSetType() { return this._type != null; } } }
41.562044
182
0.621092
[ "Apache-2.0" ]
Singh400/aws-sdk-net
sdk/src/Services/APIGateway/Generated/Model/UpdateAuthorizerResponse.cs
11,388
C#
using System; using System.IO; namespace Xamarin.Android.Prepare { partial class Configurables { const string CorrettoDistVersion = "8.222.10.1"; const string CorrettoUrlPathVersion = CorrettoDistVersion; partial class Defaults { public const string DefaultCompiler = "cc"; public static readonly Version CorrettoVersion = Version.Parse (CorrettoDistVersion); } partial class Paths { static string BundleOSType => Context.Instance.OS.Type; static string ArchiveOSType => Context.Instance.OS.Type; public static string BCLTestsSourceDir => GetCachedPath (ref bclTestsSourceDir, () => Path.Combine (MonoProfileDir, "tests")); public static string BCLAssembliesSourceDir => MonoProfileDir; public static readonly string MonoRuntimeHostMingwNativeLibraryPrefix = Path.Combine ("..", "bin"); } } }
30.206897
134
0.723744
[ "MIT" ]
06051979/xamarin-android
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Unix.cs
876
C#
/* * Copyright © 2016-2018 EDDiscovery development team * * 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. * * EDDiscovery is not affiliated with Frontier Developments plc. */ using EliteDangerousCore.DB; using BaseUtils.JSON; using System.Linq; namespace EliteDangerousCore.JournalEvents { [JournalEntryType(JournalTypeEnum.SupercruiseEntry)] public class JournalSupercruiseEntry : JournalEntry, IShipInformation { public JournalSupercruiseEntry(JObject evt ) : base(evt, JournalTypeEnum.SupercruiseEntry) { StarSystem = evt["StarSystem"].Str(); SystemAddress = evt["SystemAddress"].LongNull(); } public string StarSystem { get; set; } public long? SystemAddress { get; set; } public override void FillInformation(ISystem sys, out string info, out string detailed) { info = StarSystem; detailed = ""; } public void ShipInformation(ShipInformationList shp, string whereami, ISystem system) { shp.SupercruiseEntry(this); } } [JournalEntryType(JournalTypeEnum.SupercruiseExit)] public class JournalSupercruiseExit : JournalEntry, IBodyNameAndID { public JournalSupercruiseExit(JObject evt) : base(evt, JournalTypeEnum.SupercruiseExit) { StarSystem = evt["StarSystem"].Str(); SystemAddress = evt["SystemAddress"].LongNull(); Body = evt["Body"].Str(); BodyID = evt["BodyID"].IntNull(); BodyType = JournalFieldNaming.NormaliseBodyType(evt["BodyType"].Str()); } public string StarSystem { get; set; } public long? SystemAddress { get; set; } public string Body { get; set; } public int? BodyID { get; set; } public string BodyType { get; set; } public string BodyDesignation { get; set; } public override void FillInformation(ISystem sys, out string info, out string detailed) { info = BaseUtils.FieldBuilder.Build("At ".T(EDTx.JournalSupercruiseExit_At), Body, "< in ".T(EDTx.JournalSupercruiseExit_in), StarSystem, "Type:".T(EDTx.JournalEntry_Type), BodyType); detailed = ""; } } }
38.630137
196
0.647518
[ "Apache-2.0" ]
NonnEmilia/EliteDangerousCore
EliteDangerous/JournalEvents/JournalSupercruise.cs
2,751
C#
using Microsoft.OpenApi.Extensions; namespace WebApi.Models { public class VerseReference { public Books Book { get; } public byte Chapter { get; } public byte Verse { get; } public VerseReference(Books book, byte chapter, byte verse) { Book = book; Chapter = chapter; Verse = verse; } public override string ToString() { var bookName = Book.GetDisplayName() .Replace("First", "1 ") .Replace("Second", "2 ") .Replace("Third", "3 ") .Replace("SongOfSolomon", "Song of Solomon"); return $"{bookName} {Chapter}:{Verse}"; } } }
23.09375
67
0.500677
[ "MIT" ]
mjrousos/FCFVerses
src/WebApi/Models/VerseReference.cs
741
C#
// // IKosParametersApi.cs // // Copyright (c) Christofel authors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Kos.Data; namespace Kos.Abstractions { /// <summary> /// Represents mapping to kos parameters api. /// </summary> public interface IKosParametersApi { /// <summary> /// Gets paged parameters filtered using RSQL query. /// </summary> /// <param name="query">The RSQL query for filtering.</param> /// <param name="orderBy">The order with parameters separated by a comma. Use "-" for descending order.</param> /// <param name="limit">Sets the maximal number of records to return.</param> /// <param name="offset">Sets the offset of the first result. orderBy must be set.</param> /// <param name="lang">The request language. Supports cs or en.</param> /// <param name="token">The cancellation token for the operation.</param> /// <returns>The loaded parameters.</returns> public Task<IReadOnlyList<Parameter>> GetParameters ( string? query = null, string orderBy = "id", ushort limit = 10, int offset = 0, string? lang = null, CancellationToken token = default ); /// <summary> /// Gets Parameter by its key. /// </summary> /// <param name="key">The key of the parameter.</param> /// <param name="lang">The request language. Supports cs or en.</param> /// <param name="token">The cancellation token for the operation.</param> /// <returns>The loaded parameter.</returns> public Task<Parameter?> GetParameter ( string key, string? lang = null, CancellationToken token = default ); } }
37.509434
119
0.605634
[ "MIT" ]
ctu-fee-group/KosApi
src/Kos/Abstractions/IKosParametersApi.cs
1,988
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; public class ActivateTextAtLine : MonoBehaviour { public TextAsset theText; public int startingLine; public int endLine; public TextBoxManager tbm; public bool destrouWhenActivated; // Use this for initialization void Start () { tbm = FindObjectOfType<TextBoxManager>(); } // Update is called once per frame void Update () { } private void OnTriggerEnter2D(Collider2D collision) { if (collision.name == "Player") { tbm.ReloadScript(theText); tbm.currentLine = startingLine; tbm.endAtLine = endLine; tbm.EnableTextBox(); if (destrouWhenActivated) { Destroy(gameObject); } } } }
20
55
0.609524
[ "MIT" ]
ankanx/GGJ18
GGJ18/Assets/Scripts/Dialogue/ActivateTextAtLine.cs
842
C#
namespace AngleSharp.Dom { using AngleSharp.Attributes; using AngleSharp.Css; using AngleSharp.Css.Dom; using System; /// <summary> /// A set of useful extension methods for the Window class. /// </summary> [DomExposed("Window")] public static class WindowExtensions { /// <summary> /// Creates a new MediaQueryList object representing the parsed results /// of the specified media query string. /// </summary> /// <param name="window">The window to extend with the functionality.</param> /// <param name="mediaText">The query string.</param> /// <returns>The MediaQueryList instance.</returns> [DomName("matchMedia")] public static IMediaQueryList MatchMedia(this IWindow window, String mediaText) { var document = window.Document; var media = new MediaList(document.Context) { MediaText = mediaText }; return new CssMediaQueryList(window, media); } /// <summary> /// Gets the pseudo elements of the given element by their type. /// </summary> /// <param name="window">The window to extend with the functionality.</param> /// <param name="element">The element to get the pseudo elements from.</param> /// <param name="type">The type of pseudo elements to get, if any.</param> /// <returns>The list of pseudo elements matching the query.</returns> [DomName("getPseudoElements")] public static ICssPseudoElementList GetPseudoElements(this IWindow window, IElement element, String type = null) { throw new NotImplementedException(); } /// <summary> /// Gives the values of all the CSS properties of an element after /// applying the active stylesheets and resolving any basic computation /// those values may contain. /// </summary> /// <param name="window">The window to extend with the functionality.</param> /// <param name="element">The element to compute the style for.</param> /// <param name="pseudo">The optional pseudo selector to use.</param> /// <returns>The style declaration describing the element.</returns> [DomName("getComputedStyle")] public static ICssStyleDeclaration GetComputedStyle(this IWindow window, IElement element, String pseudo = null) { var styleCollection = window.GetStyleCollection(); return styleCollection.ComputeDeclarations(element, pseudo); } /// <summary> /// Computes the element's default style. This ignores any transitions or animations. /// Presentational hints such as bgColor are also ignored, as well as inline styles. /// </summary> /// <param name="window">The window to extend with the functionality.</param> /// <param name="element">The element to compute the style for.</param> /// <returns>The style declaration describing the element.</returns> [DomName("computeDefaultStyle")] public static ICssStyleDeclaration ComputeDefaultStyle(this IWindow window, IElement element) { // Ignores transitions and animations // Ignores author-level style // Ignores presentational hints (e.g. bgColor) // Ignores inline styles // --> computed throw new NotImplementedException(); } /// <summary> /// Computes the element's raw style. This first computes the cascaded style and then /// replaces the relative values with the absolute ones taken from the current device /// info. /// </summary> /// <param name="window">The window to extend with the functionality.</param> /// <param name="element">The element to compute the style for.</param> /// <returns>The style declaration describing the element.</returns> [DomName("computeRawStyle")] public static ICssStyleDeclaration ComputeRawStyle(this IWindow window, IElement element) { // Computes the cascaded style first // Places current device info // Replaces the relative values with absolute ones // --> computed throw new NotImplementedException(); } } }
45.968421
120
0.631326
[ "MIT" ]
Fraaankes/AngleSharp.Css
src/AngleSharp.Css/Extensions/WindowExtensions.cs
4,367
C#
using IdeaRS.OpenModel.Geometry3D; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IdeaRS.OpenModel.Model { /// <summary> /// The Pretensioned tendon group /// </summary> [OpenModelClass("CI.StructModel.Structure.PretensionedTendonGroup,CI.StructuralElements", "CI.StructModel.Structure.IPretensionedTendonGroup,CI.BasicTypes", typeof(Tendon))] public class PretensionedTendonGroup : Tendon { /// <summary> /// Constructor /// </summary> public PretensionedTendonGroup() { Items = new List<PretensionedTendonGroupItem>(); } /// <summary> /// List of the pretensioned tendon in the group /// </summary> public List<PretensionedTendonGroupItem> Items { get; set; } } /// <summary> /// The pretensionede tendon group item /// </summary> //[OpenModelClass("CI.StructModel.Structure.PretensionedTendonGroupItem,CI.StructuralElements", "CI.StructModel.Structure.IPretensionedTendonGroupItem,CI.BasicTypes")] public class PretensionedTendonGroupItem : Tendon { /// <summary> /// Geometry /// </summary> public Polygon3D Geometry { get; set; } ///// <summary> ///// Material ///// </summary> //public ReferenceElement Material { get; set; } ///// <summary> ///// Number of strands ///// </summary> //public int NumberOfStrand { get; set; } } }
27.058824
174
0.707246
[ "MIT" ]
idea-statica/ideastatica-public
src/IdeaRS.OpenModel/Model/PretensionedTendonGroup.cs
1,382
C#
/************************************************************************************* Extended WPF Toolkit Copyright (C) 2007-2013 Xceed Software Inc. This program is provided to you under the terms of the Microsoft Public License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license For more features, controls, and fast professional support, pick up the Plus Edition at http://xceed.com/wpf_toolkit Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids ***********************************************************************************/ using System; using System.Collections.Specialized; using System.Windows; using System.Windows.Media; using Xceed.Wpf.Toolkit.Primitives; using Xceed.Wpf.Toolkit.Core; using Xceed.Wpf.Toolkit.Core.Utilities; namespace Xceed.Wpf.Toolkit { public sealed class Pie : ShapeBase { #region Constructors static Pie() { DefaultStyleKeyProperty.OverrideMetadata( typeof( Pie ), new FrameworkPropertyMetadata( typeof( Pie ) ) ); // The default stretch mode of Pie is Fill Pie.StretchProperty.OverrideMetadata( typeof( Pie ), new FrameworkPropertyMetadata( Stretch.Fill ) ); Pie.StrokeLineJoinProperty.OverrideMetadata( typeof( Pie ), new FrameworkPropertyMetadata( PenLineJoin.Round ) ); } public Pie() : base() { } #endregion #region EndAngle Property public static readonly DependencyProperty EndAngleProperty = DependencyProperty.Register( "EndAngle", typeof( double ), typeof( Pie ), new FrameworkPropertyMetadata( 360d, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback( Pie.OnEndAngleChanged ), new CoerceValueCallback( Pie.CoerceEndAngleValue ) ) ); public double EndAngle { get { return ( double )this.GetValue( Pie.EndAngleProperty ); } set { this.SetValue( Pie.EndAngleProperty, value ); } } private static void OnEndAngleChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) { ( ( Pie )d ).OnEndAngleChanged( e ); } private void OnEndAngleChanged( DependencyPropertyChangedEventArgs e ) { // avoid re-entrancy if( this.IsUpdatingEndAngle ) return; if( !( this.IsUpdatingStartAngle || this.IsUpdatingSlice || this.IsUpdatingSweepDirection ) ) { switch( this.Mode ) { case PieMode.Slice: throw new InvalidOperationException( ErrorMessages.GetMessage( "EndAngleCannotBeSetDirectlyInSlice" ) ); } } // EndAngle, Slice, and SweepDirection are interrelated and must be kept in sync this.IsUpdatingEndAngle = true; try { if( this.Mode == PieMode.EndAngle ) { this.CoerceValue( Pie.SweepDirectionProperty ); } this.CoerceValue( Pie.SliceProperty ); } finally { this.IsUpdatingEndAngle = false; } } private static object CoerceEndAngleValue( DependencyObject d, object value ) { // keep EndAngle in sync with Slice and SweepDirection Pie pie = ( Pie )d; if( pie.IsUpdatingSlice || pie.IsUpdatingSweepDirection || ( pie.IsUpdatingStartAngle && pie.Mode == PieMode.Slice ) ) { double newValue = pie.StartAngle + ( ( pie.SweepDirection == SweepDirection.Clockwise ) ? 1.0 : -1.0 ) * pie.Slice * 360; if( !DoubleHelper.AreVirtuallyEqual( ( double )value, newValue ) ) { value = newValue; } } return value; } #endregion #region Mode Property public static readonly DependencyProperty ModeProperty = DependencyProperty.Register( "Mode", typeof( PieMode ), typeof( Pie ), new FrameworkPropertyMetadata( PieMode.Manual, new PropertyChangedCallback( Pie.OnModeChanged ) ) ); public PieMode Mode { get { return ( PieMode )this.GetValue( Pie.ModeProperty ); } set { this.SetValue( Pie.ModeProperty, value ); } } private static void OnModeChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) { ( ( Pie )d ).OnModeChanged( e ); } private void OnModeChanged( DependencyPropertyChangedEventArgs e ) { // disallow reentrancy if( this.IsUpdatingMode ) return; this.IsUpdatingMode = true; try { if( this.Mode == PieMode.EndAngle ) { this.CoerceValue( Pie.SweepDirectionProperty ); } } finally { this.IsUpdatingMode = false; } } #endregion #region Slice Property public static readonly DependencyProperty SliceProperty = DependencyProperty.Register( "Slice", typeof( double ), typeof( Pie ), new FrameworkPropertyMetadata( 1d, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback( Pie.OnSliceChanged ), new CoerceValueCallback( Pie.CoerceSliceValue ) ), new ValidateValueCallback( Pie.ValidateSlice ) ); public double Slice { get { return ( double )this.GetValue( Pie.SliceProperty ); } set { this.SetValue( Pie.SliceProperty, value ); } } private static void OnSliceChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) { ( ( Pie )d ).OnSliceChanged( e ); } private void OnSliceChanged( DependencyPropertyChangedEventArgs e ) { // avoid re-entrancy if( this.IsUpdatingSlice ) return; if( !( this.IsUpdatingStartAngle || this.IsUpdatingEndAngle || this.IsUpdatingSweepDirection ) ) { if( this.Mode == PieMode.EndAngle ) throw new InvalidOperationException( ErrorMessages.GetMessage( "SliceCannotBeSetDirectlyInEndAngle" ) ); } // EndAngle and Slice are interrelated and must be kept in sync this.IsUpdatingSlice = true; try { if( !( this.IsUpdatingStartAngle || this.IsUpdatingEndAngle || ( this.Mode == PieMode.Manual && this.IsUpdatingSweepDirection ) ) ) { this.CoerceValue( Pie.EndAngleProperty ); } } finally { this.IsUpdatingSlice = false; } } private static object CoerceSliceValue( DependencyObject d, object value ) { // keep Slice in sync with EndAngle, StartAngle, and SweepDirection Pie pie = ( Pie )d; if( pie.IsUpdatingEndAngle || pie.IsUpdatingStartAngle || pie.IsUpdatingSweepDirection ) { double slice = Math.Max( -360.0, Math.Min( 360.0, ( pie.EndAngle - pie.StartAngle ) ) ) / ( ( pie.SweepDirection == SweepDirection.Clockwise ) ? 360.0 : -360.0 ); double newValue = DoubleHelper.AreVirtuallyEqual( slice, 0 ) ? 0 : ( slice < 0 ) ? slice + 1 : slice; if( !DoubleHelper.AreVirtuallyEqual( ( double )value, newValue ) ) { value = newValue; } } return value; } private static bool ValidateSlice( object value ) { double newValue = ( double )value; if( newValue < 0 || newValue > 1 || DoubleHelper.IsNaN( newValue ) ) throw new ArgumentException( ErrorMessages.GetMessage( "SliceOOR" ) ); return true; } #endregion #region StartAngle Property public static readonly DependencyProperty StartAngleProperty = DependencyProperty.Register( "StartAngle", typeof( double ), typeof( Pie ), new FrameworkPropertyMetadata( 360d, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback( Pie.OnStartAngleChanged ) ) ); public double StartAngle { get { return ( double )this.GetValue( Pie.StartAngleProperty ); } set { this.SetValue( Pie.StartAngleProperty, value ); } } private static void OnStartAngleChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) { ( ( Pie )d ).OnStartAngleChanged( e ); } private void OnStartAngleChanged( DependencyPropertyChangedEventArgs e ) { // avoid re-entrancy if( this.IsUpdatingStartAngle ) return; // StartAngle, Slice, and SweepDirection are interrelated and must be kept in sync this.IsUpdatingStartAngle = true; try { switch( Mode ) { case PieMode.Manual: this.CoerceValue( Pie.SliceProperty ); break; case PieMode.EndAngle: this.CoerceValue( Pie.SweepDirectionProperty ); this.CoerceValue( Pie.SliceProperty ); break; case PieMode.Slice: this.CoerceValue( Pie.EndAngleProperty ); break; } } finally { this.IsUpdatingStartAngle = false; } } #endregion #region SweepDirection Property public static readonly DependencyProperty SweepDirectionProperty = DependencyProperty.Register( "SweepDirection", typeof( SweepDirection ), typeof( Pie ), new FrameworkPropertyMetadata( ( SweepDirection )SweepDirection.Clockwise, FrameworkPropertyMetadataOptions.AffectsRender, new PropertyChangedCallback( Pie.OnSweepDirectionChanged ), new CoerceValueCallback( Pie.CoerceSweepDirectionValue ) ) ); public SweepDirection SweepDirection { get { return ( SweepDirection )this.GetValue( Pie.SweepDirectionProperty ); } set { this.SetValue( Pie.SweepDirectionProperty, value ); } } private static void OnSweepDirectionChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) { ( ( Pie )d ).OnSweepDirectionChanged( e ); } private void OnSweepDirectionChanged( DependencyPropertyChangedEventArgs e ) { // avoid re-entrancy if( this.IsUpdatingSweepDirection ) return; // EndAngle, Slice, and SweepDirection are interrelated and must be kept in sync this.IsUpdatingSweepDirection = true; try { switch( Mode ) { case PieMode.Slice: this.CoerceValue( Pie.EndAngleProperty ); break; default: this.CoerceValue( Pie.SliceProperty ); break; } } finally { this.IsUpdatingSweepDirection = false; } } private static object CoerceSweepDirectionValue( DependencyObject d, object value ) { // keep SweepDirection in sync with EndAngle and StartAngle Pie pie = ( Pie )d; if( pie.IsUpdatingEndAngle || pie.IsUpdatingStartAngle || pie.IsUpdatingMode ) { if( DoubleHelper.AreVirtuallyEqual( pie.StartAngle, pie.EndAngle ) ) { // if the values are equal, use previously coerced value value = pie.SweepDirection; } else { value = ( pie.EndAngle < pie.StartAngle ) ? SweepDirection.Counterclockwise : SweepDirection.Clockwise; } } return value; } #endregion #region GeometryTransform Property public override Transform GeometryTransform { get { return Transform.Identity; } } #endregion #region RenderedGeometry Property public override Geometry RenderedGeometry { get { // for a Pie, the RenderedGeometry is the same as the DefiningGeometry return this.DefiningGeometry; } } #endregion #region DefiningGeometry Protected Property protected override Geometry DefiningGeometry { get { double slice = Slice; if( _rect.IsEmpty || slice <= 0 ) return Geometry.Empty; if( slice >= 1 ) return new EllipseGeometry( _rect ); // direction of flow is determined by the SweepDirection property double directionalFactor = ( this.SweepDirection == SweepDirection.Clockwise ) ? 1.0 : -1.0; double startAngle = StartAngle; Point pointA = EllipseHelper.PointOfRadialIntersection( _rect, startAngle ); Point pointB = EllipseHelper.PointOfRadialIntersection( _rect, startAngle + directionalFactor * slice * 360 ); PathSegmentCollection segments = new PathSegmentCollection(); segments.Add( new LineSegment( pointA, true ) ); ArcSegment arc = new ArcSegment(); arc.Point = pointB; arc.Size = new Size( _rect.Width / 2, _rect.Height / 2 ); arc.IsLargeArc = slice > 0.5; arc.SweepDirection = SweepDirection; segments.Add( arc ); PathFigureCollection figures = new PathFigureCollection(); figures.Add( new PathFigure( RectHelper.Center( _rect ), segments, true ) ); return new PathGeometry( figures ); } } #endregion #region IsUpdatingEndAngle Private Property private bool IsUpdatingEndAngle { get { return _cacheBits[ ( int )CacheBits.IsUpdatingEndAngle ]; } set { _cacheBits[ ( int )CacheBits.IsUpdatingEndAngle ] = value; } } #endregion #region IsUpdatingMode Private Property private bool IsUpdatingMode { get { return _cacheBits[ ( int )CacheBits.IsUpdatingMode ]; } set { _cacheBits[ ( int )CacheBits.IsUpdatingMode ] = value; } } #endregion #region IsUpdatingSlice Private Property private bool IsUpdatingSlice { get { return _cacheBits[ ( int )CacheBits.IsUpdatingSlice ]; } set { _cacheBits[ ( int )CacheBits.IsUpdatingSlice ] = value; } } #endregion #region IsUpdatingStartAngle Private Property private bool IsUpdatingStartAngle { get { return _cacheBits[ ( int )CacheBits.IsUpdatingStartAngle ]; } set { _cacheBits[ ( int )CacheBits.IsUpdatingStartAngle ] = value; } } #endregion #region IsUpdatingSweepDirection Private Property private bool IsUpdatingSweepDirection { get { return _cacheBits[ ( int )CacheBits.IsUpdatingSweepDirection ]; } set { _cacheBits[ ( int )CacheBits.IsUpdatingSweepDirection ] = value; } } #endregion internal override Size GetNaturalSize() { double strokeThickness = this.GetStrokeThickness(); return new Size( strokeThickness, strokeThickness ); } internal override Rect GetDefiningGeometryBounds() { return _rect; } protected override Size ArrangeOverride( Size finalSize ) { double penThickness = this.GetStrokeThickness(); double margin = penThickness / 2; _rect = new Rect( margin, margin, Math.Max( 0, finalSize.Width - penThickness ), Math.Max( 0, finalSize.Height - penThickness ) ); switch( Stretch ) { case Stretch.None: // empty rectangle _rect.Width = _rect.Height = 0; break; case Stretch.Fill: // already initialized for Fill break; case Stretch.Uniform: // largest square that fits in the final size if( _rect.Width > _rect.Height ) { _rect.Width = _rect.Height; } else { _rect.Height = _rect.Width; } break; case Stretch.UniformToFill: // smallest square that fills the final size if( _rect.Width < _rect.Height ) { _rect.Width = _rect.Height; } else { _rect.Height = _rect.Width; } break; } return finalSize; } protected override Size MeasureOverride( Size constraint ) { if( this.Stretch == Stretch.UniformToFill ) { double width = constraint.Width; double height = constraint.Height; if( Double.IsInfinity( width ) && Double.IsInfinity( height ) ) { return this.GetNaturalSize(); } else if( Double.IsInfinity( width ) || Double.IsInfinity( height ) ) { width = Math.Min( width, height ); } else { width = Math.Max( width, height ); } return new Size( width, width ); } return this.GetNaturalSize(); } protected override void OnRender( DrawingContext drawingContext ) { if( !_rect.IsEmpty ) { Pen pen = this.GetPen(); drawingContext.DrawGeometry( this.Fill, pen, this.RenderedGeometry ); } } #region Private Fields private Rect _rect = Rect.Empty; private BitVector32 _cacheBits = new BitVector32( 0 ); #endregion #region CacheBits Nested Type private enum CacheBits { IsUpdatingEndAngle = 0x00000001, IsUpdatingMode = 0x00000002, IsUpdatingSlice = 0x00000004, IsUpdatingStartAngle = 0x00000008, IsUpdatingSweepDirection = 0x00000010, } #endregion } }
28.521463
171
0.595764
[ "MIT" ]
BenInCOSprings/WpfDockingWindowsApplicationTemplate
wpftoolkit-110921/Main/Source/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Pie/Implementation/Pie.cs
17,942
C#
using MyEvernote.Entities.Messages; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MyEvernote.Entities.ResultModel { public class MessageResult<T> where T : class { public List<ErrorMessageObj> Errors { get; set; } public T Result { get; set; } public MessageResult() { Errors = new List<ErrorMessageObj>(); } //error message insertion method(prevents code overload) public void AddError(ErrorMessageCodes code, string message) { Errors.Add(new ErrorMessageObj() { Code = code, Message = message }); } } }
24.103448
81
0.645207
[ "Apache-2.0" ]
sinantok/my-notes-web-project
MyEvernote.Entities/ResultModel/MessageResult.cs
701
C#
//GENERATED: CS Code using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace UnrealEngine{ public partial class UNumericProperty:UProperty { } }
20
49
0.785
[ "MIT" ]
RobertAcksel/UnrealCS
Engine/Plugins/UnrealCS/UECSharpDomain/UnrealEngine/GeneratedScriptFile/UNumericProperty.cs
200
C#
using System; namespace PartsUnlimited.ViewModels { // Test public class ProductData { public string Title { get; set; } public string Url { get; set; } } }
14.461538
41
0.606383
[ "MIT" ]
datadevopslabs/PartsUnlimitedE2E
PartsUnlimited-aspnet45/src/PartsUnlimitedWebsite/ViewModels/AlbumData.cs
190
C#
using System; using System.Runtime.InteropServices; namespace ProjectCeilidh.NativeTK.Native.Platform { internal class MacNativeLibraryLoader : NativeLibraryLoader { private const int RTLD_NOW = 0x002; private const string LIBDL = "libdl"; protected override string[] GetNativeLibraryNames(string libraryName, Version version) { if (version == null) return new[] { $"lib{libraryName}.dylib" }; return new[] { $"lib{libraryName}.{version.Major}.{version.Minor}.{version.Build}.dylib", $"lib{libraryName}.{version.Major}.{version.Minor}.dylib", $"lib{libraryName}.{version.Major}.dylib" }; } protected override NativeLibraryHandle LoadNativeLibrary(string libraryName) { var handle = dlopen(libraryName, RTLD_NOW); return handle == IntPtr.Zero ? null : new MacNativeLibraryHandle(libraryName, handle); } [DllImport(LIBDL)] private static extern IntPtr dlopen(string path, int flag); [DllImport(LIBDL)] private static extern IntPtr dlsym(IntPtr handle, string symbol); private class MacNativeLibraryHandle : NativeLibraryHandle { private readonly IntPtr _handle; public MacNativeLibraryHandle(string path, IntPtr handle) : base(path) { _handle = handle; } public override IntPtr GetSymbolAddress(string symbol) => dlsym(_handle, symbol); } } }
33.6
98
0.579167
[ "MIT" ]
Ceilidh-Team/NativeTK
ProjectCeilidh.NativeTK/Native/Platform/MacNativeLibraryLoader.cs
1,680
C#
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.AzureNextGen.Maps.V20170101Preview.Outputs { [OutputType] public sealed class SkuResponse { /// <summary> /// The name of the SKU, in standard format (such as S0). /// </summary> public readonly string Name; /// <summary> /// Gets the sku tier. This is based on the SKU name. /// </summary> public readonly string Tier; [OutputConstructor] private SkuResponse( string name, string tier) { Name = name; Tier = tier; } } }
25
81
0.6
[ "Apache-2.0" ]
pulumi/pulumi-azure-nextgen
sdk/dotnet/Maps/V20170101Preview/Outputs/SkuResponse.cs
900
C#
namespace MadHoneyStore.Web.ViewModels.Home { public class IndexCategoryViewModel { public string Name { get; set; } } }
17.75
44
0.661972
[ "MIT" ]
russeva/MadHoneyStore
src/Web/MadHoneyStore.Web.ViewModels/Home/IndexCategoryViewModel.cs
144
C#
#pragma checksum "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Report\ShowSportClearedReport.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d38c39ddf1ba72ef57befa80294386830cae3e62" // <auto-generated/> #pragma warning disable 1591 [assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Report_ShowSportClearedReport), @"mvc.1.0.view", @"/Views/Report/ShowSportClearedReport.cshtml")] namespace AspNetCore { #line hidden using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewFeatures; #nullable restore #line 1 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\_ViewImports.cshtml" using ClearPost; #line default #line hidden #nullable disable #nullable restore #line 2 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\_ViewImports.cshtml" using ClearPost.Models; #line default #line hidden #nullable disable [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"d38c39ddf1ba72ef57befa80294386830cae3e62", @"/Views/Report/ShowSportClearedReport.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"d1ea81af078f1e8fa1a0018a2974e79c1fc706b2", @"/Views/_ViewImports.cshtml")] public class Views_Report_ShowSportClearedReport : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> { #pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { WriteLiteral("\r\n"); #nullable restore #line 2 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Report\ShowSportClearedReport.cshtml" ViewData["Title"] = "ShowSportClearedReport"; Layout = "~/Views/Shared/_Layout.cshtml"; #line default #line hidden #nullable disable WriteLiteral("\r\n<h1>ShowSportClearedReport</h1>\r\n\r\n"); #nullable restore #line 9 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Report\ShowSportClearedReport.cshtml" if (ViewBag.Document == null) { #line default #line hidden #nullable disable WriteLiteral(" <h2 class=\"text-center\">This report is unavailable for preview.</h2>\r\n"); #nullable restore #line 13 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Report\ShowSportClearedReport.cshtml" } else { var strBase64 = Convert.ToBase64String(ViewBag.Document); var FileContent = string.Format("data:application/pdf;base64,{0}", strBase64); #line default #line hidden #nullable disable WriteLiteral(" <center>\r\n <br /><br /><embed style=\"height: 700px; width: 70%;\""); BeginWriteAttribute("src", " src=\"", 534, "\"", 552, 1); #nullable restore #line 21 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Report\ShowSportClearedReport.cshtml" WriteAttributeValue("", 540, FileContent, 540, 12, false); #line default #line hidden #nullable disable EndWriteAttribute(); WriteLiteral(" />\r\n </center>\r\n"); #nullable restore #line 23 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Report\ShowSportClearedReport.cshtml" } #line default #line hidden #nullable disable } #pragma warning restore 1998 [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; } [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; } [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; } [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; } [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; } } } #pragma warning restore 1591
42.31068
202
0.738183
[ "MIT" ]
koninlord/ClearPost
ClearPost/obj/Debug/netcoreapp3.1/Razor/Views/Report/ShowSportClearedReport.cshtml.g.cs
4,358
C#
using System; using System.Collections.Generic; namespace eBookManager.Engine { [Serializable] public class StorageSpace { public int ID { get; set; } public string Name { get; set; } public string Description { get; set; } public List<Document> BookList { get; set; } } }
20.25
52
0.623457
[ "MIT" ]
OliverForral/C-8-and-.NET-Core-3-Projects-Using-Azure-Second-Edition
Chaper01/eBookManager/eBookManager.Engine/StorageSpace.cs
326
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace WebApiTemplate.Models { public class StudentDto { public int Id { get; set; } public string Name { get; set; } public string Email { get; set; } } }
19.6
41
0.653061
[ "MIT" ]
luuucio/DotNetCoreWebApiTemplate
Models/StudentDto.cs
296
C#
using Iot.Device.BrickPi3; using Iot.Device.BrickPi3.Models; using System; using System.Linq; using System.Threading; using System.Threading.Tasks; namespace BrickPiHardwareTest { partial class Program { const string MotorTest = "-motor"; const string VehiculeTest = "-vehicle"; const string MultiSensorTest = "-multi"; const string NoBasicTest = "-nobrick"; const string ColorTest = "-color"; const string TouchTest = "-touch"; const string NXTLightTest = "-nxtlight"; const string NXTUSTest = "-nxtus"; const string NXTColorTest = "-nxtcolor"; const string IRSensorTest = "-irsensor"; static private Brick _brick = new Brick(); static void Main(string[] args) { Console.WriteLine("Hello BrickPi3!"); if (args.Length == 0) { Console.WriteLine(@"You can use preset hardware tests. Usage:"); Console.WriteLine(@"./BrickPiHardwareTest -arg1 - arg2"); Console.WriteLine(@"where -arg1, arg2, etc are one of the following:"); Console.WriteLine($"{NoBasicTest}: don't run the basic BrickPi tests."); Console.WriteLine($"{MotorTest}: run basic motor tests, motors need to be on port A and D."); Console.WriteLine($"{VehiculeTest}: run a vehicle test, motors need to be on port A and D."); Console.WriteLine($"{MultiSensorTest}: run a multi sensor test"); Console.WriteLine(@" EV3TouchSensor on port 1"); Console.WriteLine(@" NXTTouchSensor on port 2"); Console.WriteLine(@" NXTColorSensor on port 3"); Console.WriteLine(@" NXTSoundSensor on port 4"); Console.WriteLine(@" Press the EV3TouchSensor sensor to finish"); Console.WriteLine($"{ColorTest}: run an EV3 color test"); Console.WriteLine(@" EV3TouchSensor on port 1"); Console.WriteLine(@" EV3ColorSensor on port 2"); Console.WriteLine($"{TouchTest}: run touch sensor test"); Console.WriteLine(@" EV3TouchSensor on port 1"); Console.WriteLine($"{NXTLightTest}: run the NXT light sensor tests"); Console.WriteLine(@" NXTLightSensor on port 4"); Console.WriteLine($"{NXTUSTest}: run NXT Ultrasonic test on port 4"); Console.WriteLine($"{NXTColorTest}: run NXT Color sensor test"); Console.WriteLine(@" EV3TouchSensor on port 1"); Console.WriteLine(@" NXTColorSensor on port 4"); Console.WriteLine($"{IRSensorTest}: run EV3 IR sensor test on port 4"); } try { // uncomment any of the test to run it if (!(args.Contains(NoBasicTest))) TestBrickDetails(); //TestSensors(); if (args.Contains(MotorTest)) { // // Tests directly using the brick low level driver // TestRunMotors(); TestMotorEncoder(); TestMotorDPS(); TestMotorPosition(); // // Test using the high level classes // //TestMotorTacho(); //Test3Motors(); TestMotorEvents(); } if (args.Contains(VehiculeTest)) { TestVehicule(); } // // Test using high level calsses for sensosrs // if (args.Contains(MultiSensorTest)) { TestMultipleSensorsTouchCSSoud(); } if (args.Contains(ColorTest)) { TestEV3Color(); } if (args.Contains(ColorTest)) { TestTouch(); } if (args.Contains(IRSensorTest)) { TestIRSensor(); } if (args.Contains(NXTUSTest)) { TestNXTUS(); } if (args.Contains(NXTLightTest)) { TestNXTLight(); } if (args.Contains(NXTColorTest)) { TestNXTCS(); } } catch (Exception ex) { Console.WriteLine($"Exception: {ex.Message}"); } } static private void TestMotorPosition() { // // Test motor position // _brick.OffsetMotorEncoder((byte)MotorPort.PortD, _brick.GetMotorEncoder((byte)MotorPort.PortD)); _brick.OffsetMotorEncoder((byte)MotorPort.PortA, _brick.GetMotorEncoder((byte)MotorPort.PortA)); _brick.SetMotorPositionKD((byte)MotorPort.PortA); _brick.SetMotorPositionKP((byte)MotorPort.PortA); // Float motor D _brick.SetMotorPower((byte)MotorPort.PortD, (byte)MotorSpeed.Float); // set some limits _brick.SetMotorLimits((byte)MotorPort.PortA, 50, 200); _brick.SetSensorType((byte)SensorPort.Port1, SensorType.EV3Touch); Console.WriteLine("Read Motor A and D positions. Press EV3 Touch sensor on port 1 to stop."); //run until we press the button on port2 while (_brick.GetSensor((byte)SensorPort.Port1)[0] == 0) { var target = _brick.GetMotorEncoder((byte)MotorPort.PortD); _brick.SetMotorPosition((byte)MotorPort.PortA, target); var status = _brick.GetMotorStatus((byte)MotorPort.PortA); Console.WriteLine($"Motor A Target Degrees Per Second: {target}; Motor A speed: {status.Speed}; DPS: {status.Dps}; Encoder: {status.Encoder}; Flags: {status.Flags}"); Thread.Sleep(20); } } static private void TestMotorDPS() { // // Test Mortor Degree Per Second (DPS) // _brick.OffsetMotorEncoder((byte)MotorPort.PortD, _brick.GetMotorEncoder((byte)MotorPort.PortD)); _brick.OffsetMotorEncoder((byte)MotorPort.PortA, _brick.GetMotorEncoder((byte)MotorPort.PortA)); // Float motor D _brick.SetMotorPower((byte)MotorPort.PortD, (byte)MotorSpeed.Float); _brick.SetSensorType((byte)SensorPort.Port1, SensorType.EV3Touch); Console.WriteLine("Control Motor A speed with Motor D encoder. Turn Motor D to control speed of Motor A"); Console.WriteLine("Press EV3 Touch sensor on port 1 to stop the test"); //run until we press the button on port 1 while (_brick.GetSensor((byte)SensorPort.Port1)[0] == 0) { var target = _brick.GetMotorEncoder((byte)MotorPort.PortD); _brick.SetMotorDps((byte)MotorPort.PortA, target); var status = _brick.GetMotorStatus((byte)MotorPort.PortA); Console.WriteLine($"Motor A Target Degrees Per Second: {target}; Motor A speed: {status.Speed}; DPS: {status.Dps}; Encoder: {status.Encoder}; Flags: {status.Flags}"); Thread.Sleep(20); } } static private void TestMotorEncoder() { // // Test Motor encoders // // Reset first the position Console.WriteLine("Read encoder of Motor D 100 times. Reset position to 0 to start"); _brick.OffsetMotorEncoder((byte)MotorPort.PortD, _brick.GetMotorEncoder((byte)MotorPort.PortD)); for (int i = 0; i < 100; i++) { var encodermotor = _brick.GetMotorEncoder((byte)MotorPort.PortD); Console.WriteLine($"Encoder: {encodermotor}"); Thread.Sleep(200); } } static private void TestBrickDetails() { // // Get the details abourt the brick // var brickinfo = _brick.BrickPi3Info; Console.WriteLine($"Manufacturer: {brickinfo.Manufacturer}"); Console.WriteLine($"Board: {brickinfo.Board}"); Console.WriteLine($"Hardware version: {brickinfo.HardwareVersion}"); var hdv = brickinfo.GetHardwareVersion(); for (int i = 0; i < hdv.Length; i++) Console.WriteLine($"Hardware version {i}: {hdv[i]}"); Console.WriteLine($"Software version: {brickinfo.SoftwareVersion}"); var swv = brickinfo.GetSoftwareVersion(); for (int i = 0; i < swv.Length; i++) Console.WriteLine($"Software version {i}: {swv[i]}"); Console.WriteLine($"Id: {brickinfo.Id}"); // // Testing Led // Console.WriteLine("Testing Led, PWM on Led"); for (int i = 0; i < 10; i++) { _brick.SetLed((byte)(i * 10)); Task.Delay(500).Wait(); } for (int i = 0; i < 10; i++) { _brick.SetLed((byte)(100 - i * 10)); Task.Delay(500).Wait(); } _brick.SetLed(255); // // Get the voltage details // var voltage = _brick.BrickPi3Voltage; Console.WriteLine($"3.3V: {voltage.Voltage3V3}"); Console.WriteLine($"5V: {voltage.Voltage5V}"); Console.WriteLine($"9V: {voltage.Voltage9V}"); Console.WriteLine($"Battery voltage: {voltage.VoltageBattery}"); } static private void TestSensors() { // // Setting a sencor and reading values // Console.WriteLine($"{SensorType.EV3UltrasonicCentimeter.ToString()}"); _brick.SetSensorType((byte)SensorPort.Port3, SensorType.EV3UltrasonicCentimeter); for (int i = 0; i < 100; i++) { Console.WriteLine($"Iterration {i}"); try { var sensordata = _brick.GetSensor((byte)SensorPort.Port3); for (int j = 0; j < sensordata.Length; j++) Console.WriteLine($"Sensor value {j}: {sensordata[j]}"); } catch (Exception ex) { Console.WriteLine($"Exception: {ex.Message}"); } Task.Delay(200).Wait(); } Console.WriteLine($"{SensorType.EV3Touch.ToString()}"); _brick.SetSensorType((byte)SensorPort.Port4, SensorType.EV3Touch); for (int i = 0; i < 100; i++) { Console.WriteLine($"Iterration {i}"); try { var sensordata = _brick.GetSensor((byte)SensorPort.Port4); for (int j = 0; j < sensordata.Length; j++) Console.WriteLine($"Sensor value {j}: {sensordata[j]}"); } catch (Exception ex) { Console.WriteLine($"Exception: {ex.Message}"); } Task.Delay(200).Wait(); } Console.WriteLine($"{SensorType.NXTTouch.ToString()}"); _brick.SetSensorType((byte)SensorPort.Port1, SensorType.NXTTouch); for (int i = 0; i < 100; i++) { Console.WriteLine($"Iterration {i}"); try { var sensordata = _brick.GetSensor((byte)SensorPort.Port1); for (int j = 0; j < sensordata.Length; j++) Console.WriteLine($"Sensor value {j}: {sensordata[j]}"); } catch (Exception ex) { Console.WriteLine($"Exception: {ex.Message}"); } Task.Delay(200).Wait(); } Console.WriteLine($"{SensorType.EV3ColorColor.ToString()}"); _brick.SetSensorType((byte)SensorPort.Port2, SensorType.EV3ColorColor); for (int i = 0; i < 100; i++) { Console.WriteLine($"Iterration {i}"); try { var sensordata = _brick.GetSensor((byte)SensorPort.Port2); for (int j = 0; j < sensordata.Length; j++) Console.WriteLine($"Sensor value {j}: {sensordata[j]}"); } catch (Exception ex) { Console.WriteLine($"Exception: {ex.Message}"); } Task.Delay(200).Wait(); } } static private void TestRunMotors() { // // Testing motors // // Acceleration to full speed, float and decreasing speed to stop Console.WriteLine("Speed test on Motor D, increasing and decreasing speed from 0 to maximum"); Console.WriteLine("Acceleration on Motor D"); for (int i = 0; i < 10; i++) { _brick.SetMotorPower((byte)MotorPort.PortD, (byte)(i * 10)); Task.Delay(1000).Wait(); } _brick.SetMotorPower((byte)MotorPort.PortD, (byte)MotorSpeed.Float); Console.WriteLine("Waiting 1 second"); Thread.Sleep(1000); Console.WriteLine("Deceleration on Motor D"); for (int i = 0; i < 10; i++) { _brick.SetMotorPower((byte)MotorPort.PortD, (byte)(100 - i * 10)); Task.Delay(1000).Wait(); } _brick.SetMotorPower((byte)MotorPort.PortD, (byte)MotorSpeed.Float); Console.WriteLine("End of test on Motor D"); } } }
41.505848
182
0.504826
[ "MIT" ]
491134648/iot
src/devices/BrickPi3/samples/BrickPi3.samples.cs
14,197
C#
using System; using System.Reflection; using AutoFixture.Idioms; using Xunit; namespace AutoFixture.IdiomsUnitTest { public class ReflectionExceptionUnwrappingCommandTest { [Fact] public void SutIsContextualCommand() { // Arrange var dummyCommand = new DelegatingGuardClauseCommand(); // Act var sut = new ReflectionExceptionUnwrappingCommand(dummyCommand); // Assert Assert.IsAssignableFrom<IGuardClauseCommand>(sut); } [Fact] public void CommandIsCorrect() { // Arrange var expectedCommand = new DelegatingGuardClauseCommand(); var sut = new ReflectionExceptionUnwrappingCommand(expectedCommand); // Act IGuardClauseCommand result = sut.Command; // Assert Assert.Equal(expectedCommand, result); } [Fact] public void RequestedParamNameIsCorrect() { const string expected = "foo"; var commandStub = new DelegatingGuardClauseCommand { RequestedParameterName = expected }; var sut = new ReflectionExceptionUnwrappingCommand(commandStub); var actual = sut.RequestedParameterName; Assert.Equal(expected, actual); } [Fact] public void ExecuteExecutesDecoratedCommand() { // Arrange var mockVerified = false; var expectedValue = new object(); var cmd = new DelegatingGuardClauseCommand { OnExecute = v => mockVerified = expectedValue.Equals(v) }; var sut = new ReflectionExceptionUnwrappingCommand(cmd); // Act sut.Execute(expectedValue); // Assert Assert.True(mockVerified, "Mock verified."); } [Fact] public void ExecuteRethrowsNormalException() { // Arrange var cmd = new DelegatingGuardClauseCommand { OnExecute = v => { throw new InvalidOperationException(); } }; var sut = new ReflectionExceptionUnwrappingCommand(cmd); // Act & Assert var dummyValue = new object(); Assert.Throws<InvalidOperationException>(() => sut.Execute(dummyValue)); } [Fact] public void ExecuteUnwrapsAndThrowsInnerExceptionFromTargetInvocationException() { // Arrange var expectedException = new InvalidOperationException(); var cmd = new DelegatingGuardClauseCommand { OnExecute = v => { throw new TargetInvocationException(expectedException); } }; var sut = new ReflectionExceptionUnwrappingCommand(cmd); // Act & Assert var dummyValue = new object(); var e = Assert.Throws<InvalidOperationException>(() => sut.Execute(dummyValue)); Assert.Equal(expectedException, e); } [Theory] [InlineData(typeof(object))] [InlineData(typeof(int))] [InlineData(typeof(string))] [InlineData(typeof(Version))] public void ContextTypeIsCorrect(Type type) { // Arrange var cmd = new DelegatingGuardClauseCommand { RequestedType = type }; var sut = new ReflectionExceptionUnwrappingCommand(cmd); // Act var result = sut.RequestedType; // Assert Assert.Equal(type, result); } [Fact] public void CreateExceptionReturnsCorrectResult() { // Arrange var value = Guid.NewGuid().ToString(); var expected = new Exception(); var cmd = new DelegatingGuardClauseCommand { OnCreateException = v => value == v ? expected : new Exception() }; var sut = new ReflectionExceptionUnwrappingCommand(cmd); // Act var result = sut.CreateException(value); // Assert Assert.Equal(expected, result); } [Fact] public void CreateExceptionWithInnerReturnsCorrectResult() { // Arrange var value = Guid.NewGuid().ToString(); var inner = new Exception(); var expected = new Exception(); var cmd = new DelegatingGuardClauseCommand { OnCreateExceptionWithInner = (v, e) => value == v && inner.Equals(e) ? expected : new Exception() }; var sut = new ReflectionExceptionUnwrappingCommand(cmd); // Act var result = sut.CreateException(value, inner); // Assert Assert.Equal(expected, result); } [Fact] public void CreateExceptionWithFailureReasonReturnsCorrectResult() { // Arrange var value = Guid.NewGuid().ToString(); var failureReason = Guid.NewGuid().ToString(); var inner = new Exception(); var expected = new Exception(); var cmd = new DelegatingGuardClauseCommand { OnCreateExceptionWithFailureReason = (v, r, e) => v == value && r == failureReason && e == inner ? expected : new Exception() }; var sut = new ReflectionExceptionUnwrappingCommand(cmd); // Act var result = sut.CreateException(value, failureReason, inner); // Assert Assert.Equal(expected, result); } } }
36.85906
157
0.575929
[ "MIT" ]
damian-krychowski/AutoFixture
Src/IdiomsUnitTest/ReflectionExceptionUnwrappingCommandTest.cs
5,494
C#
/** * Copyright 2003, 2004, 2005. CodeStreet LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; namespace CodeStreet.Selector.Parser { /// <summary> Class to represent an identifier. Thread safe class may be freely used across threads. /// Identifiers can either be JMS header fields, or JMS provider-specific properties, or /// application properties.<p> /// The following JMS header fields are supported: <tt>JMSDeliveryMode</tt>, /// <tt>JMSPriority</tt>, <tt>JMSMessageID</tt>, <tt>JMSTimestamp</tt>, <tt>JMSCorrelationID, /// and <tt>JMSType</tt>. In addition, the header fields <tt>JMSRedelivered</tt> and /// <tt>JMSExpiration</tt> are also supported. These additional fields are relevant only /// for the receiving application and not for the sender.<p> /// Support is provided for <tt>nested</tt> fields. Nested fields are referenced using a <tt>dot</tt> /// notation. For example, <tt>order.quantity</tt> would select the <tt>quantity</tt> field of /// the nested sub-message field <tt>order</tt> if it exists. Otherwise, it selects nothing /// (<tt>null</tt>). /// </summary> /// <author> Jawaid Hakim. /// </author> public class Identifier : IExpression { /// <summary> Check if this is a JMS header property.</summary> /// <returns> <tt>true</tt> if this identifier is a JMS header property. Otherwise, /// returns <tt>false</tt>. /// </returns> virtual public bool JMSHeader { get { return jmsHeader_; } } /// <summary> Factory.</summary> /// <param name="id">Identifier name. /// </param> /// <returns> Instance. /// @throws IllegalArgumentException Invalid identifier name. /// </returns> //UPGRADE_NOTE: Synchronized keyword was removed from method 'valueOf'. Lock expression was added. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1027"' public static Identifier valueOf(System.String id) { lock (typeof(CodeStreet.Selector.Parser.Identifier)) { if (reservedNamesSet_.Contains(id)) throw new System.ArgumentException("Identifier name cannot be a reserved name: " + id); //UPGRADE_TODO: Method 'java.util.Map.get' was converted to 'System.Collections.IDictionary.Item' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javautilMapget_javalangObject"' Identifier instance = (Identifier) idMap_[id]; if (instance == null) { instance = new Identifier(id); object tempObject; tempObject = instance; idMap_[id] = tempObject; System.Object generatedAux = tempObject; } return instance; } } /// <summary> Ctor.</summary> /// <param name="id">Identifier name. /// </param> private Identifier(System.String id) { id_ = id; jmsHeader_ = jmsHeadersSet_.Contains(id); } /// <summary> Get identifier name.</summary> /// <returns> Identifier name. /// </returns> public virtual System.String getIdentifier() { return id_; } public virtual System.Object eval(System.Collections.IDictionary identifiers) { return getValue(identifiers); } public virtual System.Object eval(IValueProvider provider, System.Object corr) { return provider.getValue(this, corr); } internal virtual System.Object getValue(System.Collections.IDictionary identifiers) { //UPGRADE_TODO: Method 'java.util.Map.get' was converted to 'System.Collections.IDictionary.Item' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javautilMapget_javalangObject"' object val = identifiers[id_]; if (val is System.Decimal || val is System.Int16 || val is System.Int32 || val is System.Int64 || val is System.Single || val is System.Double || val is System.Byte) return new NumericValue(val); return val; } public override System.String ToString() { return id_; } //UPGRADE_NOTE: Final was removed from the declaration of 'id_ '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"' private System.String id_; //UPGRADE_NOTE: Final was removed from the declaration of 'jmsHeader_ '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"' private bool jmsHeader_; private static SupportClass.SetSupport jmsHeadersSet_; private static SupportClass.SetSupport reservedNamesSet_; //UPGRADE_TODO: Class 'java.util.HashMap' was converted to 'System.Collections.Hashtable' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javautilHashMap"' //UPGRADE_NOTE: The initialization of 'idMap_' was moved to static method 'CodeStreet.Selector.Parser.Identifier'. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1005"' private static System.Collections.IDictionary idMap_; static Identifier() { idMap_ = new System.Collections.Hashtable(); { // Valid JMS header fields System.String[] jmsHeaders_ = new System.String[]{"JMSDeliveryMode", "JMSPriority", "JMSMessageID", "JMSTimestamp", "JMSCorrelationID", "JMSType", "JMSRedelivered", "JMSExpiration"}; //UPGRADE_TODO: The equivalent in .NET for method 'java.util.Arrays.asList' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"' jmsHeadersSet_ = new SupportClass.HashSetSupport(SupportClass.CollectionSupport.ToCollectionSupport(jmsHeaders_)); // Valid JMS header fields System.String[] reservedNames_ = new System.String[]{"NULL", "TRUE", "FALSE", "NULL", "NOT", "AND", "OR", "BETWEEN", "LIKE", "IN", "IS", "ESCAPE"}; //UPGRADE_TODO: The equivalent in .NET for method 'java.util.Arrays.asList' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"' reservedNamesSet_ = new SupportClass.HashSetSupport(SupportClass.CollectionSupport.ToCollectionSupport(reservedNames_)); } } } }
45.840278
236
0.702772
[ "Apache-2.0" ]
jamsel/jamsel
src/CSHARP/Selector/CodeStreet/Selector/Parser/Identifier.cs
6,601
C#
namespace Skeleton.Dapper.Tests.Tvp { using Common.Extensions; using System; using System.Collections.Generic; using System.Linq; using Dapper.Extensions; using Dapper.Tvp; using JetBrains.Annotations; using Xunit; public class TvpParameterTests : DbUsingTestBase { public class TestEntityWithAllTypes { public int Id { get; set; } public byte? Value1 { get; set; } public short? Value2 { get; set; } public long? Value3 { get; set; } public float? Value4 { get; set; } public double? Value5 { get; set; } public decimal? Value6 { get; set; } public bool? Value7 { get; set; } public Guid? Value8 { get; set; } public DateTime? Value9 { get; set; } public DateTimeOffset? Value10 { get; set; } public byte[] Value12 { get; set; } public string Value14 { get; set; } public char? Value15 { get; set; } protected bool Equals(TestEntityWithAllTypes other) { return Id == other.Id && Value1.Equals(other.Value1) && Value2.Equals(other.Value2) && Value3.Equals(other.Value3) && Value4.Equals(other.Value4) && Value5.Equals(other.Value5) && Value6.Equals(other.Value6) && Value7.Equals(other.Value7) && Value8.Equals(other.Value8) && Value9.Equals(other.Value9) && Value10.Equals(other.Value10) && Value12.IsEquals(other.Value12) && string.Equals(Value14, other.Value14) && Value15.Equals(other.Value15); } public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; if (obj.GetType() != this.GetType()) return false; return Equals((TestEntityWithAllTypes)obj); } } [UsedImplicitly] public static readonly IEnumerable<object[]> TvpParameterUsageTestsData; static TvpParameterTests() { TvpParameterUsageTestsData = new[] { new object[] { new[] { new TestEntityWithAllTypes { Id = 1, Value1 = 1, Value2 = 2, Value3 = 12L, Value4 = 1.5f, Value5 = 1.7d, Value6 = 1.834m, Value7 = true, Value8 = Guid.NewGuid(), Value9 = new DateTime(2016, 01, 01, 00, 00, 00, DateTimeKind.Unspecified), Value10 = DateTimeOffset.Now, Value12 = new byte[] {5, 6, 7}, Value14 = "abcde", Value15 = 'f' }, new TestEntityWithAllTypes { Id = 1, Value1 = 1, Value2 = 2, Value4 = 1.5f, Value5 = 1.7d, Value10 = DateTimeOffset.Now, Value12 = new byte[0], Value14 = "ab", Value15 = 'l' } } }, new object[] {new TestEntityWithAllTypes[0]} }; } private static QueryObject CreateTableQuery() { return new QueryObject(@" if type_id (N'[dbo].[TestListWithAllTypes]') is null create type [dbo].[TestListWithAllTypes] as table( [Id] [int] not null, [Value1] [tinyint] null, [Value2] [smallint] null, [Value3] [bigint] null, [Value4] [real] null, [Value5] [float] null, [Value6] [decimal](6,3) null, [Value7] [bit] null, [Value8] [uniqueidentifier] null, [Value9] [datetime] null, [Value10] [datetimeoffset] null, [Value12] [varbinary](max) null, [Value14] [nvarchar](6) null, [Value15] [nchar](1) null)"); } private static QueryObject GetAllValuesQuery(IEnumerable<TestEntityWithAllTypes> values) { return new QueryObject("select * from @Param", new { Param = TvpParameter.Create("TestListWithAllTypes", values, configurator => configurator .SetAccuracy(x => x.Value6, 6, 3) .SetMaxLength(x => x.Value14, 6)) }); } [Theory] [MemberData(nameof(TvpParameterUsageTestsData))] public void ShouldUseTvpInQueryWithAllTypes(TestEntityWithAllTypes[] expected) { // When TestEntityWithAllTypes[] actual; using (var connection = ConnectionsFactory.Create()) { connection.Execute(CreateTableQuery()); actual = connection.Query<TestEntityWithAllTypes>(GetAllValuesQuery(expected)).ToArray(); } // Then Assert.Equal(expected, actual); } } }
43.785714
131
0.385882
[ "MIT" ]
slooooowpanda/WebInfrastructure
test/Infrastructure/Dapper.Tests/Tvp/TvpParameterTests.cs
6,745
C#
#if false using System; using GameAnalyticsSDK; using GameAnalyticsSDK.Events; namespace HutongGames.PlayMaker.Actions { [ActionCategory("GameAnalytics")] [Tooltip("Sends a error event message to the GameAnalytics server.")] [HelpUrl("https://hutonggames.fogbugz.com/default.asp?W1171")] public class SendErrorEvent : FsmStateAction { [Tooltip("The severity of this event: critical, error, warning, info, debug")] public GAErrorSeverity severityType ; [Tooltip("The message")] [RequiredField] public FsmString Message; public override void Reset() { severityType = GAErrorSeverity.Error; Message = new FsmString() { UseVariable = false }; } public override void OnEnter() { GA_Error.NewEvent(severityType, Message.Value, null, false); Finish(); } } } #endif
21.210526
80
0.729529
[ "MIT" ]
Enes04/HandShake
Assets/GameAnalytics/Plugins/Playmaker/SendErrorEvent.cs
806
C#
namespace AspnetRunBasics.Settings; public class ApiSettings { public string GatewayAddress { get; set; } }
16
44
0.767857
[ "MIT" ]
shockzinfinity/shockz.msa
src/webApps/AspnetRunBasics/Settings/ApiSettings.cs
114
C#
namespace p02.ConvertFromBase_NToBase_10 { using System; using System.Numerics; using System.Collections.Generic; public class StartUp { public static void Main() { string[] lineOfDigits = Console.ReadLine().Split(); BigInteger baseToConvert = BigInteger.Parse(lineOfDigits[0]); char[] charredDigit = lineOfDigits[1].ToCharArray(); List<string> reversedIntList = new List<string>(); BigInteger sum = 0; for (int cycle2 = charredDigit.Length - 1; cycle2 >= 0; cycle2--) { reversedIntList.Add(charredDigit[cycle2].ToString()); } for (int cycle = 0; cycle < reversedIntList.Count; cycle++) { BigInteger digitToMultiply = BigInteger.Parse(reversedIntList[cycle]); sum += digitToMultiply * (BigInteger)Math.Pow((double)baseToConvert, cycle); } Console.WriteLine(sum); } } }
31.6875
92
0.575937
[ "MIT" ]
GitHarr/SoftUni
Homework/TechModule/ProgramingFundamentals-Normal/StringsAndTextProcessing-Exercises/p02.ConvertFromBase-NToBase-10/StartUp.cs
1,016
C#
using Microsoft.AspNetCore.Mvc.Rendering; using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace Equinox.Application.ViewModels { public class UserRolesViewModel { public UserRolesViewModel() { UserRoles = new List<SelectListItem>(); SelectedRoles = new List<String>(); } public String UserId { get; set; } public String Username { get; set; } public List<SelectListItem> UserRoles { get; set; } public List<String> SelectedRoles { get; set; } } }
28.136364
59
0.663974
[ "MIT" ]
duyxaoke/DEV
src/Equinox.Application/ViewModels/UserRolesViewModel.cs
621
C#
using ProfileData.DataLayer.Profile; namespace GlobalChange8.DataLayer.Profile { /// <summary> /// Profile manager container class. /// </summary> /// <remarks> /// Container class to provide access to individual profiles. /// </remarks> /// <author>Kenneth McSkimming</author> public class ProfileManager : IProfileManager { #region Properties public ProfileCache ProfileCache { get; set; } public ApplicationProfile ApplicationProfile { get; set; } public SystemProfile SystemProfile { get; set; } public UserSettings UserSettings { get; set; } #endregion #region Constructors. public ProfileManager() { ProfileCache = new ProfileCache(); ApplicationProfile = new ApplicationProfile(ProfileCache); SystemProfile = new SystemProfile(ProfileCache); if (SystemProfile.MasterCriteria != null) FileHelper.EnsureExists(SystemProfile.CurrentCriteria, SystemProfile.MasterCriteria); UserSettings = new UserSettings(ProfileCache); UserSettings.Load(SystemProfile.CurrentUserSettings, SystemProfile.MasterUserSettings); } #endregion } }
37.272727
139
0.66748
[ "Apache-2.0" ]
mcskik/Utilities
GlobalChange8/GlobalChange8/DataLayer/Profile/ProfileManager.cs
1,230
C#
namespace Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20191210Preview { using Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Runtime.PowerShell; /// <summary> /// A PowerShell PSTypeConverter to support converting to an instance of <see cref="ResourceProviderOperation" /> /// </summary> public partial class ResourceProviderOperationTypeConverter : global::System.Management.Automation.PSTypeConverter { /// <summary> /// Determines if the converter can convert the <see cref="sourceValue"/> parameter to the <see cref="destinationType" /> /// parameter. /// </summary> /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param> /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param> /// <returns> /// <c>true</c> if the converter can convert the <see cref="sourceValue"/> parameter to the <see cref="destinationType" /> /// parameter, otherwise <c>false</c>. /// </returns> public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// <summary> /// Determines if the converter can convert the <see cref="sourceValue"/> parameter to the <see cref="destinationType" /> /// parameter. /// </summary> /// <param name="sourceValue">the <see cref="System.Object" /> instance to check if it can be converted to the <see cref="ResourceProviderOperation" /// /> type.</param> /// <returns> /// <c>true</c> if the instance could be converted to a <see cref="ResourceProviderOperation" /> type, otherwise <c>false</c> /// </returns> public static bool CanConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return true; } global::System.Type type = sourceValue.GetType(); if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { // we say yest to PSObjects return true; } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { // we say yest to Hashtables/dictionaries return true; } try { if (null != sourceValue.ToJsonString()) { return true; } } catch { // Not one of our objects } try { string text = sourceValue.ToString()?.Trim(); return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Runtime.Json.JsonType.Object; } catch { // Doesn't look like it can be treated as JSON } return false; } /// <summary> /// Determines if the <see cref="sourceValue" /> parameter can be converted to the <see cref="destinationType" /> parameter /// </summary> /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param> /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param> /// <returns> /// <c>true</c> if the converter can convert the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> /// parameter, otherwise <c>false</c> /// </returns> public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// <summary> /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider" /// /> and <see cref="ignoreCase" /> /// </summary> /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param> /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param> /// <param name="formatProvider">not used by this TypeConverter.</param> /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param> /// <returns> /// an instance of <see cref="ResourceProviderOperation" />, or <c>null</c> if there is no suitable conversion. /// </returns> public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// <summary> /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider" /// /> and <see cref="ignoreCase" /> /// </summary> /// <param name="sourceValue">the value to convert into an instance of <see cref="ResourceProviderOperation" />.</param> /// <returns> /// an instance of <see cref="ResourceProviderOperation" />, or <c>null</c> if there is no suitable conversion. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20191210Preview.IResourceProviderOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20191210Preview.IResourceProviderOperation).IsAssignableFrom(type)) { return sourceValue; } try { return ResourceProviderOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { // Unable to use JSON pattern } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { return ResourceProviderOperation.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { return ResourceProviderOperation.DeserializeFromDictionary(sourceValue); } return null; } /// <summary>NotImplemented -- this will return <c>null</c></summary> /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param> /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param> /// <param name="formatProvider">not used by this TypeConverter.</param> /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param> /// <returns>will always return <c>null</c>.</returns> public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; } }
52.823944
273
0.593521
[ "MIT" ]
Avivskie/azure-powershell
src/DesktopVirtualization/generated/api/Models/Api20191210Preview/ResourceProviderOperation.TypeConverter.cs
7,360
C#
using System; namespace Sam.Extensions.EntityFramework.EFHooks { public class OrderAttribute : Attribute { public int Position { get; private set; } public OrderAttribute(int position) { Position = position; } } }
22.181818
68
0.680328
[ "MIT" ]
lionsoft/SampleSPA
Sam/Extensions/EntityFramework/EFHooks/OrderAttribute.cs
246
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Benchmark.Objects; using MessagePack; namespace Benchmark { class Program { static void Main(string[] args) { Console.WriteLine("Start"); t1(); /* Protobuf v.2.3.17 NetJSON v.1.2.5 Biser v.1.7 MessagePack 1.7.3.4 */ /* Start Protobuf obj length: 22 Biser Binary obj length: 17 NetJson obj length: 129 Biser Json obj length: 129 Message Pack obj length: 20 Protobuf encode: 1237 ms Protobuf decode: 1525 ms Biser Binary encode: 402 ms Biser Binary decode: 207 ms NetJson encode: 1314 ms NetJson decode: 1839 ms Biser Json encode: 2265 ms Biser Json decode: 3552 ms MessagePack encode: 223 ms MessagePack decode: 182 ms Press any key */ t2(); /* Start Protobuf obj length: 28 Biser Binary obj length: 20 NetJson obj length: 182 Biser Json obj length: 182 Message Pack obj length: 23 Protobuf encode: 1418 ms Protobuf decode: 1810 ms Biser Binary encode: 473 ms Biser Binary decode: 269 ms NetJson encode: 1634 ms NetJson decode: 2353 ms Biser Json encode: 2821 ms Biser Json decode: 4717 ms MessagePack encode: 279 ms MessagePack decode: 241 ms Press any key */ Console.WriteLine("Press any key"); Console.ReadLine(); } static void t1() { /* Start Protobuf obj length: 22 Biser Binary obj length: 17 NetJson obj length: 129 Biser Json obj length: 129 Protobuf encode: 1184 ms Protobuf decode: 1569 ms Biser Binary encode: 396 ms Biser Binary decode: 209 ms NetJson encode: 1350 ms NetJson decode: 1902 ms Biser Json encode: 2266 ms Biser Json decode: 3659 ms Press any key */ System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); // It's an operational class from https://github.com/hhblaze/Raft.Net/blob/master/Raft/StateMachine/StateLogEntry.cs StateLogEntry obj = new StateLogEntry() { Data = new byte[] { 1, 2, 3, 4, 5 }, Index = 458, IsCommitted = true, PreviousStateLogId = 4789, PreviousStateLogTerm = 447, RedirectId = 12, Term = 99 }; Console.WriteLine("t1----------------------------------"); //Protobuf. Warming up, getting length var pBt = obj.SerializeProtobuf(); Console.WriteLine($"Protobuf obj length: {pBt.Length}"); var pObj = pBt.DeserializeProtobuf<StateLogEntry>(); //Biser. Getting length var bBt = new Biser.Encoder().Add(obj).Encode(); Console.WriteLine($"Biser Binary obj length: {bBt.Length}"); var bObj = StateLogEntry.BiserDecode(bBt); //NetJson. Getting length var njss = NetJSON.NetJSON.Serialize(obj); Console.WriteLine($"NetJson obj length: {System.Text.Encoding.UTF8.GetBytes(njss).Length}"); var bnjss = NetJSON.NetJSON.Deserialize<StateLogEntry>(njss); //Biser Json. Getting length var bjss = new Biser.JsonEncoder(obj).GetJSON(); Console.WriteLine($"Biser Json obj length: {System.Text.Encoding.UTF8.GetBytes(bjss).Length}"); var bbjss = StateLogEntry.BiserJsonDecode(bjss); //Message Pack var mBt = MessagePackSerializer.Serialize(obj); Console.WriteLine($"Message Pack obj length: {mBt.Length}"); var mc2 = MessagePackSerializer.Deserialize<StateLogEntry>(mBt); Console.WriteLine(""); byte[] tbt = null; StateLogEntry tobj = null; sw.Start(); for (int i=0;i<1000000;i++) { tbt = obj.SerializeProtobuf(); } sw.Stop(); Console.WriteLine($"Protobuf encode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { tobj = pBt.DeserializeProtobuf<StateLogEntry>(); } sw.Stop(); Console.WriteLine($"Protobuf decode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { tbt = new Biser.Encoder().Add(obj).Encode(); } sw.Stop(); Console.WriteLine($"Biser Binary encode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { tobj = StateLogEntry.BiserDecode(bBt); } sw.Stop(); Console.WriteLine($"Biser Binary decode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { njss = NetJSON.NetJSON.Serialize(obj); } sw.Stop(); Console.WriteLine($"NetJson encode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { bnjss = NetJSON.NetJSON.Deserialize<StateLogEntry>(njss); } sw.Stop(); Console.WriteLine($"NetJson decode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { bjss = new Biser.JsonEncoder(obj).GetJSON(); } sw.Stop(); Console.WriteLine($"Biser Json encode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { bbjss = StateLogEntry.BiserJsonDecode(bjss); } sw.Stop(); Console.WriteLine($"Biser Json decode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { mBt = MessagePackSerializer.Serialize(obj); } sw.Stop(); Console.WriteLine($"MessagePack encode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { mc2 = MessagePackSerializer.Deserialize<StateLogEntry>(mBt); } sw.Stop(); Console.WriteLine($"MessagePack decode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); } static void t2() { /* Start Protobuf obj length: 28 Biser Binary obj length: 20 NetJson obj length: 182 Biser Json obj length: 182 Protobuf encode: 1367 ms Protobuf decode: 1909 ms Biser Binary encode: 464 ms Biser Binary decode: 271 ms NetJson encode: 1687 ms NetJson decode: 2383 ms Biser Json encode: 2871 ms Biser Json decode: 4748 ms Press any key */ System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); // It's an operational class from https://github.com/hhblaze/Raft.Net/blob/master/Raft/StateMachine/StateLogEntry.cs StateLogEntry sle = new StateLogEntry() { Data = new byte[] { 1, 2, 3, 4, 5 }, Index = 458, IsCommitted = true, PreviousStateLogId = 4789, PreviousStateLogTerm = 447, RedirectId = 12, Term = 99 }; // It's an operational class from https://github.com/hhblaze/Raft.Net/blob/master/Raft/Objects/StateLogEntrySuggestion.cs StateLogEntrySuggestion obj = new StateLogEntrySuggestion() { IsCommitted = true, LeaderTerm = 77, StateLogEntry = sle }; Console.WriteLine("t2----------------------------------"); //Protobuf. Warming up, getting length var pBt = obj.SerializeProtobuf(); Console.WriteLine($"Protobuf obj length: {pBt.Length}"); var pObj = pBt.DeserializeProtobuf<StateLogEntrySuggestion>(); //Biser. Getting length var bBt = new Biser.Encoder().Add(obj).Encode(); Console.WriteLine($"Biser Binary obj length: {bBt.Length}"); var bObj = StateLogEntry.BiserDecode(bBt); //NetJson. Getting length var njss = NetJSON.NetJSON.Serialize(obj); Console.WriteLine($"NetJson obj length: {System.Text.Encoding.UTF8.GetBytes(njss).Length}"); var bnjss = NetJSON.NetJSON.Deserialize<StateLogEntrySuggestion>(njss); //Biser Json. Getting length var bjss = new Biser.JsonEncoder(obj).GetJSON(); Console.WriteLine($"Biser Json obj length: {System.Text.Encoding.UTF8.GetBytes(bjss).Length}"); var bbjss = StateLogEntrySuggestion.BiserJsonDecode(bjss); //Message Pack var mBt = MessagePackSerializer.Serialize(obj); Console.WriteLine($"Message Pack obj length: {mBt.Length}"); var mc2 = MessagePackSerializer.Deserialize<StateLogEntrySuggestion>(mBt); Console.WriteLine(""); byte[] tbt = null; StateLogEntrySuggestion tobj = null; sw.Start(); for (int i = 0; i < 1000000; i++) { tbt = obj.SerializeProtobuf(); } sw.Stop(); Console.WriteLine($"Protobuf encode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { tobj = pBt.DeserializeProtobuf<StateLogEntrySuggestion>(); } sw.Stop(); Console.WriteLine($"Protobuf decode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { tbt = new Biser.Encoder().Add(obj).Encode(); } sw.Stop(); Console.WriteLine($"Biser Binary encode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { tobj = StateLogEntrySuggestion.BiserDecode(bBt); } sw.Stop(); Console.WriteLine($"Biser Binary decode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { njss = NetJSON.NetJSON.Serialize(obj); } sw.Stop(); Console.WriteLine($"NetJson encode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { bnjss = NetJSON.NetJSON.Deserialize<StateLogEntrySuggestion>(njss); } sw.Stop(); Console.WriteLine($"NetJson decode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { bjss = new Biser.JsonEncoder(obj).GetJSON(); } sw.Stop(); Console.WriteLine($"Biser Json encode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { bbjss = StateLogEntrySuggestion.BiserJsonDecode(bjss); } sw.Stop(); Console.WriteLine($"Biser Json decode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { mBt = MessagePackSerializer.Serialize(obj); } sw.Stop(); Console.WriteLine($"MessagePack encode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); sw.Start(); for (int i = 0; i < 1000000; i++) { mc2 = MessagePackSerializer.Deserialize<StateLogEntrySuggestion>(mBt); } sw.Stop(); Console.WriteLine($"MessagePack decode: {sw.ElapsedMilliseconds} ms"); sw.Reset(); } } }
34.135468
134
0.473772
[ "BSD-2-Clause" ]
hhblaze/Biser
Benchmark/Program.cs
13,861
C#
using AutoMapper; using DDNSUpdate.Application.Providers.DigitalOcean.Requests; using DDNSUpdate.Domain; namespace DDNSUpdate.Application.Providers.DigitalOcean.Converters { public class DNSRecordToDigitalOceanUpdateDomainRecordRequestConverter : ITypeConverter<DNSRecord, DigitalOceanUpdateDomainRecordRequest> { public DigitalOceanUpdateDomainRecordRequest Convert(DNSRecord record, DigitalOceanUpdateDomainRecordRequest? request, ResolutionContext context) { request ??= new DigitalOceanUpdateDomainRecordRequest(); request.Data = record.Data; request.Flags = record.Flags; request.Id = record.Id!; request.Name = record.Name; request.Port = record.Port; request.Priority = record.Priority; request.Tag = record.Tag; request.Ttl = record.TTL; request.Type = record.Type.Value; request.Weight = record.Weight; return request; } } }
39.076923
153
0.683071
[ "MIT" ]
TheDanielDoyle/DDNSUpdate
src/DDNSUpdate/Application/Providers/DigitalOcean/Converters/DNSRecordToDigitalOceanUpdateDomainRecordRequestConverter.cs
1,018
C#
using System.Threading.Tasks; namespace SignalR.Hubs { /// <summary> /// Enables disconnect notificatins for a <see cref="IHub"/> /// </summary> /// <example> /// public class MyHub : Hub, IDisconnect /// { /// public Task Disconnect() /// { /// // Tell everyone this connection is gone /// return Clients.notifyLeave(Context.ConnectionId); /// } /// } /// </example> public interface IDisconnect { /// <summary> /// Called when a connection is disconnected from the <see cref="IHub"/>. /// </summary> /// <remarks> /// This method is invoked from the server side which means the only valid property on the <see cref="HubCallerContext"/> /// is the connection id. /// </remarks> Task Disconnect(); } }
28.666667
129
0.551163
[ "MIT" ]
Icenium/SignalR
SignalR/Hubs/IDisconnect.cs
862
C#
using Microsoft.AspNetCore.Http; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; using System; using System.IO; using System.Linq; using System.Threading.Tasks; using System.Security.Cryptography; using System.Text; using Microsoft.Extensions.Configuration; using System.Net.Http; using System.Collections.Generic; using Proxylib; using Healthcare.Proofing; using Healthcare.BC.Offchain.Repository.Models; namespace Healthcare.Proofing.Service { public class ProofStorage { private string storageConnectionString; //blob storage connection private string apiEndPoint; //for proxy connection private CloudStorageAccount storageAccount; private CloudBlobClient blobClient; private IConfiguration _configuration; public ProofStorage(IConfiguration configuration) { _configuration = configuration; storageConnectionString = _configuration["proofvault_connectionstring"]; apiEndPoint = _configuration["api_endpoint"]; storageAccount = CloudStorageAccount.Parse(storageConnectionString); blobClient = storageAccount.CreateCloudBlobClient(); } async public Task<DocProof> PutProof(string bindingId, string citizenIdentifier, Microsoft.AspNetCore.Http.IFormFile proofDocs = null) { //create storage container and set permissions CloudBlobContainer container = blobClient.GetContainerReference(bindingId); await container.CreateIfNotExistsAsync(); BlobContainerPermissions permissions = new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Off }; await container.SetPermissionsAsync(permissions); CloudBlockBlob blockBlob = container.GetBlockBlobReference(citizenIdentifier); // string fileString = ""; byte[] fileHash = null; using (var fileStream = proofDocs.OpenReadStream()) { await blockBlob.UploadFromStreamAsync(fileStream); fileStream.Seek(0, SeekOrigin.Begin); using (var md5 = MD5.Create()) { fileHash = md5.ComputeHash(fileStream); } } var storedProofDocs = new DocProof() { Container = bindingId, ContentType = proofDocs.ContentType, FileName = citizenIdentifier, Hash = GetHash(bindingId, Encoding.UTF8.GetString(fileHash)), StorageSharding = "none" }; //Update profile with proof document info //Should be controlled by Application -- Commented by DB //await UpdateProofDocument(bindingId, storedProofDocs, "The Proof document was proven and stored"); return await Task.Run(() => storedProofDocs); } async public Task<bool> ValidateHash(string bindingId, string citizenIdentifier, string hash) { CloudBlobContainer container = blobClient.GetContainerReference(bindingId); CloudBlockBlob blockBlob = container.GetBlockBlobReference(citizenIdentifier); //string fileString = ""; byte[] fileHash = null; using (var fileStream = new MemoryStream()) { await blockBlob.DownloadToStreamAsync(fileStream); fileStream.Seek(0, SeekOrigin.Begin); using (var md5 = MD5.Create()) { fileHash = md5.ComputeHash(fileStream); } //fileString = fileStream.ToString(); } //System.Diagnostics.Debugger.Break(); return (hash == GetHash(bindingId, Encoding.UTF8.GetString(fileHash))); } async public Task<string> GetProof(string bindingId, string citizenIdentifier) { CloudBlobContainer container = blobClient.GetContainerReference(bindingId); CloudBlockBlob blockBlob = container.GetBlockBlobReference(citizenIdentifier); //set sasToken time constraints SharedAccessBlobPolicy sasConstraints = new SharedAccessBlobPolicy(); sasConstraints.SharedAccessStartTime = DateTimeOffset.UtcNow.AddMinutes(-5); sasConstraints.SharedAccessExpiryTime = DateTimeOffset.UtcNow.AddMinutes(5); sasConstraints.Permissions = SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.Write; string sasBlobToken = blockBlob.GetSharedAccessSignature(sasConstraints); return await Task.Run(() => $"{blockBlob.Uri + sasBlobToken}"); } private string GetHash(string bindingId, string fileString) { using (var algorithm = SHA256.Create()) { var hashedBytes = algorithm.ComputeHash(Encoding.UTF8.GetBytes(bindingId + fileString)); return BitConverter.ToString(hashedBytes).Replace("-", ""); } } } }
38.268116
143
0.622609
[ "MIT" ]
Bhaskers-Blu-Org2/Healthcare-Blockchain-Solution-Accelerator
03_Application_Deployment/src/Healthcare.Proofing/Healthcare.Proofing.Service/ProofStorageService.cs
5,283
C#
using System; using System.Linq; using System.IO; using ECommon.Logging; using log4net; using log4net.Appender; using log4net.Config; using log4net.Layout; namespace ECommon.Log4Net { /// <summary>Log4Net based logger factory. /// </summary> public class Log4NetLoggerFactory : ILoggerFactory { private readonly string loggerRepository; /// <summary>Parameterized constructor. /// </summary> /// <param name="configFile"></param> /// <param name="loggerRepository"></param> public Log4NetLoggerFactory(string configFile, string loggerRepository = "NetStandardRepository") { this.loggerRepository = loggerRepository; var file = new FileInfo(configFile); if (!file.Exists) { file = new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, configFile)); } var repositories = LogManager.GetAllRepositories(); if (repositories != null && repositories.Any(x => x.Name == loggerRepository)) { return; } var repository = LogManager.CreateRepository(loggerRepository); if (file.Exists) { XmlConfigurator.ConfigureAndWatch(repository, file); } else { BasicConfigurator.Configure(repository, new ConsoleAppender { Layout = new PatternLayout() }); } } /// <summary>Create a new Log4NetLogger instance. /// </summary> /// <param name="name"></param> /// <returns></returns> public ILogger Create(string name) { return new Log4NetLogger(LogManager.GetLogger(loggerRepository, name)); } /// <summary>Create a new Log4NetLogger instance. /// </summary> /// <param name="type"></param> /// <returns></returns> public ILogger Create(Type type) { return new Log4NetLogger(LogManager.GetLogger(loggerRepository, type)); } } }
31.757576
110
0.583492
[ "MIT" ]
DrDao/ecommon
src/ECommon.Log4Net/Log4NetLoggerFactory.cs
2,098
C#
/* * Tester.PCL * * This file was automatically generated for Stamplay by APIMATIC v2.0 ( https://apimatic.io ) on 08/09/2016 */ using System; using System.Collections.Generic; using System.Dynamic; using System.Globalization; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using Tester.PCL; using Tester.PCL.Http.Request; using Tester.PCL.Http.Response; using Tester.PCL.Http.Client; using Tester.PCL.Exceptions; using Tester.PCL.Models; namespace Tester.PCL.Controllers { public partial class QueryParamController: BaseController, IQueryParamController { #region Singleton Pattern //private static variables for the singleton pattern private static object syncObject = new object(); private static QueryParamController instance = null; /// <summary> /// Singleton pattern implementation /// </summary> internal static QueryParamController Instance { get { lock (syncObject) { if (null == instance) { instance = new QueryParamController(); } } return instance; } } #endregion Singleton Pattern /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="boolean">Required parameter: Example: </param> /// <param name="number">Required parameter: Example: </param> /// <param name="mstring">Required parameter: Example: </param> /// <param name="queryParameters">Additional optional query parameters are supported by this endpoint</param> /// <return>Returns the ServerResponse response from the API call</return> public ServerResponse SimpleQuery( bool boolean, int number, string mstring, Dictionary<string, object> queryParameters = null) { Task<ServerResponse> t = SimpleQueryAsync(boolean, number, mstring, queryParameters); Task.WaitAll(t); return t.Result; } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="boolean">Required parameter: Example: </param> /// <param name="number">Required parameter: Example: </param> /// <param name="mstring">Required parameter: Example: </param> /// <param name="queryParameters">Additional optional query parameters are supported by this endpoint</param> /// <return>Returns the ServerResponse response from the API call</return> public async Task<ServerResponse> SimpleQueryAsync( bool boolean, int number, string mstring, Dictionary<string, object> queryParameters = null) { //validating required parameters if (null == mstring) throw new ArgumentNullException("mstring", "The parameter \"mstring\" is a required parameter and cannot be null."); //the base uri for api requestss string _baseUri = Configuration.BaseUri; //prepare query string for API call StringBuilder _queryBuilder = new StringBuilder(_baseUri); _queryBuilder.Append("/query"); //process optional query parameters APIHelper.AppendUrlWithQueryParameters(_queryBuilder, new Dictionary<string, object>() { { "boolean", boolean }, { "number", number }, { "string", mstring } }); //append optional parameters to the query APIHelper.AppendUrlWithQueryParameters(_queryBuilder, queryParameters); //validate and preprocess url string _queryUrl = APIHelper.CleanUrl(_queryBuilder); //append request with appropriate headers and parameters var _headers = new Dictionary<string,string>() { { "user-agent", "Stamplay SDK" }, { "accept", "application/json" } }; //prepare the API call request to fetch the response HttpRequest _request = ClientInstance.Get(_queryUrl,_headers); //invoke request and get response HttpStringResponse _response = (HttpStringResponse) await ClientInstance.ExecuteAsStringAsync(_request); HttpContext _context = new HttpContext(_request,_response); //handle errors defined at the API level base.ValidateResponse(_response, _context); try { return APIHelper.JsonDeserialize<ServerResponse>(_response.Body); } catch (Exception _ex) { throw new APIException("Failed to parse the response: " + _ex.Message, _context); } } /// <summary> /// TODO: type endpoint description here /// </summary> /// <return>Returns the ServerResponse response from the API call</return> public ServerResponse NoParams() { Task<ServerResponse> t = NoParamsAsync(); Task.WaitAll(t); return t.Result; } /// <summary> /// TODO: type endpoint description here /// </summary> /// <return>Returns the ServerResponse response from the API call</return> public async Task<ServerResponse> NoParamsAsync() { //the base uri for api requestss string _baseUri = Configuration.BaseUri; //prepare query string for API call StringBuilder _queryBuilder = new StringBuilder(_baseUri); _queryBuilder.Append("/query/noparams"); //validate and preprocess url string _queryUrl = APIHelper.CleanUrl(_queryBuilder); //append request with appropriate headers and parameters var _headers = new Dictionary<string,string>() { { "user-agent", "Stamplay SDK" }, { "accept", "application/json" } }; //prepare the API call request to fetch the response HttpRequest _request = ClientInstance.Get(_queryUrl,_headers); //invoke request and get response HttpStringResponse _response = (HttpStringResponse) await ClientInstance.ExecuteAsStringAsync(_request); HttpContext _context = new HttpContext(_request,_response); //handle errors defined at the API level base.ValidateResponse(_response, _context); try { return APIHelper.JsonDeserialize<ServerResponse>(_response.Body); } catch (Exception _ex) { throw new APIException("Failed to parse the response: " + _ex.Message, _context); } } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="mstring">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public ServerResponse StringParam(string mstring) { Task<ServerResponse> t = StringParamAsync(mstring); Task.WaitAll(t); return t.Result; } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="mstring">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public async Task<ServerResponse> StringParamAsync(string mstring) { //validating required parameters if (null == mstring) throw new ArgumentNullException("mstring", "The parameter \"mstring\" is a required parameter and cannot be null."); //the base uri for api requestss string _baseUri = Configuration.BaseUri; //prepare query string for API call StringBuilder _queryBuilder = new StringBuilder(_baseUri); _queryBuilder.Append("/query/stringparam"); //process optional query parameters APIHelper.AppendUrlWithQueryParameters(_queryBuilder, new Dictionary<string, object>() { { "string", mstring } }); //validate and preprocess url string _queryUrl = APIHelper.CleanUrl(_queryBuilder); //append request with appropriate headers and parameters var _headers = new Dictionary<string,string>() { { "user-agent", "Stamplay SDK" }, { "accept", "application/json" } }; //prepare the API call request to fetch the response HttpRequest _request = ClientInstance.Get(_queryUrl,_headers); //invoke request and get response HttpStringResponse _response = (HttpStringResponse) await ClientInstance.ExecuteAsStringAsync(_request); HttpContext _context = new HttpContext(_request,_response); //handle errors defined at the API level base.ValidateResponse(_response, _context); try { return APIHelper.JsonDeserialize<ServerResponse>(_response.Body); } catch (Exception _ex) { throw new APIException("Failed to parse the response: " + _ex.Message, _context); } } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="url">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public ServerResponse UrlParam(string url) { Task<ServerResponse> t = UrlParamAsync(url); Task.WaitAll(t); return t.Result; } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="url">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public async Task<ServerResponse> UrlParamAsync(string url) { //validating required parameters if (null == url) throw new ArgumentNullException("url", "The parameter \"url\" is a required parameter and cannot be null."); //the base uri for api requestss string _baseUri = Configuration.BaseUri; //prepare query string for API call StringBuilder _queryBuilder = new StringBuilder(_baseUri); _queryBuilder.Append("/query/urlparam"); //process optional query parameters APIHelper.AppendUrlWithQueryParameters(_queryBuilder, new Dictionary<string, object>() { { "url", url } }); //validate and preprocess url string _queryUrl = APIHelper.CleanUrl(_queryBuilder); //append request with appropriate headers and parameters var _headers = new Dictionary<string,string>() { { "user-agent", "Stamplay SDK" }, { "accept", "application/json" } }; //prepare the API call request to fetch the response HttpRequest _request = ClientInstance.Get(_queryUrl,_headers); //invoke request and get response HttpStringResponse _response = (HttpStringResponse) await ClientInstance.ExecuteAsStringAsync(_request); HttpContext _context = new HttpContext(_request,_response); //handle errors defined at the API level base.ValidateResponse(_response, _context); try { return APIHelper.JsonDeserialize<ServerResponse>(_response.Body); } catch (Exception _ex) { throw new APIException("Failed to parse the response: " + _ex.Message, _context); } } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="number">Required parameter: Example: </param> /// <param name="precision">Required parameter: Example: </param> /// <param name="mstring">Required parameter: Example: </param> /// <param name="url">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public ServerResponse MultipleParams( int number, double precision, string mstring, string url) { Task<ServerResponse> t = MultipleParamsAsync(number, precision, mstring, url); Task.WaitAll(t); return t.Result; } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="number">Required parameter: Example: </param> /// <param name="precision">Required parameter: Example: </param> /// <param name="mstring">Required parameter: Example: </param> /// <param name="url">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public async Task<ServerResponse> MultipleParamsAsync( int number, double precision, string mstring, string url) { //validating required parameters if (null == mstring) throw new ArgumentNullException("mstring", "The parameter \"mstring\" is a required parameter and cannot be null."); if (null == url) throw new ArgumentNullException("url", "The parameter \"url\" is a required parameter and cannot be null."); //the base uri for api requestss string _baseUri = Configuration.BaseUri; //prepare query string for API call StringBuilder _queryBuilder = new StringBuilder(_baseUri); _queryBuilder.Append("/query/multipleparams"); //process optional query parameters APIHelper.AppendUrlWithQueryParameters(_queryBuilder, new Dictionary<string, object>() { { "number", number }, { "precision", precision }, { "string", mstring }, { "url", url } }); //validate and preprocess url string _queryUrl = APIHelper.CleanUrl(_queryBuilder); //append request with appropriate headers and parameters var _headers = new Dictionary<string,string>() { { "user-agent", "Stamplay SDK" }, { "accept", "application/json" } }; //prepare the API call request to fetch the response HttpRequest _request = ClientInstance.Get(_queryUrl,_headers); //invoke request and get response HttpStringResponse _response = (HttpStringResponse) await ClientInstance.ExecuteAsStringAsync(_request); HttpContext _context = new HttpContext(_request,_response); //handle errors defined at the API level base.ValidateResponse(_response, _context); try { return APIHelper.JsonDeserialize<ServerResponse>(_response.Body); } catch (Exception _ex) { throw new APIException("Failed to parse the response: " + _ex.Message, _context); } } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="integers">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public ServerResponse NumberArray(List<int> integers) { Task<ServerResponse> t = NumberArrayAsync(integers); Task.WaitAll(t); return t.Result; } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="integers">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public async Task<ServerResponse> NumberArrayAsync(List<int> integers) { //validating required parameters if (null == integers) throw new ArgumentNullException("integers", "The parameter \"integers\" is a required parameter and cannot be null."); //the base uri for api requestss string _baseUri = Configuration.BaseUri; //prepare query string for API call StringBuilder _queryBuilder = new StringBuilder(_baseUri); _queryBuilder.Append("/query/numberarray"); //process optional query parameters APIHelper.AppendUrlWithQueryParameters(_queryBuilder, new Dictionary<string, object>() { { "integers", integers } }); //validate and preprocess url string _queryUrl = APIHelper.CleanUrl(_queryBuilder); //append request with appropriate headers and parameters var _headers = new Dictionary<string,string>() { { "user-agent", "Stamplay SDK" }, { "accept", "application/json" } }; //prepare the API call request to fetch the response HttpRequest _request = ClientInstance.Get(_queryUrl,_headers); //invoke request and get response HttpStringResponse _response = (HttpStringResponse) await ClientInstance.ExecuteAsStringAsync(_request); HttpContext _context = new HttpContext(_request,_response); //handle errors defined at the API level base.ValidateResponse(_response, _context); try { return APIHelper.JsonDeserialize<ServerResponse>(_response.Body); } catch (Exception _ex) { throw new APIException("Failed to parse the response: " + _ex.Message, _context); } } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="strings">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public ServerResponse StringArray(List<string> strings) { Task<ServerResponse> t = StringArrayAsync(strings); Task.WaitAll(t); return t.Result; } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="strings">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public async Task<ServerResponse> StringArrayAsync(List<string> strings) { //validating required parameters if (null == strings) throw new ArgumentNullException("strings", "The parameter \"strings\" is a required parameter and cannot be null."); //the base uri for api requestss string _baseUri = Configuration.BaseUri; //prepare query string for API call StringBuilder _queryBuilder = new StringBuilder(_baseUri); _queryBuilder.Append("/query/stringarray"); //process optional query parameters APIHelper.AppendUrlWithQueryParameters(_queryBuilder, new Dictionary<string, object>() { { "strings", strings } }); //validate and preprocess url string _queryUrl = APIHelper.CleanUrl(_queryBuilder); //append request with appropriate headers and parameters var _headers = new Dictionary<string,string>() { { "user-agent", "Stamplay SDK" }, { "accept", "application/json" } }; //prepare the API call request to fetch the response HttpRequest _request = ClientInstance.Get(_queryUrl,_headers); //invoke request and get response HttpStringResponse _response = (HttpStringResponse) await ClientInstance.ExecuteAsStringAsync(_request); HttpContext _context = new HttpContext(_request,_response); //handle errors defined at the API level base.ValidateResponse(_response, _context); try { return APIHelper.JsonDeserialize<ServerResponse>(_response.Body); } catch (Exception _ex) { throw new APIException("Failed to parse the response: " + _ex.Message, _context); } } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="days">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public ServerResponse StringEnumArray(List<Days> days) { Task<ServerResponse> t = StringEnumArrayAsync(days); Task.WaitAll(t); return t.Result; } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="days">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public async Task<ServerResponse> StringEnumArrayAsync(List<Days> days) { //validating required parameters if (null == days) throw new ArgumentNullException("days", "The parameter \"days\" is a required parameter and cannot be null."); //the base uri for api requestss string _baseUri = Configuration.BaseUri; //prepare query string for API call StringBuilder _queryBuilder = new StringBuilder(_baseUri); _queryBuilder.Append("/query/stringenumarray"); //process optional query parameters APIHelper.AppendUrlWithQueryParameters(_queryBuilder, new Dictionary<string, object>() { { "days", DaysHelper.ToValue(days) } }); //validate and preprocess url string _queryUrl = APIHelper.CleanUrl(_queryBuilder); //append request with appropriate headers and parameters var _headers = new Dictionary<string,string>() { { "user-agent", "Stamplay SDK" }, { "accept", "application/json" } }; //prepare the API call request to fetch the response HttpRequest _request = ClientInstance.Get(_queryUrl,_headers); //invoke request and get response HttpStringResponse _response = (HttpStringResponse) await ClientInstance.ExecuteAsStringAsync(_request); HttpContext _context = new HttpContext(_request,_response); //handle errors defined at the API level base.ValidateResponse(_response, _context); try { return APIHelper.JsonDeserialize<ServerResponse>(_response.Body); } catch (Exception _ex) { throw new APIException("Failed to parse the response: " + _ex.Message, _context); } } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="suites">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public ServerResponse IntegerEnumArray(List<SuiteCode> suites) { Task<ServerResponse> t = IntegerEnumArrayAsync(suites); Task.WaitAll(t); return t.Result; } /// <summary> /// TODO: type endpoint description here /// </summary> /// <param name="suites">Required parameter: Example: </param> /// <return>Returns the ServerResponse response from the API call</return> public async Task<ServerResponse> IntegerEnumArrayAsync(List<SuiteCode> suites) { //validating required parameters if (null == suites) throw new ArgumentNullException("suites", "The parameter \"suites\" is a required parameter and cannot be null."); //the base uri for api requestss string _baseUri = Configuration.BaseUri; //prepare query string for API call StringBuilder _queryBuilder = new StringBuilder(_baseUri); _queryBuilder.Append("/query/integerenumarray"); //process optional query parameters APIHelper.AppendUrlWithQueryParameters(_queryBuilder, new Dictionary<string, object>() { { "suites", SuiteCodeHelper.ToValue(suites) } }); //validate and preprocess url string _queryUrl = APIHelper.CleanUrl(_queryBuilder); //append request with appropriate headers and parameters var _headers = new Dictionary<string,string>() { { "user-agent", "Stamplay SDK" }, { "accept", "application/json" } }; //prepare the API call request to fetch the response HttpRequest _request = ClientInstance.Get(_queryUrl,_headers); //invoke request and get response HttpStringResponse _response = (HttpStringResponse) await ClientInstance.ExecuteAsStringAsync(_request); HttpContext _context = new HttpContext(_request,_response); //handle errors defined at the API level base.ValidateResponse(_response, _context); try { return APIHelper.JsonDeserialize<ServerResponse>(_response.Body); } catch (Exception _ex) { throw new APIException("Failed to parse the response: " + _ex.Message, _context); } } } }
39.349183
134
0.586323
[ "MIT" ]
mnaumanali94/CSHARP-SDK
Tester.PCL/Controllers/QueryParamController.cs
26,482
C#
using System; using System.Windows.Input; namespace Coffee.Security.Authentication.Input { public class AuthCommand<T> : ICommand { #region Fields private Action<T> action; private string node; #endregion #region Constructors public AuthCommand(Action<T> action, String node = null) { this.action = action; this.node = node; } #endregion #region Events public event EventHandler CanExecuteChanged; #endregion #region Methods public bool CanExecute(object parameter) { return (string.IsNullOrEmpty(node) ? true : User.HasNode(node)); } public void Execute(object parameter) { if (CanExecute(parameter) && action != null && parameter is T) action.Invoke((T)parameter); } protected void OnCanExecuteChanged() { CanExecuteChanged?.Invoke(this, EventArgs.Empty); } #endregion } }
19.285714
76
0.555556
[ "MIT" ]
g3ntle/Coffee.Security
src/Coffee.Security/Authentication/Input/AuthCommandGeneric.cs
1,082
C#
using Microsoft.EntityFrameworkCore.Migrations; namespace buildeR.DAL.Migrations { public partial class AddNotificationSetting : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "NotificationSettings", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:Identity", "1, 1"), UserId = table.Column<int>(nullable: false), NotificationType = table.Column<int>(nullable: false), App = table.Column<bool>(nullable: false), Email = table.Column<bool>(nullable: false) }, constraints: table => { table.PrimaryKey("PK_NotificationSettings", x => x.Id); table.ForeignKey( name: "FK_NotificationSettings_Users_UserId", column: x => x.UserId, principalTable: "Users", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_NotificationSettings_UserId", table: "NotificationSettings", column: "UserId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "NotificationSettings"); } } }
37.090909
75
0.514093
[ "MIT" ]
BinaryStudioAcademy/bsa-2020-buildeR
backend/buildeR.DAL/Migrations/20200819091945_AddNotificationSetting.cs
1,634
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.md file in the project root for more information. using System.Collections.Generic; using System.ComponentModel.Composition; using System.Linq; using System.Threading.Tasks; using Microsoft.Build.Framework.XamlTypes; using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.LanguageServices; using Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem; namespace Microsoft.VisualStudio.ProjectSystem.Properties { /// <summary> /// Returns the set of Startup objects (or entry point types) in a project. /// </summary> [ExportDynamicEnumValuesProvider("StartupObjectsEnumProvider")] [AppliesTo(ProjectCapability.CSharpOrVisualBasic)] internal class StartupObjectsEnumProvider : IDynamicEnumValuesProvider { private readonly Workspace _workspace; private readonly UnconfiguredProject _unconfiguredProject; [ImportingConstructor] public StartupObjectsEnumProvider([Import(typeof(VisualStudioWorkspace))] Workspace workspace, UnconfiguredProject project) { _workspace = workspace; _unconfiguredProject = project; } public Task<IDynamicEnumValuesGenerator> GetProviderAsync(IList<NameValuePair>? options) { return Task.FromResult<IDynamicEnumValuesGenerator>(new StartupObjectsEnumGenerator(_workspace, _unconfiguredProject)); } } internal class StartupObjectsEnumGenerator : IDynamicEnumValuesGenerator { public bool AllowCustomValues => true; private readonly Workspace _workspace; private readonly UnconfiguredProject _unconfiguredProject; /// <summary> /// When we implement WinForms support, we need to set this for VB WinForms projects /// </summary> private static bool SearchForEntryPointsInFormsOnly => false; [ImportingConstructor] public StartupObjectsEnumGenerator(Workspace workspace, UnconfiguredProject project) { _workspace = workspace; _unconfiguredProject = project; } public async Task<ICollection<IEnumValue>> GetListedValuesAsync() { Project project = _workspace.CurrentSolution.Projects.First(p => PathHelper.IsSamePath(p.FilePath, _unconfiguredProject.FullPath)); Compilation? compilation = await project.GetCompilationAsync(); IEntryPointFinderService? entryPointFinderService = project.LanguageServices.GetService<IEntryPointFinderService>(); IEnumerable<INamedTypeSymbol>? entryPoints = entryPointFinderService?.FindEntryPoints(compilation?.GlobalNamespace, SearchForEntryPointsInFormsOnly); IEnumerable<string> entryPointNames = entryPoints.Select(e => e.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted))); return entryPointNames.Select(name => (IEnumValue)new PageEnumValue(new EnumValue { Name = name, DisplayName = name })).ToArray(); } public Task<IEnumValue?> TryCreateEnumValueAsync(string userSuppliedValue) { var value = new PageEnumValue(new EnumValue { Name = userSuppliedValue, DisplayName = userSuppliedValue }); return Task.FromResult<IEnumValue?>(value); } } }
47.743243
204
0.720917
[ "MIT" ]
77-A/.Net-Project
src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Properties/StartupObjectsEnumProvider.cs
3,462
C#
namespace nuPickers.PropertyEditors.SqlCheckBoxPicker { using nuPickers.EmbeddedResource; using Umbraco.Core.PropertyEditors; internal class SqlCheckBoxPickerPreValueEditor : PreValueEditor { [PreValueField("dataSource", "", EmbeddedResource.ROOT_URL + "SqlDataSource/SqlDataSourceConfig.html", HideLabel = true)] public string DataSource { get; set; } [PreValueField("customLabel", "Label Macro", EmbeddedResource.ROOT_URL + "CustomLabel/CustomLabelConfig.html", HideLabel = true)] public string CustomLabel { get; set; } [PreValueField("checkBoxPicker", "", EmbeddedResource.ROOT_URL + "CheckBoxPicker/CheckBoxPickerConfig.html", HideLabel = true)] public string CheckBoxPicker { get; set; } [PreValueField("layoutDirection", "Layout Direction", EmbeddedResource.ROOT_URL + "LayoutDirection/LayoutDirectionConfig.html")] public string LayoutDirection { get; set; } [PreValueField("relationMapping", "", EmbeddedResource.ROOT_URL + "RelationMapping/RelationMappingConfig.html", HideLabel = true)] public string RelationMapping { get; set; } [PreValueField("saveFormat", "Save Format", EmbeddedResource.ROOT_URL + "SaveFormat/SaveFormatConfig.html")] public string SaveFormat { get; set; } } }
50.615385
138
0.723404
[ "MIT" ]
OxygenAS/nuPickers
source/nuPickers/PropertyEditors/SqlCheckBoxPicker/SqlCheckBoxPickerPreValueEditor.cs
1,318
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.ApiManagement.V20170301.Outputs { /// <summary> /// Operation request details. /// </summary> [OutputType] public sealed class RequestContractResponse { /// <summary> /// Operation request description. /// </summary> public readonly string? Description; /// <summary> /// Collection of operation request headers. /// </summary> public readonly ImmutableArray<Outputs.ParameterContractResponse> Headers; /// <summary> /// Collection of operation request query parameters. /// </summary> public readonly ImmutableArray<Outputs.ParameterContractResponse> QueryParameters; /// <summary> /// Collection of operation request representations. /// </summary> public readonly ImmutableArray<Outputs.RepresentationContractResponse> Representations; [OutputConstructor] private RequestContractResponse( string? description, ImmutableArray<Outputs.ParameterContractResponse> headers, ImmutableArray<Outputs.ParameterContractResponse> queryParameters, ImmutableArray<Outputs.RepresentationContractResponse> representations) { Description = description; Headers = headers; QueryParameters = queryParameters; Representations = representations; } } }
33.056604
95
0.664384
[ "Apache-2.0" ]
polivbr/pulumi-azure-native
sdk/dotnet/ApiManagement/V20170301/Outputs/RequestContractResponse.cs
1,752
C#
using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Reflection.PortableExecutable; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Lunar.Native.Structures; using Lunar.PortableExecutable.Structures; namespace Lunar.PortableExecutable.DataDirectories { internal sealed class ImportDirectory : DataDirectory { internal ImmutableArray<ImportDescriptor> ImportDescriptors { get; } internal ImportDirectory(ReadOnlyMemory<byte> peBytes, PEHeaders peHeaders) : base(peBytes, peHeaders) { ImportDescriptors = ReadImportDescriptors().ToImmutableArray(); } private IEnumerable<ImportDescriptor> ReadImportDescriptors() { // Calculate the import table offset if (!PeHeaders.TryGetDirectoryOffset(PeHeaders.PEHeader.ImportTableDirectory, out var importTableOffset)) { yield break; } for (var descriptorIndex = 0;; descriptorIndex ++) { // Read the import descriptor var descriptorOffset = importTableOffset + Unsafe.SizeOf<ImageImportDescriptor>() * descriptorIndex; var descriptor = MemoryMarshal.Read<ImageImportDescriptor>(PeBytes.Slice(descriptorOffset).Span); if (descriptor.Name == 0) { break; } // Read the import descriptor name var descriptorNameOffset = RvaToOffset(descriptor.Name); var descriptorName = ReadNullTerminatedString(descriptorNameOffset); // Read the functions imported under the import descriptor var descriptorThunkOffset = descriptor.OriginalFirstThunk == 0 ? RvaToOffset(descriptor.FirstThunk) : RvaToOffset(descriptor.OriginalFirstThunk); var importAddressTableOffset = RvaToOffset(descriptor.FirstThunk); var importedFunctions = ReadImportedFunctions(descriptorThunkOffset, importAddressTableOffset); yield return new ImportDescriptor(importedFunctions, descriptorName); } } private IEnumerable<ImportedFunction> ReadImportedFunctions(int descriptorThunkOffset, int importAddressTableOffset) { for (var functionIndex = 0;; functionIndex ++) { int functionOffset; int functionDataOffset; if (PeHeaders.PEHeader.Magic == PEMagic.PE32) { // Read the thunk data of the function var functionThunkDataOffset = descriptorThunkOffset + sizeof(int) * functionIndex; var functionThunkData = MemoryMarshal.Read<int>(PeBytes.Slice(functionThunkDataOffset).Span); if (functionThunkData == 0) { break; } // Calculate the offset of the function functionOffset = importAddressTableOffset + sizeof(int) * functionIndex; // Determine if the function is imported via ordinal if ((functionThunkData & int.MinValue) != 0) { yield return new ImportedFunction(null, functionOffset, functionThunkData & ushort.MaxValue); continue; } functionDataOffset = RvaToOffset(functionThunkData); } else { // Read the thunk data of the function var functionThunkDataOffset = descriptorThunkOffset + sizeof(long) * functionIndex; var functionThunkData = MemoryMarshal.Read<long>(PeBytes.Slice(functionThunkDataOffset).Span); if (functionThunkData == 0) { break; } // Calculate the offset of the function functionOffset = importAddressTableOffset + sizeof(long) * functionIndex; // Determine if the function is imported via ordinal if ((functionThunkData & long.MinValue) != 0) { yield return new ImportedFunction(null, functionOffset, (int) functionThunkData & ushort.MaxValue); continue; } functionDataOffset = RvaToOffset((int) functionThunkData); } // Read the name of the function var functionName = ReadNullTerminatedString(functionDataOffset + sizeof(short)); // Read the ordinal of the function var functionOrdinal = MemoryMarshal.Read<short>(PeBytes.Slice(functionDataOffset).Span); yield return new ImportedFunction(functionName, functionOffset, functionOrdinal); } } } }
36.683453
161
0.582075
[ "MIT" ]
Aekras1a/Lunar
Lunar/PortableExecutable/DataDirectories/ImportDirectory.cs
5,101
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Globalization; using System.IO; using System.Text; namespace System.Net.NetworkInformation { internal static class UnixCommandLinePing { // Ubuntu has ping under /bin, OSX under /sbin, ArchLinux under /usr/bin. private static readonly string[] s_binFolders = { "/bin/", "/sbin/", "/usr/bin/" }; private const string s_ipv4PingFile = "ping"; private const string s_ipv6PingFile = "ping6"; private static readonly string s_discoveredPing4UtilityPath = GetPingUtilityPath(ipv4: true); private static readonly string s_discoveredPing6UtilityPath = GetPingUtilityPath(ipv4: false); // We don't want to pick up an arbitrary or malicious ping // command, so that's why we do the path probing ourselves. private static string GetPingUtilityPath(bool ipv4) { string fileName = ipv4 ? s_ipv4PingFile : s_ipv6PingFile; foreach (string folder in s_binFolders) { string path = Path.Combine(folder, fileName); if (File.Exists(path)) { return path; } } return null; } /// <summary> /// The location of the IPv4 ping utility on the current machine. /// </summary> public static string Ping4UtilityPath { get { return s_discoveredPing4UtilityPath; } } /// <summary> /// The location of the IPv6 ping utility on the current machine. /// </summary> public static string Ping6UtilityPath { get { return s_discoveredPing6UtilityPath; } } /// <summary> /// Constructs command line arguments appropriate for the ping or ping6 utility. /// </summary> /// <param name="packetSize">The packet size to use in the ping. Exact packet payload cannot be specified.</param> /// <param name="address">A string representation of the IP address to ping.</param> /// <returns>The constructed command line arguments, which can be passed to ping or ping6.</returns> public static string ConstructCommandLine(int packetSize, string address, bool ipv4) { StringBuilder sb = new StringBuilder(); sb.Append("-c 1"); // Just send a single ping ("count = 1") // The command-line flags for "Do-not-fragment" and "TTL" are not standard. // In fact, they are different even between ping and ping6 on the same machine. // The ping utility is not flexible enough to specify an exact payload. // But we can at least send the right number of bytes. // ping and ping6 do not report timing information unless at least 16 bytes are sent. if (packetSize < 16) { packetSize = 16; } sb.Append(" -s "); sb.Append(packetSize); sb.Append(' '); sb.Append(address); return sb.ToString(); } /// <summary> /// Parses the standard output of the ping utility, returning the round-trip time of the ping. /// </summary> /// <param name="pingOutput">The full standard output of a ping utility run.</param> /// <returns>The parsed round-trip time of a successful ping. Throws if parsing was unsuccessful.</returns> public static long ParseRoundTripTime(string pingOutput) { int timeIndex = pingOutput.IndexOf("time=", StringComparison.Ordinal); int afterTime = timeIndex + "time=".Length; int msIndex = pingOutput.IndexOf("ms", afterTime); int numLength = msIndex - afterTime - 1; string timeSubstring = pingOutput.Substring(afterTime, numLength); double parsedRtt = double.Parse(timeSubstring, CultureInfo.InvariantCulture); return (long)Math.Round(parsedRtt); } } }
42.814433
122
0.620034
[ "MIT" ]
BigBadBleuCheese/corefx
src/Common/src/System/Net/NetworkInformation/UnixCommandLinePing.cs
4,153
C#
using System; using System.Linq; using Alea; using AleaTK; using NUnit.Framework; using Context = AleaTK.Context; using static AleaTK.Library; using static AleaTKUtil.Common; using static AleaTKTest.Common; namespace AleaTKTest { public static class TensorComputing { private static readonly Context cpu = Context.CpuContext; private static readonly Context gpu = Context.GpuContext(GpuId, StreamId); private static void Main() { //PiEstimationGpu(); } [Test] public static void AssignOnes1DCpu() { var ctx = cpu; const int n = 1000; var a = ctx.Allocate(Shape.Create(n), 1.0); var b = ctx.Device.Allocate<double>(Shape.Create(n)); Assert.IsTrue(a.ToArray().SequenceEqual(Enumerable.Repeat(1.0, n))); ctx.Assign(b, a); Assert.IsTrue(b.ToArray().SequenceEqual(Enumerable.Repeat(1.0, n))); b.Print(); } [Test] public static void AssignOnes1DGpu() { var ctx = gpu; const int n = 1000; var a = ctx.Allocate(Shape.Create(n), 1.0); var b = ctx.Device.Allocate<double>(Shape.Create(n)); Assert.IsTrue(a.ToArray().SequenceEqual(Enumerable.Repeat(1.0, n))); ctx.Assign(b, a); Assert.IsTrue(b.ToArray().SequenceEqual(Enumerable.Repeat(1.0, n))); b.Print(); } [Test] public static void AssignOnes2DCpu() { var ctx = cpu; const int m = 100; const int n = 50; var a = ctx.Device.Allocate<double>(Shape.Create(m, n)); ctx.Assign(a, 3.14); a.Print(); var expected = new double[m, n]; for (var i = 0; i < m; ++i) for (var j = 0; j < n; ++j) expected[i, j] = 3.14; var actual = a.ToArray2D(); AreEqual(expected, actual); } [Test] public static void AssignOnes2DGpu() { var ctx = gpu; const int m = 100; const int n = 50; var a = ctx.Device.Allocate<double>(Shape.Create(m, n)); ctx.Assign(a, 3.14); a.Print(); var expected = new double[m, n]; for (var i = 0; i < m; ++i) for (var j = 0; j < n; ++j) expected[i, j] = 3.14; var actual = a.ToArray2D(); AreEqual(expected, actual); } [Test] public static void ReferenceThenAssignCpu() { var ctx = cpu; const int n = 1000; var arrayA = GenerateRandomDoubleData(n, 1, 100); var arrayB = new double[n]; var a = arrayA.AsTensor(); var b = arrayB.AsTensor(); // since b is just reference of a host array, so we need run // assignment sync (last argument sync = true) ctx.Assign(b, a).Wait(); b.Print(); Assert.IsTrue(arrayB.SequenceEqual(arrayA)); } [Test] public static void ReferenceThenCopyThenAssignGpu() { const int n = 1000; var arrayA = GenerateRandomDoubleData(n, 1, 100); var arrayB = new double[n]; var cpuA = arrayA.AsTensor(); var cpuB = arrayB.AsTensor(); var gpuA = gpu.Device.Allocate<double>(Shape.Create(n)); var gpuB = gpu.Device.Allocate<double>(Shape.Create(n)); gpu.Copy(gpuA, cpuA); gpu.Assign(gpuB, gpuA); // this copy need to sync, since cpuB is just a reference gpu.Copy(cpuB, gpuB).Wait(); gpuB.Print(); Assert.IsTrue(arrayB.SequenceEqual(arrayA)); } [Test] public static void AllocateTensorWithInitValuesCpu() { var ctx = cpu; const int n = 1000; var array = GenerateRandomDoubleData(n, 1, 100); var a = ctx.Allocate(array); var b = ctx.Device.Allocate<double>(Shape.Create(n)); ctx.Assign(b, a); b.Print(); Assert.IsTrue(b.ToArray().SequenceEqual(array)); } [Test] public static void AllocateTensorWithInitValuesGpu() { var ctx = gpu; const int n = 1000; var array = GenerateRandomDoubleData(n, 1, 100); var a = ctx.Allocate(array); var b = ctx.Device.Allocate<double>(Shape.Create(n)); ctx.Assign(b, a); b.Print(); Assert.IsTrue(b.ToArray().SequenceEqual(array)); } [Test] public static void SimpleMathCpu() { var ctx = cpu; const int n = 1000; var input = GenerateRandomDoubleData(n, -2, 2); var a = ctx.Allocate(input); //a.Print(); ctx.Assign(a, 3.0 * a + Exp(a + 1.5)); a.Print(); var expected = input.Select(x => 3.0 * x + Math.Exp(x + 1.5)).ToArray(); var actual = a.ToArray(); Assert.AreEqual(expected, actual); } [Test] public static void SimpleMathGpu() { var ctx = gpu; const int n = 1000; var input = GenerateRandomDoubleData(n, -2, 2); var a = ctx.Allocate(input); //a.Print(); ctx.Assign(a, 3.0 * a + Exp(a + 1.5)); a.Print(); var expected = input.Select(x => 3.0 * x + Math.Exp(x + 1.5)).ToArray(); var actual = a.ToArray(); AreClose(expected, actual, 1e-10); } [Test] public static void SigmoidCpu() { var ctx = cpu; const int n = 1000; var input = GenerateRandomDoubleData(n, -2, 2); var a = ctx.Allocate(input); //a.Print(); ctx.Assign(a, 1.0 / (1.0 + Exp(-a))); a.Print(); var expected = input.Select(x => 1.0 / (1.0 + Math.Exp(-x))).ToArray(); var actual = a.ToArray(); Assert.AreEqual(expected, actual); } [Test] public static void SigmoidGpu() { var ctx = gpu; const int n = 1000; var input = GenerateRandomDoubleData(n, -2, 2); var a = ctx.Allocate(input); //a.Print(); ctx.Assign(a, 1.0 / (1.0 + Exp(-a))); a.Print(); var expected = input.Select(x => 1.0 / (1.0 + Math.Exp(-x))).ToArray(); var actual = a.ToArray(); AreClose(expected, actual, 1e-10); } [Test] public static void RepMatOverRowsCpu() { var ctx = cpu; var input = new[] { 1.0, 2.0, 3.0 }; // a is rank 1, when we assign it to rank 2, by boradcasting // rule, it will be implicitly reshape to [1,3], which means, // repeat mat over rows. var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Create(5, 3)); a.Print(); ctx.Assign(b, a); b.Print(); var expected = new[,] { {1.0, 2.0, 3.0}, {1.0, 2.0, 3.0}, {1.0, 2.0, 3.0}, {1.0, 2.0, 3.0}, {1.0, 2.0, 3.0} }; var actual = b.ToArray2D(); AreEqual(expected, actual); } [Test] public static void RepMatOverRowsGpu() { var ctx = gpu; var input = new[] { 1.0, 2.0, 3.0 }; // a is rank 1, when we assign it to rank 2, by boradcasting // rule, it will be implicitly reshape to [1,3], which means, // repeat mat over rows. var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Create(5, 3)); a.Print(); ctx.Assign(b, a); b.Print(); var expected = new[,] { {1.0, 2.0, 3.0}, {1.0, 2.0, 3.0}, {1.0, 2.0, 3.0}, {1.0, 2.0, 3.0}, {1.0, 2.0, 3.0} }; var actual = b.ToArray2D(); AreEqual(expected, actual); } [Test] public static void RepMatOverColsCpu() { var ctx = cpu; var input = new[,] { {1.0}, {2.0}, {3.0}, {4.0}, {5.0}}; var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Create(5, 3)); a.Print(); ctx.Assign(b, a); b.Print(); var expected = new[,] { {1.0, 1.0, 1.0}, {2.0, 2.0, 2.0}, {3.0, 3.0, 3.0}, {4.0, 4.0, 4.0}, {5.0, 5.0, 5.0} }; var actual = b.ToArray2D(); AreEqual(expected, actual); } [Test] public static void RepMatOverColsGpu() { var ctx = gpu; var input = new[,] { { 1.0 }, { 2.0 }, { 3.0 }, { 4.0 }, { 5.0 } }; var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Create(5, 3)); a.Print(); ctx.Assign(b, a); b.Print(); var expected = new[,] { {1.0, 1.0, 1.0}, {2.0, 2.0, 2.0}, {3.0, 3.0, 3.0}, {4.0, 4.0, 4.0}, {5.0, 5.0, 5.0} }; var actual = b.ToArray2D(); AreEqual(expected, actual); } [Test] public static void RepMatOverColsViaReshapeCpu() { var ctx = cpu; var input = new[] { 1.0, 2.0, 3.0, 4.0, 5.0 }; var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Create(5, 3)); a.Print(); ctx.Assign(b, a.Reshape(-1, 1)); b.Print(); var expected = new[,] { {1.0, 1.0, 1.0}, {2.0, 2.0, 2.0}, {3.0, 3.0, 3.0}, {4.0, 4.0, 4.0}, {5.0, 5.0, 5.0} }; var actual = b.ToArray2D(); AreEqual(expected, actual); } [Test] public static void RepMatOverColsViaReshapeGpu() { var ctx = gpu; var input = new[] { 1.0, 2.0, 3.0, 4.0, 5.0 }; var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Create(5, 3)); a.Print(); // a is rank1, it is row vector by the broadcasting rule, // to make it repeat over columns, you need change it to // column vector. You can do this via reshape. the -1 // in reshapr means, it can be calculated. For more detail // see https://www.tensorflow.org/versions/r0.8/api_docs/python/array_ops.html#reshape ctx.Assign(b, a.Reshape(-1, 1)); b.Print(); var expected = new[,] { {1.0, 1.0, 1.0}, {2.0, 2.0, 2.0}, {3.0, 3.0, 3.0}, {4.0, 4.0, 4.0}, {5.0, 5.0, 5.0} }; var actual = b.ToArray2D(); AreEqual(expected, actual); } [Test] public static void RepMatOverColsViaTransposeCpu() { var ctx = cpu; var input = new[,] { { 1.0, 2.0, 3.0, 4.0, 5.0 } }; var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Create(5, 3)); a.Print(); ctx.Assign(b, a.T); b.Print(); var expected = new[,] { {1.0, 1.0, 1.0}, {2.0, 2.0, 2.0}, {3.0, 3.0, 3.0}, {4.0, 4.0, 4.0}, {5.0, 5.0, 5.0} }; var actual = b.ToArray2D(); AreEqual(expected, actual); } [Test] public static void RepMatOverColsViaTransposeGpu() { var ctx = gpu; var input = new[,] { { 1.0, 2.0, 3.0, 4.0, 5.0 } }; var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Create(5, 3)); a.Print(); ctx.Assign(b, a.T); b.Print(); var expected = new[,] { {1.0, 1.0, 1.0}, {2.0, 2.0, 2.0}, {3.0, 3.0, 3.0}, {4.0, 4.0, 4.0}, {5.0, 5.0, 5.0} }; var actual = b.ToArray2D(); AreEqual(expected, actual); } [Test] public static void ReduceSumCpu() { var ctx = cpu; const int n = 1000; var input = GenerateRandomDoubleData(n, -2, 2); var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Scalar); ctx.Assign(b, ReduceSum(a)); b.Print(); var actual = b.ToScalar(); Console.WriteLine(actual); var expected = input.Sum(); Assert.AreEqual(expected, actual); // you can also calc mean by / the numItems ctx.Assign(b, ReduceSum(a) / n); b.Print(); actual = b.ToScalar(); expected = input.Average(); Assert.AreEqual(expected, actual); } [Test] public static void ReduceSumGpu() { var ctx = gpu; const int n = 1000; var input = GenerateRandomDoubleData(n, -2, 2); var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Scalar); ctx.Assign(b, ReduceSum(a)); b.Print(); var actual = b.ToScalar(); Console.WriteLine(actual); var expected = input.Sum(); Assert.That(actual, Is.EqualTo(expected).Within(1e-10)); // you can also calc mean by / the numItems ctx.Assign(b, ReduceSum(a) / n); b.Print(); actual = b.ToScalar(); expected = input.Average(); Assert.That(actual, Is.EqualTo(expected).Within(1e-10)); } [Test] public static void ReduceSumWithParamsCpu() { // https://www.tensorflow.org/versions/r0.8/api_docs/python/math_ops.html#reduce_sum //# 'x' is [[1, 1, 1] //# [1, 1, 1]] //tf.reduce_sum(x) ==> 6 //tf.reduce_sum(x, 0) ==> [2, 2, 2] //tf.reduce_sum(x, 1) ==> [3, 3] //tf.reduce_sum(x, 1, keep_dims = True) ==> [[3], [3]] //tf.reduce_sum(x, [0, 1]) ==> 6 var ctx = cpu; var x = ctx.Allocate(new[,] { { 1.0, 1.0, 1.0 }, { 1.0, 1.0, 1.0 } }); Assert.AreEqual(6.0, ctx.Eval(ReduceSum(x)).ToScalar()); Assert.AreEqual(new[] { 2.0, 2.0, 2.0 }, ctx.Eval(ReduceSum(x, 0)).ToArray()); Assert.AreEqual(new[] { 3.0, 3.0 }, ctx.Eval(ReduceSum(x, 1)).ToArray()); Assert.AreEqual(new[,] { { 3.0 }, { 3.0 } }, ctx.Eval(ReduceSum(x, true, 1)).ToArray2D()); Assert.AreEqual(6.0, ctx.Eval(ReduceSum(x, 0, 1)).ToScalar()); } [Test] public static void ReduceSumWithParamsGpu() { // https://www.tensorflow.org/versions/r0.8/api_docs/python/math_ops.html#reduce_sum //# 'x' is [[1, 1, 1] //# [1, 1, 1]] //tf.reduce_sum(x) ==> 6 //tf.reduce_sum(x, 0) ==> [2, 2, 2] //tf.reduce_sum(x, 1) ==> [3, 3] //tf.reduce_sum(x, 1, keep_dims = True) ==> [[3], [3]] //tf.reduce_sum(x, [0, 1]) ==> 6 var ctx = gpu; var x = ctx.Allocate(new[,] { { 1.0, 1.0, 1.0 }, { 1.0, 1.0, 1.0 } }); Assert.AreEqual(6.0, ctx.Eval(ReduceSum(x)).ToScalar()); Assert.AreEqual(new[] { 2.0, 2.0, 2.0 }, ctx.Eval(ReduceSum(x, 0)).ToArray()); Assert.AreEqual(new[] { 3.0, 3.0 }, ctx.Eval(ReduceSum(x, 1)).ToArray()); Assert.AreEqual(new[,] { { 3.0 }, { 3.0 } }, ctx.Eval(ReduceSum(x, true, 1)).ToArray2D()); Assert.AreEqual(6.0, ctx.Eval(ReduceSum(x, 0, 1)).ToScalar()); } [Test] public static void ReduceMeanCpu() { var ctx = cpu; const int n = 1000; var input = GenerateRandomDoubleData(n, -2, 2); var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Scalar); ctx.Assign(b, ReduceMean(1.0 / (1.0 + Exp(-a)))); b.Print(); var actual = b.ToScalar(); Console.WriteLine(actual); var expected = input.Select(x => 1.0 / (1.0 + Math.Exp(-x))).Average(); Assert.AreEqual(expected, actual); } [Test] public static void ReduceMeanGpu() { var ctx = gpu; const int n = 1000; var input = GenerateRandomDoubleData(n, -2, 2); var a = ctx.Allocate(input); var b = ctx.Device.Allocate<double>(Shape.Scalar); ctx.Assign(b, ReduceMean(1.0 / (1.0 + Exp(-a)))); b.Print(); var actual = b.ToScalar(); Console.WriteLine(actual); var expected = input.Select(x => 1.0 / (1.0 + Math.Exp(-x))).Average(); Assert.That(actual, Is.EqualTo(expected).Within(1e-10)); } [Test] public static void AssignUniformRandomCpu() { var ctx = cpu; const int n = 1000; var a = ctx.Device.Allocate<double>(Shape.Create(n)); ctx.Assign(a, RandomUniform<double>()); a.Print(); // you can use eval to directly evaluate an expression, internally // it will allocate a tensor and return to you. var mean = ctx.Eval(ReduceMean(a)).ToScalar(); Console.WriteLine(mean); Assert.That(mean, Is.EqualTo(0.5).Within(1e-1)); } [Test] public static void AssignUniformRandomGpu() { var ctx = gpu; const int n = 1000; var a = ctx.Device.Allocate<double>(Shape.Create(n)); ctx.Assign(a, RandomUniform<double>()); a.Print(); // you can use eval to directly evaluate an expression, internally // it will allocate a tensor and return to you. var mean = ctx.Eval(ReduceMean(a)).ToScalar(); Console.WriteLine(mean); Assert.That(mean, Is.EqualTo(0.5).Within(1e-1)); } public static void EstimatePi(Context ctx, int batchs, ulong batchSize, double error) { const ulong seed = 0UL; // allocate buffer for the generated points and a scalar to hold the simulated value of pi var points = ctx.Device.Allocate<double2>(Shape.Create((long)batchSize)); var pi = ctx.Device.Allocate<double>(Shape.Scalar); // transform that checks if point is inside unit square or not // the value 4.0 is because we only simulate points in positive quadrant var pis = Map(points, point => (point.x * point.x + point.y * point.y) < 1.0 ? 4.0 : 0.0); // iterate over multiple batches for (var i = 0; i < batchs; ++i) { Console.WriteLine($"Batch {i}"); // generates random numbers, apply the mapping followed by a mean reduction var offset = batchSize * (ulong)i; ctx.Assign(points, RandomUniform<double2>(seed: seed, offset: offset)); ctx.Assign(pi, i == 0 ? ReduceMean(pis) : (pi + ReduceMean(pis)) / 2.0); } Console.WriteLine($"Pi = {pi.ToScalar()}"); Assert.That(pi.ToScalar(), Is.EqualTo(Math.PI).Within(error)); } [Test] public static void EstimatePiCpu() { EstimatePi(cpu, 5, 100000, 1e-2); } [Test] public static void EstimatePiGpu() { EstimatePi(gpu, 100, 10000000, 1e-3); } [Test] public static void ShapeBroadcast01() { //Image (3d array): 256 x 256 x 3 //Scale (1d array): 3 //Result (3d array): 256 x 256 x 3 var shape1 = Shape.Create(256, 256, 3); var shape2 = Shape.Create(3); var actual = Shape.Broadcast(shape1, shape2); var expected = Shape.Create(256, 256, 3); Console.WriteLine(actual); Assert.IsTrue(actual.SequenceEqual(expected)); } [Test] public static void ShapeBroadcast02() { //A (4d array): 8 x 1 x 6 x 1 //B (3d array): 7 x 1 x 5 //Result (4d array): 8 x 7 x 6 x 5 var shape1 = Shape.Create(8, 1, 6, 1); var shape2 = Shape.Create(7, 1, 5); var actual = Shape.Broadcast(shape1, shape2); var expected = Shape.Create(8, 7, 6, 5); Console.WriteLine(actual); Assert.IsTrue(actual.SequenceEqual(expected)); } [Test] public static void ShapeBroadcast03() { var shape1 = Shape.Create(2, 3); var shape2 = Shape.Create(2, 1, 1); var shape3 = Shape.Create(1, 1, 3); var actual = Shape.Broadcast(shape1, shape2, shape3); var expected = Shape.Create(2, 2, 3); Console.WriteLine(actual); Assert.IsTrue(actual.SequenceEqual(expected)); } [Test] public static void BroadcastScalarToVectorCpu() { var ctx = cpu; const int n = 1000; var a = ctx.Allocate(Shape.Scalar, 5.0); var b = ctx.Allocate(Shape.Create(n), 1.0); ctx.Assign(b, a); b.Print(); var actual = b.ToArray(); var expected = Enumerable.Repeat(5.0, n).ToArray(); Assert.AreEqual(expected, actual); } [Test] public static void BroadcastScalarToVectorGpu() { var ctx = gpu; const int n = 1000; var a = ctx.Allocate(Shape.Scalar, 5.0); var b = ctx.Allocate(Shape.Create(n), 1.0); ctx.Assign(b, a); b.Print(); var actual = b.ToArray(); var expected = Enumerable.Repeat(5.0, n).ToArray(); Assert.AreEqual(expected, actual); } [Test] public static void BroadcastScalarToMatrixCpu() { var ctx = cpu; var a = ctx.Allocate(Shape.Scalar, 5.0); var b = ctx.Allocate(Shape.Create(333, 555), 1.0); ctx.Assign(b, a); b.Print(); var actual = b.ToArray2D(); var expected = CreateArray(333, 555, (row, col) => 5.0); AreEqual(expected, actual); } [Test] public static void BroadcastScalarToMatrixGpu() { var ctx = gpu; var a = ctx.Allocate(Shape.Scalar, 5.0); var b = ctx.Allocate(Shape.Create(333, 555), 1.0); ctx.Assign(b, a); b.Print(); var actual = b.ToArray2D(); var expected = CreateArray(333, 555, (row, col) => 5.0); AreEqual(expected, actual); } [Test] public static void BroadcastVectorToMatrixCpu() { var ctx = cpu; var a = ctx.Allocate(new[] { 1.0, 2.0, 3.0, 4.0 }); var b = ctx.Allocate(Shape.Create(333, 4), 1.0); ctx.Assign(b, a); b.Print(); var actual = b.ToArray2D(); var expected = CreateArray(333, 4, (row, col) => col + 1.0); AreEqual(expected, actual); } [Test] public static void BroadcastVectorToMatrixGpu() { var ctx = gpu; var a = ctx.Allocate(new[] { 1.0, 2.0, 3.0, 4.0 }); var b = ctx.Allocate(Shape.Create(333, 4), 1.0); ctx.Assign(b, a); b.Print(); var actual = b.ToArray2D(); var expected = CreateArray(333, 4, (row, col) => col + 1.0); AreEqual(expected, actual); } [Test] public static void SimpleDotCpu() { var ctx = cpu; var inputA = new[,] { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } }; var inputB = new[,] { { 1.0, 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0, 8.0 }, { 9.0, 10.0, 11.0, 12.0 } }; var a = ctx.Allocate(inputA); var b = ctx.Allocate(inputB); a.Print(); b.Print(); var c = ctx.Device.Allocate<double>(Shape.Create(2, 4)); ctx.Assign(c, Dot(a, b)); c.Print(); var expected = Dot(inputA, inputB); var actual = c.ToArray2D(); AreEqual(expected, actual); } [Test] public static void SimpleDotGpu() { var ctx = gpu; var inputA = new[,] { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } }; var inputB = new[,] { { 1.0, 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0, 8.0 }, { 9.0, 10.0, 11.0, 12.0 } }; var a = ctx.Allocate(inputA); var b = ctx.Allocate(inputB); a.Print(); b.Print(); var c = ctx.Device.Allocate<double>(Shape.Create(2, 4)); ctx.Assign(c, Dot(a, b)); c.Print(); var expected = Dot(inputA, inputB); var actual = c.ToArray2D(); AreEqual(expected, actual); } [Test] public static void SimpleTransposeCpu() { var ctx = cpu; var inputA = new[,] { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } }; var a = ctx.Allocate(inputA); var at = a.T; at.Print(); var ata = ctx.Device.Allocate<double>(Shape.Create(3, 2)); ctx.Assign(ata, at); ata.Print(); var expected = new[,] { { 1.0, 4.0 }, { 2.0, 5.0 }, { 3.0, 6.0 } }; AreEqual(expected, ata.ToArray2D()); var actual = at.ToArray2D(); AreEqual(expected, actual); } [Test] public static void SimpleTransposeGpu() { var ctx = gpu; var inputA = new[,] { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } }; var a = ctx.Allocate(inputA); var at = a.T; at.Print(); var ata = ctx.Device.Allocate<double>(Shape.Create(3, 2)); ctx.Assign(ata, at); ata.Print(); var expected = new[,] { { 1.0, 4.0 }, { 2.0, 5.0 }, { 3.0, 6.0 } }; AreEqual(expected, ata.ToArray2D()); var actual = at.ToArray2D(); AreEqual(expected, actual); } [Test] public static void SimpleTransDotCpu() { var ctx = cpu; var inputA = new[,] { { 1.0, 4.0 }, { 2.0, 5.0 }, { 3.0, 6.0 } }; var inputB = new[,] { { 1.0, 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0, 8.0 }, { 9.0, 10.0, 11.0, 12.0 } }; var a = ctx.Allocate(inputA); var b = ctx.Allocate(inputB); a.Print(); b.Print(); var c = ctx.Device.Allocate<double>(Shape.Create(2, 4)); ctx.Assign(c, Dot(a.T, b)); c.Print(); var expected = Dot(Transpose(inputA), inputB); var actual = c.ToArray2D(); AreEqual(expected, actual); } [Test] public static void SimpleTransDotGpu() { var ctx = gpu; var inputA = new[,] { { 1.0, 4.0 }, { 2.0, 5.0 }, { 3.0, 6.0 } }; var inputB = new[,] { { 1.0, 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0, 8.0 }, { 9.0, 10.0, 11.0, 12.0 } }; var a = ctx.Allocate(inputA); var b = ctx.Allocate(inputB); a.Print(); b.Print(); var c = ctx.Device.Allocate<double>(Shape.Create(2, 4)); ctx.Assign(c, Dot(a.T, b)); c.Print(); var expected = Dot(Transpose(inputA), inputB); var actual = c.ToArray2D(); AreEqual(expected, actual); } [Test] public static void ReduceSumByRowCpu() { var ctx = cpu; var input = new[,] { { 1.0, 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0, 8.0 }, { 9.0, 10.0, 11.0, 12.0 } }; var a = ctx.Allocate(input); a.Print(); var b = ctx.Device.Allocate<double>(Shape.Create(4)); ctx.Assign(b, ReduceSum(a, 0)); b.Print(); var expected = new double[input.GetLength(1)]; expected[0] = 1.0 + 5.0 + 9.0; expected[1] = 2.0 + 6.0 + 10.0; expected[2] = 3.0 + 7.0 + 11.0; expected[3] = 4.0 + 8.0 + 12.0; var actual = b.ToArray(); Assert.AreEqual(expected, actual); } [Test] public static void ReduceSumByRowGpu() { var ctx = gpu; var input = new[,] { { 1.0, 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0, 8.0 }, { 9.0, 10.0, 11.0, 12.0 } }; var a = ctx.Allocate(input); a.Print(); var b = ctx.Device.Allocate<double>(Shape.Create(4)); ctx.Assign(b, ReduceSum(a, 0)); b.Print(); var expected = new double[input.GetLength(1)]; expected[0] = 1.0 + 5.0 + 9.0; expected[1] = 2.0 + 6.0 + 10.0; expected[2] = 3.0 + 7.0 + 11.0; expected[3] = 4.0 + 8.0 + 12.0; var actual = b.ToArray(); Assert.AreEqual(expected, actual); } [Test] public static void ReduceSumByColCpu() { var ctx = cpu; var input = new[,] { { 1.0, 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0, 8.0 }, { 9.0, 10.0, 11.0, 12.0 } }; var a = ctx.Allocate(input); a.Print(); var b = ctx.Device.Allocate<double>(Shape.Create(3)); ctx.Assign(b, ReduceSum(a, 1)); b.Print(); var expected = new double[input.GetLength(0)]; expected[0] = 1.0 + 2.0 + 3.0 + 4.0; expected[1] = 5.0 + 6.0 + 7.0 + 8.0; expected[2] = 9.0 + 10.0 + 11.0 + 12.0; var actual = b.ToArray(); Assert.AreEqual(expected, actual); } [Test] public static void ReduceSumByColGpu() { var ctx = gpu; var input = new[,] { { 1.0, 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0, 8.0 }, { 9.0, 10.0, 11.0, 12.0 } }; var a = ctx.Allocate(input); a.Print(); var b = ctx.Device.Allocate<double>(Shape.Create(3)); ctx.Assign(b, ReduceSum(a, 1)); b.Print(); var expected = new double[input.GetLength(0)]; expected[0] = 1.0 + 2.0 + 3.0 + 4.0; expected[1] = 5.0 + 6.0 + 7.0 + 8.0; expected[2] = 9.0 + 10.0 + 11.0 + 12.0; var actual = b.ToArray(); Assert.AreEqual(expected, actual); } [Test] public static void RepmatAsColViaLValueCpu() { var ctx = cpu; var input = new[] { 1.0, 2.0, 3.0 }; var a = ctx.Allocate(input); a.Print(); var b = ctx.Device.Allocate<double>(Shape.Create(3, 5)); ctx.Assign(b, a.Reshape(-1, 1)); b.Print(); var expected = new[,] { {1.0, 1.0, 1.0, 1.0, 1.0}, {2.0, 2.0, 2.0, 2.0, 2.0}, {3.0, 3.0, 3.0, 3.0, 3.0} }; var actual = b.ToArray2D(); Assert.AreEqual(expected, actual); } [Test] public static void RepmatAsColViaLValueGpu() { var ctx = gpu; var input = new[] { 1.0, 2.0, 3.0 }; var a = ctx.Allocate(input); a.Print(); var b = ctx.Device.Allocate<double>(Shape.Create(3, 5)); ctx.Assign(b, a.Reshape(-1, 1)); b.Print(); var expected = new[,] { {1.0, 1.0, 1.0, 1.0, 1.0}, {2.0, 2.0, 2.0, 2.0, 2.0}, {3.0, 3.0, 3.0, 3.0, 3.0} }; var actual = b.ToArray2D(); Assert.AreEqual(expected, actual); } [Test] public static void SimpleSoftmaxForwardCpu() { var ctx = cpu; var rng = new Random(); const int M = 100; const int N = 10; var input = new double[M, N]; for (var row = 0; row < M; ++row) { for (var col = 0; col < N; ++col) { input[row, col] = rng.NextDouble(); } } var a = ctx.Allocate(input); a.Print(); var b = ctx.Device.Allocate<double>(Shape.Create(M, N)); // we reduce sum the exp(a) on columns, and keepdims so it stays as a column vector. var softmax = Exp(a) / ReduceSum(Exp(a), true, 1); ctx.Assign(b, softmax); b.Print(); var expected = new double[M, N]; for (var row = 0; row < M; ++row) { var acc = Enumerable.Range(0, N).Select(col => Math.Exp(input[row, col])).Sum(); for (var col = 0; col < N; ++col) { expected[row, col] = Math.Exp(input[row, col]) / acc; } } var actual = b.ToArray2D(); //TestUtil.AreClose(expected, actual, 1e-10); AreEqual(expected, actual); } [Test] public static void SimpleSoftmaxForwardGpu() { var ctx = gpu; var rng = new Random(); const int M = 100; const int N = 10; var input = new double[M, N]; for (var row = 0; row < M; ++row) { for (var col = 0; col < N; ++col) { input[row, col] = rng.NextDouble(); } } var a = ctx.Allocate(input); a.Print(); var b = ctx.Device.Allocate<double>(Shape.Create(M, N)); // we reduce sum the exp(a) on columns, and keepdims so it stays as a column vector. var softmax = Exp(a) / (ReduceSum(Exp(a), true, 1)); ctx.Assign(b, softmax); b.Print(); var expected = new double[M, N]; for (var row = 0; row < M; ++row) { var acc = Enumerable.Range(0, N).Select(col => Math.Exp(input[row, col])).Sum(); for (var col = 0; col < N; ++col) { expected[row, col] = Math.Exp(input[row, col]) / acc; } } var actual = b.ToArray2D(); AreClose(expected, actual, 1e-10); //TestUtil.AreEqual(expected, actual); } [Test] public static void TakeCpu() { var ctx = cpu; var source = new[,] { {0.0f, 0.1f, 0.2f}, {1.0f, 1.1f, 1.2f}, {2.0f, 2.1f, 2.2f}, {3.0f, 3.1f, 3.2f}, {4.0f, 4.1f, 4.2f}, }; var indices = new[,] { {0, 0, 1}, {4, 1, 3} }; var _source = ctx.Allocate(source); var _indices = ctx.Allocate(indices); var _embedded = ctx.Eval(Take(_indices, _source)); ctx.Eval(_embedded.Reshape(6, -1)).Print(); var expected = new[,] { {0.0f, 0.1f, 0.2f}, {0.0f, 0.1f, 0.2f}, {1.0f, 1.1f, 1.2f}, {4.0f, 4.1f, 4.2f}, {1.0f, 1.1f, 1.2f}, {3.0f, 3.1f, 3.2f}, }; Assert.AreEqual(expected, ctx.Eval(_embedded.Reshape(6, -1)).ToArray2D()); } [Test] public static void TakeGpu() { var ctx = gpu; var source = new[,] { {0.0f, 0.1f, 0.2f}, {1.0f, 1.1f, 1.2f}, {2.0f, 2.1f, 2.2f}, {3.0f, 3.1f, 3.2f}, {4.0f, 4.1f, 4.2f}, }; var indices = new[,] { {0, 0, 1}, {4, 1, 3} }; var _source = ctx.Allocate(source); var _indices = ctx.Allocate(indices); var _embedded = ctx.Eval(Take(_indices, _source)); ctx.Eval(_embedded.Reshape(6, -1)).Print(); var expected = new[,] { {0.0f, 0.1f, 0.2f}, {0.0f, 0.1f, 0.2f}, {1.0f, 1.1f, 1.2f}, {4.0f, 4.1f, 4.2f}, {1.0f, 1.1f, 1.2f}, {3.0f, 3.1f, 3.2f}, }; Assert.AreEqual(expected, ctx.Eval(_embedded.Reshape(6, -1)).ToArray2D()); } [Test] public static void TakeGradCpu() { var ctx = cpu; var gradout = new[,,] { {{0.0f, 0.1f, 0.2f}, {1.0f, 1.1f, 1.2f}, {2.0f, 2.1f, 2.2f}}, {{3.0f, 3.1f, 3.2f}, {4.0f, 4.1f, 4.2f}, {5.0f, 5.1f, 5.2f}} }; var indices = new[,] { {0, 0, 1}, {4, 1, 3} }; var _gradout = ctx.Allocate(gradout); var _indices = ctx.Allocate(indices); var _embedgrad = ctx.Eval(TakeGrad(_indices, _gradout, 5)); _embedgrad.Print(); var expected = new[,] { {0.0f + 1.0f, 0.1f + 1.1f, 0.2f + 1.2f}, {2.0f + 4.0f, 2.1f + 4.1f, 2.2f + 4.2f}, {0.0f, 0.0f, 0.0f}, {5.0f, 5.1f, 5.2f}, {3.0f, 3.1f, 3.2f} }; Assert.AreEqual(expected, _embedgrad.ToArray2D()); } [Test] public static void TakeGradGpu() { var ctx = gpu; var gradout = new[, ,] { {{0.0f, 0.1f, 0.2f}, {1.0f, 1.1f, 1.2f}, {2.0f, 2.1f, 2.2f}}, {{3.0f, 3.1f, 3.2f}, {4.0f, 4.1f, 4.2f}, {5.0f, 5.1f, 5.2f}} }; var indices = new[,] { {0, 0, 1}, {4, 1, 3} }; var _gradout = ctx.Allocate(gradout); var _indices = ctx.Allocate(indices); var _embedgrad = ctx.Eval(TakeGrad(_indices, _gradout, 5)); _embedgrad.Print(); var expected = new[,] { {0.0f + 1.0f, 0.1f + 1.1f, 0.2f + 1.2f}, {2.0f + 4.0f, 2.1f + 4.1f, 2.2f + 4.2f}, {0.0f, 0.0f, 0.0f}, {5.0f, 5.1f, 5.2f}, {3.0f, 3.1f, 3.2f} }; Assert.AreEqual(expected, _embedgrad.ToArray2D()); } [Test] public static void Slice1DCpu() { var ctx = gpu; var input = ctx.Allocate(new[] { 1.0, 2.0, 3.0, 4.0, 5.0 }); ctx.Assign(input.Slice(), input.Slice() + 1.0); input.Print(); Assert.AreEqual(new[] { 2.0, 3.0, 4.0, 5.0, 6.0 }, input.ToArray()); ctx.Assign(input.Slice(1), input.Slice(1) + 1.0); input.Print(); Assert.AreEqual(new[] { 2.0, 4.0, 4.0, 5.0, 6.0 }, input.ToArray()); ctx.Assign(input.Slice(Range(1, 4)), input.Slice(Range(1, 4)) + 1.0); input.Print(); Assert.AreEqual(new[] { 2.0, 5.0, 5.0, 6.0, 6.0 }, input.ToArray()); } [Test] public static void Slice1DGpu() { var ctx = gpu; var input = ctx.Allocate(new[] { 1.0, 2.0, 3.0, 4.0, 5.0 }); ctx.Assign(input.Slice(), input.Slice() + 1.0); input.Print(); Assert.AreEqual(new[] { 2.0, 3.0, 4.0, 5.0, 6.0 }, input.ToArray()); ctx.Assign(input.Slice(1), input.Slice(1) + 1.0); input.Print(); Assert.AreEqual(new[] { 2.0, 4.0, 4.0, 5.0, 6.0 }, input.ToArray()); ctx.Assign(input.Slice(Range(1, 4)), input.Slice(Range(1, 4)) + 1.0); input.Print(); Assert.AreEqual(new[] { 2.0, 5.0, 5.0, 6.0, 6.0 }, input.ToArray()); } [Test] public static void Slice2DCpu() { var ctx = cpu; var input = ctx.Allocate(new[,] { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } }); ctx.Assign(input.Slice(), input.Slice() + 1.0); input.Print(); Assert.AreEqual(new[,] { { 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0 } }, input.ToArray2D()); ctx.Assign(input.Slice(-1, Range(0, 2)), input.Slice(-1, Range(0, 2)) + 1.0); input.Print(); Assert.AreEqual(new[,] { { 3.0, 4.0, 4.0 }, { 6.0, 7.0, 7.0 } }, input.ToArray2D()); ctx.Assign(input.Slice(1, Range(0, 2)), input.Slice(1, Range(0, 2)) + 1.0); input.Print(); Assert.AreEqual(new[,] { { 3.0, 4.0, 4.0 }, { 7.0, 8.0, 7.0 } }, input.ToArray2D()); } [Test] public static void Slice2DGpu() { var ctx = gpu; var input = ctx.Allocate(new[,] { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } }); ctx.Assign(input.Slice(), input.Slice() + 1.0); input.Print(); Assert.AreEqual(new[,] { { 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0 } }, input.ToArray2D()); ctx.Assign(input.Slice(-1, Range(0, 2)), input.Slice(-1, Range(0, 2)) + 1.0); input.Print(); Assert.AreEqual(new[,] { { 3.0, 4.0, 4.0 }, { 6.0, 7.0, 7.0 } }, input.ToArray2D()); ctx.Assign(input.Slice(1, Range(0, 2)), input.Slice(1, Range(0, 2)) + 1.0); input.Print(); Assert.AreEqual(new[,] { { 3.0, 4.0, 4.0 }, { 7.0, 8.0, 7.0 } }, input.ToArray2D()); } [Test] public static void Slice3DCpu() { var ctx = cpu; var input = ctx.Allocate(new[, ,] { { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } }, { { 1.5, 2.5, 3.5 }, { 4.5, 5.5, 6.5 } } }); ctx.Assign(input.Slice(), input.Slice() + 1.0); Assert.AreEqual(new[, ,] { { { 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0 } }, { { 2.5, 3.5, 4.5 }, { 5.5, 6.5, 7.5 } } }, input.ToArray3D()); ctx.Assign(input.Slice(-1, -1, Range(0, 2)), input.Slice(-1, -1, Range(0, 2)) + 1.0); Assert.AreEqual(new[, ,] { { { 3.0, 4.0, 4.0 }, { 6.0, 7.0, 7.0 } }, { { 3.5, 4.5, 4.5 }, { 6.5, 7.5, 7.5 } } }, input.ToArray3D()); ctx.Assign(input.Slice(1, -1, Range(0, 2)), input.Slice(1, -1, Range(0, 2)) + 1.0); Assert.AreEqual(new[, ,] { { { 3.0, 4.0, 4.0 }, { 6.0, 7.0, 7.0 } }, { { 4.5, 5.5, 4.5 }, { 7.5, 8.5, 7.5 } } }, input.ToArray3D()); } [Test] public static void Slice3DGpu() { var ctx = gpu; var input = ctx.Allocate(new[, ,] { { { 1.0, 2.0, 3.0 }, { 4.0, 5.0, 6.0 } }, { { 1.5, 2.5, 3.5 }, { 4.5, 5.5, 6.5 } } }); ctx.Assign(input.Slice(), input.Slice() + 1.0); Assert.AreEqual(new[, ,] { { { 2.0, 3.0, 4.0 }, { 5.0, 6.0, 7.0 } }, { { 2.5, 3.5, 4.5 }, { 5.5, 6.5, 7.5 } } }, input.ToArray3D()); ctx.Assign(input.Slice(-1, -1, Range(0, 2)), input.Slice(-1, -1, Range(0, 2)) + 1.0); Assert.AreEqual(new[, ,] { { { 3.0, 4.0, 4.0 }, { 6.0, 7.0, 7.0 } }, { { 3.5, 4.5, 4.5 }, { 6.5, 7.5, 7.5 } } }, input.ToArray3D()); ctx.Assign(input.Slice(1, -1, Range(0, 2)), input.Slice(1, -1, Range(0, 2)) + 1.0); Assert.AreEqual(new[, ,] { { { 3.0, 4.0, 4.0 }, { 6.0, 7.0, 7.0 } }, { { 4.5, 5.5, 4.5 }, { 7.5, 8.5, 7.5 } } }, input.ToArray3D()); } [Test] public static void RandomNormalCpu() { var ctx = cpu; //var data = ctx.Eval(RandomNormal<double>(Shape.Create(100, 100), seed: 0UL)); //data.Print(); //var mean = ctx.Eval(ReduceMean(data)); //mean.Print(); //Assert.That(mean.ToScalar(), Is.EqualTo(0.0).Within(1e-2)); } [Test] public static void RandomNormalGpu() { var ctx = gpu; var data = ctx.Eval(RandomNormal<double>(Shape.Create(100, 100), seed: 0UL)); data.Print(); var mean = ctx.Eval(ReduceMean(data)); mean.Print(); Assert.That(mean.ToScalar(), Is.EqualTo(0.0).Within(1e-2)); } [Test] public static void DropoutForwardGpu() { var ctx = gpu; var data = ctx.Allocate(new[] {1.0f, 2.0f, 3.0f, 4.0f}); var mask = ctx.Allocate(new[] {6U, 3U, 9U, 2U}); var threshold = 5U; var scale = 2.0; var result = ctx.Eval(Dropout(data, mask, threshold, scale)); result.Print(); } [Test] public static void RandomUniformGpu() { var ctx = gpu; var data = ctx.Eval((2.0f.AsScalar() * RandomUniform<float>(Shape.Create(10, 10)) - 1.0f.AsScalar()) * 5.0f.AsScalar()); data.Print(); } } }
35.383321
144
0.442071
[ "Apache-2.0" ]
fastai/AleaTK
tests/AleaTKTest/TensorComputing.cs
46,248
C#
using System; using Archimedes.Framework.Stereotype; namespace Archimedes.Framework.Test.ContainerTest { [Service] public class ServiceC { [Inject] public ServiceC(ServiceA serviceA, ServiceB serviceB) { if(serviceA == null) throw new ArgumentNullException("serviceA"); if(serviceB == null) throw new ArgumentNullException("serviceB"); this.serviceA = serviceA; this.serviceB = serviceB; } public ServiceA serviceA; public ServiceB serviceB; } }
24.434783
77
0.629893
[ "MIT" ]
ElderByte-/Archimedes.Framework
Archimedes.Framework.Test/ContainerTest/ServiceC.cs
564
C#