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
namespace FaraMedia.Web.Framework.UI.Sectionation.Renderers { using System.Web.Mvc; using FaraMedia.Web.Framework.UI.Sectionation.Items; public abstract class SectionItemRendererBase { public abstract MvcHtmlString Render(SectionItemBase sectionItem); } }
31.222222
74
0.768683
[ "MIT" ]
m-sadegh-sh/FaraMedia
src/Presentation/FaraMedia.Web.Framework/UI/Sectionation/Renderers/SectionItemRendererBase.cs
281
C#
using System; using System.Collections.Generic; using System.Text; namespace RazorPagesMovie.MovieServices.DTOs { public class MovieDto { public int Id { get; set; } public string Title { get; set; } public DateTime ReleaseDate { get; set; } public string Genre { get; set; } public decimal Price { get; set; } } }
20.210526
49
0.606771
[ "MIT" ]
VeselinovStf/Telerik_Alpha_NET_Prep
Web_Applications/RazorPagesInAspNetCore/RazorPagesMovie.MovieServices/DTOs/MovieDto.cs
386
C#
namespace MassTransit.Futures { /// <summary> /// Given the event context and request, returns an object used to complete the initialization of the object type /// </summary> /// <param name="context"></param> /// <typeparam name="TMessage"></typeparam> /// <typeparam name="T"></typeparam> public delegate T FutureMessageFactory<in TMessage, out T>(FutureConsumeContext<TMessage> context) where TMessage : class where T : class; /// <summary> /// Given the event context and request, returns an object used to complete the initialization of the object type /// </summary> /// <param name="context"></param> /// <typeparam name="T"></typeparam> public delegate T FutureMessageFactory<out T>(FutureConsumeContext context) where T : class; }
38.904762
117
0.667075
[ "ECL-2.0", "Apache-2.0" ]
AhmedKhalil777/MassTransit
src/MassTransit/Futures/FutureMessageFactory.cs
817
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using System.IO; using Grammophone.BetaImport; namespace Grammophone.BetaImport.Viewer { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void CanExecuteOpen(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = true; } private void ExecuteOpen(object sender, ExecutedRoutedEventArgs e) { var dialog = new Microsoft.Win32.OpenFileDialog(); dialog.DefaultExt = ".txt"; dialog.Filter = "Text documents|*.txt"; if (dialog.ShowDialog(this) == true) { using (Stream inputStream = dialog.OpenFile()) { using (BetaReader betaReader = new BetaReader(inputStream, new PrecombinedDiacriticsBetaConverter())) //using (BetaReader betaReader = new BetaReader(inputStream, new ComposingDiacriticsBetaConverter())) { fileTextBox.Text = dialog.FileName; contentTextBox.ScrollToHome(); contentTextBox.Text = betaReader.ReadToEnd(); } } } } } }
24.736842
106
0.729787
[ "MIT" ]
grammophone/Gramma.BetaImport.Viewer
MainWindow.xaml.cs
1,412
C#
using RabbitMQ.TraceableMessaging.Models; using System; using System.Collections.Generic; using System.Text; namespace RabbitMQ.TraceableMessaging.ApplicationInsights.Tests.Models { class Pong1 : Reply { } }
18.5
70
0.774775
[ "MIT" ]
dmlarionov/RabbitMQ.TraceableMessaging
tests/RabbitMQ.TraceableMessaging.ApplicationInsights.Tests/Models/Pong1.cs
224
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 timestream-query-2018-11-01.normal.json service model. */ using System; using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using System.Net; using Amazon.TimestreamQuery.Model; using Amazon.TimestreamQuery.Model.Internal.MarshallTransformations; using Amazon.TimestreamQuery.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.TimestreamQuery { /// <summary> /// Implementation for accessing TimestreamQuery /// /// /// </summary> public partial class AmazonTimestreamQueryClient : AmazonServiceClient, IAmazonTimestreamQuery { private static IServiceMetadata serviceMetadata = new AmazonTimestreamQueryMetadata(); private ITimestreamQueryPaginatorFactory _paginators; /// <summary> /// Paginators for the service /// </summary> public ITimestreamQueryPaginatorFactory Paginators { get { if (this._paginators == null) { this._paginators = new TimestreamQueryPaginatorFactory(this); } return this._paginators; } } #region Constructors /// <summary> /// Constructs AmazonTimestreamQueryClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// <code> /// &lt;?xml version="1.0" encoding="utf-8" ?&gt; /// &lt;configuration&gt; /// &lt;appSettings&gt; /// &lt;add key="AWSProfileName" value="AWS Default"/&gt; /// &lt;/appSettings&gt; /// &lt;/configuration&gt; /// </code> /// /// </summary> public AmazonTimestreamQueryClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonTimestreamQueryConfig()) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// <code> /// &lt;?xml version="1.0" encoding="utf-8" ?&gt; /// &lt;configuration&gt; /// &lt;appSettings&gt; /// &lt;add key="AWSProfileName" value="AWS Default"/&gt; /// &lt;/appSettings&gt; /// &lt;/configuration&gt; /// </code> /// /// </summary> /// <param name="region">The region to connect.</param> public AmazonTimestreamQueryClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonTimestreamQueryConfig{RegionEndpoint = region}) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// <code> /// &lt;?xml version="1.0" encoding="utf-8" ?&gt; /// &lt;configuration&gt; /// &lt;appSettings&gt; /// &lt;add key="AWSProfileName" value="AWS Default"/&gt; /// &lt;/appSettings&gt; /// &lt;/configuration&gt; /// </code> /// /// </summary> /// <param name="config">The AmazonTimestreamQueryClient Configuration Object</param> public AmazonTimestreamQueryClient(AmazonTimestreamQueryConfig config) : base(FallbackCredentialsFactory.GetCredentials(), config) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with AWS Credentials /// </summary> /// <param name="credentials">AWS Credentials</param> public AmazonTimestreamQueryClient(AWSCredentials credentials) : this(credentials, new AmazonTimestreamQueryConfig()) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with AWS Credentials /// </summary> /// <param name="credentials">AWS Credentials</param> /// <param name="region">The region to connect.</param> public AmazonTimestreamQueryClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonTimestreamQueryConfig{RegionEndpoint = region}) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with AWS Credentials and an /// AmazonTimestreamQueryClient Configuration object. /// </summary> /// <param name="credentials">AWS Credentials</param> /// <param name="clientConfig">The AmazonTimestreamQueryClient Configuration Object</param> public AmazonTimestreamQueryClient(AWSCredentials credentials, AmazonTimestreamQueryConfig clientConfig) : base(credentials, clientConfig) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID and AWS Secret Key /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonTimestreamQueryConfig()) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID and AWS Secret Key /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="region">The region to connect.</param> public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonTimestreamQueryConfig() {RegionEndpoint=region}) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID, AWS Secret Key and an /// AmazonTimestreamQueryClient Configuration object. /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="clientConfig">The AmazonTimestreamQueryClient Configuration Object</param> public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonTimestreamQueryConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID and AWS Secret Key /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="awsSessionToken">AWS Session Token</param> public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonTimestreamQueryConfig()) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID and AWS Secret Key /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="awsSessionToken">AWS Session Token</param> /// <param name="region">The region to connect.</param> public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonTimestreamQueryConfig{RegionEndpoint = region}) { } /// <summary> /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID, AWS Secret Key and an /// AmazonTimestreamQueryClient Configuration object. /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="awsSessionToken">AWS Session Token</param> /// <param name="clientConfig">The AmazonTimestreamQueryClient Configuration Object</param> public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonTimestreamQueryConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig) { } #endregion #region Overrides /// <summary> /// Creates the signer for the service. /// </summary> protected override AbstractAWSSigner CreateSigner() { return new AWS4Signer(); } /// <summary> /// Capture metadata for the service. /// </summary> protected override IServiceMetadata ServiceMetadata { get { return serviceMetadata; } } #endregion #region Dispose /// <summary> /// Disposes the service client. /// </summary> protected override void Dispose(bool disposing) { base.Dispose(disposing); } #endregion #region EndpointOperation Override protected override IEnumerable<DiscoveryEndpointBase> EndpointOperation(EndpointOperationContextBase context) { return EndpointDiscoveryResolver.ResolveEndpoints(context, () => { var request = new DescribeEndpointsRequest { }; var response = DescribeEndpoints(request); if(response.HttpStatusCode != HttpStatusCode.OK || response.Endpoints == null) { return null; } var endpoints = new List<DiscoveryEndpointBase>(); foreach(var endpoint in response.Endpoints) { endpoints.Add(new DiscoveryEndpoint(endpoint.Address, endpoint.CachePeriodInMinutes)); } return endpoints; }); } #endregion #region CancelQuery /// <summary> /// Cancels a query that has been issued. Cancellation is guaranteed only if the query /// has not completed execution before the cancellation request was issued. Because cancellation /// is an idempotent operation, subsequent cancellation requests will return a <code>CancellationMessage</code>, /// indicating that the query has already been canceled. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CancelQuery service method.</param> /// /// <returns>The response from the CancelQuery service method, as returned by TimestreamQuery.</returns> /// <exception cref="Amazon.TimestreamQuery.Model.AccessDeniedException"> /// You are not authorized to perform this action. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.InternalServerException"> /// Timestream was unable to fully process this request because of an internal server /// error. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.InvalidEndpointException"> /// The requested endpoint was invalid. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ThrottlingException"> /// The request was denied due to request throttling. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ValidationException"> /// Invalid or malformed request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso> public virtual CancelQueryResponse CancelQuery(CancelQueryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CancelQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = CancelQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = CancelQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke<CancelQueryResponse>(request, options); } /// <summary> /// Cancels a query that has been issued. Cancellation is guaranteed only if the query /// has not completed execution before the cancellation request was issued. Because cancellation /// is an idempotent operation, subsequent cancellation requests will return a <code>CancellationMessage</code>, /// indicating that the query has already been canceled. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CancelQuery service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CancelQuery service method, as returned by TimestreamQuery.</returns> /// <exception cref="Amazon.TimestreamQuery.Model.AccessDeniedException"> /// You are not authorized to perform this action. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.InternalServerException"> /// Timestream was unable to fully process this request because of an internal server /// error. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.InvalidEndpointException"> /// The requested endpoint was invalid. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ThrottlingException"> /// The request was denied due to request throttling. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ValidationException"> /// Invalid or malformed request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso> public virtual Task<CancelQueryResponse> CancelQueryAsync(CancelQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CancelQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = CancelQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = CancelQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync<CancelQueryResponse>(request, options, cancellationToken); } #endregion #region DescribeEndpoints /// <summary> /// DescribeEndpoints returns a list of available endpoints to make Timestream API calls /// against. This API is available through both Write and Query. /// /// /// <para> /// Because Timestream’s SDKs are designed to transparently work with the service’s architecture, /// including the management and mapping of the service endpoints, <i>it is not recommended /// that you use this API unless</i>: /// </para> /// <ul> <li> /// <para> /// Your application uses a programming language that does not yet have SDK support /// </para> /// </li> <li> /// <para> /// You require better control over the client-side implementation /// </para> /// </li> </ul> /// <para> /// For detailed information on how to use DescribeEndpoints, see <a href="https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.html">The /// Endpoint Discovery Pattern and REST APIs</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeEndpoints service method.</param> /// /// <returns>The response from the DescribeEndpoints service method, as returned by TimestreamQuery.</returns> /// <exception cref="Amazon.TimestreamQuery.Model.InternalServerException"> /// Timestream was unable to fully process this request because of an internal server /// error. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ThrottlingException"> /// The request was denied due to request throttling. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ValidationException"> /// Invalid or malformed request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/DescribeEndpoints">REST API Reference for DescribeEndpoints Operation</seealso> public virtual DescribeEndpointsResponse DescribeEndpoints(DescribeEndpointsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeEndpointsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeEndpointsResponseUnmarshaller.Instance; return Invoke<DescribeEndpointsResponse>(request, options); } /// <summary> /// DescribeEndpoints returns a list of available endpoints to make Timestream API calls /// against. This API is available through both Write and Query. /// /// /// <para> /// Because Timestream’s SDKs are designed to transparently work with the service’s architecture, /// including the management and mapping of the service endpoints, <i>it is not recommended /// that you use this API unless</i>: /// </para> /// <ul> <li> /// <para> /// Your application uses a programming language that does not yet have SDK support /// </para> /// </li> <li> /// <para> /// You require better control over the client-side implementation /// </para> /// </li> </ul> /// <para> /// For detailed information on how to use DescribeEndpoints, see <a href="https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.html">The /// Endpoint Discovery Pattern and REST APIs</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeEndpoints service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeEndpoints service method, as returned by TimestreamQuery.</returns> /// <exception cref="Amazon.TimestreamQuery.Model.InternalServerException"> /// Timestream was unable to fully process this request because of an internal server /// error. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ThrottlingException"> /// The request was denied due to request throttling. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ValidationException"> /// Invalid or malformed request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/DescribeEndpoints">REST API Reference for DescribeEndpoints Operation</seealso> public virtual Task<DescribeEndpointsResponse> DescribeEndpointsAsync(DescribeEndpointsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeEndpointsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeEndpointsResponseUnmarshaller.Instance; return InvokeAsync<DescribeEndpointsResponse>(request, options, cancellationToken); } #endregion #region Query /// <summary> /// Query is a synchronous operation that enables you to execute a query. Query will /// timeout after 60 seconds. You must update the default timeout in the SDK to support /// a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. /// For more information, see Quotas in the Timestream Developer Guide. /// </summary> /// <param name="request">Container for the necessary parameters to execute the Query service method.</param> /// /// <returns>The response from the Query service method, as returned by TimestreamQuery.</returns> /// <exception cref="Amazon.TimestreamQuery.Model.AccessDeniedException"> /// You are not authorized to perform this action. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ConflictException"> /// Unable to poll results for a cancelled query. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.InternalServerException"> /// Timestream was unable to fully process this request because of an internal server /// error. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.InvalidEndpointException"> /// The requested endpoint was invalid. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.QueryExecutionException"> /// Timestream was unable to run the query successfully. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ThrottlingException"> /// The request was denied due to request throttling. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ValidationException"> /// Invalid or malformed request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/Query">REST API Reference for Query Operation</seealso> public virtual QueryResponse Query(QueryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = QueryRequestMarshaller.Instance; options.ResponseUnmarshaller = QueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = QueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke<QueryResponse>(request, options); } /// <summary> /// Query is a synchronous operation that enables you to execute a query. Query will /// timeout after 60 seconds. You must update the default timeout in the SDK to support /// a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. /// For more information, see Quotas in the Timestream Developer Guide. /// </summary> /// <param name="request">Container for the necessary parameters to execute the Query service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the Query service method, as returned by TimestreamQuery.</returns> /// <exception cref="Amazon.TimestreamQuery.Model.AccessDeniedException"> /// You are not authorized to perform this action. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ConflictException"> /// Unable to poll results for a cancelled query. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.InternalServerException"> /// Timestream was unable to fully process this request because of an internal server /// error. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.InvalidEndpointException"> /// The requested endpoint was invalid. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.QueryExecutionException"> /// Timestream was unable to run the query successfully. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ThrottlingException"> /// The request was denied due to request throttling. /// </exception> /// <exception cref="Amazon.TimestreamQuery.Model.ValidationException"> /// Invalid or malformed request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/Query">REST API Reference for Query Operation</seealso> public virtual Task<QueryResponse> QueryAsync(QueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = QueryRequestMarshaller.Instance; options.ResponseUnmarshaller = QueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = QueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync<QueryResponse>(request, options, cancellationToken); } #endregion } }
47.927562
194
0.648247
[ "Apache-2.0" ]
ChristopherButtars/aws-sdk-net
sdk/src/Services/TimestreamQuery/Generated/_bcl45/AmazonTimestreamQueryClient.cs
27,135
C#
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ProjetoModeloDDD.Domain")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ProjetoModeloDDD.Domain")] [assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a253bb37-e74a-41da-8c71-8b044a7a0ce8")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
38.351351
84
0.74771
[ "Apache-2.0" ]
fabianomarcos/ASP-NET-MVC-MODELO-DDD
ProjetoModeloDDD/ProjetoModeloDDD.Domain/Properties/AssemblyInfo.cs
1,422
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; using Xunit; namespace System.Linq.Expressions.Tests { public static class TernaryArrayNullableTests { #region Test methods [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableBoolArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; bool?[][] array2 = new bool?[][] { null, new bool?[0], new bool?[] { true, false }, new bool?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableBoolArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableByteArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; byte?[][] array2 = new byte?[][] { null, new byte?[0], new byte?[] { 0, 1, byte.MaxValue }, new byte?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableByteArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableCharArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; char?[][] array2 = new char?[][] { null, new char?[0], new char?[] { '\0', '\b', 'A', '\uffff' }, new char?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableCharArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableDecimalArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; decimal?[][] array2 = new decimal?[][] { null, new decimal?[0], new decimal?[] { decimal.Zero, decimal.One, decimal.MinusOne, decimal.MinValue, decimal.MaxValue }, new decimal?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableDecimalArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableDoubleArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; double?[][] array2 = new double?[][] { null, new double?[0], new double?[] { 0, 1, -1, double.MinValue, double.MaxValue, double.Epsilon, double.NegativeInfinity, double.PositiveInfinity }, new double?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableDoubleArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableFloatArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; float?[][] array2 = new float?[][] { null, new float?[0], new float?[] { 0, 1, -1, float.MinValue, float.MaxValue, float.Epsilon, float.NegativeInfinity, float.PositiveInfinity }, new float?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableFloatArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableIntArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; int?[][] array2 = new int?[][] { null, new int?[0], new int?[] { 0, 1, -1, int.MinValue, int.MaxValue }, new int?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableIntArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableLongArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; long?[][] array2 = new long?[][] { null, new long?[0], new long?[] { 0, 1, -1, long.MinValue, long.MaxValue }, new long?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableLongArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableStructArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; S?[][] array2 = new S?[][] { null, new S?[0], new S?[] { default(S), new S() }, new S?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableStructArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableSByteArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; sbyte?[][] array2 = new sbyte?[][] { null, new sbyte?[0], new sbyte?[] { 0, 1, -1, sbyte.MinValue, sbyte.MaxValue }, new sbyte?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableSByteArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableStructWithStringArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; Sc?[][] array2 = new Sc?[][] { null, new Sc?[0], new Sc?[] { default(Sc), new Sc(), new Sc(null) }, new Sc?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableStructWithStringArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableStructWithStringAndFieldArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; Scs?[][] array2 = new Scs?[][] { null, new Scs?[0], new Scs?[] { default(Scs), new Scs(), new Scs(null, new S()) }, new Scs?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableStructWithStringAndFieldArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableShortArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; short?[][] array2 = new short?[][] { null, new short?[0], new short?[] { 0, 1, -1, short.MinValue, short.MaxValue }, new short?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableShortArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableStructWithTwoValuesArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; Sp?[][] array2 = new Sp?[][] { null, new Sp?[0], new Sp?[] { default(Sp), new Sp(), new Sp(5, 5.0) }, new Sp?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableStructWithTwoValuesArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableStructWithValueArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; Ss?[][] array2 = new Ss?[][] { null, new Ss?[0], new Ss?[] { default(Ss), new Ss(), new Ss(new S()) }, new Ss?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableStructWithValueArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableUIntArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; uint?[][] array2 = new uint?[][] { null, new uint?[0], new uint?[] { 0, 1, uint.MaxValue }, new uint?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableUIntArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableULongArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; ulong?[][] array2 = new ulong?[][] { null, new ulong?[0], new ulong?[] { 0, 1, ulong.MaxValue }, new ulong?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableULongArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableUShortArrayTest(bool useInterpreter) { bool[] array1 = new bool[] { false, true }; ushort?[][] array2 = new ushort?[][] { null, new ushort?[0], new ushort?[] { 0, 1, ushort.MaxValue }, new ushort?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableUShortArray(array1[i], array2[j], array2[k], useInterpreter); } } } } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableGenericWithStructRestrictionArrayWithEnumTest(bool useInterpreter) { CheckTernaryArrayNullableGenericWithStructRestrictionArrayHelper<E>(useInterpreter); } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableGenericWithStructRestrictionArrayWithStructTest(bool useInterpreter) { CheckTernaryArrayNullableGenericWithStructRestrictionArrayHelper<S>(useInterpreter); } [Theory, ClassData(typeof(CompilationTypes))] public static void CheckTernaryArrayNullableGenericWithStructRestrictionArrayWithStructWithStringAndFieldTest(bool useInterpreter) { CheckTernaryArrayNullableGenericWithStructRestrictionArrayHelper<Scs>(useInterpreter); } #endregion #region Generic helpers private static void CheckTernaryArrayNullableGenericWithStructRestrictionArrayHelper<Ts>(bool useInterpreter) where Ts : struct { bool[] array1 = new bool[] { false, true }; Ts?[][] array2 = new Ts?[][] { null, new Ts?[0], new Ts?[] { default(Ts), new Ts() }, new Ts?[100] }; for (int i = 0; i < array1.Length; i++) { for (int j = 0; j < array2.Length; j++) { for (int k = 0; k < array2.Length; k++) { VerifyArrayNullableGenericWithStructRestrictionArray<Ts>(array1[i], array2[j], array2[k], useInterpreter); } } } } #endregion #region Test verifiers private static void VerifyArrayNullableBoolArray(bool condition, bool?[] a, bool?[] b, bool useInterpreter) { Expression<Func<bool?[]>> e = Expression.Lambda<Func<bool?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(bool?[])), Expression.Constant(b, typeof(bool?[]))), Enumerable.Empty<ParameterExpression>()); Func<bool?[]> f = e.Compile(useInterpreter); bool?[] result = default(bool?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } bool?[] expected = default(bool?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableByteArray(bool condition, byte?[] a, byte?[] b, bool useInterpreter) { Expression<Func<byte?[]>> e = Expression.Lambda<Func<byte?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(byte?[])), Expression.Constant(b, typeof(byte?[]))), Enumerable.Empty<ParameterExpression>()); Func<byte?[]> f = e.Compile(useInterpreter); byte?[] result = default(byte?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } byte?[] expected = default(byte?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableCharArray(bool condition, char?[] a, char?[] b, bool useInterpreter) { Expression<Func<char?[]>> e = Expression.Lambda<Func<char?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(char?[])), Expression.Constant(b, typeof(char?[]))), Enumerable.Empty<ParameterExpression>()); Func<char?[]> f = e.Compile(useInterpreter); char?[] result = default(char?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } char?[] expected = default(char?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableDecimalArray(bool condition, decimal?[] a, decimal?[] b, bool useInterpreter) { Expression<Func<decimal?[]>> e = Expression.Lambda<Func<decimal?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(decimal?[])), Expression.Constant(b, typeof(decimal?[]))), Enumerable.Empty<ParameterExpression>()); Func<decimal?[]> f = e.Compile(useInterpreter); decimal?[] result = default(decimal?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } decimal?[] expected = default(decimal?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableDoubleArray(bool condition, double?[] a, double?[] b, bool useInterpreter) { Expression<Func<double?[]>> e = Expression.Lambda<Func<double?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(double?[])), Expression.Constant(b, typeof(double?[]))), Enumerable.Empty<ParameterExpression>()); Func<double?[]> f = e.Compile(useInterpreter); double?[] result = default(double?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } double?[] expected = default(double?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableFloatArray(bool condition, float?[] a, float?[] b, bool useInterpreter) { Expression<Func<float?[]>> e = Expression.Lambda<Func<float?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(float?[])), Expression.Constant(b, typeof(float?[]))), Enumerable.Empty<ParameterExpression>()); Func<float?[]> f = e.Compile(useInterpreter); float?[] result = default(float?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } float?[] expected = default(float?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableIntArray(bool condition, int?[] a, int?[] b, bool useInterpreter) { Expression<Func<int?[]>> e = Expression.Lambda<Func<int?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(int?[])), Expression.Constant(b, typeof(int?[]))), Enumerable.Empty<ParameterExpression>()); Func<int?[]> f = e.Compile(useInterpreter); int?[] result = default(int?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } int?[] expected = default(int?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableLongArray(bool condition, long?[] a, long?[] b, bool useInterpreter) { Expression<Func<long?[]>> e = Expression.Lambda<Func<long?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(long?[])), Expression.Constant(b, typeof(long?[]))), Enumerable.Empty<ParameterExpression>()); Func<long?[]> f = e.Compile(useInterpreter); long?[] result = default(long?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } long?[] expected = default(long?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableStructArray(bool condition, S?[] a, S?[] b, bool useInterpreter) { Expression<Func<S?[]>> e = Expression.Lambda<Func<S?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(S?[])), Expression.Constant(b, typeof(S?[]))), Enumerable.Empty<ParameterExpression>()); Func<S?[]> f = e.Compile(useInterpreter); S?[] result = default(S?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } S?[] expected = default(S?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableSByteArray(bool condition, sbyte?[] a, sbyte?[] b, bool useInterpreter) { Expression<Func<sbyte?[]>> e = Expression.Lambda<Func<sbyte?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(sbyte?[])), Expression.Constant(b, typeof(sbyte?[]))), Enumerable.Empty<ParameterExpression>()); Func<sbyte?[]> f = e.Compile(useInterpreter); sbyte?[] result = default(sbyte?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } sbyte?[] expected = default(sbyte?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableStructWithStringArray(bool condition, Sc?[] a, Sc?[] b, bool useInterpreter) { Expression<Func<Sc?[]>> e = Expression.Lambda<Func<Sc?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(Sc?[])), Expression.Constant(b, typeof(Sc?[]))), Enumerable.Empty<ParameterExpression>()); Func<Sc?[]> f = e.Compile(useInterpreter); Sc?[] result = default(Sc?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } Sc?[] expected = default(Sc?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableStructWithStringAndFieldArray(bool condition, Scs?[] a, Scs?[] b, bool useInterpreter) { Expression<Func<Scs?[]>> e = Expression.Lambda<Func<Scs?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(Scs?[])), Expression.Constant(b, typeof(Scs?[]))), Enumerable.Empty<ParameterExpression>()); Func<Scs?[]> f = e.Compile(useInterpreter); Scs?[] result = default(Scs?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } Scs?[] expected = default(Scs?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableShortArray(bool condition, short?[] a, short?[] b, bool useInterpreter) { Expression<Func<short?[]>> e = Expression.Lambda<Func<short?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(short?[])), Expression.Constant(b, typeof(short?[]))), Enumerable.Empty<ParameterExpression>()); Func<short?[]> f = e.Compile(useInterpreter); short?[] result = default(short?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } short?[] expected = default(short?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableStructWithTwoValuesArray(bool condition, Sp?[] a, Sp?[] b, bool useInterpreter) { Expression<Func<Sp?[]>> e = Expression.Lambda<Func<Sp?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(Sp?[])), Expression.Constant(b, typeof(Sp?[]))), Enumerable.Empty<ParameterExpression>()); Func<Sp?[]> f = e.Compile(useInterpreter); Sp?[] result = default(Sp?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } Sp?[] expected = default(Sp?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableStructWithValueArray(bool condition, Ss?[] a, Ss?[] b, bool useInterpreter) { Expression<Func<Ss?[]>> e = Expression.Lambda<Func<Ss?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(Ss?[])), Expression.Constant(b, typeof(Ss?[]))), Enumerable.Empty<ParameterExpression>()); Func<Ss?[]> f = e.Compile(useInterpreter); Ss?[] result = default(Ss?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } Ss?[] expected = default(Ss?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableUIntArray(bool condition, uint?[] a, uint?[] b, bool useInterpreter) { Expression<Func<uint?[]>> e = Expression.Lambda<Func<uint?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(uint?[])), Expression.Constant(b, typeof(uint?[]))), Enumerable.Empty<ParameterExpression>()); Func<uint?[]> f = e.Compile(useInterpreter); uint?[] result = default(uint?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } uint?[] expected = default(uint?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableULongArray(bool condition, ulong?[] a, ulong?[] b, bool useInterpreter) { Expression<Func<ulong?[]>> e = Expression.Lambda<Func<ulong?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(ulong?[])), Expression.Constant(b, typeof(ulong?[]))), Enumerable.Empty<ParameterExpression>()); Func<ulong?[]> f = e.Compile(useInterpreter); ulong?[] result = default(ulong?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } ulong?[] expected = default(ulong?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableUShortArray(bool condition, ushort?[] a, ushort?[] b, bool useInterpreter) { Expression<Func<ushort?[]>> e = Expression.Lambda<Func<ushort?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(ushort?[])), Expression.Constant(b, typeof(ushort?[]))), Enumerable.Empty<ParameterExpression>()); Func<ushort?[]> f = e.Compile(useInterpreter); ushort?[] result = default(ushort?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } ushort?[] expected = default(ushort?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } private static void VerifyArrayNullableGenericWithStructRestrictionArray<Ts>(bool condition, Ts?[] a, Ts?[] b, bool useInterpreter) where Ts : struct { Expression<Func<Ts?[]>> e = Expression.Lambda<Func<Ts?[]>>( Expression.Condition( Expression.Constant(condition, typeof(bool)), Expression.Constant(a, typeof(Ts?[])), Expression.Constant(b, typeof(Ts?[]))), Enumerable.Empty<ParameterExpression>()); Func<Ts?[]> f = e.Compile(useInterpreter); Ts?[] result = default(Ts?[]); Exception fEx = null; try { result = f(); } catch (Exception ex) { fEx = ex; } Ts?[] expected = default(Ts?[]); Exception csEx = null; try { expected = condition ? a : b; } catch (Exception ex) { csEx = ex; } if (fEx != null || csEx != null) { Assert.NotNull(fEx); Assert.NotNull(csEx); Assert.Equal(csEx.GetType(), fEx.GetType()); } else { Assert.Equal(expected, result); } } #endregion } }
34.665574
220
0.438735
[ "MIT" ]
OceanYan/corefx
src/System.Linq.Expressions/tests/Ternary/TernaryArrayNullableTests.cs
42,292
C#
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Authentication.OidcDemo.macOS")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Authentication.OidcDemo.macOS")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("166de4ca-8f11-4ef9-bcf8-3e7834988e7d")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
38.675676
84
0.748428
[ "Apache-2.0" ]
Mohsens22/Uno.Samples
UI/Authentication.OidcDemo/Authentication.OidcDemo/Authentication.OidcDemo.macOS/Properties/AssemblyInfo.cs
1,434
C#
using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Diagnostics; using System.IO; using System.Reflection; namespace Tests.Tx { [TestClass] public class EtwGeneration { string ToolFileName { get { string dir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); return Path.Combine(dir, @"EtwEventTypeGen.exe"); } } [TestMethod] public void GenerateHttp() { var tool = Process.Start(ToolFileName, "/m:HTTP_Server.man /o:http"); tool.WaitForExit(); Assert.AreEqual(0, tool.ExitCode); } [TestMethod] public void GenerateAsp() { var tool = Process.Start(ToolFileName, "/m:asp.man /o:http"); tool.WaitForExit(); Assert.AreEqual(0, tool.ExitCode); } } }
23.097561
93
0.544879
[ "Apache-2.0" ]
Reactive-Extensions/Tx
Test/UnitTests/EtwGeneration.cs
949
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using FantasyCritic.Lib.Domain; using NodaTime; namespace FantasyCritic.Web.Models.Responses { public class ManagerMessageViewModel { public ManagerMessageViewModel(ManagerMessage domain, bool isDismissed) { MessageID = domain.MessageID; MessageText = domain.MessageText; IsPublic = domain.IsPublic; Timestamp = domain.Timestamp; IsDismissed = isDismissed; } public Guid MessageID { get; } public string MessageText { get; } public bool IsPublic { get; } public Instant Timestamp { get; } public bool IsDismissed { get; } } }
26.033333
79
0.654289
[ "MIT" ]
SteveF92/FantasyCritic
FantasyCritic.Web/Models/Responses/ManagerMessageViewModel.cs
781
C#
using FluentAssertions; using Xunit; namespace MsSqlCdc.Tests; public class DataConverTests { [Theory] [InlineData(RelationalOperator.LargestLessThan, "largest less than")] [InlineData(RelationalOperator.LargestLessThanOrEqual, "largest less than or equal")] [InlineData(RelationalOperator.SmallestGreaterThan, "smallest greater than")] [InlineData(RelationalOperator.SmallestGreaterThanOrEqual, "smallest greater than or equal")] public void Convert_relation_operator_to_string_representation( RelationalOperator relationalOperator, string expected) { var stringRepresentation = DataConvert.ConvertRelationOperator(relationalOperator); stringRepresentation.Should().Be(expected); } [Theory] [InlineData(NetChangesRowFilterOption.All, "all")] [InlineData(NetChangesRowFilterOption.AllWithMask, "all with mask")] [InlineData(NetChangesRowFilterOption.AllWithMerge, "all with merge")] public void Convert_net_changes_filter_options_to_string_representation( NetChangesRowFilterOption filterOption, string expected) { var stringRepresentation = DataConvert.ConvertNetChangesRowFilterOption(filterOption); stringRepresentation.Should().Be(expected); } [Theory] [InlineData(AllChangesRowFilterOption.All, "all")] [InlineData(AllChangesRowFilterOption.AllUpdateOld, "all update old")] public void Convert_all_changes_filter_options_to_string_representation( AllChangesRowFilterOption filterOption, string expected) { var stringRepresentation = DataConvert.ConvertAllChangesRowFilterOption(filterOption); stringRepresentation.Should().Be(expected); } }
39.318182
97
0.762428
[ "MIT" ]
DAXGRID/mssql-cdc
test/MsSqlCdc.Tests/DataConvertTests.cs
1,730
C#
using EPiServer.Core; using System.Collections.Generic; namespace TcbInternetSolutions.Vulcan.Core { /// <summary> /// Arguments used to modify indexing /// </summary> public interface IVulcanIndexingModifierArgs { /// <summary> /// Content Instance /// </summary> IContent Content { get; } /// <summary> /// Matched pipeline Id or null /// </summary> string PipelineId { get; } /// <summary> /// Additional items to serialize for item /// </summary> IDictionary<string, object> AdditionalItems { get; } } }
24.269231
60
0.573693
[ "MIT" ]
TCB-Internet-Solutions/vulcan
src/TcbInternetSolutions.Vulcan.Core/IVulcanIndexingModifierArgs.cs
633
C#
/* * DocuSign REST API * * The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. * * OpenAPI spec version: v2 * Contact: devcenter@docusign.com * Generated by: https://github.com/swagger-api/swagger-codegen.git */ using System; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; namespace DocuSign.eSign.Model { /// <summary> /// FoldersResponse /// </summary> [DataContract] public partial class FoldersResponse : IEquatable<FoldersResponse>, IValidatableObject { public FoldersResponse() { // Empty Constructor } /// <summary> /// Initializes a new instance of the <see cref="FoldersResponse" /> class. /// </summary> /// <param name="Folders">.</param> public FoldersResponse(List<Folder> Folders = default(List<Folder>)) { this.Folders = Folders; } /// <summary> /// /// </summary> /// <value></value> [DataMember(Name="folders", EmitDefaultValue=false)] public List<Folder> Folders { get; set; } /// <summary> /// Returns the string presentation of the object /// </summary> /// <returns>String presentation of the object</returns> public override string ToString() { var sb = new StringBuilder(); sb.Append("class FoldersResponse {\n"); sb.Append(" Folders: ").Append(Folders).Append("\n"); sb.Append("}\n"); return sb.ToString(); } /// <summary> /// Returns the JSON string presentation of the object /// </summary> /// <returns>JSON string presentation of the object</returns> public string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } /// <summary> /// Returns true if objects are equal /// </summary> /// <param name="obj">Object to be compared</param> /// <returns>Boolean</returns> public override bool Equals(object obj) { // credit: http://stackoverflow.com/a/10454552/677735 return this.Equals(obj as FoldersResponse); } /// <summary> /// Returns true if FoldersResponse instances are equal /// </summary> /// <param name="other">Instance of FoldersResponse to be compared</param> /// <returns>Boolean</returns> public bool Equals(FoldersResponse other) { // credit: http://stackoverflow.com/a/10454552/677735 if (other == null) return false; return ( this.Folders == other.Folders || this.Folders != null && this.Folders.SequenceEqual(other.Folders) ); } /// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks etc, of course :) if (this.Folders != null) hash = hash * 59 + this.Folders.GetHashCode(); return hash; } } public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) { yield break; } } }
30.765625
125
0.561453
[ "MIT" ]
CameronLoewen/docusign-csharp-client
sdk/src/DocuSign.eSign/Model/FoldersResponse.cs
3,938
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 mediaconvert-2017-08-29.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.MediaConvert.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.MediaConvert.Model.Internal.MarshallTransformations { /// <summary> /// CaptionSourceSettings Marshaller /// </summary> public class CaptionSourceSettingsMarshaller : IRequestMarshaller<CaptionSourceSettings, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(CaptionSourceSettings requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAncillarySourceSettings()) { context.Writer.WritePropertyName("ancillarySourceSettings"); context.Writer.WriteObjectStart(); var marshaller = AncillarySourceSettingsMarshaller.Instance; marshaller.Marshall(requestObject.AncillarySourceSettings, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetDvbSubSourceSettings()) { context.Writer.WritePropertyName("dvbSubSourceSettings"); context.Writer.WriteObjectStart(); var marshaller = DvbSubSourceSettingsMarshaller.Instance; marshaller.Marshall(requestObject.DvbSubSourceSettings, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetEmbeddedSourceSettings()) { context.Writer.WritePropertyName("embeddedSourceSettings"); context.Writer.WriteObjectStart(); var marshaller = EmbeddedSourceSettingsMarshaller.Instance; marshaller.Marshall(requestObject.EmbeddedSourceSettings, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetFileSourceSettings()) { context.Writer.WritePropertyName("fileSourceSettings"); context.Writer.WriteObjectStart(); var marshaller = FileSourceSettingsMarshaller.Instance; marshaller.Marshall(requestObject.FileSourceSettings, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetSourceType()) { context.Writer.WritePropertyName("sourceType"); context.Writer.Write(requestObject.SourceType); } if(requestObject.IsSetTeletextSourceSettings()) { context.Writer.WritePropertyName("teletextSourceSettings"); context.Writer.WriteObjectStart(); var marshaller = TeletextSourceSettingsMarshaller.Instance; marshaller.Marshall(requestObject.TeletextSourceSettings, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetTrackSourceSettings()) { context.Writer.WritePropertyName("trackSourceSettings"); context.Writer.WriteObjectStart(); var marshaller = TrackSourceSettingsMarshaller.Instance; marshaller.Marshall(requestObject.TrackSourceSettings, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CaptionSourceSettingsMarshaller Instance = new CaptionSourceSettingsMarshaller(); } }
36.171875
116
0.64838
[ "Apache-2.0" ]
Bio2hazard/aws-sdk-net
sdk/src/Services/MediaConvert/Generated/Model/Internal/MarshallTransformations/CaptionSourceSettingsMarshaller.cs
4,630
C#
//------------------------------------------------------------------------------ // <auto-generated> // このコードはツールによって生成されました。 // ランタイム バージョン:4.0.30319.18444 // // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 // コードが再生成されるときに損失したりします。 // </auto-generated> //------------------------------------------------------------------------------ namespace KbtterWPF.Properties { using System; /// <summary> /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。 /// </summary> // このクラスは StronglyTypedResourceBuilder クラスが ResGen // または Visual Studio のようなツールを使用して自動生成されました。 // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に // ResGen を実行し直すか、または VS プロジェクトをビルドし直します。 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } /// <summary> /// このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。 /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("KbtterWPF.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、 /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。 /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } } }
40.484375
175
0.610575
[ "MIT" ]
shirothin/Kbtter
KbtterWPF/Properties/Resources.Designer.cs
3,235
C#
/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. 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 * * 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 TencentCloud.Cam.V20190116.Models { using Newtonsoft.Json; using System.Collections.Generic; using TencentCloud.Common; public class CreatePolicyVersionResponse : AbstractModel { /// <summary> /// Policy version ID /// Note: this field may return null, indicating that no valid values can be obtained. /// </summary> [JsonProperty("VersionId")] public ulong? VersionId{ get; set; } /// <summary> /// The unique request ID, which is returned for each request. RequestId is required for locating a problem. /// </summary> [JsonProperty("RequestId")] public string RequestId{ get; set; } /// <summary> /// For internal usage only. DO NOT USE IT. /// </summary> public override void ToMap(Dictionary<string, string> map, string prefix) { this.SetParamSimple(map, prefix + "VersionId", this.VersionId); this.SetParamSimple(map, prefix + "RequestId", this.RequestId); } } }
33.173077
116
0.653333
[ "Apache-2.0" ]
TencentCloud/tencentcloud-sdk-dotnet-intl-en
TencentCloud/Cam/V20190116/Models/CreatePolicyVersionResponse.cs
1,725
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 ec2-2016-11-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.EC2.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.EC2.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteEgressOnlyInternetGateway operation /// </summary> public class DeleteEgressOnlyInternetGatewayResponseUnmarshaller : EC2ResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteEgressOnlyInternetGatewayResponse response = new DeleteEgressOnlyInternetGatewayResponse(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth = 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("returnCode", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.ReturnCode = unmarshaller.Unmarshall(context); continue; } } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); return new AmazonEC2Exception(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeleteEgressOnlyInternetGatewayResponseUnmarshaller _instance = new DeleteEgressOnlyInternetGatewayResponseUnmarshaller(); internal static DeleteEgressOnlyInternetGatewayResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteEgressOnlyInternetGatewayResponseUnmarshaller Instance { get { return _instance; } } } }
37.386139
159
0.63215
[ "Apache-2.0" ]
philasmar/aws-sdk-net
sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/DeleteEgressOnlyInternetGatewayResponseUnmarshaller.cs
3,776
C#
// ------------------------------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------------------------------------------- using System; using System.Net; using System.Threading; using System.Threading.Tasks; using EnsureThat; using Microsoft.Azure.Storage; using Microsoft.Azure.Storage.Blob; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Health.Fhir.Core.Configs; using Microsoft.Health.Fhir.Core.Features.Operations; namespace Microsoft.Health.Fhir.Azure.IntegrationDataStore { public class AzureConnectionStringClientInitializerV2 : IIntegrationDataStoreClientInitilizer<CloudBlobClient> { private readonly IntegrationDataStoreConfiguration _integrationDataStoreConfiguration; private readonly ILogger<AzureConnectionStringClientInitializerV2> _logger; public AzureConnectionStringClientInitializerV2(IOptions<IntegrationDataStoreConfiguration> integrationDataStoreConfiguration, ILogger<AzureConnectionStringClientInitializerV2> logger) { EnsureArg.IsNotNull(integrationDataStoreConfiguration?.Value, nameof(integrationDataStoreConfiguration)); EnsureArg.IsNotNull(logger, nameof(logger)); _integrationDataStoreConfiguration = integrationDataStoreConfiguration.Value; _logger = logger; } public Task<CloudBlobClient> GetAuthorizedClientAsync(CancellationToken cancellationToken) { return GetAuthorizedClientAsync(_integrationDataStoreConfiguration, cancellationToken); } public Task<CloudBlobClient> GetAuthorizedClientAsync(IntegrationDataStoreConfiguration integrationDataStoreConfiguration, CancellationToken cancellationToken) { if (string.IsNullOrWhiteSpace(integrationDataStoreConfiguration.StorageAccountConnection)) { throw new IntegrationDataStoreClientInitializerException(Resources.InvalidConnectionSettings, HttpStatusCode.BadRequest); } if (!CloudStorageAccount.TryParse(integrationDataStoreConfiguration.StorageAccountConnection, out CloudStorageAccount cloudAccount)) { throw new IntegrationDataStoreClientInitializerException(Resources.InvalidConnectionSettings, HttpStatusCode.BadRequest); } CloudBlobClient blobClient; try { blobClient = cloudAccount.CreateCloudBlobClient(); } catch (Exception ex) { _logger.LogError(ex, "Failed to create a Cloud Blob Client"); throw new IntegrationDataStoreClientInitializerException(Resources.InvalidConnectionSettings, HttpStatusCode.BadRequest); } return Task.FromResult(blobClient); } } }
45.492537
192
0.694226
[ "MIT" ]
BearerPipelineTest/fhir-server
src/Microsoft.Health.Fhir.Azure/IntegrationDataStore/AzureConnectionStringClientInitializerV2.cs
3,050
C#
using ShadowEngine.Objects.Parameters; using ShadowEngine.Config; using ShadowEngine.Exceptions; using ShadowEngine.Objects.Texturing.Image; using System; using System.Collections.Generic; using System.Drawing; using System.Collections.ObjectModel; namespace ShadowEngine.Objects.Texturing { /// <summary> /// Texture class /// </summary> public abstract class Texture : ConfigSavable { /// <value>All set up textures</value> public static Collection<Texture> All = new Collection<Texture>(); /// <value>Texture name</value> public string Name; public abstract void Render(Graphics g, TexturedObject obj, Vector2D cameraPos); /// <summary> /// Sets up a texture /// </summary> public static void Setup(Texture t) { foreach (Texture tex in All) if (tex.Name == t.Name) throw new TextureException("Texture name \"" + t.Name + "\" is already in use"); All.Add(t); } /// <summary> /// Finds texture by name /// </summary> public static Texture Get(string name) { foreach (Texture t in All) if (t.Name == name) return t; throw new TextureException("Cannot find texture \"" + name); } public static Collection<Texture> StartsWidth(string name) { Collection<Texture> tex = new Collection<Texture>(); foreach (Texture t in All) if (t.Name.StartsWith(name)) tex.Add(t); return tex; } public static void RenderObjectCenters(Graphics g, TexturedObject obj, Vector2D cameraPos) { if (obj.Visible) { g.FillEllipse( new SolidBrush( Color.Red ), new Rectangle( new Point( (int)(obj.GetNonRotatedGlobalPosition().X - 2 - cameraPos.X), (int)(obj.GetNonRotatedGlobalPosition().Y - 2 - cameraPos.Y) ), new System.Drawing.Size( 5, 5) )); } } public static void SaveConfig(string path) { Collection<ColorTexture> c = new Collection<ColorTexture>(); Collection<RegularTexture> r = new Collection<RegularTexture>(); Collection<GridTexture> g = new Collection<GridTexture>(); foreach (Texture t in All) if (t is ColorTexture) c.Add((ColorTexture)t); else if (t is RegularTexture) r.Add((RegularTexture)t); else g.Add((GridTexture)t); var serialized = new { Image = new { Regular = r, Grid = g }, Other = new { Color = c } }; WriteConfigFile(path, serialized); } public static void LoadConfig(string path) { dynamic val = ReadConfigFile(path); try { var a = val["Image"]["Regular"]; var b = val["Image"]["Grid"]; var c = val["Other"]["Color"]; } catch (Exception e) { Exception ex = new ConfigException(path + " config file is incorrect", e); Log.Exception(ex); throw ex; } foreach (Dictionary<string, object> dict in val["Image"]["Regular"]) { string name; string p; try { name = (string)dict["Name"]; p = (string)dict["ImagePath"]; } catch (Exception e) { Exception ex = new ConfigException(path + " config file is incorrect", e); Log.Exception(ex); throw ex; } RegularTexture t = new RegularTexture(name, p); if (dict.ContainsKey("InterpolationMode")) t.InterpolationMode = (System.Drawing.Drawing2D.InterpolationMode) Enum.Parse(typeof(System.Drawing.Drawing2D.InterpolationMode), (string)dict["InterpolationMode"]); All.Add(t); } foreach (Dictionary<string, object> dict in val["Image"]["Grid"]) { string name; string p; int xc; int yc; try { name = (string)dict["Name"]; p = (string)dict["ImagePath"]; xc = (int)dict["xCount"]; yc = (int)dict["yCount"]; } catch (Exception e) { Exception ex = new ConfigException(path + " config file is incorrect", e); Log.Exception(ex); throw ex; } GridTexture t = new GridTexture(name, p, xc, yc); if (dict.ContainsKey("InterpolationMode")) t.InterpolationMode = (System.Drawing.Drawing2D.InterpolationMode) Enum.Parse(typeof(System.Drawing.Drawing2D.InterpolationMode), (string)dict["InterpolationMode"]); All.Add(t); } foreach (Dictionary<string, object> dict in val["Other"]["Color"]) { string name; string hex; ColorTextureShape shape; try { name = (string)dict["Name"]; hex = (string)dict["HexColor"]; Dictionary<string, object> sd = (Dictionary<string, object>)dict["Size"]; shape = (ColorTextureShape)Enum.Parse(typeof(ColorTextureShape), (string)dict["ShapeString"]); } catch (Exception e) { Exception ex = new ConfigException(path + " config file is incorrect", e); Log.Exception(ex); throw ex; } ColorConverter cc = new ColorConverter(); Color c = (Color)cc.ConvertFromString(hex); All.Add(new ColorTexture(name, c, shape)); } foreach (Texture t in All) if (t is ImageTexture) ((ImageTexture)t).InitializeImage(); } } }
35.169231
114
0.461651
[ "MIT" ]
jszczerbinsky/ShadowEngine
src/ShadowEngine/Objects/Texturing/Texture.cs
6,860
C#
using System; namespace LoanApplication.Models { public class ErrorViewModel { public string RequestId { get; set; } public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); } }
19.363636
70
0.676056
[ "MIT" ]
PacktPublishing/CSharp-and-.NET-Core-Test-Driven-Development
Chapter04/LoanApplication/Models/ErrorViewModel.cs
213
C#
using Microsoft.VisualStudio.TestTools.UnitTesting; using Senparc.CO2NET.Tests; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace Senparc.CO2NET.Cache.Redis.Tests { [TestClass] public class RedisLockTest : BaseTest { [TestMethod] public void LockTest() { var cache = CacheStrategyFactory.GetObjectCacheStrategyInstance(); Console.WriteLine("Redis 配置:" + BaseTest._senparcSetting.Cache_Redis_Configuration); Console.WriteLine("当前缓存策略:" + cache.GetType()); var lockResourceName = "LockTest"; var threadCount = 60;//定义线程数量 var runningCount = 0; var finishThreadCount = 0;//已完成线程数量 var retryCount = 10;//重试次数(Redis 默认10) var retryDelay = TimeSpan.FromMilliseconds(100);//单次重试等待时间(Redis 默认10毫秒) Dictionary<int, Thread> threadCollection = new Dictionary<int, Thread>();//线程集合 var dtStart = SystemTime.Now; var startRun = false; //配置所有线程(为了尽量同时开始,忽略设置时间,所以先设置,再依次快速开启) for (int i = 0; i < threadCount; i++) { var lockGroupKey = i % 4;//分为4组 var threadIndex = i; threadCollection[i] = new Thread(async () => { runningCount++; //while (runningCount < threadCount) { //等待统一开始 } var dt1 = SystemTime.Now; using (var syncLock =cache.BeginCacheLock(lockResourceName, lockGroupKey.ToString(), retryCount, retryDelay)) { var runTime = SystemTime.Now; var waitTime = (runTime - dt1).TotalMilliseconds; Thread.Sleep(100);//模拟线程处理时间 finishThreadCount++; Console.WriteLine($"{runTime.ToString("ss.ffffff")} - {SystemTime.Now.ToString("ss.ffffff")}\t\t 等待:{waitTime}ms \t\t获取syncLock完成(Group:{lockGroupKey}):{threadIndex} - {syncLock.LockSuccessful}"); } }); threadCollection[i].Name = $"Lock-{i}"; } //开始所有线程 //此方法会导致死循环 //threadCollection.Values.ToList().AsParallel().ForAll(thread => thread.Start()); foreach (var thread in threadCollection.Values) { thread.Start();//注意:线程实际启动完成时间不一定是按序的 } while (finishThreadCount < threadCount) { //等待完成 } Console.WriteLine($"过程结束,总用时:{SystemTime.DiffTotalMS(dtStart)} ms"); } } }
36.473684
220
0.53824
[ "Apache-2.0" ]
554393109/Senparc.CO2NET
src/Senparc.CO2NET.Cache.Redis.Tests/RedisLockTest.cs
3,098
C#
// Copyright (c) 2022 AccelByte Inc. All Rights Reserved. // This is licensed software from AccelByte Inc, for limitations // and restrictions contact your company contract manager. // This code is generated by tool. DO NOT EDIT. using System; using System.IO; using System.Collections.Generic; using AccelByte.Sdk.Core; using AccelByte.Sdk.Sample.Cli.Command; using AccelByte.Sdk.Api.Iam.Wrapper; using AccelByte.Sdk.Api.Iam.Model; using AccelByte.Sdk.Api.Iam.Operation; namespace AccelByte.Sdk.Sample.Cli.ApiCommand.Iam { [SdkConsoleCommand("iam","publicremovetrusteddevicev4")] public class PublicRemoveTrustedDeviceV4Command: ISdkConsoleCommand { private AccelByteSDK _SDK; public string ServiceName{ get { return "Iam"; } } public string OperationName{ get { return "PublicRemoveTrustedDeviceV4"; } } [SdkCommandArgument("namespace")] public string Namespace { get; set; } = String.Empty; [SdkCommandArgument("device_token")] public string DeviceToken { get; set; } = String.Empty; public PublicRemoveTrustedDeviceV4Command(AccelByteSDK sdk) { _SDK = sdk; } public string Run() { AccelByte.Sdk.Api.Iam.Wrapper.UsersV4 wrapper = new AccelByte.Sdk.Api.Iam.Wrapper.UsersV4(_SDK); PublicRemoveTrustedDeviceV4 operation = new PublicRemoveTrustedDeviceV4( Namespace, DeviceToken ); wrapper.PublicRemoveTrustedDeviceV4(operation); return String.Empty; } } }
31.09434
108
0.656553
[ "MIT" ]
AccelByte/accelbyte-csharp-sdk
samples/AccelByte.Sdk.Sample.Cli/ApiCommand/Iam/UsersV4/PublicRemoveTrustedDeviceV4.cs
1,648
C#
using ANM.Example.Application.UseCases.GetTransactions; using Microsoft.AspNetCore.Mvc; namespace ANM.Example.API.UseCases.GetTransactions { public class GetTransactionsPresenter : IGetTransactionsOutput { public IActionResult ViewModel { get; private set; } public void Error(string message) { ViewModel = new BadRequestObjectResult(message); } public void Ok(GetTransactionsOutput output) { ViewModel = new OkObjectResult(new GetTransactionsResponse(output.Transactions)); } } }
27.47619
93
0.688042
[ "MIT" ]
alesimoes/hexagonal-clean-architecture
source/ANM.Example.API/UseCases/GetTransactions/GetTransactionsPresenter.cs
579
C#
namespace CrossJob.Web.Admin { using System; using System.Linq; using System.Web.UI; using Models; using Ninject; using Services.Contracts; using Controls.Notifier; public partial class Freelancers : Page { [Inject] public IFreelancersService users { get; set; } protected void Page_Load(object sender, EventArgs e) { this.DynamicDataManager1.RegisterControl(this.FreelancerListView); } public IQueryable<Freelancer> Freelancers_GetData() { return this.users.GetAllFreelancers(); } public void Freelancers_UpdateItem(string id) { Freelancer user = this.users.GetFreelancerDetails(id); if (user == null) { Notifier.Warning(String.Format("Item with id {0} was not found", id)); ModelState.AddModelError("", String.Format("Item with id {0} was not found", id)); return; } TryUpdateModel(user); if (ModelState.IsValid) { try { this.users.UpdateProfileFreelancer(user); } catch (Exception ex) { Notifier.Error("Sorry, cannot update user!" + ex.Message); } } Notifier.Success("Successfully updated the user!"); Response.Redirect("~/Admin/Freelancers"); } public void Freelancers_DeleteItem(string id) { this.HiddenfieldDeleteId.Text = id; this.ModalWindow.Show(); } protected void ModalWindow_OKButtonClicked(object sender, EventArgs e) { var id = this.HiddenfieldDeleteId.Text; if (this.users.GetFreelancerDetails(id) == null) { ModelState.AddModelError("", String.Format("Item with id {0} was not found", id)); return; } try { this.users.DeleteFreelancer(id); } catch (Exception ex) { Notifier.Error("Sorry, cannot delete this user." + ex.Message); } Notifier.Success("Successfully deleted the user!"); Response.Redirect("~/Admin/Freelancers"); } } }
29.54321
98
0.5257
[ "MIT" ]
Team-Katana-WebForms/CrossJob
CrossJob/Web/CrossJob.Web/Admin/Freelancers.aspx.cs
2,395
C#
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using AnZw.NavCodeEditor.Extensions.Reflection; namespace AnZw.NavCodeEditor.Extensions.LanguageService { public class SignatureInfo : ReflectionWrapper { public string ParentTypeName { get; set; } public string MethodName { get; set; } public ParameterInfo ReturnType { get; set; } public List<ParameterInfo> Parameters { get; } public string FormattedValue { get; set; } public SignatureInfo(object source) : base(source) { this.Parameters = new List<ParameterInfo>(); //copy properties this.ParentTypeName = GetProperty<string>("ParentTypeName"); this.MethodName = GetProperty<string>("MethodName"); this.FormattedValue = GetProperty<string>("FormattedValue"); object sourceReturnType = GetProperty("ReturnType"); if (sourceReturnType == null) this.ReturnType = null; else this.ReturnType = new ParameterInfo(sourceReturnType); IEnumerable sourceParameters = GetProperty<IEnumerable>("Parameters"); if (sourceParameters != null) { foreach (object sourceParameter in sourceParameters) { this.Parameters.Add(new ParameterInfo(sourceParameter)); } } } } }
32.382979
82
0.624179
[ "MIT" ]
anzwdev/ClassicAL-CodeEditorExtension
VSProject/AnZw.NavCodeEditor.Extensions/LanguageService/SignatureInfo.cs
1,524
C#
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace Sage.CA.SBS.ERP.Sage300.Common.Resources.Portal { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class NavigationResx { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal NavigationResx() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Sage.CA.SBS.ERP.Sage300.Common.Resources.Portal.NavigationResx", typeof(NavigationResx).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// <summary> /// Looks up a localized string similar to Administrative Services. /// </summary> public static string AdministrativeServices { get { return ResourceManager.GetString("AdministrativeServices", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/P Transactions. /// </summary> public static string AP_3rd_Level_Transaction_Template { get { return ResourceManager.GetString("AP_3rd_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/P Transactions. /// </summary> public static string AP_4th_Level_Transaction_Template { get { return ResourceManager.GetString("AP_4th_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Adjustment Batch List. /// </summary> public static string AP_Adjustment_Batch_List { get { return ResourceManager.GetString("AP_Adjustment_Batch_List", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Adjustment Entry. /// </summary> public static string AP_Adjustment_Entry { get { return ResourceManager.GetString("AP_Adjustment_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Batch Status. /// </summary> public static string AP_Batch_Status_Report { get { return ResourceManager.GetString("AP_Batch_Status_Report", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear History. /// </summary> public static string AP_Clear_History { get { return ResourceManager.GetString("AP_Clear_History", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear Statistics. /// </summary> public static string AP_Clear_Statistics { get { return ResourceManager.GetString("AP_Clear_Statistics", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Recurring Payables. /// </summary> public static string AP_Common_RecurringPayables { get { return ResourceManager.GetString("AP_Common_RecurringPayables", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Retainage Batch. /// </summary> public static string AP_Create_Retainage_Batch { get { return ResourceManager.GetString("AP_Create_Retainage_Batch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Delete Inactive Records. /// </summary> public static string AP_Delete_Inactive_Records { get { return ResourceManager.GetString("AP_Delete_Inactive_Records", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/P Periodic Processing. /// </summary> public static string AP_PeriodicProcessing { get { return ResourceManager.GetString("AP_PeriodicProcessing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Revaluation. /// </summary> public static string AP_PeriodicProcessing_Revaluation { get { return ResourceManager.GetString("AP_PeriodicProcessing_Revaluation", resourceCulture); } } /// <summary> /// Looks up a localized string similar to T5018(CPRS) Electronic Filing. /// </summary> public static string AP_PeriodicProcessing_T5028CPRSElectronicFiling { get { return ResourceManager.GetString("AP_PeriodicProcessing_T5028CPRSElectronicFiling", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Posting Journals. /// </summary> public static string AP_Posting_Journals { get { return ResourceManager.GetString("AP_Posting_Journals", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Recurring Payable Batch. /// </summary> public static string AP_Processing_CreateRecPayableBatch { get { return ResourceManager.GetString("AP_Processing_CreateRecPayableBatch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Recurring Payables. /// </summary> public static string AP_Recurring_Payables { get { return ResourceManager.GetString("AP_Recurring_Payables", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Remit-To Locations. /// </summary> public static string AP_Remit_To_Locations { get { return ResourceManager.GetString("AP_Remit_To_Locations", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/P Setup. /// </summary> public static string AP_Setup { get { return ResourceManager.GetString("AP_Setup", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 1099/CPRS Codes. /// </summary> public static string AP_Setup_1099CPRSCodes { get { return ResourceManager.GetString("AP_Setup_1099CPRSCodes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Distribution Sets. /// </summary> public static string AP_Setup_DistributionSets { get { return ResourceManager.GetString("AP_Setup_DistributionSets", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payment Selection Codes. /// </summary> public static string AP_Setup_PaymentSelectionCodes { get { return ResourceManager.GetString("AP_Setup_PaymentSelectionCodes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/P Transaction Reports. /// </summary> public static string AP_TransactionReports { get { return ResourceManager.GetString("AP_TransactionReports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Vendor Transactions. /// </summary> public static string AP_TransactionReports_VendorTransactions { get { return ResourceManager.GetString("AP_TransactionReports_VendorTransactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/P Transactions. /// </summary> public static string AP_Transactions { get { return ResourceManager.GetString("AP_Transactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Control Payments. /// </summary> public static string AP_Transactions_ControlPayments { get { return ResourceManager.GetString("AP_Transactions_ControlPayments", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Payment Batch. /// </summary> public static string AP_Transactions_CreatePaymentBatch { get { return ResourceManager.GetString("AP_Transactions_CreatePaymentBatch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payment Batch List. /// </summary> public static string AP_Transactions_PaymentBatchList { get { return ResourceManager.GetString("AP_Transactions_PaymentBatchList", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payment Entry. /// </summary> public static string AP_Transactions_PaymentEntry { get { return ResourceManager.GetString("AP_Transactions_PaymentEntry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payment Inquiry. /// </summary> public static string AP_Transactions_PaymentInquiry { get { return ResourceManager.GetString("AP_Transactions_PaymentInquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Print Checks. /// </summary> public static string AP_Transactions_PrintCheques { get { return ResourceManager.GetString("AP_Transactions_PrintCheques", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Aged Cash Requirements. /// </summary> public static string AP_TransReports_AgedCashRequirements { get { return ResourceManager.GetString("AP_TransReports_AgedCashRequirements", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Aged Payables. /// </summary> public static string AP_TransReports_AgedPayables { get { return ResourceManager.GetString("AP_TransReports_AgedPayables", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Check Register. /// </summary> public static string AP_TransReports_CheckRegister { get { return ResourceManager.GetString("AP_TransReports_CheckRegister", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Vendor Groups. /// </summary> public static string AP_Vendor_Groups { get { return ResourceManager.GetString("AP_Vendor_Groups", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Vendor Groups. /// </summary> public static string AP_VendorGroups { get { return ResourceManager.GetString("AP_VendorGroups", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/P Vendor Reports. /// </summary> public static string AP_VendorReports { get { return ResourceManager.GetString("AP_VendorReports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Letters/Labels. /// </summary> public static string AP_VendorReports_LettersLabels { get { return ResourceManager.GetString("AP_VendorReports_LettersLabels", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Print 1099/1096 Forms. /// </summary> public static string AP_VendorReports_Print10991096Form { get { return ResourceManager.GetString("AP_VendorReports_Print10991096Form", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Print T5018 (CPRS) Forms. /// </summary> public static string AP_VendorReports_PrintT5018CPRSForm { get { return ResourceManager.GetString("AP_VendorReports_PrintT5018CPRSForm", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/P Vendors. /// </summary> public static string AP_Vendors { get { return ResourceManager.GetString("AP_Vendors", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 1099/CPRS Inquiry. /// </summary> public static string AP_Vendors_1099CPRSInquiry { get { return ResourceManager.GetString("AP_Vendors_1099CPRSInquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 1099 Electronic Filing. /// </summary> public static string AP_Vendors_1099ElectronicFiling { get { return ResourceManager.GetString("AP_Vendors_1099ElectronicFiling", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Vendor Activity. /// </summary> public static string AP_Vendors_VendorActivity { get { return ResourceManager.GetString("AP_Vendors_VendorActivity", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Vendors. /// </summary> public static string AP_Vendors_Vendors { get { return ResourceManager.GetString("AP_Vendors_Vendors", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/R Transactions. /// </summary> public static string AR_3rd_Level_Transaction_Template { get { return ResourceManager.GetString("AR_3rd_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/R Transactions. /// </summary> public static string AR_4th_Level_Transaction_Template { get { return ResourceManager.GetString("AR_4th_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Adjustment Batch List. /// </summary> public static string AR_Adjustment_Batch_List { get { return ResourceManager.GetString("AR_Adjustment_Batch_List", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Adjustment Entry. /// </summary> public static string AR_Adjustment_Entry { get { return ResourceManager.GetString("AR_Adjustment_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Batch Status. /// </summary> public static string AR_Batch_Status { get { return ResourceManager.GetString("AR_Batch_Status", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear History. /// </summary> public static string AR_Clear_History { get { return ResourceManager.GetString("AR_Clear_History", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear Statistics. /// </summary> public static string AR_Clear_Statistics { get { return ResourceManager.GetString("AR_Clear_Statistics", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Retainage Batch. /// </summary> public static string AR_Create_Retainage_Batch { get { return ResourceManager.GetString("AR_Create_Retainage_Batch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Write-Off Batch. /// </summary> public static string AR_Create_Write_Off_Batch { get { return ResourceManager.GetString("AR_Create_Write_Off_Batch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customer Groups. /// </summary> public static string AR_Customer_Groups { get { return ResourceManager.GetString("AR_Customer_Groups", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customer Inquiry. /// </summary> public static string AR_Customer_Inquiry { get { return ResourceManager.GetString("AR_Customer_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customer List. /// </summary> public static string AR_Customer_List { get { return ResourceManager.GetString("AR_Customer_List", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/R Customer Reports. /// </summary> public static string AR_CustomerReports { get { return ResourceManager.GetString("AR_CustomerReports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/R Customers. /// </summary> public static string AR_Customers { get { return ResourceManager.GetString("AR_Customers", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customer Groups. /// </summary> public static string AR_Customers_CustomerGroups { get { return ResourceManager.GetString("AR_Customers_CustomerGroups", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customers. /// </summary> public static string AR_Customers_Customers { get { return ResourceManager.GetString("AR_Customers_Customers", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Labels. /// </summary> public static string AR_CustomersReports_Labels { get { return ResourceManager.GetString("AR_CustomersReports_Labels", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Recurring Charges. /// </summary> public static string AR_CustomersReports_RecurringCharges { get { return ResourceManager.GetString("AR_CustomersReports_RecurringCharges", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Ship-To Locations. /// </summary> public static string AR_CustomersReports_ShipToLocations { get { return ResourceManager.GetString("AR_CustomersReports_ShipToLocations", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Statements/Letters/Labels. /// </summary> public static string AR_CustomersReports_StatementsLettersLabels { get { return ResourceManager.GetString("AR_CustomersReports_StatementsLettersLabels", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Delete Inactive Records. /// </summary> public static string AR_Delete_Inactive_Records { get { return ResourceManager.GetString("AR_Delete_Inactive_Records", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Deposit Slips. /// </summary> public static string AR_Deposit_Slips { get { return ResourceManager.GetString("AR_Deposit_Slips", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Document Inquiry. /// </summary> public static string AR_Document_Inquiry { get { return ResourceManager.GetString("AR_Document_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Items. /// </summary> public static string AR_Items { get { return ResourceManager.GetString("AR_Items", resourceCulture); } } /// <summary> /// Looks up a localized string similar to National Accounts. /// </summary> public static string AR_National_Accounts { get { return ResourceManager.GetString("AR_National_Accounts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to National Accounts. /// </summary> public static string AR_NationalAccounts { get { return ResourceManager.GetString("AR_NationalAccounts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/R Periodic Processing. /// </summary> public static string AR_PeriodicProcessing { get { return ResourceManager.GetString("AR_PeriodicProcessing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Revaluation. /// </summary> public static string AR_PeriodicProcessing_Revaluation { get { return ResourceManager.GetString("AR_PeriodicProcessing_Revaluation", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Posting Journals. /// </summary> public static string AR_Posting_Journals { get { return ResourceManager.GetString("AR_Posting_Journals", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Process Credit Card Payments. /// </summary> public static string AR_Process_Credit_Card_Payments { get { return ResourceManager.GetString("AR_Process_Credit_Card_Payments", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Interest Batch. /// </summary> public static string AR_Processing_CreateInterestBatch { get { return ResourceManager.GetString("AR_Processing_CreateInterestBatch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Recurring Charge Batch. /// </summary> public static string AR_Processing_CreateRecurringChargeBatch { get { return ResourceManager.GetString("AR_Processing_CreateRecurringChargeBatch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Quick Receipt Entry. /// </summary> public static string AR_Quick_Receipt_Entry { get { return ResourceManager.GetString("AR_Quick_Receipt_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Receipt Inquiry. /// </summary> public static string AR_Receipt_Inquiry { get { return ResourceManager.GetString("AR_Receipt_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Recurring Charges. /// </summary> public static string AR_Recurring_Charges { get { return ResourceManager.GetString("AR_Recurring_Charges", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Refund Batch List. /// </summary> public static string AR_Refund_Batch_List { get { return ResourceManager.GetString("AR_Refund_Batch_List", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Refund Entry. /// </summary> public static string AR_Refund_Entry { get { return ResourceManager.GetString("AR_Refund_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Refund Inquiry. /// </summary> public static string AR_Refund_Inquiry { get { return ResourceManager.GetString("AR_Refund_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/R Setup. /// </summary> public static string AR_Setup { get { return ResourceManager.GetString("AR_Setup", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Billing Cycles. /// </summary> public static string AR_Setup_BillingCycles { get { return ResourceManager.GetString("AR_Setup_BillingCycles", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Comment Types. /// </summary> public static string AR_Setup_CommentTypes { get { return ResourceManager.GetString("AR_Setup_CommentTypes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Dunning Messages. /// </summary> public static string AR_Setup_DunningMessages { get { return ResourceManager.GetString("AR_Setup_DunningMessages", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Interest Profiles. /// </summary> public static string AR_Setup_InterestProfiles { get { return ResourceManager.GetString("AR_Setup_InterestProfiles", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Salespersons. /// </summary> public static string AR_Setup_Salespersons { get { return ResourceManager.GetString("AR_Setup_Salespersons", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Ship-To Locations. /// </summary> public static string AR_Ship_To_Locations { get { return ResourceManager.GetString("AR_Ship_To_Locations", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/R Transaction Reports. /// </summary> public static string AR_TransactionReports { get { return ResourceManager.GetString("AR_TransactionReports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Item Sales History. /// </summary> public static string AR_TransactionReports_ItemSalesHistory { get { return ResourceManager.GetString("AR_TransactionReports_ItemSalesHistory", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A/R Transactions. /// </summary> public static string AR_Transactions { get { return ResourceManager.GetString("AR_Transactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Receipt Batch List. /// </summary> public static string AR_Transactions_ReceiptBatchList { get { return ResourceManager.GetString("AR_Transactions_ReceiptBatchList", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Aged Retainage. /// </summary> public static string AR_TransReports_AgedRetainage { get { return ResourceManager.GetString("AR_TransReports_AgedRetainage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Aged Trial Balance. /// </summary> public static string AR_TransReports_AgedTrialBalance { get { return ResourceManager.GetString("AR_TransReports_AgedTrialBalance", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customer Transactions. /// </summary> public static string AR_TransReports_CustomerTransactions { get { return ResourceManager.GetString("AR_TransReports_CustomerTransactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Update Recurring Charges. /// </summary> public static string AR_UpdateRecurringCharges { get { return ResourceManager.GetString("AR_UpdateRecurringCharges", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Data Integrity. /// </summary> public static string AS_DataIntegrity { get { return ResourceManager.GetString("AS_DataIntegrity", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customize Navigation Menu. /// </summary> public static string AS_MenuCustomization { get { return ResourceManager.GetString("AS_MenuCustomization", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customize the navigation menu by hiding or showing web screens and categories. If you hide all screens for a module, the module does not appear in the navigation menu.. /// </summary> public static string AS_MenuCustomization_Instructions { get { return ResourceManager.GetString("AS_MenuCustomization_Instructions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Restart Maintenance. /// </summary> public static string AS_RestartMaintenance { get { return ResourceManager.GetString("AS_RestartMaintenance", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Security Groups. /// </summary> public static string AS_SecurityGroups { get { return ResourceManager.GetString("AS_SecurityGroups", resourceCulture); } } /// <summary> /// Looks up a localized string similar to User Authorizations. /// </summary> public static string AS_UserAuthorizations { get { return ResourceManager.GetString("AS_UserAuthorizations", resourceCulture); } } /// <summary> /// Looks up a localized string similar to User Authorizations Report. /// </summary> public static string AS_UserAuthorizationsReport { get { return ResourceManager.GetString("AS_UserAuthorizationsReport", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Users. /// </summary> public static string AS_Users { get { return ResourceManager.GetString("AS_Users", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Users and Security. /// </summary> public static string AS_UserSecurity { get { return ResourceManager.GetString("AS_UserSecurity", resourceCulture); } } /// <summary> /// Looks up a localized string similar to UI Profiles. /// </summary> public static string AS_WorkProfile { get { return ResourceManager.GetString("AS_WorkProfile", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Australia Tax Reports. /// </summary> public static string AustraliaGST { get { return ResourceManager.GetString("AustraliaGST", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Banks. /// </summary> public static string Bank_Banks { get { return ResourceManager.GetString("Bank_Banks", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Credit Card Types. /// </summary> public static string Bank_CreditCardTypes { get { return ResourceManager.GetString("Bank_CreditCardTypes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Periodic Processing. /// </summary> public static string Bank_PeriodicProcessing { get { return ResourceManager.GetString("Bank_PeriodicProcessing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear History. /// </summary> public static string Bank_PeriodicProcessing_ClearHistory { get { return ResourceManager.GetString("Bank_PeriodicProcessing_ClearHistory", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Setup. /// </summary> public static string Bank_Setup { get { return ResourceManager.GetString("Bank_Setup", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Entry. /// </summary> public static string Bank_Trans_BankEntry { get { return ResourceManager.GetString("Bank_Trans_BankEntry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Import OFX Statements. /// </summary> public static string Bank_Trans_ImportOFXStatements { get { return ResourceManager.GetString("Bank_Trans_ImportOFXStatements", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Post Entries. /// </summary> public static string Bank_Trans_PostEntries { get { return ResourceManager.GetString("Bank_Trans_PostEntries", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Post Reconciliation. /// </summary> public static string Bank_Trans_PostReconciliation { get { return ResourceManager.GetString("Bank_Trans_PostReconciliation", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Reconcile E-Statements. /// </summary> public static string Bank_Trans_ReconcileOFXStatement { get { return ResourceManager.GetString("Bank_Trans_ReconcileOFXStatement", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Reconcile Statements. /// </summary> public static string Bank_Trans_ReconcileStatements { get { return ResourceManager.GetString("Bank_Trans_ReconcileStatements", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Reverse Transactions. /// </summary> public static string Bank_Trans_ReverseTrans { get { return ResourceManager.GetString("Bank_Trans_ReverseTrans", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Transfers. /// </summary> public static string Bank_Trans_Transfer { get { return ResourceManager.GetString("Bank_Trans_Transfer", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transaction History Inquiry. /// </summary> public static string Bank_Trans_TransHistoryInquiry { get { return ResourceManager.GetString("Bank_Trans_TransHistoryInquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Transactions. /// </summary> public static string Bank_Transactions { get { return ResourceManager.GetString("Bank_Transactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Transaction Reports. /// </summary> public static string Bank_TransReports { get { return ResourceManager.GetString("Bank_TransReports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Entries Posting Journal. /// </summary> public static string Bank_TransReports_BankEntriesPostingJournal { get { return ResourceManager.GetString("Bank_TransReports_BankEntriesPostingJournal", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Reconciliation. /// </summary> public static string Bank_TransReports_BankReconciliation { get { return ResourceManager.GetString("Bank_TransReports_BankReconciliation", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Deposit Register. /// </summary> public static string Bank_TransReports_DepositRegister { get { return ResourceManager.GetString("Bank_TransReports_DepositRegister", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Deposits Status. /// </summary> public static string Bank_TransReports_DepositStatus { get { return ResourceManager.GetString("Bank_TransReports_DepositStatus", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Check/Payment Register. /// </summary> public static string Bank_TransReports_PaymentRegister { get { return ResourceManager.GetString("Bank_TransReports_PaymentRegister", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Reconciliation Posting Journal. /// </summary> public static string Bank_TransReports_ReconciliationPostingJournal { get { return ResourceManager.GetString("Bank_TransReports_ReconciliationPostingJournal", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Reconciliation Status. /// </summary> public static string Bank_TransReports_ReconciliationStatus { get { return ResourceManager.GetString("Bank_TransReports_ReconciliationStatus", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transfer Posting Journal. /// </summary> public static string Bank_TransReports_TransferPostingJournal { get { return ResourceManager.GetString("Bank_TransReports_TransferPostingJournal", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Withdrawals Status. /// </summary> public static string Bank_TransReports_WithdrawStatus { get { return ResourceManager.GetString("Bank_TransReports_WithdrawStatus", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Services. /// </summary> public static string Banking_Services { get { return ResourceManager.GetString("Banking_Services", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Reconciliation. /// </summary> public static string BK_3rd_Level_Transaction_Template { get { return ResourceManager.GetString("BK_3rd_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bank Reconciliation. /// </summary> public static string BK_4th_Level_Transaction_Template { get { return ResourceManager.GetString("BK_4th_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Business Activity Statement. /// </summary> public static string BusinessActivityStatement { get { return ResourceManager.GetString("BusinessActivityStatement", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Articles. /// </summary> public static string CNAPortalHelpArticles { get { return ResourceManager.GetString("CNAPortalHelpArticles", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Help Center. /// </summary> public static string CNAPortalHelpCenter { get { return ResourceManager.GetString("CNAPortalHelpCenter", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Contact Support. /// </summary> public static string CNAPortalHelpContactSupport { get { return ResourceManager.GetString("CNAPortalHelpContactSupport", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Feature Tour. /// </summary> public static string CNAPortalHelpExploreSage { get { return ResourceManager.GetString("CNAPortalHelpExploreSage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Getting Started. /// </summary> public static string CNAPortalHelpGettingStart { get { return ResourceManager.GetString("CNAPortalHelpGettingStart", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Printing Reports. /// </summary> public static string CNAPortalHelpPrintReports { get { return ResourceManager.GetString("CNAPortalHelpPrintReports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Resources. /// </summary> public static string CNAPortalHelpResources { get { return ResourceManager.GetString("CNAPortalHelpResources", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sage City. /// </summary> public static string CNAPortalHelpSageCity { get { return ResourceManager.GetString("CNAPortalHelpSageCity", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sage University. /// </summary> public static string CNAPortalHelpSageUniversity { get { return ResourceManager.GetString("CNAPortalHelpSageUniversity", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Setting Up Home Page Widgets. /// </summary> public static string CNAPortalHelpSettingHomePageWidgets { get { return ResourceManager.GetString("CNAPortalHelpSettingHomePageWidgets", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Share Your Ideas. /// </summary> public static string CNAPortalHelpShareIdeas { get { return ResourceManager.GetString("CNAPortalHelpShareIdeas", resourceCulture); } } /// <summary> /// Looks up a localized string similar to What&apos;s New. /// </summary> public static string CNAPortalHelpWhatNewHere { get { return ResourceManager.GetString("CNAPortalHelpWhatNewHere", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Collapse Menu. /// </summary> public static string CollapseMenu { get { return ResourceManager.GetString("CollapseMenu", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Batch Listing. /// </summary> public static string Common_BatchListing { get { return ResourceManager.GetString("Common_BatchListing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create G/L Batch. /// </summary> public static string Common_CreateGLBatch { get { return ResourceManager.GetString("Common_CreateGLBatch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Batch. /// </summary> public static string Common_CreateOEBatch { get { return ResourceManager.GetString("Common_CreateOEBatch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Batch. /// </summary> public static string Common_CreatePOBatch { get { return ResourceManager.GetString("Common_CreatePOBatch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Inquiry. /// </summary> public static string Common_Inquiry { get { return ResourceManager.GetString("Common_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Invoices. /// </summary> public static string Common_Invoices { get { return ResourceManager.GetString("Common_Invoices", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Optional Fields. /// </summary> public static string Common_OptionalFields { get { return ResourceManager.GetString("Common_OptionalFields", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Receipts. /// </summary> public static string Common_Receipts { get { return ResourceManager.GetString("Common_Receipts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transactions Listing. /// </summary> public static string Common_Report_TransactionListing { get { return ResourceManager.GetString("Common_Report_TransactionListing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Account Sets. /// </summary> public static string Common_Setup_AccountSets { get { return ResourceManager.GetString("Common_Setup_AccountSets", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Distribution Codes. /// </summary> public static string Common_Setup_DistributionCodes { get { return ResourceManager.GetString("Common_Setup_DistributionCodes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Email Messages. /// </summary> public static string Common_Setup_EmailMessages { get { return ResourceManager.GetString("Common_Setup_EmailMessages", resourceCulture); } } /// <summary> /// Looks up a localized string similar to G/L Integration. /// </summary> public static string Common_Setup_GLIntegration { get { return ResourceManager.GetString("Common_Setup_GLIntegration", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Options. /// </summary> public static string Common_Setup_Options { get { return ResourceManager.GetString("Common_Setup_Options", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payment Codes. /// </summary> public static string Common_Setup_PaymentCodes { get { return ResourceManager.GetString("Common_Setup_PaymentCodes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Segment Codes. /// </summary> public static string Common_Setup_SegmentCodes { get { return ResourceManager.GetString("Common_Setup_SegmentCodes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Terms. /// </summary> public static string Common_Setup_Terms { get { return ResourceManager.GetString("Common_Setup_Terms", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Posting Errors. /// </summary> public static string Common_TransactionReports_PostingErrors { get { return ResourceManager.GetString("Common_TransactionReports_PostingErrors", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Invoice Batch List. /// </summary> public static string Common_Transactions_InvoiceBatchList { get { return ResourceManager.GetString("Common_Transactions_InvoiceBatchList", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Invoice Entry. /// </summary> public static string Common_Transactions_InvoiceEntry { get { return ResourceManager.GetString("Common_Transactions_InvoiceEntry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Post Batches. /// </summary> public static string Common_Transactions_PostBatches { get { return ResourceManager.GetString("Common_Transactions_PostBatches", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Receipt Entry. /// </summary> public static string Common_Transactions_ReceiptEntry { get { return ResourceManager.GetString("Common_Transactions_ReceiptEntry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Year End. /// </summary> public static string Common_YearEnd { get { return ResourceManager.GetString("Common_YearEnd", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Common Services. /// </summary> public static string CommonServices { get { return ResourceManager.GetString("CommonServices", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Company Setup. /// </summary> public static string CompanySetup { get { return ResourceManager.GetString("CompanySetup", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Configurations. /// </summary> public static string Configurations { get { return ResourceManager.GetString("Configurations", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create G/L Batch. /// </summary> public static string Create_GL_Batch { get { return ResourceManager.GetString("Create_GL_Batch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Company Profile. /// </summary> public static string CS_CompanyProfile { get { return ResourceManager.GetString("CS_CompanyProfile", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Fiscal Calendar. /// </summary> public static string CS_FiscalCalendar { get { return ResourceManager.GetString("CS_FiscalCalendar", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payments Acceptance. /// </summary> public static string CS_PaymentsAcceptance { get { return ResourceManager.GetString("CS_PaymentsAcceptance", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Reminder List. /// </summary> public static string CS_Reminder_List { get { return ResourceManager.GetString("CS_Reminder_List", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Schedules. /// </summary> public static string CS_Schedules { get { return ResourceManager.GetString("CS_Schedules", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Scheduling. /// </summary> public static string CS_Scheduling { get { return ResourceManager.GetString("CS_Scheduling", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Service Center. /// </summary> public static string CS_ServiceCenter { get { return ResourceManager.GetString("CS_ServiceCenter", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Currency. /// </summary> public static string Currency { get { return ResourceManager.GetString("Currency", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Currency Rates. /// </summary> public static string Currency_Rates { get { return ResourceManager.GetString("Currency_Rates", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Currency Rate Types. /// </summary> public static string Currency_RateTypes { get { return ResourceManager.GetString("Currency_RateTypes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Currency Codes. /// </summary> public static string CurrencyCodes { get { return ResourceManager.GetString("CurrencyCodes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customization. /// </summary> public static string Customization { get { return ResourceManager.GetString("Customization", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customized Queries. /// </summary> public static string CustomizedQueries { get { return ResourceManager.GetString("CustomizedQueries", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Data and Maintenance. /// </summary> public static string DataAndMaintenance { get { return ResourceManager.GetString("DataAndMaintenance", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Demonstration Report Designer. /// </summary> public static string Demonstration_ReportDesigner { get { return ResourceManager.GetString("Demonstration_ReportDesigner", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Report Designer S300.xlsx. /// </summary> public static string ExcelFile_DemonstrationReportDesigner { get { return ResourceManager.GetString("ExcelFile_DemonstrationReportDesigner", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Balance Sheet S300.xlsx. /// </summary> public static string ExcelFile_FinancialBalanceSheet { get { return ResourceManager.GetString("ExcelFile_FinancialBalanceSheet", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Cash Flow Summary by Category S300.xlsx. /// </summary> public static string ExcelFile_FinancialCashFlowSummaryCategory { get { return ResourceManager.GetString("ExcelFile_FinancialCashFlowSummaryCategory", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Forecasting S300.xlsx. /// </summary> public static string ExcelFile_FinancialForecasting { get { return ResourceManager.GetString("ExcelFile_FinancialForecasting", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Forecasting S300 green.xlsx. /// </summary> public static string ExcelFile_FinancialForecastingGreen { get { return ResourceManager.GetString("ExcelFile_FinancialForecastingGreen", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Income Statement S300.xlsx. /// </summary> public static string ExcelFile_FinancialIncomeStatement { get { return ResourceManager.GetString("ExcelFile_FinancialIncomeStatement", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Ratio S300.xlsx. /// </summary> public static string ExcelFile_FinancialRatio { get { return ResourceManager.GetString("ExcelFile_FinancialRatio", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Expand Menu. /// </summary> public static string ExpandMenu { get { return ResourceManager.GetString("ExpandMenu", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Balance Sheet. /// </summary> public static string Financial_BalanceSheet { get { return ResourceManager.GetString("Financial_BalanceSheet", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Cash Flow Summary by Category. /// </summary> public static string Financial_CashFlowSummaryCategory { get { return ResourceManager.GetString("Financial_CashFlowSummaryCategory", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Forecasting. /// </summary> public static string Financial_Forecasting { get { return ResourceManager.GetString("Financial_Forecasting", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Forecasting (Green). /// </summary> public static string Financial_ForecastingGreen { get { return ResourceManager.GetString("Financial_ForecastingGreen", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Income Statement. /// </summary> public static string Financial_IncomeStatement { get { return ResourceManager.GetString("Financial_IncomeStatement", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Financial Ratios. /// </summary> public static string Financial_Ratio { get { return ResourceManager.GetString("Financial_Ratio", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear all text size settings on individual screens, and reset text size to the default (Large)?. /// </summary> public static string FormSizeResetConfirmation { get { return ResourceManager.GetString("FormSizeResetConfirmation", resourceCulture); } } /// <summary> /// Looks up a localized string similar to G/L Transactions. /// </summary> public static string GL_3rd_Level_Transaction_Template { get { return ResourceManager.GetString("GL_3rd_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to G/L Transactions. /// </summary> public static string GL_4th_Level_Transaction_Template { get { return ResourceManager.GetString("GL_4th_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Account History Inquiry. /// </summary> public static string GL_Account_History_Inquiry { get { return ResourceManager.GetString("GL_Account_History_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Account Permissions. /// </summary> public static string GL_Account_Permissions { get { return ResourceManager.GetString("GL_Account_Permissions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to G/L Accounts. /// </summary> public static string GL_Accounts { get { return ResourceManager.GetString("GL_Accounts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Accounts. /// </summary> public static string GL_Accounts_Accounts { get { return ResourceManager.GetString("GL_Accounts_Accounts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Chart of Accounts. /// </summary> public static string GL_Accounts_ChartOfAccounts { get { return ResourceManager.GetString("GL_Accounts_ChartOfAccounts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Batch Status. /// </summary> public static string GL_Batch_Status { get { return ResourceManager.GetString("GL_Batch_Status", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Budget Maintenance. /// </summary> public static string GL_BudgetMaintenance { get { return ResourceManager.GetString("GL_BudgetMaintenance", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear History. /// </summary> public static string GL_Clear_History { get { return ResourceManager.GetString("GL_Clear_History", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Recurring Entries. /// </summary> public static string GL_Common_RecurringEntries { get { return ResourceManager.GetString("GL_Common_RecurringEntries", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Source Codes. /// </summary> public static string GL_Common_SourceCodes { get { return ResourceManager.GetString("GL_Common_SourceCodes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Consolidate Posted Transactions. /// </summary> public static string GL_Consolidate_Posted_Transactions { get { return ResourceManager.GetString("GL_Consolidate_Posted_Transactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Accounts. /// </summary> public static string GL_Create_Accounts { get { return ResourceManager.GetString("GL_Create_Accounts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Allocation Batch. /// </summary> public static string GL_Create_Allocation_Batch { get { return ResourceManager.GetString("GL_Create_Allocation_Batch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Revaluation Batch. /// </summary> public static string GL_Create_Revaluation_Batch { get { return ResourceManager.GetString("GL_Create_Revaluation_Batch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Fiscal Set Comparison. /// </summary> public static string GL_Fiscal_Set_Comparison { get { return ResourceManager.GetString("GL_Fiscal_Set_Comparison", resourceCulture); } } /// <summary> /// Looks up a localized string similar to G/L Periodic Processing. /// </summary> public static string GL_PeriodicProcessing { get { return ResourceManager.GetString("GL_PeriodicProcessing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Period End Maintenance. /// </summary> public static string GL_PeriodicProcessing_PeriodEndMaintenance { get { return ResourceManager.GetString("GL_PeriodicProcessing_PeriodEndMaintenance", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create New Year. /// </summary> public static string GL_Processing_CreateNewYear { get { return ResourceManager.GetString("GL_Processing_CreateNewYear", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Recurring Entries Batch. /// </summary> public static string GL_Processing_CreateRecEntBatch { get { return ResourceManager.GetString("GL_Processing_CreateRecEntBatch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Recurring Entries. /// </summary> public static string GL_Recurring_Entries { get { return ResourceManager.GetString("GL_Recurring_Entries", resourceCulture); } } /// <summary> /// Looks up a localized string similar to G/L Reports. /// </summary> public static string GL_Reports { get { return ResourceManager.GetString("GL_Reports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Posting Journals. /// </summary> public static string GL_Reports_PostingJournals { get { return ResourceManager.GetString("GL_Reports_PostingJournals", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transaction Details Optional Fields. /// </summary> public static string GL_Reports_TransactionalDetailsOptionalFields { get { return ResourceManager.GetString("GL_Reports_TransactionalDetailsOptionalFields", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Trial Balance. /// </summary> public static string GL_Reports_TrialBalance { get { return ResourceManager.GetString("GL_Reports_TrialBalance", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Revaluation Codes. /// </summary> public static string GL_Revaluation_Codes { get { return ResourceManager.GetString("GL_Revaluation_Codes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to G/L Setup. /// </summary> public static string GL_Setup { get { return ResourceManager.GetString("GL_Setup", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Account Groups. /// </summary> public static string GL_Setup_AccountGroups { get { return ResourceManager.GetString("GL_Setup_AccountGroups", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Account Structures. /// </summary> public static string GL_Setup_AccountStructures { get { return ResourceManager.GetString("GL_Setup_AccountStructures", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Source Codes. /// </summary> public static string GL_Source_Codes { get { return ResourceManager.GetString("GL_Source_Codes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Source Journal Profiles. /// </summary> public static string GL_Source_Journal_Profiles { get { return ResourceManager.GetString("GL_Source_Journal_Profiles", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Source Journals. /// </summary> public static string GL_Source_Journals { get { return ResourceManager.GetString("GL_Source_Journals", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Source Currency Inquiry. /// </summary> public static string GL_SourceCurrencyInquiry { get { return ResourceManager.GetString("GL_SourceCurrencyInquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to G/L Transactions. /// </summary> public static string GL_Transaction { get { return ResourceManager.GetString("GL_Transaction", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transaction History. /// </summary> public static string GL_Transaction_History { get { return ResourceManager.GetString("GL_Transaction_History", resourceCulture); } } /// <summary> /// Looks up a localized string similar to G/L Transactions . /// </summary> public static string GL_Transactions { get { return ResourceManager.GetString("GL_Transactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Batch List. /// </summary> public static string GL_Transactions_BatchList { get { return ResourceManager.GetString("GL_Transactions_BatchList", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Journal Entry. /// </summary> public static string GL_Transactions_JournalEntry { get { return ResourceManager.GetString("GL_Transactions_JournalEntry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Global Search. /// </summary> public static string GlobalSearch { get { return ResourceManager.GetString("GlobalSearch", resourceCulture); } } /// <summary> /// Looks up a localized string similar to A problem occurred and the search could not be performed. Contact your system administrator for help.. /// </summary> public static string GlobalSearchFailed { get { return ResourceManager.GetString("GlobalSearchFailed", resourceCulture); } } /// <summary> /// Looks up a localized string similar to GST F5. /// </summary> public static string GSTF5 { get { return ResourceManager.GetString("GSTF5", resourceCulture); } } /// <summary> /// Looks up a localized string similar to GST IAF Generator. /// </summary> public static string GSTIAF { get { return ResourceManager.GetString("GSTIAF", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Help. /// </summary> public static string Help { get { return ResourceManager.GetString("Help", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Find help for setting up and using Sage 300c. /// </summary> public static string HelpTitle { get { return ResourceManager.GetString("HelpTitle", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Home. /// </summary> public static string Home { get { return ResourceManager.GetString("Home", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Maintain Items. /// </summary> public static string IC_3rd_Level_Maintain_Template { get { return ResourceManager.GetString("IC_3rd_Level_Maintain_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Transactions. /// </summary> public static string IC_3rd_Level_Transaction_Template { get { return ResourceManager.GetString("IC_3rd_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Maintain Items. /// </summary> public static string IC_4th_Level_Maintain_Template { get { return ResourceManager.GetString("IC_4th_Level_Maintain_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Transactions. /// </summary> public static string IC_4th_Level_Transaction_Template { get { return ResourceManager.GetString("IC_4th_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Account Sets. /// </summary> public static string IC_Account_Sets { get { return ResourceManager.GetString("IC_Account_Sets", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Adjustments. /// </summary> public static string IC_Adjustments { get { return ResourceManager.GetString("IC_Adjustments", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Aged Inventory. /// </summary> public static string IC_Aged_Inventory { get { return ResourceManager.GetString("IC_Aged_Inventory", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Alternate Items. /// </summary> public static string IC_Alternate_Items { get { return ResourceManager.GetString("IC_Alternate_Items", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bills of Material. /// </summary> public static string IC_Bills_of_Material { get { return ResourceManager.GetString("IC_Bills_of_Material", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Bin/Shelf Labels. /// </summary> public static string IC_Bin_Shelf_Labels { get { return ResourceManager.GetString("IC_Bin_Shelf_Labels", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Categories. /// </summary> public static string IC_Categories { get { return ResourceManager.GetString("IC_Categories", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear History. /// </summary> public static string IC_Clear_History { get { return ResourceManager.GetString("IC_Clear_History", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Contract Codes. /// </summary> public static string IC_Contract_Codes { get { return ResourceManager.GetString("IC_Contract_Codes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Contract Pricing. /// </summary> public static string IC_Contract_Pricing { get { return ResourceManager.GetString("IC_Contract_Pricing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Copy Bills of Material. /// </summary> public static string IC_Copy_Bills_of_Material { get { return ResourceManager.GetString("IC_Copy_Bills_of_Material", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Copy Item Pricing. /// </summary> public static string IC_Copy_Item_Pricing { get { return ResourceManager.GetString("IC_Copy_Item_Pricing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Current Transactions Inquiry. /// </summary> public static string IC_Current_Transactions_Inquiry { get { return ResourceManager.GetString("IC_Current_Transactions_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customer Details. /// </summary> public static string IC_Customer_Details { get { return ResourceManager.GetString("IC_Customer_Details", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Day End Processing. /// </summary> public static string IC_Day_End_Processing { get { return ResourceManager.GetString("IC_Day_End_Processing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Delete Inactive Records. /// </summary> public static string IC_Delete_Inactive_Records { get { return ResourceManager.GetString("IC_Delete_Inactive_Records", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Generate Inventory Worksheet. /// </summary> public static string IC_Generate_Inventory_Worksheet { get { return ResourceManager.GetString("IC_Generate_Inventory_Worksheet", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Internal Usage. /// </summary> public static string IC_Internal_Usage { get { return ResourceManager.GetString("IC_Internal_Usage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Inventory Counts. /// </summary> public static string IC_Inventory_Counts { get { return ResourceManager.GetString("IC_Inventory_Counts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Inventory Movement. /// </summary> public static string IC_Inventory_Movement { get { return ResourceManager.GetString("IC_Inventory_Movement", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Inventory Reconciliation. /// </summary> public static string IC_Inventory_Reconciliation { get { return ResourceManager.GetString("IC_Inventory_Reconciliation", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Inventory Worksheet. /// </summary> public static string IC_Inventory_Worksheet { get { return ResourceManager.GetString("IC_Inventory_Worksheet", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Items. /// </summary> public static string IC_Item { get { return ResourceManager.GetString("IC_Item", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Item Labels. /// </summary> public static string IC_Item_Labels { get { return ResourceManager.GetString("IC_Item_Labels", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Item Location Details Quantity Inquiry. /// </summary> public static string IC_Item_Loc_Detail_Qty_Inquiry { get { return ResourceManager.GetString("IC_Item_Loc_Detail_Qty_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Item Pricing . /// </summary> public static string IC_Item_Pricing { get { return ResourceManager.GetString("IC_Item_Pricing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Item Status. /// </summary> public static string IC_Item_Status { get { return ResourceManager.GetString("IC_Item_Status", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Item Structures. /// </summary> public static string IC_Item_Structures { get { return ResourceManager.GetString("IC_Item_Structures", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Items and Price Lists. /// </summary> public static string IC_Items_Price_Lists { get { return ResourceManager.GetString("IC_Items_Price_Lists", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Items Wizard. /// </summary> public static string IC_Items_Wizard { get { return ResourceManager.GetString("IC_Items_Wizard", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Item Valuation. /// </summary> public static string IC_ItemValuation { get { return ResourceManager.GetString("IC_ItemValuation", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Kitting Items. /// </summary> public static string IC_Kitting_Items { get { return ResourceManager.GetString("IC_Kitting_Items", resourceCulture); } } /// <summary> /// Looks up a localized string similar to LIFO/FIFO Inquiry. /// </summary> public static string IC_LIFO_FIFO_Inquiry { get { return ResourceManager.GetString("IC_LIFO_FIFO_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Location Details. /// </summary> public static string IC_Location_Details { get { return ResourceManager.GetString("IC_Location_Details", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Locations. /// </summary> public static string IC_Locations { get { return ResourceManager.GetString("IC_Locations", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Lot Numbers. /// </summary> public static string IC_Lot_Numbers { get { return ResourceManager.GetString("IC_Lot_Numbers", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Lot Recalls/Releases. /// </summary> public static string IC_Lot_Recalls_Releases { get { return ResourceManager.GetString("IC_Lot_Recalls_Releases", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Manufacturers&apos; Items. /// </summary> public static string IC_Manufacturers_Item { get { return ResourceManager.GetString("IC_Manufacturers_Item", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Markup Analysis. /// </summary> public static string IC_Markup_Analysis { get { return ResourceManager.GetString("IC_Markup_Analysis", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Optional Fields. /// </summary> public static string IC_Optional_Fields { get { return ResourceManager.GetString("IC_Optional_Fields", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Overstocked Items. /// </summary> public static string IC_Overstocked_Items { get { return ResourceManager.GetString("IC_Overstocked_Items", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Periodic Processing. /// </summary> public static string IC_PeriodicProcessing { get { return ResourceManager.GetString("IC_PeriodicProcessing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Physical Inventory. /// </summary> public static string IC_Physical_Inventory { get { return ResourceManager.GetString("IC_Physical_Inventory", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Physical Inventory Quantities. /// </summary> public static string IC_Physical_Inventory_Quantities { get { return ResourceManager.GetString("IC_Physical_Inventory_Quantities", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Post Inventory Reconciliation. /// </summary> public static string IC_Post_Inventory_Reconciliation { get { return ResourceManager.GetString("IC_Post_Inventory_Reconciliation", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Post Transactions. /// </summary> public static string IC_Post_Transactions { get { return ResourceManager.GetString("IC_Post_Transactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Posting Journals. /// </summary> public static string IC_Posting_Journals { get { return ResourceManager.GetString("IC_Posting_Journals", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Post Transactions. /// </summary> public static string IC_PostTransactions { get { return ResourceManager.GetString("IC_PostTransactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Price List Codes. /// </summary> public static string IC_Price_List_Codes { get { return ResourceManager.GetString("IC_Price_List_Codes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Price Lists. /// </summary> public static string IC_Price_Lists { get { return ResourceManager.GetString("IC_Price_Lists", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Price/Sales Analysis Reports. /// </summary> public static string IC_PriceSalesAnalysisReports { get { return ResourceManager.GetString("IC_PriceSalesAnalysisReports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Process Adjustments. /// </summary> public static string IC_Process_Adjustments { get { return ResourceManager.GetString("IC_Process_Adjustments", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Quarantine. /// </summary> public static string IC_Quarantine_Report { get { return ResourceManager.GetString("IC_Quarantine_Report", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Recall. /// </summary> public static string IC_Recall_Report { get { return ResourceManager.GetString("IC_Recall_Report", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Receipts. /// </summary> public static string IC_Receipt { get { return ResourceManager.GetString("IC_Receipt", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Reorder. /// </summary> public static string IC_Reorder { get { return ResourceManager.GetString("IC_Reorder", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Reorder Quantities. /// </summary> public static string IC_Reorder_Quantities { get { return ResourceManager.GetString("IC_Reorder_Quantities", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sales Statistics. /// </summary> public static string IC_Sales_Statistics { get { return ResourceManager.GetString("IC_Sales_Statistics", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Segment Codes. /// </summary> public static string IC_Segment_Code { get { return ResourceManager.GetString("IC_Segment_Code", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Selling Price/Margin Analysis. /// </summary> public static string IC_Selling_Price_Margin_Analysis { get { return ResourceManager.GetString("IC_Selling_Price_Margin_Analysis", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Serial/Lot Number List. /// </summary> public static string IC_Serial_Lot_Number_List_Report { get { return ResourceManager.GetString("IC_Serial_Lot_Number_List_Report", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Serial/Lot Number Quantity On Hand. /// </summary> public static string IC_Serial_Lot_Number_Qty_On_Hand_Report { get { return ResourceManager.GetString("IC_Serial_Lot_Number_Qty_On_Hand_Report", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Serial/Lot Transactions. /// </summary> public static string IC_Serial_Lot_Transactions_Report { get { return ResourceManager.GetString("IC_Serial_Lot_Transactions_Report", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Serial Number Inquiry. /// </summary> public static string IC_Serial_Number_Inquiry { get { return ResourceManager.GetString("IC_Serial_Number_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Serial Registration. /// </summary> public static string IC_Serial_Registration { get { return ResourceManager.GetString("IC_Serial_Registration", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Setup. /// </summary> public static string IC_Setup { get { return ResourceManager.GetString("IC_Setup", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Setup Reports. /// </summary> public static string IC_Setup_Reports { get { return ResourceManager.GetString("IC_Setup_Reports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Shipments. /// </summary> public static string IC_Shipments { get { return ResourceManager.GetString("IC_Shipments", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Slow Moving Items. /// </summary> public static string IC_SlowMovingItems { get { return ResourceManager.GetString("IC_SlowMovingItems", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Statistics and Inquiries. /// </summary> public static string IC_Statistics_Inquiries { get { return ResourceManager.GetString("IC_Statistics_Inquiries", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Stock Control Reports. /// </summary> public static string IC_Stock_Control_Reports { get { return ResourceManager.GetString("IC_Stock_Control_Reports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Stock Transactions. /// </summary> public static string IC_Stock_Transactions { get { return ResourceManager.GetString("IC_Stock_Transactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Stock Transactions Inquiry. /// </summary> public static string IC_StockTransactionsInquiry { get { return ResourceManager.GetString("IC_StockTransactionsInquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transaction History Inquiry. /// </summary> public static string IC_Transaction_History_Inquiry { get { return ResourceManager.GetString("IC_Transaction_History_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transaction Listing. /// </summary> public static string IC_Transaction_Listing { get { return ResourceManager.GetString("IC_Transaction_Listing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transaction Statistics. /// </summary> public static string IC_Transaction_Statistics { get { return ResourceManager.GetString("IC_Transaction_Statistics", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transaction History. /// </summary> public static string IC_TransactionHistory { get { return ResourceManager.GetString("IC_TransactionHistory", resourceCulture); } } /// <summary> /// Looks up a localized string similar to I/C Transactions. /// </summary> public static string IC_Transactions { get { return ResourceManager.GetString("IC_Transactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transfer Slips. /// </summary> public static string IC_Transfer_Slips { get { return ResourceManager.GetString("IC_Transfer_Slips", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transfers. /// </summary> public static string IC_Transfers { get { return ResourceManager.GetString("IC_Transfers", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Units of Measure. /// </summary> public static string IC_Units_of_Measure { get { return ResourceManager.GetString("IC_Units_of_Measure", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Update Bills of Material. /// </summary> public static string IC_Update_Bills_of_Material { get { return ResourceManager.GetString("IC_Update_Bills_of_Material", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Update Item Pricing. /// </summary> public static string IC_Update_Item_Pricing { get { return ResourceManager.GetString("IC_Update_Item_Pricing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Vendor Details. /// </summary> public static string IC_Vendor_Details { get { return ResourceManager.GetString("IC_Vendor_Details", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Warranty Codes. /// </summary> public static string IC_Warranty_Codes { get { return ResourceManager.GetString("IC_Warranty_Codes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Warranty/Contract List. /// </summary> public static string IC_Warranty_Contract_List { get { return ResourceManager.GetString("IC_Warranty_Contract_List", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Weight Units of Measure. /// </summary> public static string IC_Weight_Units_of_Measure { get { return ResourceManager.GetString("IC_Weight_Units_of_Measure", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Import Tax Codes. /// </summary> public static string ImportTaxCodes { get { return ResourceManager.GetString("ImportTaxCodes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to This query displays results in a special format with multiple interactive tables. You cannot use it as the basis for custom saved queries.. /// </summary> public static string Inquiry_ToolTip { get { return ResourceManager.GetString("Inquiry_ToolTip", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Large. /// </summary> public static string Large { get { return ResourceManager.GetString("Large", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Malaysia Tax Reports. /// </summary> public static string MalaysiaGST { get { return ResourceManager.GetString("MalaysiaGST", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Medium. /// </summary> public static string Medium { get { return ResourceManager.GetString("Medium", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Accounts Payable. /// </summary> public static string Module_AccountsPayable { get { return ResourceManager.GetString("Module_AccountsPayable", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Accounts Receivable. /// </summary> public static string Module_AccountsReceivable { get { return ResourceManager.GetString("Module_AccountsReceivable", resourceCulture); } } /// <summary> /// Looks up a localized string similar to General Ledger. /// </summary> public static string Module_GeneralLedger { get { return ResourceManager.GetString("Module_GeneralLedger", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Inventory Control. /// </summary> public static string Module_InventoryControl { get { return ResourceManager.GetString("Module_InventoryControl", resourceCulture); } } /// <summary> /// Looks up a localized string similar to More. /// </summary> public static string Module_More { get { return ResourceManager.GetString("Module_More", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Order Entry. /// </summary> public static string Module_OrderEntry { get { return ResourceManager.GetString("Module_OrderEntry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Purchase Orders. /// </summary> public static string Module_PurchaseOrders { get { return ResourceManager.GetString("Module_PurchaseOrders", resourceCulture); } } /// <summary> /// Looks up a localized string similar to M/T Contacts. /// </summary> public static string MT_Contacts { get { return ResourceManager.GetString("MT_Contacts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Contacts. /// </summary> public static string MT_Contacts_Contacts { get { return ResourceManager.GetString("MT_Contacts_Contacts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Optional Fields. /// </summary> public static string MT_OptionalFields { get { return ResourceManager.GetString("MT_OptionalFields", resourceCulture); } } /// <summary> /// Looks up a localized string similar to M/T Setup. /// </summary> public static string MT_Setup { get { return ResourceManager.GetString("MT_Setup", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Multiple Contacts. /// </summary> public static string MultipleContacts { get { return ResourceManager.GetString("MultipleContacts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to O/E Transaction. /// </summary> public static string OE_3rd_Level_Transaction_Template { get { return ResourceManager.GetString("OE_3rd_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to O/E Transaction Template. /// </summary> public static string OE_4th_Level_Transaction_Template { get { return ResourceManager.GetString("OE_4th_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Aged Orders. /// </summary> public static string OE_AgedOrders { get { return ResourceManager.GetString("OE_AgedOrders", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Capture Payments with Invoices. /// </summary> public static string OE_CapturePaymentsWithInvoices { get { return ResourceManager.GetString("OE_CapturePaymentsWithInvoices", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear History. /// </summary> public static string OE_Clear_History { get { return ResourceManager.GetString("OE_Clear_History", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Copy Orders. /// </summary> public static string OE_Copy_Orders { get { return ResourceManager.GetString("OE_Copy_Orders", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Credit/Debit Note Entry. /// </summary> public static string OE_Credit_Debit_Note_Entry { get { return ResourceManager.GetString("OE_Credit_Debit_Note_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Credit/Debit Notes. /// </summary> public static string OE_CreditDebit_Notes { get { return ResourceManager.GetString("OE_CreditDebit_Notes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Current Orders Inquiry. /// </summary> public static string OE_Current_Orders_Inquiry { get { return ResourceManager.GetString("OE_Current_Orders_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Email Messages. /// </summary> public static string OE_Email_Messages { get { return ResourceManager.GetString("OE_Email_Messages", resourceCulture); } } /// <summary> /// Looks up a localized string similar to O/E Forms. /// </summary> public static string OE_Forms { get { return ResourceManager.GetString("OE_Forms", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Invoices. /// </summary> public static string OE_Invoice { get { return ResourceManager.GetString("OE_Invoice", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Invoice Entry. /// </summary> public static string OE_Invoice_Entry { get { return ResourceManager.GetString("OE_Invoice_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Invoice Action. /// </summary> public static string OE_InvoiceAction { get { return ResourceManager.GetString("OE_InvoiceAction", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Miscellaneous Charges. /// </summary> public static string OE_Miscellaneous_Charges { get { return ResourceManager.GetString("OE_Miscellaneous_Charges", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Optional Fields. /// </summary> public static string OE_Optional_Fields { get { return ResourceManager.GetString("OE_Optional_Fields", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Options. /// </summary> public static string OE_Options { get { return ResourceManager.GetString("OE_Options", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Order Action. /// </summary> public static string OE_Order_Action { get { return ResourceManager.GetString("OE_Order_Action", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Order Confirmations. /// </summary> public static string OE_Order_Confirmations { get { return ResourceManager.GetString("OE_Order_Confirmations", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Order Entry. /// </summary> public static string OE_Order_Entry { get { return ResourceManager.GetString("OE_Order_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Pending Shipments Inquiry. /// </summary> public static string OE_Pending_Shipments_Inquiry { get { return ResourceManager.GetString("OE_Pending_Shipments_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to O/E Periodic Processing. /// </summary> public static string OE_PeriodicProcessing { get { return ResourceManager.GetString("OE_PeriodicProcessing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Picking Slips. /// </summary> public static string OE_Picking_Slips { get { return ResourceManager.GetString("OE_Picking_Slips", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Posting Journals. /// </summary> public static string OE_Posting_Journals { get { return ResourceManager.GetString("OE_Posting_Journals", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Quotes. /// </summary> public static string OE_Quotes { get { return ResourceManager.GetString("OE_Quotes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to O/E Reports. /// </summary> public static string OE_Reports { get { return ResourceManager.GetString("OE_Reports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sales History. /// </summary> public static string OE_Sales_History { get { return ResourceManager.GetString("OE_Sales_History", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sales Statistics. /// </summary> public static string OE_Sales_Statistics { get { return ResourceManager.GetString("OE_Sales_Statistics", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Salesperson Commissions. /// </summary> public static string OE_Salesperson_Commissions { get { return ResourceManager.GetString("OE_Salesperson_Commissions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Salesperson Inquiry. /// </summary> public static string OE_Salesperson_Inquiry { get { return ResourceManager.GetString("OE_Salesperson_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sales Statistics. /// </summary> public static string OE_SalesStatistics { get { return ResourceManager.GetString("OE_SalesStatistics", resourceCulture); } } /// <summary> /// Looks up a localized string similar to O/E Setup. /// </summary> public static string OE_Setup { get { return ResourceManager.GetString("OE_Setup", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Ship-Via Codes. /// </summary> public static string OE_Ship_Via_Codes { get { return ResourceManager.GetString("OE_Ship_Via_Codes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Shipment Entry. /// </summary> public static string OE_Shipment_Entry { get { return ResourceManager.GetString("OE_Shipment_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Shipping Labels. /// </summary> public static string OE_ShippingLabels { get { return ResourceManager.GetString("OE_ShippingLabels", resourceCulture); } } /// <summary> /// Looks up a localized string similar to O/E Statistics and Inquiries. /// </summary> public static string OE_Statistics_and_Inquiries { get { return ResourceManager.GetString("OE_Statistics_and_Inquiries", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Templates. /// </summary> public static string OE_Templates { get { return ResourceManager.GetString("OE_Templates", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transaction List. /// </summary> public static string OE_TransactionList { get { return ResourceManager.GetString("OE_TransactionList", resourceCulture); } } /// <summary> /// Looks up a localized string similar to O/E Transactions. /// </summary> public static string OE_Transactions { get { return ResourceManager.GetString("OE_Transactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payment Processing. /// </summary> public static string PaymentProcessing { get { return ResourceManager.GetString("PaymentProcessing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Pin Navigation Menu. /// </summary> public static string PinMenu { get { return ResourceManager.GetString("PinMenu", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Transactions. /// </summary> public static string PO_3rd_Level_Transaction_Template { get { return ResourceManager.GetString("PO_3rd_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Transactions. /// </summary> public static string PO_4th_Level_Transaction_Template { get { return ResourceManager.GetString("PO_4th_Level_Transaction_Template", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Additional Costs. /// </summary> public static string PO_AdditionalCosts { get { return ResourceManager.GetString("PO_AdditionalCosts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Aged Purchase Orders . /// </summary> public static string PO_Aged_Purchase_Orders_Report { get { return ResourceManager.GetString("PO_Aged_Purchase_Orders_Report", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Analytical Reports. /// </summary> public static string PO_Analytical_Reports { get { return ResourceManager.GetString("PO_Analytical_Reports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear History. /// </summary> public static string PO_Clear_History { get { return ResourceManager.GetString("PO_Clear_History", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Copy Purchase Orders. /// </summary> public static string PO_Copy_Purchase_Order { get { return ResourceManager.GetString("PO_Copy_Purchase_Order", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create POs from I/C. /// </summary> public static string PO_Create_POs_from_IC { get { return ResourceManager.GetString("PO_Create_POs_from_IC", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create POs from O/E. /// </summary> public static string PO_Create_POs_from_OE { get { return ResourceManager.GetString("PO_Create_POs_from_OE", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create POs from Requisitions. /// </summary> public static string PO_Create_POs_from_Requisitions { get { return ResourceManager.GetString("PO_Create_POs_from_Requisitions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Create Purchase Orders. /// </summary> public static string PO_Create_Purchase_Orders { get { return ResourceManager.GetString("PO_Create_Purchase_Orders", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Credit/Debit Note Entry. /// </summary> public static string PO_Credit_Debit_Note_Entry { get { return ResourceManager.GetString("PO_Credit_Debit_Note_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Email Messages. /// </summary> public static string PO_Email_Messages { get { return ResourceManager.GetString("PO_Email_Messages", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Forms. /// </summary> public static string PO_Forms { get { return ResourceManager.GetString("PO_Forms", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Invoice Entry. /// </summary> public static string PO_Invoice_Entry { get { return ResourceManager.GetString("PO_Invoice_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Mailing Labels. /// </summary> public static string PO_Mailing_Labels { get { return ResourceManager.GetString("PO_Mailing_Labels", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Optional Fields. /// </summary> public static string PO_Optional_Fields { get { return ResourceManager.GetString("PO_Optional_Fields", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Options. /// </summary> public static string PO_Options { get { return ResourceManager.GetString("PO_Options", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payables Clearing Audit List. /// </summary> public static string PO_Payables_Clearing_Audit_List_Report { get { return ResourceManager.GetString("PO_Payables_Clearing_Audit_List_Report", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Pending Receipts Inquiry. /// </summary> public static string PO_Pending_Receipts_Inquiry { get { return ResourceManager.GetString("PO_Pending_Receipts_Inquiry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Periodic Processing. /// </summary> public static string PO_PeriodicProcessing { get { return ResourceManager.GetString("PO_PeriodicProcessing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Posting Journals. /// </summary> public static string PO_Posting_Journals { get { return ResourceManager.GetString("PO_Posting_Journals", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Purchase History. /// </summary> public static string PO_Purchase_History { get { return ResourceManager.GetString("PO_Purchase_History", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Purchase Order Action. /// </summary> public static string PO_Purchase_Order_Action { get { return ResourceManager.GetString("PO_Purchase_Order_Action", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Purchase Order Entry. /// </summary> public static string PO_Purchase_Order_Entry { get { return ResourceManager.GetString("PO_Purchase_Order_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Purchase Orders. /// </summary> public static string PO_Purchase_Orders { get { return ResourceManager.GetString("PO_Purchase_Orders", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Purchase Statistics. /// </summary> public static string PO_Purchase_Statistics { get { return ResourceManager.GetString("PO_Purchase_Statistics", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Purchase Statistics. /// </summary> public static string PO_PurchaseStatistics { get { return ResourceManager.GetString("PO_PurchaseStatistics", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Receipt Entry. /// </summary> public static string PO_Receipt_Entry { get { return ResourceManager.GetString("PO_Receipt_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Receiving Slips. /// </summary> public static string PO_Receiving_Slips { get { return ResourceManager.GetString("PO_Receiving_Slips", resourceCulture); } } /// <summary> /// Looks up a localized string similar to About Purchase Order Forms. /// </summary> public static string PO_ReceivingSlips_Article1 { get { return ResourceManager.GetString("PO_ReceivingSlips_Article1", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Printing Receiving Slips. /// </summary> public static string PO_ReceivingSlips_Article2 { get { return ResourceManager.GetString("PO_ReceivingSlips_Article2", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Receiving Slips Screen. /// </summary> public static string PO_ReceivingSlips_Screen { get { return ResourceManager.GetString("PO_ReceivingSlips_Screen", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Requisition Entry. /// </summary> public static string PO_RequisitionEntry { get { return ResourceManager.GetString("PO_RequisitionEntry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Requisitions. /// </summary> public static string PO_Requisitions { get { return ResourceManager.GetString("PO_Requisitions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Return Entry. /// </summary> public static string PO_Return_Entry { get { return ResourceManager.GetString("PO_Return_Entry", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Returns. /// </summary> public static string PO_Returns { get { return ResourceManager.GetString("PO_Returns", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Setup. /// </summary> public static string PO_Setup { get { return ResourceManager.GetString("PO_Setup", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Setup Reports. /// </summary> public static string PO_Setup_Reports { get { return ResourceManager.GetString("PO_Setup_Reports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Ship-Via Codes. /// </summary> public static string PO_Ship_Via_Codes { get { return ResourceManager.GetString("PO_Ship_Via_Codes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Shippable Backorders. /// </summary> public static string PO_Shippable_Backorders { get { return ResourceManager.GetString("PO_Shippable_Backorders", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Statistics and Inquiries. /// </summary> public static string PO_Statistics_Inquiries { get { return ResourceManager.GetString("PO_Statistics_Inquiries", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Templates. /// </summary> public static string PO_Templates { get { return ResourceManager.GetString("PO_Templates", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Transaction List. /// </summary> public static string PO_TransactionList { get { return ResourceManager.GetString("PO_TransactionList", resourceCulture); } } /// <summary> /// Looks up a localized string similar to P/O Transactions. /// </summary> public static string PO_Transactions { get { return ResourceManager.GetString("PO_Transactions", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Vendor Contract Costs. /// </summary> public static string PO_Vendor_Contract_Costs { get { return ResourceManager.GetString("PO_Vendor_Contract_Costs", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payroll Employee Timecards. /// </summary> public static string PR_EmployeeTimeCard { get { return ResourceManager.GetString("PR_EmployeeTimeCard", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Canadian Payroll Employee Timecards. /// </summary> public static string PR_EmployeeTimeCard_CA { get { return ResourceManager.GetString("PR_EmployeeTimeCard_CA", resourceCulture); } } /// <summary> /// Looks up a localized string similar to US Payroll Employee Timecards. /// </summary> public static string PR_EmployeeTimeCard_US { get { return ResourceManager.GetString("PR_EmployeeTimeCard_US", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Project and Job Costing. /// </summary> public static string ProjectJobCosting { get { return ResourceManager.GetString("ProjectJobCosting", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Projects. /// </summary> public static string Projects { get { return ResourceManager.GetString("Projects", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sage Intelligence Go!. /// </summary> public static string Sage_Intelligence_Go { get { return ResourceManager.GetString("Sage_Intelligence_Go", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Saved Queries . /// </summary> public static string Saved_Queries { get { return ResourceManager.GetString("Saved_Queries", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Search. /// </summary> public static string Search { get { return ResourceManager.GetString("Search", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Search objects by keyword. /// </summary> public static string SearchTitle { get { return ResourceManager.GetString("SearchTitle", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Customize Theme Color. /// </summary> public static string SetCompanyColor { get { return ResourceManager.GetString("SetCompanyColor", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Set Theme Color from Database. /// </summary> public static string SetCompanyColorDB { get { return ResourceManager.GetString("SetCompanyColorDB", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Settings. /// </summary> public static string Settings { get { return ResourceManager.GetString("Settings", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Singapore Tax Reports. /// </summary> public static string SingaporeGST { get { return ResourceManager.GetString("SingaporeGST", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Open. /// </summary> public static string SIR_Btn { get { return ResourceManager.GetString("SIR_Btn", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sage Intelligence Reporting Cloud. /// </summary> public static string SIR_Msg1 { get { return ResourceManager.GetString("SIR_Msg1", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Gain better visibility into your business with dynamic financial reports that you can export and customize in Microsoft Excel® or Excel Online.. /// </summary> public static string SIR_Msg2 { get { return ResourceManager.GetString("SIR_Msg2", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Actual YTD. /// </summary> public static string SIR_Report1 { get { return ResourceManager.GetString("SIR_Report1", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Actual vs Prior. /// </summary> public static string SIR_Report2 { get { return ResourceManager.GetString("SIR_Report2", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Actual vs Budget. /// </summary> public static string SIR_Report3 { get { return ResourceManager.GetString("SIR_Report3", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Month to Month. /// </summary> public static string SIR_Report4 { get { return ResourceManager.GetString("SIR_Report4", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Intelligence. /// </summary> public static string SIR_Title { get { return ResourceManager.GetString("SIR_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Small. /// </summary> public static string Small { get { return ResourceManager.GetString("Small", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tasks. /// </summary> public static string Task { get { return ResourceManager.GetString("Task", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Clear History. /// </summary> public static string Tax_ClearHistory { get { return ResourceManager.GetString("Tax_ClearHistory", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Periodic Processing. /// </summary> public static string Tax_PeriodicProcessing { get { return ResourceManager.GetString("Tax_PeriodicProcessing", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Reports. /// </summary> public static string Tax_Reports { get { return ResourceManager.GetString("Tax_Reports", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Reverse Charges. /// </summary> public static string Tax_ReverseCharge { get { return ResourceManager.GetString("Tax_ReverseCharge", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Services. /// </summary> public static string Tax_Services { get { return ResourceManager.GetString("Tax_Services", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Setup. /// </summary> public static string Tax_Setup { get { return ResourceManager.GetString("Tax_Setup", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Authorities. /// </summary> public static string Tax_TaxAuthorities { get { return ResourceManager.GetString("Tax_TaxAuthorities", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Classes. /// </summary> public static string Tax_TaxClasses { get { return ResourceManager.GetString("Tax_TaxClasses", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Groups. /// </summary> public static string Tax_TaxGroups { get { return ResourceManager.GetString("Tax_TaxGroups", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Rates. /// </summary> public static string Tax_TaxRates { get { return ResourceManager.GetString("Tax_TaxRates", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Tracking. /// </summary> public static string Tax_TaxTracking { get { return ResourceManager.GetString("Tax_TaxTracking", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Withholding Tax Rates. /// </summary> public static string Tax_WithholdingTaxRates { get { return ResourceManager.GetString("Tax_WithholdingTaxRates", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Code Mapping. /// </summary> public static string TaxCodeMapping { get { return ResourceManager.GetString("TaxCodeMapping", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Templates. /// </summary> public static string Templates { get { return ResourceManager.GetString("Templates", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Text Size. /// </summary> public static string TextSize { get { return ResourceManager.GetString("TextSize", resourceCulture); } } /// <summary> /// Looks up a localized string similar to GST 03. /// </summary> public static string TM_GST03 { get { return ResourceManager.GetString("TM_GST03", resourceCulture); } } /// <summary> /// Looks up a localized string similar to GST GAF Generator. /// </summary> public static string TM_GSTGAF { get { return ResourceManager.GetString("TM_GSTGAF", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Import Tax Codes. /// </summary> public static string TM_ImportTaxCodes { get { return ResourceManager.GetString("TM_ImportTaxCodes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Options. /// </summary> public static string TM_Options { get { return ResourceManager.GetString("TM_Options", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tax Code Mapping. /// </summary> public static string TM_TaxCodeMapping { get { return ResourceManager.GetString("TM_TaxCodeMapping", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Tools. /// </summary> public static string Tools { get { return ResourceManager.GetString("Tools", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Show or hide the web toolbar. /// </summary> public static string ToolsTitle { get { return ResourceManager.GetString("ToolsTitle", resourceCulture); } } /// <summary> /// Looks up a localized string similar to T/S GST F5. /// </summary> public static string TS_GSTF5 { get { return ResourceManager.GetString("TS_GSTF5", resourceCulture); } } /// <summary> /// Looks up a localized string similar to T/S GST IAF Generator. /// </summary> public static string TS_GSTIAF { get { return ResourceManager.GetString("TS_GSTIAF", resourceCulture); } } /// <summary> /// Looks up a localized string similar to T/S Import Tax Codes. /// </summary> public static string TS_ImportTaxCodes { get { return ResourceManager.GetString("TS_ImportTaxCodes", resourceCulture); } } /// <summary> /// Looks up a localized string similar to T/S Tax Code Mapping. /// </summary> public static string TS_TaxCodeMapping { get { return ResourceManager.GetString("TS_TaxCodeMapping", resourceCulture); } } /// <summary> /// Looks up a localized string similar to T/W Business Activity Statement. /// </summary> public static string TW_BusinessActivityStatement { get { return ResourceManager.GetString("TW_BusinessActivityStatement", resourceCulture); } } /// <summary> /// Looks up a localized string similar to T/W Configurations. /// </summary> public static string TW_Configurations { get { return ResourceManager.GetString("TW_Configurations", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Unpin Navigation Menu. /// </summary> public static string UnpinMenu { get { return ResourceManager.GetString("UnpinMenu", resourceCulture); } } /// <summary> /// Looks up a localized string similar to VPF. /// </summary> public static string Visual_Process_Flow_Top { get { return ResourceManager.GetString("Visual_Process_Flow_Top", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payment Processing Options. /// </summary> public static string YP_Setup_Options { get { return ResourceManager.GetString("YP_Setup_Options", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Payment Processing Codes. /// </summary> public static string YP_Setup_ProcessingCodes { get { return ResourceManager.GetString("YP_Setup_ProcessingCodes", resourceCulture); } } } }
34.995435
221
0.543065
[ "MIT" ]
ggagnaux/Sage300-SDK
resources/Sage300Resources/Sage.CA.SBS.ERP.Sage300.Common.Resources/Portal/NavigationResx.Designer.cs
160,982
C#
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; namespace CampusSnapshots.Models.AccountViewModels { public class ForgotPasswordViewModel { [Required] [EmailAddress] public string Email { get; set; } } }
21
50
0.72619
[ "MIT" ]
Filipedc1/cen4010-s2018-g01
CampusSnapshots/CampusSnapshots/ViewModels/AccountViewModels/ForgotPasswordViewModel.cs
338
C#
using System.Net; namespace Kudu.Client.PCL.Infrastructure { public class BasicAuthCredentialProvider : ICredentialProvider { private readonly ICredentials _credentials; public BasicAuthCredentialProvider(string userName, string password) { _credentials = new NetworkCredential(userName, password); } public ICredentials GetCredentials() { return _credentials; } } }
23.15
76
0.658747
[ "Apache-2.0" ]
eashi/kudu.client.pcl
Kudu.Client.PCL/Infrastructure/BasicAuthCredentialProvider.cs
465
C#
namespace Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing { using System; using System.Diagnostics; using System.IO; using System.Security; using System.Threading; using Microsoft.ApplicationInsights.Common.Extensions; using static System.FormattableString; /// <summary> /// This class contains helper methods that can be shared across file loggers. /// </summary> internal static class FileHelper { private static string identityName = null; public static string IdentityName => LazyInitializer.EnsureInitialized(ref identityName, GetCurrentIdentityName); /// <summary> /// Test that this process can read and write to a given directory. /// </summary> /// <param name="directory">The directory to be evaluated.</param> public static void TestDirectoryPermissions(DirectoryInfo directory) { string testFileName = Path.GetRandomFileName(); string testFilePath = Path.Combine(directory.FullName, testFileName); if (!Directory.Exists(directory.FullName)) { Directory.CreateDirectory(directory.FullName); } // Create a test file, will auto-delete this file. using (var testFile = new FileStream(testFilePath, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None, 4096, FileOptions.DeleteOnClose)) { testFile.Write(new[] { default(byte) }, 0, 1); } } /// <summary> /// Generate a file name in the format "ApplicationInsightsLog_20200101_120000_w3wp_12345.txt. /// </summary> /// <remarks> /// File logging can be controlled by an Environment Variable and may affect multiple running applications on a single machine. /// We include the Date, TimeStamp, Process Name, and Process ID to uniquely identify applications. /// </remarks> /// <returns>File name for use in logging.</returns> public static string GenerateFileName() { var process = Process.GetCurrentProcess(); return Invariant($"ApplicationInsightsLog_{DateTime.UtcNow.ToInvariantString("yyyyMMdd_HHmmss")}_{process.ProcessName}_{process.Id}.txt"); } /// <summary> /// Get the current identity. /// </summary> private static string GetCurrentIdentityName() { try { #if NETSTANDARD // This constant is defined for all versions of NetStandard https://docs.microsoft.com/en-us/dotnet/core/tutorials/libraries#how-to-multitarget return System.Environment.UserName; #else using (var identity = System.Security.Principal.WindowsIdentity.GetCurrent()) { return identity.Name; } #endif } catch (SecurityException exp) { CoreEventSource.Log.LogWindowsIdentityAccessSecurityException(exp.Message); return "Unknown"; } } } }
38.95
159
0.62837
[ "MIT" ]
304NotModified/ApplicationInsights-dotnet
BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/FileHelper.cs
3,118
C#
// --------------------------------------------------------------------------------------------- // <copyright>PhotonNetwork Framework for Unity - Copyright (C) 2020 Exit Games GmbH</copyright> // <author>developer@exitgames.com</author> // --------------------------------------------------------------------------------------------- #if UNITY_EDITOR #if PUN_2_OR_NEWER using UnityEngine; using UnityEditor; using System.Collections.Generic; using Photon.Pun; namespace Photon.Pun.Simple.Assists { public static class TriggerAssists { [MenuItem(AssistHelpers.CONVERT_TO_FOLDER + "Zone: Vital Recharge", false, AssistHelpers.CONVERTTO_PRIORITY)] public static void ConvertToVitalRechargeZone() { ConvertToZone(Preset.RechargeZone); } [MenuItem(AssistHelpers.CONVERT_TO_FOLDER + "Zone: Vital Damage", false, AssistHelpers.CONVERTTO_PRIORITY)] public static void ConvertToDamageZone() { ConvertToZone(Preset.DamageZone); } private static void ConvertToZone(Preset preset) { var selection = NetObjectAssists.GetSelectedGameObject(); if (selection != null) if (!selection.CheckReparentable()) return; selection.EnsureComponentExists<ContactTrigger>().UsePreset(preset); selection.EnsureComponentExists<VitalsContactReactor>().UsePreset(preset); selection.SetAllCollidersAsTriggger(true); } static List<Collider> colliders = new List<Collider>(); static List<Collider2D> colliders2D = new List<Collider2D>(); public static void SetAllCollidersAsTriggger(this GameObject selection, bool isTrigger = true) { if (ReferenceEquals(selection, null)) return; selection.transform.GetNestedComponentsInChildren<Collider, NetObject>(colliders); for (int i = 0; i < colliders.Count; ++i) colliders[i].isTrigger = true; selection.transform.GetNestedComponentsInChildren<Collider2D, NetObject>(colliders2D); for (int i = 0; i < colliders2D.Count; ++i) colliders2D[i].isTrigger = true; } } } #endif #endif
34.880597
118
0.581515
[ "CC0-1.0" ]
chrapacz2000/KoboldKare
Assets/ThirdParty/Photon/Simple/Components/Assistants/TriggerAssists.cs
2,339
C#
//---------------------- // <auto-generated> // Generated using the NSwag toolchain v13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) // </auto-generated> //---------------------- #pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." #pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." #pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' #pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... #pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." #pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" namespace NSwag.Integration.ClientPCL.Contracts { using System = global::System; [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.4.0 (Newtonsoft.Json v11.0.0.0)")] public partial class GeoPoint { [Newtonsoft.Json.JsonProperty("Latitude", Required = Newtonsoft.Json.Required.Always)] public double Latitude { get; set; } [Newtonsoft.Json.JsonProperty("Longitude", Required = Newtonsoft.Json.Required.Always)] public double Longitude { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.4.0 (Newtonsoft.Json v11.0.0.0)")] public partial class GenericRequestOfAddressAndPerson { [Newtonsoft.Json.JsonProperty("Item1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Address Item1 { get; set; } [Newtonsoft.Json.JsonProperty("Item2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Person Item2 { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.4.0 (Newtonsoft.Json v11.0.0.0)")] public partial class Address { [Newtonsoft.Json.JsonProperty("IsPrimary", Required = Newtonsoft.Json.Required.Always)] public bool IsPrimary { get; set; } [Newtonsoft.Json.JsonProperty("City", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string City { get; set; } } [Newtonsoft.Json.JsonConverter(typeof(JsonInheritanceConverter), "discriminator")] [JsonInheritanceAttribute("Teacher", typeof(Teacher))] [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.4.0 (Newtonsoft.Json v11.0.0.0)")] public partial class Person { [Newtonsoft.Json.JsonProperty("Id", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid Id { get; set; } /// <summary>Gets or sets the first name.</summary> [Newtonsoft.Json.JsonProperty("FirstName", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(int.MaxValue, MinimumLength = 2)] public string FirstName { get; set; } /// <summary>Gets or sets the last name.</summary> [Newtonsoft.Json.JsonProperty("LastName", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public string LastName { get; set; } [Newtonsoft.Json.JsonProperty("Gender", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public Gender Gender { get; set; } [Newtonsoft.Json.JsonProperty("DateOfBirth", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.DateTime DateOfBirth { get; set; } [Newtonsoft.Json.JsonProperty("Weight", Required = Newtonsoft.Json.Required.Always)] public decimal Weight { get; set; } [Newtonsoft.Json.JsonProperty("Height", Required = Newtonsoft.Json.Required.Always)] public double Height { get; set; } [Newtonsoft.Json.JsonProperty("Age", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Range(5, 99)] public int Age { get; set; } [Newtonsoft.Json.JsonProperty("AverageSleepTime", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.TimeSpan AverageSleepTime { get; set; } [Newtonsoft.Json.JsonProperty("Address", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public Address Address { get; set; } = new Address(); [Newtonsoft.Json.JsonProperty("Children", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.ObjectModel.ObservableCollection<Person> Children { get; set; } = new System.Collections.ObjectModel.ObservableCollection<Person>(); [Newtonsoft.Json.JsonProperty("Skills", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.Dictionary<string, SkillLevel> Skills { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.4.0 (Newtonsoft.Json v11.0.0.0)")] public enum Gender { [System.Runtime.Serialization.EnumMember(Value = @"Male")] Male = 0, [System.Runtime.Serialization.EnumMember(Value = @"Female")] Female = 1, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.4.0 (Newtonsoft.Json v11.0.0.0)")] public enum SkillLevel { Low = 0, Medium = 1, Height = 2, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.4.0 (Newtonsoft.Json v11.0.0.0)")] public partial class Teacher : Person { [Newtonsoft.Json.JsonProperty("Course", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Course { get; set; } [Newtonsoft.Json.JsonProperty("SkillLevel", Required = Newtonsoft.Json.Required.Always)] public SkillLevel SkillLevel { get; set; } = NSwag.Integration.ClientPCL.Contracts.SkillLevel.Medium; } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.4.0 (Newtonsoft.Json v11.0.0.0)")] [Newtonsoft.Json.JsonObjectAttribute] public partial class PersonNotFoundException : System.Exception { [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid Id { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.4.0 (Newtonsoft.Json v11.0.0.0)")] [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple = true)] internal class JsonInheritanceAttribute : System.Attribute { public JsonInheritanceAttribute(string key, System.Type type) { Key = key; Type = type; } public string Key { get; } public System.Type Type { get; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.4.0 (Newtonsoft.Json v11.0.0.0)")] internal class JsonInheritanceConverter : Newtonsoft.Json.JsonConverter { internal static readonly string DefaultDiscriminatorName = "discriminator"; private readonly string _discriminator; [System.ThreadStatic] private static bool _isReading; [System.ThreadStatic] private static bool _isWriting; public JsonInheritanceConverter() { _discriminator = DefaultDiscriminatorName; } public JsonInheritanceConverter(string discriminator) { _discriminator = discriminator; } public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) { try { _isWriting = true; var jObject = Newtonsoft.Json.Linq.JObject.FromObject(value, serializer); jObject.AddFirst(new Newtonsoft.Json.Linq.JProperty(_discriminator, GetSubtypeDiscriminator(value.GetType()))); writer.WriteToken(jObject.CreateReader()); } finally { _isWriting = false; } } public override bool CanWrite { get { if (_isWriting) { _isWriting = false; return false; } return true; } } public override bool CanRead { get { if (_isReading) { _isReading = false; return false; } return true; } } public override bool CanConvert(System.Type objectType) { return true; } public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) { var jObject = serializer.Deserialize<Newtonsoft.Json.Linq.JObject>(reader); if (jObject == null) return null; var discriminatorValue = jObject.GetValue(_discriminator); var discriminator = discriminatorValue != null ? Newtonsoft.Json.Linq.Extensions.Value<string>(discriminatorValue) : null; var subtype = GetObjectSubtype(objectType, discriminator); var objectContract = serializer.ContractResolver.ResolveContract(subtype) as Newtonsoft.Json.Serialization.JsonObjectContract; if (objectContract == null || System.Linq.Enumerable.All(objectContract.Properties, p => p.PropertyName != _discriminator)) { jObject.Remove(_discriminator); } try { _isReading = true; return serializer.Deserialize(jObject.CreateReader(), subtype); } finally { _isReading = false; } } private System.Type GetObjectSubtype(System.Type objectType, string discriminator) { foreach (var attribute in System.Reflection.CustomAttributeExtensions.GetCustomAttributes<JsonInheritanceAttribute>(System.Reflection.IntrospectionExtensions.GetTypeInfo(objectType), true)) { if (attribute.Key == discriminator) return attribute.Type; } return objectType; } private string GetSubtypeDiscriminator(System.Type objectType) { foreach (var attribute in System.Reflection.CustomAttributeExtensions.GetCustomAttributes<JsonInheritanceAttribute>(System.Reflection.IntrospectionExtensions.GetTypeInfo(objectType), true)) { if (attribute.Type == objectType) return attribute.Key; } return objectType.Name; } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v11.0.0.0))")] public partial class FileParameter { public FileParameter(System.IO.Stream data) : this (data, null, null) { } public FileParameter(System.IO.Stream data, string fileName) : this (data, fileName, null) { } public FileParameter(System.IO.Stream data, string fileName, string contentType) { Data = data; FileName = fileName; ContentType = contentType; } public System.IO.Stream Data { get; private set; } public string FileName { get; private set; } public string ContentType { get; private set; } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v11.0.0.0))")] public partial class FileResponse : System.IDisposable { private System.IDisposable _client; private System.IDisposable _response; public int StatusCode { get; private set; } public System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; } public System.IO.Stream Stream { get; private set; } public bool IsPartial { get { return StatusCode == 206; } } public FileResponse(int statusCode, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.IO.Stream stream, System.IDisposable client, System.IDisposable response) { StatusCode = statusCode; Headers = headers; Stream = stream; _client = client; _response = response; } public void Dispose() { Stream.Dispose(); if (_response != null) _response.Dispose(); if (_client != null) _client.Dispose(); } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SwaggerResponse { public int StatusCode { get; private set; } public System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; } public SwaggerResponse(int statusCode, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers) { StatusCode = statusCode; Headers = headers; } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SwaggerResponse<TResult> : SwaggerResponse { public TResult Result { get; private set; } public SwaggerResponse(int statusCode, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, TResult result) : base(statusCode, headers) { Result = result; } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v11.0.0.0))")] public partial class GeoClientException : System.Exception { public int StatusCode { get; private set; } public string Response { get; private set; } public System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; } public GeoClientException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Exception innerException) : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) { StatusCode = statusCode; Response = response; Headers = headers; } public override string ToString() { return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v11.0.0.0))")] public partial class GeoClientException<TResult> : GeoClientException { public TResult Result { get; private set; } public GeoClientException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, TResult result, System.Exception innerException) : base(message, statusCode, response, headers, innerException) { Result = result; } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PersonsClientException : System.Exception { public int StatusCode { get; private set; } public string Response { get; private set; } public System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; } public PersonsClientException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Exception innerException) : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) { StatusCode = statusCode; Response = response; Headers = headers; } public override string ToString() { return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PersonsClientException<TResult> : PersonsClientException { public TResult Result { get; private set; } public PersonsClientException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, TResult result, System.Exception innerException) : base(message, statusCode, response, headers, innerException) { Result = result; } } } #pragma warning restore 1591 #pragma warning restore 1573 #pragma warning restore 472 #pragma warning restore 114 #pragma warning restore 108
42.021834
268
0.647459
[ "MIT" ]
DanikRaikhlin/NSwag
src/NSwag.Integration.ClientPCL/ServiceClientsContracts.cs
19,246
C#
using System; using System.Collections.Generic; namespace FCM.Business.Models { public partial class UsersCars { public Guid IdUser { get; set; } public Guid IdCar { get; set; } public virtual Cars IdCarNavigation { get; set; } public virtual Users IdUserNavigation { get; set; } } }
22.066667
59
0.646526
[ "MIT" ]
VitaliyFilippov2012/Vehicle-logbook
Server_Asp.Net/FinanceCarManager/FCM.Business/Models/UsersCars.cs
333
C#
using System; using System.Collections.Generic; using System.Text; using System.Threading; using System.Threading.Tasks; using ESFA.DC.PeriodEnd.ReportService.Reports.Interface.AppsMonthly.Model; namespace ESFA.DC.PeriodEnd.ReportService.Reports.Interface.AppsMonthly.DataProvider { public interface IPaymentsDataProvider { Task<ICollection<Payment>> GetPaymentsAsync(int ukprn, int academicYear, CancellationToken cancellationToken); Task<ICollection<Earning>> GetEarningsAsync(int ukprn, CancellationToken cancellationToken); } }
33.117647
118
0.802842
[ "MIT" ]
SkillsFundingAgency/DC-2021-PeriodEnd-ReportService
src/ESFA.DC.PeriodEnd.ReportService.Reports.Interface/AppsMonthly/DataProvider/IPaymentsDataProvider.cs
565
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; using Newtonsoft.Json.Linq; namespace StickyNotes { public class MapInfoElement : MonoBehaviour { [SerializeField] Text mMapIdText; [SerializeField] Text mLocationText; [SerializeField] Toggle mToggle; public void Initialize(LibPlacenote.MapInfo mapInfo, ToggleGroup toggleGroup, RectTransform listParent, UnityAction<bool> onToggleChanged) { mMapIdText.text = mapInfo.placeId; if (mapInfo.metadata.name != null && mapInfo.metadata.name.Length > 0) { mMapIdText.text = mapInfo.metadata.name; } mToggle.group = toggleGroup; gameObject.transform.SetParent(listParent); mToggle.onValueChanged.AddListener(onToggleChanged); if (Input.location.status != LocationServiceStatus.Running) { mLocationText.text = "Distance Unknown - No user location"; } else if (mapInfo.metadata.location != null) { var distance = Calc(Input.location.lastData.latitude, Input.location.lastData.longitude, mapInfo.metadata.location.latitude, mapInfo.metadata.location.longitude); mLocationText.text = "Distance: " + distance.ToString("F3") + "km"; } else { mLocationText.text = "Distance Unknown - Map does not have location"; } } public static double Calc(float lat1, float lon1, float lat2, float lon2) { // Very simple spherical calculation, should probably use a better // projection for production var R = 6378.137; // Radius of earth in KM var dLat = lat2 * Mathf.PI / 180 - lat1 * Mathf.PI / 180; var dLon = lon2 * Mathf.PI / 180 - lon1 * Mathf.PI / 180; float a = Mathf.Sin(dLat / 2) * Mathf.Sin(dLat / 2) + Mathf.Cos(lat1 * Mathf.PI / 180) * Mathf.Cos(lat2 * Mathf.PI / 180) * Mathf.Sin(dLon / 2) * Mathf.Sin(dLon / 2); var c = 2 * Mathf.Atan2(Mathf.Sqrt(a), Mathf.Sqrt(1 - a)); var d = R * c; return d; } } }
39.833333
104
0.571967
[ "MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
Pandinosaurus/PlacenoteSDK-Unity
Assets/Placenote/Examples/3_StickyNotes/Scripts/MapInfoElement.cs
2,392
C#
using System; using System.Numerics; using Veldrid.Utilities; namespace Veldrid.NeoDemo.Objects { internal class FullScreenQuad : Renderable { private DisposeCollector _disposeCollector; private Pipeline _pipeline; private DeviceBuffer _ib; private DeviceBuffer _vb; public bool UseTintedTexture { get; set; } public override void CreateDeviceObjects(GraphicsDevice gd, CommandList cl, SceneContext sc) { DisposeCollectorResourceFactory factory = new DisposeCollectorResourceFactory(gd.ResourceFactory); _disposeCollector = factory.DisposeCollector; ResourceLayout resourceLayout = factory.CreateResourceLayout(new ResourceLayoutDescription( new ResourceLayoutElementDescription("SourceTexture", ResourceKind.TextureReadOnly, ShaderStages.Fragment), new ResourceLayoutElementDescription("SourceSampler", ResourceKind.Sampler, ShaderStages.Fragment))); (Shader vs, Shader fs) = StaticResourceCache.GetShaders(gd, gd.ResourceFactory, "FullScreenQuad"); GraphicsPipelineDescription pd = new GraphicsPipelineDescription( new BlendStateDescription( RgbaFloat.Black, BlendAttachmentDescription.OverrideBlend), DepthStencilStateDescription.Disabled, new RasterizerStateDescription(FaceCullMode.Back, PolygonFillMode.Solid, FrontFace.Clockwise, true, false), PrimitiveTopology.TriangleList, new ShaderSetDescription( new[] { new VertexLayoutDescription( new VertexElementDescription("Position", VertexElementSemantic.TextureCoordinate, VertexElementFormat.Float2), new VertexElementDescription("TexCoords", VertexElementSemantic.TextureCoordinate, VertexElementFormat.Float2)) }, new[] { vs, fs }, ShaderHelper.GetSpecializations(gd)), new ResourceLayout[] { resourceLayout }, gd.SwapchainFramebuffer.OutputDescription); _pipeline = factory.CreateGraphicsPipeline(ref pd); float[] verts = Util.GetFullScreenQuadVerts(gd); _vb = factory.CreateBuffer(new BufferDescription(verts.SizeInBytes() * sizeof(float), BufferUsage.VertexBuffer)); cl.UpdateBuffer(_vb, 0, verts); _ib = factory.CreateBuffer( new BufferDescription(s_quadIndices.SizeInBytes(), BufferUsage.IndexBuffer)); cl.UpdateBuffer(_ib, 0, s_quadIndices); } public override void DestroyDeviceObjects() { _disposeCollector.DisposeAll(); } public override RenderOrderKey GetRenderOrderKey(Vector3 cameraPosition) { return new RenderOrderKey(); } public override void Render(GraphicsDevice gd, CommandList cl, SceneContext sc, RenderPasses renderPass) { cl.SetPipeline(_pipeline); cl.SetGraphicsResourceSet(0, UseTintedTexture ? sc.DuplicatorTargetSet1 : sc.DuplicatorTargetSet0); cl.SetVertexBuffer(0, _vb); cl.SetIndexBuffer(_ib, IndexFormat.UInt16); cl.DrawIndexed(6, 1, 0, 0, 0); } public override RenderPasses RenderPasses => RenderPasses.SwapchainOutput; public override void UpdatePerFrameResources(GraphicsDevice gd, CommandList cl, SceneContext sc) { } private static ushort[] s_quadIndices = new ushort[] { 0, 1, 2, 0, 2, 3 }; } }
43.892857
139
0.650122
[ "MIT" ]
BSG-75/veldrid
src/NeoDemo/Objects/FullScreenQuad.cs
3,689
C#
using System; using System.Linq; namespace CsBenc.Encoders { /// <summary> /// Simple encoder with checksum abilities. /// </summary> public class ChecksumEncoder : SimpleEncoder { private readonly string _checksums; private readonly int _checksumBase; /// <summary> /// Creates a new instance of an encoder with checksum abilities. /// </summary> /// <param name="alphabet">The alphabet to use for encoding. Limited to 255 characters</param> /// <param name="checksums">Extension to the alphabet for the checksums</param> public ChecksumEncoder(string alphabet, string checksums) : base(alphabet) { _checksums = checksums; _checksumBase = alphabet.Length + _checksums.Length; } /// <summary> /// Encodes a number as a string without checksum. /// </summary> /// <param name="number">Number to encode</param> /// <returns>String encoding of the number</returns> public override string Encode(ulong number) { return Encode(number, false); } /// <summary> /// Encodes a number as a string, optionally adding a checksum. /// </summary> /// <param name="number">Number to encode</param> /// <param name="checksum">true to add a checksum to the resulting string.</param> /// <returns>String encoding of the number with an optional checksum</returns> public virtual string Encode(ulong number, bool checksum) { var encoded = base.Encode(number); if (checksum) { encoded += GetChecksum(number); } return encoded; } /// <summary> /// Decodes an encoded string without checksum as a number. /// </summary> /// <param name="encoded">Encoded string without checksum</param> /// <returns>Decoded numeric value</returns> public override ulong DecodeLong(string encoded) { return DecodeLong(encoded, false); } /// <summary> /// Decodes an encoded string as a number (with an optional checksum). /// </summary> /// <param name="encoded">Encoded string with optional checksum</param> /// <param name="checksum">true to indicate that the string contains a checksum.</param> /// <returns>Decoded numeric value</returns> public virtual ulong DecodeLong(string encoded, bool checksum) { var chunks = GetChunks(checksum ? encoded.Substring(0, encoded.Length - 1) : encoded).ToArray(); var result = Processor.CombineLong(chunks); if (checksum) { var csc = GetChecksum(result); if (csc != encoded[encoded.Length - 1]) { throw new Exception("Checksum mismatch"); } } return result; } private char GetChecksum(ulong number) { var checksum = (byte)(number % (ulong)_checksumBase); var alphabetSize = Alphabet.Length; var checksumChar = checksum > alphabetSize ? _checksums[alphabetSize - checksum] : Alphabet[checksum]; return checksumChar; } } }
34.326531
114
0.575505
[ "MIT" ]
mcliment/CsBenc
src/CsBenc/Encoders/ChecksumEncoder.cs
3,366
C#
using CharacterGen.Abilities; using CharacterGen.Domain.Tables; using CharacterGen.Races; using NUnit.Framework; namespace CharacterGen.Tests.Integration.Tables.Abilities.Races { [TestFixture] public class KuoToaAbilityAdjustmentsTests : AdjustmentsTests { protected override string tableName { get { return string.Format(TableNameConstants.Formattable.Adjustments.RACEAbilityAdjustments, RaceConstants.BaseRaces.KuoToa); } } [Test] public override void CollectionNames() { var abilityGroups = CollectionsMapper.Map(TableNameConstants.Set.Collection.AbilityGroups); AssertCollectionNames(abilityGroups[GroupConstants.All]); } [TestCase(AbilityConstants.Charisma, -2)] [TestCase(AbilityConstants.Constitution, 2)] [TestCase(AbilityConstants.Dexterity, 0)] [TestCase(AbilityConstants.Intelligence, 2)] [TestCase(AbilityConstants.Strength, 2)] [TestCase(AbilityConstants.Wisdom, 4)] public void RacialAbilityAdjustment(string name, int adjustment) { base.Adjustment(name, adjustment); } } }
33.828571
140
0.692568
[ "MIT" ]
DnDGen/CharacterGen
CharacterGen.Tests.Integration.Tables/Abilities/Races/KuoToaAbilityAdjustmentsTests.cs
1,186
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BpuyoReplayConverter { static class BpuyoParameter { public const int FieldSize = 78; public const int ColumnNumber = 6; public const int RowNumber = 13; public const int KumipuyoSize = 2; public const int BlockFrameSize = 120; public const int PlayerNumber = 2; } }
22.8
46
0.682018
[ "MIT" ]
nsendoda/BpuyoReplayConverter
BpuyoReplayConverter/BpuyoParameter.cs
458
C#
 namespace FinancialPortal.Models { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Microsoft.AspNet.Identity; using Microsoft.Owin.Security; public class IndexViewModel { public bool HasPassword { get; set; } public IList<UserLoginInfo> Logins { get; set; } public string PhoneNumber { get; set; } public bool TwoFactor { get; set; } public bool BrowserRemembered { get; set; } } public class ManageLoginsViewModel { public IList<UserLoginInfo> CurrentLogins { get; set; } public IList<AuthenticationDescription> OtherLogins { get; set; } } public class FactorViewModel { public string Purpose { get; set; } } public class SetPasswordViewModel { [Required] [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] [DataType(DataType.Password)] [Display(Name = "New password")] public string NewPassword { get; set; } [DataType(DataType.Password)] [Display(Name = "Confirm new password")] [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] public string ConfirmPassword { get; set; } } public class ChangePasswordViewModel { [Required] [DataType(DataType.Password)] [Display(Name = "Current password")] public string OldPassword { get; set; } [Required] [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] [DataType(DataType.Password)] [Display(Name = "New password")] public string NewPassword { get; set; } [DataType(DataType.Password)] [Display(Name = "Confirm new password")] [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] public string ConfirmPassword { get; set; } } public class AddPhoneNumberViewModel { [Required] [Phone] [Display(Name = "Phone Number")] public string Number { get; set; } } public class VerifyPhoneNumberViewModel { [Required] [Display(Name = "Code")] public string Code { get; set; } [Required] [Phone] [Display(Name = "Phone Number")] public string PhoneNumber { get; set; } } public class ConfigureTwoFactorViewModel { public string SelectedProvider { get; set; } public ICollection<System.Web.Mvc.SelectListItem> Providers { get; set; } } }
30.758621
110
0.622571
[ "MIT" ]
drrky-g/FinancialPortal
FinancialPortal/Models/ManageViewModels.cs
2,678
C#
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.Extensions.Primitives; namespace Microsoft.AspNetCore.Mvc.ModelBinding { /// <summary> /// Represents the state of an attempt to bind values from an HTTP Request to an action method, which includes /// validation information. /// </summary> public class ModelStateDictionary : IReadOnlyDictionary<string, ModelStateEntry> { // Make sure to update the doc headers if this value is changed. /// <summary> /// The default value for <see cref="MaxAllowedErrors"/> of <c>200</c>. /// </summary> public static readonly int DefaultMaxAllowedErrors = 200; private const char DelimiterDot = '.'; private const char DelimiterOpen = '['; private readonly ModelStateNode _root; private int _maxAllowedErrors; /// <summary> /// Initializes a new instance of the <see cref="ModelStateDictionary"/> class. /// </summary> public ModelStateDictionary() : this(DefaultMaxAllowedErrors) { } /// <summary> /// Initializes a new instance of the <see cref="ModelStateDictionary"/> class. /// </summary> public ModelStateDictionary(int maxAllowedErrors) { MaxAllowedErrors = maxAllowedErrors; var emptySegment = new StringSegment(buffer: string.Empty); _root = new ModelStateNode(subKey: emptySegment) { Key = string.Empty }; } /// <summary> /// Initializes a new instance of the <see cref="ModelStateDictionary"/> class by using values that are copied /// from the specified <paramref name="dictionary"/>. /// </summary> /// <param name="dictionary">The <see cref="ModelStateDictionary"/> to copy values from.</param> public ModelStateDictionary(ModelStateDictionary dictionary) : this(dictionary?.MaxAllowedErrors ?? DefaultMaxAllowedErrors) { if (dictionary == null) { throw new ArgumentNullException(nameof(dictionary)); } Merge(dictionary); } /// <summary> /// Root entry for the <see cref="ModelStateDictionary"/>. /// </summary> public ModelStateEntry Root => _root; /// <summary> /// Gets or sets the maximum allowed model state errors in this instance of <see cref="ModelStateDictionary"/>. /// Defaults to <c>200</c>. /// </summary> /// <remarks> /// <para> /// <see cref="ModelStateDictionary"/> tracks the number of model errors added by calls to /// <see cref="AddModelError(string, Exception, ModelMetadata)"/> or /// <see cref="TryAddModelError(string, Exception, ModelMetadata)"/>. /// Once the value of <code>MaxAllowedErrors - 1</code> is reached, if another attempt is made to add an error, /// the error message will be ignored and a <see cref="TooManyModelErrorsException"/> will be added. /// </para> /// <para> /// Errors added via modifying <see cref="ModelStateEntry"/> directly do not count towards this limit. /// </para> /// </remarks> public int MaxAllowedErrors { get { return _maxAllowedErrors; } set { if (value < 0) { throw new ArgumentOutOfRangeException(nameof(value)); } _maxAllowedErrors = value; } } /// <summary> /// Gets a value indicating whether or not the maximum number of errors have been /// recorded. /// </summary> /// <remarks> /// Returns <c>true</c> if a <see cref="TooManyModelErrorsException"/> has been recorded; /// otherwise <c>false</c>. /// </remarks> public bool HasReachedMaxErrors { get { return ErrorCount >= MaxAllowedErrors; } } /// <summary> /// Gets the number of errors added to this instance of <see cref="ModelStateDictionary"/> via /// <see cref="M:AddModelError"/> or <see cref="M:TryAddModelError"/>. /// </summary> public int ErrorCount { get; private set; } /// <inheritdoc /> public int Count { get; private set; } /// <summary> /// Gets the key sequence. /// </summary> public KeyEnumerable Keys => new KeyEnumerable(this); /// <inheritdoc /> IEnumerable<string> IReadOnlyDictionary<string, ModelStateEntry>.Keys => Keys; /// <summary> /// Gets the value sequence. /// </summary> public ValueEnumerable Values => new ValueEnumerable(this); /// <inheritdoc /> IEnumerable<ModelStateEntry> IReadOnlyDictionary<string, ModelStateEntry>.Values => Values; /// <summary> /// Gets a value that indicates whether any model state values in this model state dictionary is invalid or not validated. /// </summary> public bool IsValid { get { return ValidationState == ModelValidationState.Valid || ValidationState == ModelValidationState.Skipped; } } /// <inheritdoc /> public ModelValidationState ValidationState => GetValidity(_root) ?? ModelValidationState.Valid; /// <inheritdoc /> public ModelStateEntry this[string key] { get { if (key == null) { throw new ArgumentNullException(nameof(key)); } ModelStateEntry entry; TryGetValue(key, out entry); return entry; } } // Flag that indicates if TooManyModelErrorException has already been added to this dictionary. private bool HasRecordedMaxModelError { get; set; } /// <summary> /// Adds the specified <paramref name="exception"/> to the <see cref="ModelStateEntry.Errors"/> instance /// that is associated with the specified <paramref name="key"/>. /// </summary> /// <param name="key">The key of the <see cref="ModelStateEntry"/> to add errors to.</param> /// <param name="exception">The <see cref="Exception"/> to add.</param> /// <param name="metadata">The <see cref="ModelMetadata"/> associated with the model.</param> public void AddModelError(string key, Exception exception, ModelMetadata metadata) { if (key == null) { throw new ArgumentNullException(nameof(key)); } if (exception == null) { throw new ArgumentNullException(nameof(exception)); } if (metadata == null) { throw new ArgumentNullException(nameof(metadata)); } TryAddModelError(key, exception, metadata); } /// <summary> /// Attempts to add the specified <paramref name="exception"/> to the <see cref="ModelStateEntry.Errors"/> /// instance that is associated with the specified <paramref name="key"/>. If the maximum number of allowed /// errors has already been recorded, records a <see cref="TooManyModelErrorsException"/> exception instead. /// </summary> /// <param name="key">The key of the <see cref="ModelStateEntry"/> to add errors to.</param> /// <param name="exception">The <see cref="Exception"/> to add.</param> /// <param name="metadata">The <see cref="ModelMetadata"/> associated with the model.</param> /// <returns> /// <c>True</c> if the given error was added, <c>false</c> if the error was ignored. /// See <see cref="MaxAllowedErrors"/>. /// </returns> public bool TryAddModelError(string key, Exception exception, ModelMetadata metadata) { if (key == null) { throw new ArgumentNullException(nameof(key)); } if (exception == null) { throw new ArgumentNullException(nameof(exception)); } if (metadata == null) { throw new ArgumentNullException(nameof(metadata)); } if (ErrorCount >= MaxAllowedErrors - 1) { EnsureMaxErrorsReachedRecorded(); return false; } if (exception is FormatException || exception is OverflowException) { // Convert FormatExceptions and OverflowExceptions to Invalid value messages. ModelStateEntry entry; TryGetValue(key, out entry); var name = metadata.GetDisplayName(); string errorMessage; if (entry == null) { errorMessage = metadata.ModelBindingMessageProvider.UnknownValueIsInvalidAccessor(name); } else { errorMessage = metadata.ModelBindingMessageProvider.AttemptedValueIsInvalidAccessor( entry.AttemptedValue, name); } return TryAddModelError(key, errorMessage); } ErrorCount++; AddModelErrorCore(key, exception); return true; } /// <summary> /// Adds the specified <paramref name="errorMessage"/> to the <see cref="ModelStateEntry.Errors"/> instance /// that is associated with the specified <paramref name="key"/>. /// </summary> /// <param name="key">The key of the <see cref="ModelStateEntry"/> to add errors to.</param> /// <param name="errorMessage">The error message to add.</param> public void AddModelError(string key, string errorMessage) { if (key == null) { throw new ArgumentNullException(nameof(key)); } if (errorMessage == null) { throw new ArgumentNullException(nameof(errorMessage)); } TryAddModelError(key, errorMessage); } /// <summary> /// Attempts to add the specified <paramref name="errorMessage"/> to the <see cref="ModelStateEntry.Errors"/> /// instance that is associated with the specified <paramref name="key"/>. If the maximum number of allowed /// errors has already been recorded, records a <see cref="TooManyModelErrorsException"/> exception instead. /// </summary> /// <param name="key">The key of the <see cref="ModelStateEntry"/> to add errors to.</param> /// <param name="errorMessage">The error message to add.</param> /// <returns> /// <c>True</c> if the given error was added, <c>false</c> if the error was ignored. /// See <see cref="MaxAllowedErrors"/>. /// </returns> public bool TryAddModelError(string key, string errorMessage) { if (key == null) { throw new ArgumentNullException(nameof(key)); } if (errorMessage == null) { throw new ArgumentNullException(nameof(errorMessage)); } if (ErrorCount >= MaxAllowedErrors - 1) { EnsureMaxErrorsReachedRecorded(); return false; } ErrorCount++; var modelState = GetOrAddNode(key); Count += !modelState.IsContainerNode ? 0 : 1; modelState.ValidationState = ModelValidationState.Invalid; modelState.MarkNonContainerNode(); modelState.Errors.Add(errorMessage); return true; } /// <summary> /// Returns the aggregate <see cref="ModelValidationState"/> for items starting with the /// specified <paramref name="key"/>. /// </summary> /// <param name="key">The key to look up model state errors for.</param> /// <returns>Returns <see cref="ModelValidationState.Unvalidated"/> if no entries are found for the specified /// key, <see cref="ModelValidationState.Invalid"/> if at least one instance is found with one or more model /// state errors; <see cref="ModelValidationState.Valid"/> otherwise.</returns> public ModelValidationState GetFieldValidationState(string key) { if (key == null) { throw new ArgumentNullException(nameof(key)); } var item = GetNode(key); return GetValidity(item) ?? ModelValidationState.Unvalidated; } /// <summary> /// Returns <see cref="ModelValidationState"/> for the <paramref name="key"/>. /// </summary> /// <param name="key">The key to look up model state errors for.</param> /// <returns>Returns <see cref="ModelValidationState.Unvalidated"/> if no entry is found for the specified /// key, <see cref="ModelValidationState.Invalid"/> if an instance is found with one or more model /// state errors; <see cref="ModelValidationState.Valid"/> otherwise.</returns> public ModelValidationState GetValidationState(string key) { if (key == null) { throw new ArgumentNullException(nameof(key)); } ModelStateEntry validationState; if (TryGetValue(key, out validationState)) { return validationState.ValidationState; } return ModelValidationState.Unvalidated; } /// <summary> /// Marks the <see cref="ModelStateEntry.ValidationState"/> for the entry with the specified /// <paramref name="key"/> as <see cref="ModelValidationState.Valid"/>. /// </summary> /// <param name="key">The key of the <see cref="ModelStateEntry"/> to mark as valid.</param> public void MarkFieldValid(string key) { if (key == null) { throw new ArgumentNullException(nameof(key)); } var modelState = GetOrAddNode(key); if (modelState.ValidationState == ModelValidationState.Invalid) { throw new InvalidOperationException(Resources.Validation_InvalidFieldCannotBeReset); } Count += !modelState.IsContainerNode ? 0 : 1; modelState.MarkNonContainerNode(); modelState.ValidationState = ModelValidationState.Valid; } /// <summary> /// Marks the <see cref="ModelStateEntry.ValidationState"/> for the entry with the specified <paramref name="key"/> /// as <see cref="ModelValidationState.Skipped"/>. /// </summary> /// <param name="key">The key of the <see cref="ModelStateEntry"/> to mark as skipped.</param> public void MarkFieldSkipped(string key) { if (key == null) { throw new ArgumentNullException(nameof(key)); } var modelState = GetOrAddNode(key); if (modelState.ValidationState == ModelValidationState.Invalid) { throw new InvalidOperationException(Resources.Validation_InvalidFieldCannotBeReset_ToSkipped); } Count += !modelState.IsContainerNode ? 0 : 1; modelState.MarkNonContainerNode(); modelState.ValidationState = ModelValidationState.Skipped; } /// <summary> /// Copies the values from the specified <paramref name="dictionary"/> into this instance, overwriting /// existing values if keys are the same. /// </summary> /// <param name="dictionary">The <see cref="ModelStateDictionary"/> to copy values from.</param> public void Merge(ModelStateDictionary dictionary) { if (dictionary == null) { return; } foreach (var source in dictionary) { var target = GetOrAddNode(source.Key); Count += !target.IsContainerNode ? 0 : 1; ErrorCount += source.Value.Errors.Count - target.Errors.Count; target.Copy(source.Value); target.MarkNonContainerNode(); } } /// <summary> /// Sets the of <see cref="ModelStateEntry.RawValue"/> and <see cref="ModelStateEntry.AttemptedValue"/> for /// the <see cref="ModelStateEntry"/> with the specified <paramref name="key"/>. /// </summary> /// <param name="key">The key for the <see cref="ModelStateEntry"/> entry.</param> /// <param name="rawValue">The raw value for the <see cref="ModelStateEntry"/> entry.</param> /// <param name="attemptedValue"> /// The values of <paramref name="rawValue"/> in a comma-separated <see cref="string"/>. /// </param> public void SetModelValue(string key, object rawValue, string attemptedValue) { if (key == null) { throw new ArgumentNullException(nameof(key)); } var modelState = GetOrAddNode(key); Count += !modelState.IsContainerNode ? 0 : 1; modelState.RawValue = rawValue; modelState.AttemptedValue = attemptedValue; modelState.MarkNonContainerNode(); } /// <summary> /// Sets the value for the <see cref="ModelStateEntry"/> with the specified <paramref name="key"/>. /// </summary> /// <param name="key">The key for the <see cref="ModelStateEntry"/> entry</param> /// <param name="valueProviderResult"> /// A <see cref="ValueProviderResult"/> with data for the <see cref="ModelStateEntry"/> entry. /// </param> public void SetModelValue(string key, ValueProviderResult valueProviderResult) { if (key == null) { throw new ArgumentNullException(nameof(key)); } // Avoid creating a new array for rawValue if there's only one value. object rawValue; if (valueProviderResult == ValueProviderResult.None) { rawValue = null; } else if (valueProviderResult.Length == 1) { rawValue = valueProviderResult.Values[0]; } else { rawValue = valueProviderResult.Values.ToArray(); } SetModelValue(key, rawValue, valueProviderResult.ToString()); } /// <summary> /// Clears <see cref="ModelStateDictionary"/> entries that match the key that is passed as parameter. /// </summary> /// <param name="key">The key of <see cref="ModelStateDictionary"/> to clear.</param> public void ClearValidationState(string key) { // If key is null or empty, clear all entries in the dictionary // else just clear the ones that have key as prefix var entries = FindKeysWithPrefix(key ?? string.Empty); foreach (var entry in entries) { entry.Value.Errors.Clear(); entry.Value.ValidationState = ModelValidationState.Unvalidated; } } private ModelStateNode GetNode(string key) { Debug.Assert(key != null); var current = _root; if (key.Length > 0) { var match = default(MatchResult); do { var subKey = FindNext(key, ref match); current = current.GetNode(subKey); // Path not found, exit early if (current == null) { break; } } while (match.Type != Delimiter.None); } return current; } private ModelStateNode GetOrAddNode(string key) { Debug.Assert(key != null); // For a key of the format, foo.bar[0].baz[qux] we'll create the following nodes: // foo // -> bar // -> [0] // -> baz // -> [qux] var current = _root; if (key.Length > 0) { var match = default(MatchResult); do { var subKey = FindNext(key, ref match); current = current.GetOrAddNode(subKey); } while (match.Type != Delimiter.None); if (current.Key == null) { // New Node - Set key current.Key = key; } } return current; } // Shared function factored out for clarity, force inlining to put back in [MethodImpl(MethodImplOptions.AggressiveInlining)] private static StringSegment FindNext(string key, ref MatchResult currentMatch) { var index = currentMatch.Index; var matchType = Delimiter.None; for (; index < key.Length; index++) { var ch = key[index]; if (ch == DelimiterDot) { matchType = Delimiter.Dot; break; } else if (ch == DelimiterOpen) { matchType = Delimiter.OpenBracket; break; } } var keyStart = currentMatch.Type == Delimiter.OpenBracket ? currentMatch.Index - 1 : currentMatch.Index; currentMatch.Type = matchType; currentMatch.Index = index + 1; return new StringSegment(key, keyStart, index - keyStart); } private static ModelValidationState? GetValidity(ModelStateNode node) { if (node == null) { return null; } ModelValidationState? validationState = null; if (!node.IsContainerNode) { validationState = ModelValidationState.Valid; if (node.ValidationState == ModelValidationState.Unvalidated) { // If any entries of a field is unvalidated, we'll treat the tree as unvalidated. return ModelValidationState.Unvalidated; } if (node.ValidationState == ModelValidationState.Invalid) { validationState = node.ValidationState; } } if (node.ChildNodes != null) { for (var i = 0; i < node.ChildNodes.Count; i++) { var entryState = GetValidity(node.ChildNodes[i]); if (entryState == ModelValidationState.Unvalidated) { return entryState; } if (validationState == null || entryState == ModelValidationState.Invalid) { validationState = entryState; } } } return validationState; } private void EnsureMaxErrorsReachedRecorded() { if (!HasRecordedMaxModelError) { var exception = new TooManyModelErrorsException(Resources.ModelStateDictionary_MaxModelStateErrors); AddModelErrorCore(string.Empty, exception); HasRecordedMaxModelError = true; ErrorCount++; } } private void AddModelErrorCore(string key, Exception exception) { var modelState = GetOrAddNode(key); Count += !modelState.IsContainerNode ? 0 : 1; modelState.ValidationState = ModelValidationState.Invalid; modelState.MarkNonContainerNode(); modelState.Errors.Add(exception); } /// <summary> /// Removes all keys and values from this instance of <see cref="ModelStateDictionary"/>. /// </summary> public void Clear() { Count = 0; HasRecordedMaxModelError = false; ErrorCount = 0; _root.Reset(); _root.ChildNodes?.Clear(); } /// <inheritdoc /> public bool ContainsKey(string key) { if (key == null) { throw new ArgumentNullException(nameof(key)); } return !GetNode(key)?.IsContainerNode ?? false; } /// <summary> /// Removes the <see cref="ModelStateEntry"/> with the specified <paramref name="key"/>. /// </summary> /// <param name="key">The key.</param> /// <returns><c>true</c> if the element is successfully removed; otherwise <c>false</c>. This method also /// returns <c>false</c> if key was not found.</returns> public bool Remove(string key) { if (key == null) { throw new ArgumentNullException(nameof(key)); } var node = GetNode(key); if (node?.IsContainerNode == false) { Count--; ErrorCount -= node.Errors.Count; node.Reset(); return true; } return false; } /// <inheritdoc /> public bool TryGetValue(string key, out ModelStateEntry value) { if (key == null) { throw new ArgumentNullException(nameof(key)); } var result = GetNode(key); if (result?.IsContainerNode == false) { value = result; return true; } value = null; return false; } /// <summary> /// Returns an enumerator that iterates through this instance of <see cref="ModelStateDictionary"/>. /// </summary> /// <returns>An <see cref="Enumerator"/>.</returns> public Enumerator GetEnumerator() => new Enumerator(this, prefix: string.Empty); /// <inheritdoc /> IEnumerator<KeyValuePair<string, ModelStateEntry>> IEnumerable<KeyValuePair<string, ModelStateEntry>>.GetEnumerator() => GetEnumerator(); /// <inheritdoc /> IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); public static bool StartsWithPrefix(string prefix, string key) { if (prefix == null) { throw new ArgumentNullException(nameof(prefix)); } if (key == null) { throw new ArgumentNullException(nameof(key)); } if (prefix.Length == 0) { // Everything is prefixed by the empty string. return true; } if (prefix.Length > key.Length) { return false; // Not long enough. } if (!key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) { return false; } if (key.Length == prefix.Length) { // Exact match return true; } var charAfterPrefix = key[prefix.Length]; if (charAfterPrefix == '.' || charAfterPrefix == '[') { return true; } return false; } public PrefixEnumerable FindKeysWithPrefix(string prefix) { if (prefix == null) { throw new ArgumentNullException(nameof(prefix)); } return new PrefixEnumerable(this, prefix); } private struct MatchResult { public Delimiter Type; public int Index; } private enum Delimiter { None = 0, Dot, OpenBracket } [DebuggerDisplay("SubKey={SubKey}, Key={Key}, ValidationState={ValidationState}")] private class ModelStateNode : ModelStateEntry { private bool _isContainerNode = true; public ModelStateNode(StringSegment subKey) { SubKey = subKey; } public List<ModelStateNode> ChildNodes { get; set; } public override IReadOnlyList<ModelStateEntry> Children => ChildNodes; public string Key { get; set; } public StringSegment SubKey { get; } public override bool IsContainerNode => _isContainerNode; public void MarkNonContainerNode() { _isContainerNode = false; } public void Copy(ModelStateEntry entry) { RawValue = entry.RawValue; AttemptedValue = entry.AttemptedValue; Errors.Clear(); for (var i = 0; i < entry.Errors.Count; i++) { Errors.Add(entry.Errors[i]); } ValidationState = entry.ValidationState; } public void Reset() { _isContainerNode = true; RawValue = null; AttemptedValue = null; ValidationState = ModelValidationState.Unvalidated; Errors.Clear(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public ModelStateNode GetNode(StringSegment subKey) { ModelStateNode modelStateNode = null; if (subKey.Length == 0) { modelStateNode = this; } else if (ChildNodes != null) { var index = BinarySearch(subKey); if (index >= 0) { modelStateNode = ChildNodes[index]; } } return modelStateNode; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public ModelStateNode GetOrAddNode(StringSegment subKey) { ModelStateNode modelStateNode; if (subKey.Length == 0) { modelStateNode = this; } else if (ChildNodes == null) { ChildNodes = new List<ModelStateNode>(1); modelStateNode = new ModelStateNode(subKey); ChildNodes.Add(modelStateNode); } else { var index = BinarySearch(subKey); if (index >= 0) { modelStateNode = ChildNodes[index]; } else { modelStateNode = new ModelStateNode(subKey); ChildNodes.Insert(~index, modelStateNode); } } return modelStateNode; } public override ModelStateEntry GetModelStateForProperty(string propertyName) => GetNode(new StringSegment(propertyName)); private int BinarySearch(StringSegment searchKey) { Debug.Assert(ChildNodes != null); var low = 0; var high = ChildNodes.Count - 1; while (low <= high) { var mid = low + ((high - low) / 2); var midKey = ChildNodes[mid].SubKey; var result = midKey.Length - searchKey.Length; if (result == 0) { result = string.Compare( midKey.Buffer, midKey.Offset, searchKey.Buffer, searchKey.Offset, searchKey.Length, StringComparison.OrdinalIgnoreCase); } if (result == 0) { return mid; } if (result < 0) { low = mid + 1; } else { high = mid - 1; } } return ~low; } } public struct PrefixEnumerable : IEnumerable<KeyValuePair<string, ModelStateEntry>> { private readonly ModelStateDictionary _dictionary; private readonly string _prefix; public PrefixEnumerable(ModelStateDictionary dictionary, string prefix) { if (dictionary == null) { throw new ArgumentNullException(nameof(dictionary)); } if (prefix == null) { throw new ArgumentNullException(nameof(prefix)); } _dictionary = dictionary; _prefix = prefix; } public Enumerator GetEnumerator() => new Enumerator(_dictionary, _prefix); IEnumerator<KeyValuePair<string, ModelStateEntry>> IEnumerable<KeyValuePair<string, ModelStateEntry>>.GetEnumerator() => GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } public struct Enumerator : IEnumerator<KeyValuePair<string, ModelStateEntry>> { private readonly ModelStateNode _rootNode; private ModelStateNode _modelStateNode; private List<ModelStateNode> _nodes; private int _index; private bool _visitedRoot; public Enumerator(ModelStateDictionary dictionary, string prefix) { if (dictionary == null) { throw new ArgumentNullException(nameof(dictionary)); } if (prefix == null) { throw new ArgumentNullException(nameof(prefix)); } _index = -1; _rootNode = dictionary.GetNode(prefix); _modelStateNode = null; _nodes = null; _visitedRoot = false; } public KeyValuePair<string, ModelStateEntry> Current => new KeyValuePair<string, ModelStateEntry>(_modelStateNode.Key, _modelStateNode); object IEnumerator.Current => Current; public void Dispose() { } public bool MoveNext() { if (_rootNode == null) { return false; } if (!_visitedRoot) { // Visit the root node _visitedRoot = true; if (_rootNode.ChildNodes?.Count > 0) { _nodes = new List<ModelStateNode> { _rootNode }; } if (!_rootNode.IsContainerNode) { _modelStateNode = _rootNode; return true; } } if (_nodes == null) { return false; } while (_nodes.Count > 0) { var node = _nodes[0]; if (_index == node.ChildNodes.Count - 1) { // We've exhausted the current sublist. _nodes.RemoveAt(0); _index = -1; continue; } else { _index++; } var currentChild = node.ChildNodes[_index]; if (currentChild.ChildNodes?.Count > 0) { _nodes.Add(currentChild); } if (!currentChild.IsContainerNode) { _modelStateNode = currentChild; return true; } } return false; } public void Reset() { _index = -1; _nodes.Clear(); _visitedRoot = false; _modelStateNode = null; } } public struct KeyEnumerable : IEnumerable<string> { private readonly ModelStateDictionary _dictionary; public KeyEnumerable(ModelStateDictionary dictionary) { _dictionary = dictionary; } public KeyEnumerator GetEnumerator() => new KeyEnumerator(_dictionary, prefix: string.Empty); IEnumerator<string> IEnumerable<string>.GetEnumerator() => GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } public struct KeyEnumerator : IEnumerator<string> { private Enumerator _prefixEnumerator; public KeyEnumerator(ModelStateDictionary dictionary, string prefix) { _prefixEnumerator = new Enumerator(dictionary, prefix); Current = null; } public string Current { get; private set; } object IEnumerator.Current => Current; public void Dispose() => _prefixEnumerator.Dispose(); public bool MoveNext() { var result = _prefixEnumerator.MoveNext(); if (result) { var current = _prefixEnumerator.Current; Current = current.Key; } else { Current = null; } return result; } public void Reset() { _prefixEnumerator.Reset(); Current = null; } } public struct ValueEnumerable : IEnumerable<ModelStateEntry> { private readonly ModelStateDictionary _dictionary; public ValueEnumerable(ModelStateDictionary dictionary) { _dictionary = dictionary; } public ValueEnumerator GetEnumerator() => new ValueEnumerator(_dictionary, prefix: string.Empty); IEnumerator<ModelStateEntry> IEnumerable<ModelStateEntry>.GetEnumerator() => GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } public struct ValueEnumerator : IEnumerator<ModelStateEntry> { private Enumerator _prefixEnumerator; public ValueEnumerator(ModelStateDictionary dictionary, string prefix) { _prefixEnumerator = new Enumerator(dictionary, prefix); Current = null; } public ModelStateEntry Current { get; private set; } object IEnumerator.Current => Current; public void Dispose() => _prefixEnumerator.Dispose(); public bool MoveNext() { var result = _prefixEnumerator.MoveNext(); if (result) { var current = _prefixEnumerator.Current; Current = current.Value; } else { Current = null; } return result; } public void Reset() { _prefixEnumerator.Reset(); Current = null; } } } }
34.418136
130
0.511612
[ "Apache-2.0" ]
erravimishracse/Mvc
src/Microsoft.AspNetCore.Mvc.Abstractions/ModelBinding/ModelStateDictionary.cs
40,992
C#
using System; using Newtonsoft.Json; namespace TdLib { /// <summary> /// Autogenerated TDLib APIs /// </summary> public static partial class TdApi { public partial class InputPassportElement : Object { /// <summary> /// A Telegram Passport element to be saved containing the user's temporary registration /// </summary> public class InputPassportElementTemporaryRegistration : InputPassportElement { /// <summary> /// Data type for serialization /// </summary> [JsonProperty("@type")] public override string DataType { get; set; } = "inputPassportElementTemporaryRegistration"; /// <summary> /// Extra data attached to the message /// </summary> [JsonProperty("@extra")] public override string Extra { get; set; } /// <summary> /// The temporary registration document to be saved /// </summary> [JsonConverter(typeof(Converter))] [JsonProperty("temporary_registration")] public InputPersonalDocument TemporaryRegistration { get; set; } } } } }
33.897436
108
0.531014
[ "MIT" ]
0x25CBFC4F/tdsharp
TDLib.Api/Objects/InputPassportElementTemporaryRegistration.cs
1,322
C#
using System.Runtime.Serialization; using Portable.Xaml.Markup; [assembly: ContractNamespace("http://schemas.directx12gameengine.com/xaml", ClrNamespace = "DirectX12GameEngine.Assets")] [assembly: XmlnsDefinition("http://schemas.directx12gameengine.com/xaml", "DirectX12GameEngine.Assets")]
48.833333
121
0.812287
[ "MIT" ]
5l1v3r1/DirectX12GameEngine
DirectX12GameEngine.Assets/Properties/AssemblyInfo.cs
295
C#
#region (c) 2019 Gilles Macabies All right reserved // Author : Gilles Macabies // Solution : DataGridFilter // Projet : DataGridFilter // File : FilterDataGrid.cs // Created : 26/01/2021 #endregion (c) 2019 Gilles Macabies All right reserved using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Runtime.CompilerServices; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Input; using System.Windows.Media; using System.Windows.Shapes; using System.Windows.Threading; // ReSharper disable ArrangeAccessorOwnerBody // ReSharper disable InvertIf // ReSharper disable ExplicitCallerInfoArgument // ReSharper disable CheckNamespace // https://stackoverflow.com/questions/3685566/wpf-using-resizegrip-to-resize-controls // https://www.c-sharpcorner.com/UploadFile/mahesh/binding-static-properties-in-wpf-4-5/ // https://www.csharp-examples.net/string-format-datetime/ // Tools.DiffFiles FilterDataGrid.cs FilterDataGrid\Properties\FilterDataGrid.cs namespace FilterDataGrid { /// <summary> /// Implementation of Datagrid /// </summary> public sealed class FilterDataGrid : DataGrid, INotifyPropertyChanged { #region Public Constructors public FilterDataGrid() { Debug.WriteLineIf(DebugMode, "Constructor"); // load resources Resources = new FilterDataGridDictionary(); originalPopUpHeight = (double)FindResource("PopupHeight"); CommandBindings.Add(new CommandBinding(ShowFilter, ShowFilterCommand, CanShowFilter)); CommandBindings.Add(new CommandBinding(ApplyFilter, ApplyFilterCommand, CanApplyFilter)); // Ok CommandBindings.Add(new CommandBinding(CancelFilter, CancelFilterCommand)); CommandBindings.Add(new CommandBinding(RemoveFilter, RemoveFilterCommand, CanRemoveFilter)); CommandBindings.Add(new CommandBinding(IsChecked, CheckedAllCommand)); CommandBindings.Add(new CommandBinding(ClearSearchBox, ClearSearchBoxClick)); } #endregion Public Constructors #region Command public static readonly ICommand ApplyFilter = new RoutedCommand(); public static readonly ICommand CancelFilter = new RoutedCommand(); public static readonly ICommand ClearSearchBox = new RoutedCommand(); public static readonly ICommand IsChecked = new RoutedCommand(); public static readonly ICommand RemoveFilter = new RoutedCommand(); public static readonly ICommand ShowFilter = new RoutedCommand(); #endregion Command #region Public DependencyProperty /// <summary> /// date format displayed /// </summary> public static readonly DependencyProperty DateFormatStringProperty = DependencyProperty.Register("DateFormatString", typeof(string), typeof(FilterDataGrid), new PropertyMetadata("d")); public static readonly DependencyProperty FilterLanguageProperty = DependencyProperty.Register("FilterLanguage", typeof(Local), typeof(FilterDataGrid), new PropertyMetadata(Local.English)); /// <summary> /// Show elapsed time (for debug) /// </summary> public static readonly DependencyProperty ShowElapsedTimeProperty = DependencyProperty.Register("ShowElapsedTime", typeof(bool), typeof(FilterDataGrid), new PropertyMetadata(false)); /// <summary> /// Show statusbar /// </summary> public static readonly DependencyProperty ShowStatusBarProperty = DependencyProperty.Register("ShowStatusBar", typeof(bool), typeof(FilterDataGrid), new PropertyMetadata(false)); #endregion Public DependencyProperty #region Public Event public event PropertyChangedEventHandler PropertyChanged; public event EventHandler Sorted; #endregion Public Event #region Private Fields private const bool DebugMode = false; private static readonly Dispatcher UiDispatcher = Dispatcher.CurrentDispatcher; private readonly Dictionary<string, Predicate<object>> criteria = new Dictionary<string, Predicate<object>>(); private Button button; private Type collectionType; private Cursor cursor; private TimeSpan elased; private string fieldName; private Geometry iconFilter; private Geometry iconFilterSet; private string lastFilter; private ListBox listBox; private double minHeight; private double minWidth; private double originalPopUpHeight; private Path pathFilterIcon; private bool pending; private Popup popup; private List<object> rawValuesDataGridItems; private bool search; private string searchText; private TextBox searchTextBox; private Grid sizableContentGrid; private double sizableContentHeight; private double sizableContentWidth; private List<object> sourceObjectList; private Thumb thumb; private TreeView treeview; #endregion Private Fields #region Public Properties /// <summary> /// Date format displayed /// </summary> public string DateFormatString { get { return (string)GetValue(DateFormatStringProperty); } set { SetValue(DateFormatStringProperty, value); } } /// <summary> /// Elapsed time /// </summary> public TimeSpan ElapsedTime { get => elased; set { elased = value; //Debug.WriteLine("OnPropertyChanged"); OnPropertyChanged(); } } /// <summary> /// Language /// </summary> public Local FilterLanguage { get { return (Local)GetValue(FilterLanguageProperty); } set { SetValue(FilterLanguageProperty, value); } } /// <summary> /// Display items count /// </summary> public int ItemsSourceCount { get; set; } public bool ShowElapsedTime { get { return (bool)GetValue(ShowElapsedTimeProperty); } set { SetValue(ShowElapsedTimeProperty, value); } } /// <summary> /// Show status bar /// </summary> public bool ShowStatusBar { get { return (bool)GetValue(ShowStatusBarProperty); } set { SetValue(ShowStatusBarProperty, value); } } /// <summary> /// Instance of Loc /// </summary> public Loc Translate { get; private set; } #endregion Public Properties #region Private Properties private ICollectionView CollectionViewSource { get; set; } private FilterCommon CurrentFilter { get; set; } private List<FilterCommon> GlobalFilterList { get; set; } = new List<FilterCommon>(); private ICollectionView ItemCollectionView { get; set; } #endregion Private Properties #region Protected Methods /// <summary> /// Initialize datagrid /// </summary> /// <param name="e"></param> protected override void OnInitialized(EventArgs e) { Debug.WriteLineIf(DebugMode, "OnInitialized"); base.OnInitialized(e); try { iconFilterSet = (Geometry)FindResource("FilterSet"); iconFilter = (Geometry)FindResource("Filter"); // FilterLanguage : default : 0 (english) Translate = new Loc { Language = (int)FilterLanguage }; // sorting event Sorted += OnSorted; if (AutoGenerateColumns) return; // get the columns that can be filtered var columns = Columns .Where(c => c is DataGridTextColumn dtx && dtx.IsColumnFiltered || c is DataGridTemplateColumn dtp && dtp.IsColumnFiltered) .Select(c => c) .ToList(); // set header template foreach (var col in columns) { var columnType = col.GetType(); if (columnType == typeof(DataGridTextColumn)) { var column = (DataGridTextColumn)col; column.HeaderTemplate = (DataTemplate)FindResource("DataGridHeaderTemplate"); // get type var fieldType = Nullable.GetUnderlyingType(column.Binding.GetType()) ?? column.Binding.GetType(); // apply DateFormatString when StringFormat for column is not provided if (fieldType == typeof(DateTime) && !string.IsNullOrEmpty(DateFormatString) && string.IsNullOrEmpty(column.Binding.StringFormat)) column.Binding.StringFormat = DateFormatString; // culture ((Binding)column.Binding).ConverterCulture = Translate.Culture; column.FieldName = ((Binding)column.Binding).Path.Path; } else if (columnType == typeof(DataGridTemplateColumn)) { var column = (DataGridTemplateColumn)col; column.HeaderTemplate = (DataTemplate)FindResource("DataGridHeaderTemplate"); } } } catch (Exception ex) { Debug.WriteLine($"OnInitialized : {ex.Message}"); throw; } } /// <summary> /// Auto generated column, set templateHeader /// </summary> /// <param name="e"></param> protected override void OnAutoGeneratingColumn(DataGridAutoGeneratingColumnEventArgs e) { Debug.WriteLineIf(DebugMode, "OnAutoGeneratingColumn"); base.OnAutoGeneratingColumn(e); try { if (e.Column.GetType() != typeof(System.Windows.Controls.DataGridTextColumn)) return; var column = new DataGridTextColumn { Binding = new Binding(e.PropertyName) { ConverterCulture = Translate.Culture /* StringFormat */}, FieldName = e.PropertyName, Header = e.Column.Header.ToString(), HeaderTemplate = (DataTemplate)FindResource("DataGridHeaderTemplate"), IsColumnFiltered = true }; // get type var fieldType = Nullable.GetUnderlyingType(e.PropertyType) ?? e.PropertyType; // apply the format string provided if (fieldType == typeof(DateTime) && !string.IsNullOrEmpty(DateFormatString)) column.Binding.StringFormat = DateFormatString; // culture ((Binding)column.Binding).ConverterCulture = Translate.Culture; e.Column = column; } catch (Exception ex) { Debug.WriteLine($"OnAutoGeneratingColumn : {ex.Message}"); throw; } } /// <summary> /// The source of the Datagrid items has been changed (refresh or on loading) /// </summary> /// <param name="oldValue"></param> /// <param name="newValue"></param> protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue) { Debug.WriteLineIf(DebugMode, "OnItemsSourceChanged"); // order call : // Constructor // OnInitialized // OnItemsSourceChanged base.OnItemsSourceChanged(oldValue, newValue); try { if (GlobalFilterList.Count > 0) criteria.Clear(); // clear criteria // remove filter and reset column foreach (var filter in GlobalFilterList) { var coll = Columns .FirstOrDefault(c => c is DataGridTextColumn dtx && dtx.FieldName == filter.FieldName || c is DataGridTemplateColumn dtp && dtp.FieldName == filter.FieldName); if (coll == null) continue; var header = VisualTreeHelpers.GetHeader(coll, this); var buttonFilter = header?.FindVisualChild<Button>(); if (buttonFilter == null) continue; buttonFilter.Opacity = 0.5; pathFilterIcon = VisualTreeHelpers.FindChild<Path>(buttonFilter, "PathFilterIcon"); if (pathFilterIcon != null) pathFilterIcon.Data = iconFilter; } CollectionViewSource = System.Windows.Data.CollectionViewSource.GetDefaultView(ItemsSource); // set Filter // thank's Stefan Heimel for this contribution if (CollectionViewSource.CanFilter) { CollectionViewSource.Filter = Filter; } GlobalFilterList = new List<FilterCommon>(); ItemsSourceCount = Items.Count; OnPropertyChanged("ItemsSourceCount"); ElapsedTime = new TimeSpan(0, 0, 0); // if there is no item in ItemsSource, the Cast fails and an error occurs if (ItemsSourceCount > 0) collectionType = ItemsSource?.Cast<object>().First().GetType(); } catch (Exception ex) { Debug.WriteLine($"OnItemsSourceChanged : {ex.Message}"); throw; } } /// <summary> /// Set the cursor to "Cursors.Wait" during a long sorting operation /// https://stackoverflow.com/questions/8416961/how-can-i-be-notified-if-a-datagrid-column-is-sorted-and-not-sorting /// </summary> /// <param name="eventArgs"></param> protected override void OnSorting(DataGridSortingEventArgs eventArgs) { if (pending) return; Mouse.OverrideCursor = Cursors.Wait; base.OnSorting(eventArgs); Sorted?.Invoke(this, new EventArgs()); } #endregion Protected Methods #region Private Methods /// <summary> /// Reset the cursor at the end of the sort /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void OnSorted(object sender, EventArgs e) { ResetCursor(); } /// <summary> /// Reset cursor /// </summary> private static async void ResetCursor() { // reset cursor await UiDispatcher.BeginInvoke((Action)(() => { Mouse.OverrideCursor = null; }), DispatcherPriority.ContextIdle); } /// <summary> /// Can Apply filter (popup Ok button) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CanApplyFilter(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = CurrentFilter?.FieldType == typeof(DateTime) ? CurrentFilter.AnyDateIsChecked() // treeview : ItemCollectionView?.Cast<FilterItem>().Skip(1).Any(f => f.IsChecked) ?? false; } /// <summary> /// Cancel button, close popup /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CancelFilterCommand(object sender, ExecutedRoutedEventArgs e) { if (popup == null) return; popup.IsOpen = false; // raise EventArgs PopupClosed } /// <summary> /// Can remove filter when current column (CurrentFilter) filtered /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CanRemoveFilter(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = CurrentFilter?.IsFiltered ?? false; } /// <summary> /// Can show filter /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CanShowFilter(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = CollectionViewSource?.CanFilter == true && (!popup?.IsOpen ?? true) && !pending; } /// <summary> /// Check/uncheck all item when the action is (select all) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CheckedAllCommand(object sender, ExecutedRoutedEventArgs e) { var item = (FilterItem)e.Parameter; // only when the item[0] (select all) is checked or unchecked if (item?.Id != 0 || ItemCollectionView == null) return; foreach (var obj in ItemCollectionView?.Cast<FilterItem>().Skip(1) .Where(f => f.IsChecked != item.IsChecked)) obj.IsChecked = item.IsChecked; } /// <summary> /// Clear Search Box text /// </summary> /// <param name="sender"></param> /// <param name="routedEventArgs"></param> private void ClearSearchBoxClick(object sender, RoutedEventArgs routedEventArgs) { search = false; searchTextBox.Text = string.Empty; // raises TextChangedEventArgs } /// <summary> /// Aggregate list of predicate as filter /// </summary> /// <param name="o"></param> /// <returns></returns> private bool Filter(object o) { return criteria.Values .Aggregate(true, (prevValue, predicate) => prevValue && predicate(o)); } /// <summary> /// OnPropertyChange /// </summary> /// <param name="propertyName"></param> private void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } /// <summary> /// On Resize Thumb Drag Completed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnResizeThumbDragCompleted(object sender, DragCompletedEventArgs e) { Cursor = cursor; } /// <summary> /// Get delta on drag thumb /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnResizeThumbDragDelta(object sender, DragDeltaEventArgs e) { // initialize the first Actual size Width/Height if (sizableContentHeight <= 0) { sizableContentHeight = sizableContentGrid.ActualHeight; sizableContentWidth = sizableContentGrid.ActualWidth; } var yAdjust = sizableContentGrid.Height + e.VerticalChange; var xAdjust = sizableContentGrid.Width + e.HorizontalChange; //make sure not to resize to negative width or heigth xAdjust = sizableContentGrid.ActualWidth + xAdjust > minWidth ? xAdjust : minWidth; yAdjust = sizableContentGrid.ActualHeight + yAdjust > minHeight ? yAdjust : minHeight; xAdjust = xAdjust < minWidth ? minWidth : xAdjust; yAdjust = yAdjust < minHeight ? minHeight : yAdjust; // set size of grid sizableContentGrid.Width = xAdjust; sizableContentGrid.Height = yAdjust; } /// <summary> /// On Resize Thumb DragStarted /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnResizeThumbDragStarted(object sender, DragStartedEventArgs e) { cursor = Cursor; Cursor = Cursors.SizeNWSE; } /// <summary> /// Reset the size of popup to original size /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void PopupClosed(object sender, EventArgs e) { Debug.WriteLineIf(DebugMode, "\r\nPopupClosed"); var pop = (Popup)sender; // clear lists if close popup without filtering if (!pending) { // clear resource sourceObjectList = null; rawValuesDataGridItems = null; ItemCollectionView = null; } sizableContentGrid.Width = sizableContentWidth; sizableContentGrid.Height = sizableContentHeight; Cursor = cursor; // fix resize grip, unsubscribe the event if (pop != null) pop.Closed -= PopupClosed; thumb.DragCompleted -= OnResizeThumbDragCompleted; thumb.DragDelta -= OnResizeThumbDragDelta; thumb.DragStarted -= OnResizeThumbDragStarted; } /// <summary> /// Remove current filter /// </summary> private void RemoveCurrentFilter() { if (CurrentFilter == null) return; popup.IsOpen = false; button.Opacity = 0.5; pathFilterIcon.Data = iconFilter; var start = DateTime.Now; ElapsedTime = new TimeSpan(0, 0, 0); Mouse.OverrideCursor = Cursors.Wait; if (CurrentFilter.IsFiltered && criteria.Remove(CurrentFilter.FieldName)) CollectionViewSource.Refresh(); if (GlobalFilterList.Contains(CurrentFilter)) GlobalFilterList.Remove(CurrentFilter); // set the last filter applied lastFilter = GlobalFilterList.LastOrDefault()?.FieldName; ElapsedTime = DateTime.Now - start; ResetCursor(); } /// <summary> /// remove current filter /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RemoveFilterCommand(object sender, ExecutedRoutedEventArgs e) { RemoveCurrentFilter(); } /// <summary> /// Filter current list in popup /// </summary> /// <param name="obj"></param> /// <returns></returns> private bool SearchFilter(object obj) { var item = (FilterItem)obj; if (string.IsNullOrEmpty(searchText) || item == null || item.Id == 0) return true; if (item.FieldType == typeof(DateTime)) return ((DateTime?)item.Content)?.ToString("d") .IndexOf(searchText, StringComparison.OrdinalIgnoreCase) >= 0; return item.Content?.ToString().IndexOf(searchText, StringComparison.OrdinalIgnoreCase) >= 0; } /// <summary> /// Search TextBox Text Changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SearchTextBoxOnTextChanged(object sender, TextChangedEventArgs e) { var textBox = (TextBox)sender; // fix TextChanged event fires twice // I did not find another solution if (textBox == null || textBox.Text == searchText || ItemCollectionView == null) return; searchText = textBox.Text; // Debug.WriteLine($"{searchText} == {textBox?.Text}"); search = !string.IsNullOrEmpty(searchText); // apply filter ItemCollectionView.Refresh(); if (CurrentFilter.FieldType != typeof(DateTime) || treeview == null) return; // rebuild treeview var items = ItemCollectionView?.Cast<FilterItem>() .Skip(1) // skip (select all) .Where(i => i.IsChecked) .Select(f => f.Content) .Distinct() .ToList(); if (items.Count > 0 && !string.IsNullOrEmpty(searchText)) treeview.ItemsSource = CurrentFilter.BuildTree(items); else if (string.IsNullOrEmpty(searchText)) // fill the tree with the elements of the list of the original items treeview.ItemsSource = CurrentFilter.BuildTree(sourceObjectList); } /// <summary> /// Open popup on Button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void ShowFilterCommand(object sender, ExecutedRoutedEventArgs e) { Debug.WriteLineIf(DebugMode, "\r\nShowFilterCommand"); // reset previous elapsed time ElapsedTime = new TimeSpan(0, 0, 0); var start = DateTime.Now; // clear search text (important) searchText = string.Empty; search = false; try { button = (Button)e.OriginalSource; if (Items.Count == 0 || button == null) return; // navigate up to the current header and get column type var header = VisualTreeHelpers.FindAncestor<DataGridColumnHeader>(button); var columnType = header.Column.GetType(); // then down to the current popup popup = VisualTreeHelpers.FindChild<Popup>(header, "FilterPopup"); if (popup == null) return; // popup handle event popup.Closed -= PopupClosed; popup.Closed += PopupClosed; // icon filter pathFilterIcon = VisualTreeHelpers.FindChild<Path>(button, "PathFilterIcon"); // resizable grid sizableContentGrid = VisualTreeHelpers.FindChild<Grid>(popup.Child, "SizableContentGrid"); // search textbox searchTextBox = VisualTreeHelpers.FindChild<TextBox>(popup.Child, "SearchBox"); searchTextBox.Text = string.Empty; searchTextBox.TextChanged += SearchTextBoxOnTextChanged; // clear SearchBox button var clearSearchBoxBtn = VisualTreeHelpers.FindChild<Button>(popup.Child, "ClearSearchBoxBtn"); clearSearchBoxBtn.Click += ClearSearchBoxClick; // thumb resize grip thumb = VisualTreeHelpers.FindChild<Thumb>(sizableContentGrid, "PopupThumb"); // minimum size of Grid sizableContentHeight = 0; sizableContentWidth = 0; sizableContentGrid.Height = originalPopUpHeight; sizableContentGrid.MinHeight = originalPopUpHeight; minHeight = sizableContentGrid.MinHeight; minWidth = sizableContentGrid.MinWidth; // Debug.WriteLine($"\nMinHeight: {minHeight, -8}Height :{sizableContentGrid.Height}\n"); // thumb handle event thumb.DragCompleted += OnResizeThumbDragCompleted; thumb.DragDelta += OnResizeThumbDragDelta; thumb.DragStarted += OnResizeThumbDragStarted; // get field name from binding Path if (columnType == typeof(DataGridTextColumn)) { var column = (DataGridTextColumn)header.Column; fieldName = column.FieldName; } if (columnType == typeof(DataGridTemplateColumn)) { var column = (DataGridTemplateColumn)header.Column; fieldName = column.FieldName; } // invalid fieldName if (string.IsNullOrEmpty(fieldName)) return; // get type of field Type fieldType = null; var fieldProperty = collectionType.GetProperty(fieldName); if (fieldProperty != null) // get type or get underlying type if nullable fieldType = Nullable.GetUnderlyingType(fieldProperty.PropertyType) ?? fieldProperty.PropertyType; // If no filter, add filter to GlobalFilterList list CurrentFilter = GlobalFilterList.FirstOrDefault(f => f.FieldName == fieldName) ?? new FilterCommon { FieldName = fieldName, FieldType = fieldType, Translate = Translate }; // list of all item values, filtered and unfiltered (previous filtered items) sourceObjectList = new List<object>(); // add the first element (select all) var filterItemList = new List<FilterItem> {new FilterItem {Id = 0, Label = Translate.All, IsChecked = true}}; // set cursor Mouse.OverrideCursor = Cursors.Wait; // get the list of distinct values from the selected column // List of raw values of the current column await Task.Run(() => { sourceObjectList = Items.Cast<object>() .Select(x => x.GetType().GetProperty(fieldName)?.GetValue(x, null)) .Distinct() // clear duplicate values first .Select(item => item) .ToList(); // only the raw values of the items of the datagrid view rawValuesDataGridItems = new List<object>(sourceObjectList); // rawValuesDataGridItems.RemoveAll(v => v == null || string.IsNullOrEmpty((string)v)); // adds the previous filtered items to the list of new items (CurrentFilter.PreviouslyFilteredItems) // displays new (checked) and already filtered (unchecked) items // PreviouslyFilteredItems is a HashSet of objects if (lastFilter == CurrentFilter.FieldName) sourceObjectList.AddRange(CurrentFilter?.PreviouslyFilteredItems); // sorting is a slow operation, using ParallelQuery sourceObjectList = sourceObjectList.AsParallel().OrderBy(x => x).ToList(); var emptyItem = false; // if it exists, place the empty element at the bottom of the list if (sourceObjectList.Any(l => string.IsNullOrEmpty(l?.ToString()))) { // the filter compare with Items values // EmptyItem == null : items.value = "" => the datagrid item is not filtered // it is possible to have null values and "" in the same list // if remove all these values and add a null value for EmptyItem, the values "" will not be found emptyItem = true; sourceObjectList.RemoveAll(v => v == null || string.IsNullOrEmpty(v.ToString())); } // add all items to the filterItemList for (var i = 0; i < sourceObjectList.Count; i++) { var item = sourceObjectList[i]; var filterItem = new FilterItem { Id = filterItemList.Count, FieldType = fieldType, Content = item, // raw value Label = item?.ToString(), // Content displayed Level = 1, // padding // check or uncheck if the content of item exists in the previously filtered elements IsChecked = !CurrentFilter?.PreviouslyFilteredItems.Contains(item) ?? false }; filterItemList.Add(filterItem); } // add a empty item at the bottom of the list if (emptyItem) { sourceObjectList.Insert(sourceObjectList.Count, null); filterItemList.Add(new FilterItem { Id = filterItemList.Count, FieldType = fieldType, Content = null, Label = Translate.Empty, IsChecked = !CurrentFilter?.PreviouslyFilteredItems.Contains(null) ?? false }); } }); // and task // the current listbox or treeview if (fieldType == typeof(DateTime)) { treeview = VisualTreeHelpers.FindChild<TreeView>(popup.Child, "PopupTreeview"); if (treeview != null) { // fill the treeview with the tree structure built by CurrentFilter.BuildTree // and if it is the last filter, uncheck the elements already filtered treeview.ItemsSource = CurrentFilter?.BuildTree(sourceObjectList, lastFilter /*== CurrentFilter.FieldName*/); treeview.Visibility = Visibility.Visible; } if (listBox != null) { // clear previous data listBox.ItemsSource = null; listBox.Visibility = Visibility.Collapsed; } } else { listBox = VisualTreeHelpers.FindChild<ListBox>(popup.Child, "PopupListBox"); if (listBox != null) { // set filterList as ItemsSource of ListBox listBox.Visibility = Visibility.Visible; listBox.ItemsSource = filterItemList; listBox.UpdateLayout(); // scroll to top of view var scrollViewer = VisualTreeHelpers.GetDescendantByType(listBox, typeof(ScrollViewer)) as ScrollViewer; scrollViewer?.ScrollToTop(); } if (treeview != null) { // clear previous data treeview.ItemsSource = null; treeview.Visibility = Visibility.Collapsed; } } // Set ICollectionView for filter in popup ItemCollectionView = System.Windows.Data.CollectionViewSource.GetDefaultView(filterItemList); // set filter in popup if (ItemCollectionView.CanFilter) { ItemCollectionView.Filter = SearchFilter; } // set the placement and offset of the PopUp in relation to the header and // the main window of the application (placement : bottom left or bottom right) PopupPlacement(sizableContentGrid, header); // open popup popup.IsOpen = true; } catch (Exception ex) { Debug.WriteLine($"ShowFilterCommand error : {ex.Message}"); throw; } finally { // show open popup elapsed time in UI ElapsedTime = DateTime.Now - start; // reset cursor ResetCursor(); } } /// <summary> /// Click OK Button when Popup is Open, apply filter /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void ApplyFilterCommand(object sender, ExecutedRoutedEventArgs e) { Debug.WriteLineIf(DebugMode, "\r\nApplyFilterCommand"); var start = DateTime.Now; pending = true; popup.IsOpen = false; // raise PopupClosed event // set cursor wait Mouse.OverrideCursor = Cursors.Wait; // list of content of items not to be filtered List<object> checkedItems; try { // list of content of items to filter var uncheckedItems = new List<object>(); // to test if unchecked items are checked again var contain = false; // items already filtered var previousFilteredItems = new List<object>(CurrentFilter.PreviouslyFilteredItems); await Task.Run(() => { // filter date if (CurrentFilter.FieldType == typeof(DateTime)) { // get the list of dates from the treeview (any state : checked/not checked) var dateList = CurrentFilter.GetAllItemsTree(); // items to be not filtered (checked) checkedItems = dateList.Where(f => f.IsChecked).Select(f => f.Content).ToList(); // unchecked : // the search result is checked => add unchecked elements to the unchecked list // otherwise, add the unchecked items of the date list uncheckedItems = search ? rawValuesDataGridItems?.Except(checkedItems).ToList() : dateList.Where(f => !f.IsChecked).Select(f => f.Content).ToList(); } else { // all items listbox/treeview from popup var viewItems = ItemCollectionView?.Cast<FilterItem>().Skip(1).ToList() ?? new List<FilterItem>(); // items to be not filtered (checked) checkedItems = viewItems.Where(f => f.IsChecked).Select(f => f.Content).ToList(); // unchecked : // the search result is checked => add unchecked elements to the unchecked list // otherwise add unchecked from the lisbox view uncheckedItems = search ? rawValuesDataGridItems.Except(checkedItems).ToList() // result search (only items checked) : viewItems.Where(f => !f.IsChecked) .Select(f => f.Content).ToList(); // items not checked // two values, null and string.empty for list of string if (uncheckedItems.Any(v => v == null)) uncheckedItems.Add(string.Empty); } if (checkedItems.Any() && uncheckedItems != null) { // check if unchecked (filtered) items have been checked // common items (intersect) to the two lists = old items unchecked contain = checkedItems.Intersect(previousFilteredItems).Any(); if (contain) { // remove string.Empty if (checkedItems.Any(i => i == null)) previousFilteredItems.RemoveAll(item => item?.ToString() == string.Empty); // remove filtered items that should no longer be filtered previousFilteredItems = previousFilteredItems.Except(checkedItems).ToList(); } // add the previous filtered items to the list of new items to filter uncheckedItems.AddRange(previousFilteredItems); } }); if (uncheckedItems.Any() || contain) { // fill the PreviouslyFilteredItems HashSet with unchecked items CurrentFilter.PreviouslyFilteredItems = new HashSet<object>(uncheckedItems, EqualityComparer<object>.Default); // add a filter if it is not already added previously if (!CurrentFilter.IsFiltered) CurrentFilter.AddFilter(criteria); // add current filter to GlobalFilterList if (GlobalFilterList.All(f => f.FieldName != CurrentFilter.FieldName)) GlobalFilterList.Add(CurrentFilter); // set the current field name as the last filter name lastFilter = CurrentFilter.FieldName; // set button opacity button.Opacity = 1; // set icon filter pathFilterIcon.Data = iconFilterSet; // apply filter CollectionViewSource.Refresh(); // remove the current filter if there is no items to filter if (!CurrentFilter.PreviouslyFilteredItems.Any()) RemoveCurrentFilter(); } } catch (Exception ex) { Debug.WriteLine($"ApplyFilterCommand error : {ex.Message}"); throw; } finally { pending = false; ResetCursor(); ElapsedTime = elased.Add(DateTime.Now - start); Debug.WriteLineIf(DebugMode, $"Elapsed time : m:{ElapsedTime.Minutes} s:{ElapsedTime.Seconds}\r\n"); } } /// <summary> /// PopUp placement and offset /// </summary> /// <param name="grid"></param> /// <param name="header"></param> private void PopupPlacement(FrameworkElement grid, FrameworkElement header) { try { popup.PlacementTarget = header; popup.HorizontalOffset = -1d; popup.VerticalOffset = -1d; popup.Placement = PlacementMode.Bottom; // get the host window of the datagrid // thank's Stefan Heimel for this contribution var hostingWindow = Window.GetWindow(this); if (hostingWindow != null) { var mainHeight = hostingWindow.ActualHeight - 39d; var mainWidth = hostingWindow.ActualWidth; var col = ((DataGridColumnHeader)header).Column; // get X,Y position var headerMainPoint = header.TransformToVisual(hostingWindow).Transform(new Point(0, 0)); var popupHeaderPoint = popup.TransformToVisual(header).Transform(new Point(0, 0)); var headHeigth = header.ActualHeight; var popupHeigth = originalPopUpHeight; var popupWidth = grid.Width > 0 ? grid.Width : grid.ActualWidth; // delta for max size popup var deltaX = mainWidth - (headerMainPoint.X + popupWidth); var deltaY = mainHeight - (headerMainPoint.Y + popupHeigth + headHeigth); // first column grid.MaxWidth = popupWidth + deltaX - 17d; // the other columns if (col.DisplayIndex > 0) { popup.HorizontalOffset = col.ActualWidth - popupWidth - popupHeaderPoint.X + 3d; grid.MaxWidth += Math.Abs(popup.HorizontalOffset) - 1d; } // delta > 0 : main > popup // delta < 0 : popup > main if (deltaY >= 0) { grid.MaxHeight = mainHeight - (headerMainPoint.Y + headHeigth) - 1d; } else { grid.MaxHeight = popupHeigth + deltaY; grid.Height = grid.MaxHeight; grid.MinHeight = grid.MaxHeight; } } } catch (Exception ex) { Debug.WriteLine($"PopupPlacement error : {ex.Message}"); throw; } } #endregion Private Methods } /// <summary> /// ResourceDictionary /// </summary> public partial class FilterDataGridDictionary { #region Public Constructors public FilterDataGridDictionary() { InitializeComponent(); } #endregion Public Constructors } }
38.437968
128
0.531042
[ "MIT" ]
Apflkuacha/DataGridFilter
FilterDataGrid/FilterDataGrid.cs
46,166
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: IEntityCollectionRequest.cs.tt namespace Microsoft.Graph { using System; using System.Collections.Generic; using System.Net.Http; using System.Threading; using System.Linq.Expressions; /// <summary> /// The interface IDeviceConfigurationDeviceStatusesCollectionRequest. /// </summary> public partial interface IDeviceConfigurationDeviceStatusesCollectionRequest : IBaseRequest { /// <summary> /// Adds the specified DeviceConfigurationDeviceStatus to the collection via POST. /// </summary> /// <param name="deviceConfigurationDeviceStatus">The DeviceConfigurationDeviceStatus to add.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The created DeviceConfigurationDeviceStatus.</returns> System.Threading.Tasks.Task<DeviceConfigurationDeviceStatus> AddAsync(DeviceConfigurationDeviceStatus deviceConfigurationDeviceStatus, CancellationToken cancellationToken = default); /// <summary> /// Adds the specified DeviceConfigurationDeviceStatus to the collection via POST and returns a <see cref="GraphResponse{DeviceConfigurationDeviceStatus}"/> object of the request. /// </summary> /// <param name="deviceConfigurationDeviceStatus">The DeviceConfigurationDeviceStatus to add.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The <see cref="GraphResponse{DeviceConfigurationDeviceStatus}"/> object of the request.</returns> System.Threading.Tasks.Task<GraphResponse<DeviceConfigurationDeviceStatus>> AddResponseAsync(DeviceConfigurationDeviceStatus deviceConfigurationDeviceStatus, CancellationToken cancellationToken = default); /// <summary> /// Gets the collection page. /// </summary> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The collection page.</returns> System.Threading.Tasks.Task<IDeviceConfigurationDeviceStatusesCollectionPage> GetAsync(CancellationToken cancellationToken = default); /// <summary> /// Gets the collection page and returns a <see cref="GraphResponse{DeviceConfigurationDeviceStatusesCollectionResponse}"/> object. /// </summary> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The <see cref="GraphResponse{DeviceConfigurationDeviceStatusesCollectionResponse}"/> object.</returns> System.Threading.Tasks.Task<GraphResponse<DeviceConfigurationDeviceStatusesCollectionResponse>> GetResponseAsync(CancellationToken cancellationToken = default); /// <summary> /// Adds the specified expand value to the request. /// </summary> /// <param name="value">The expand value.</param> /// <returns>The request object to send.</returns> IDeviceConfigurationDeviceStatusesCollectionRequest Expand(string value); /// <summary> /// Adds the specified expand value to the request. /// </summary> /// <param name="expandExpression">The expression from which to calculate the expand value.</param> /// <returns>The request object to send.</returns> IDeviceConfigurationDeviceStatusesCollectionRequest Expand(Expression<Func<DeviceConfigurationDeviceStatus, object>> expandExpression); /// <summary> /// Adds the specified select value to the request. /// </summary> /// <param name="value">The select value.</param> /// <returns>The request object to send.</returns> IDeviceConfigurationDeviceStatusesCollectionRequest Select(string value); /// <summary> /// Adds the specified select value to the request. /// </summary> /// <param name="selectExpression">The expression from which to calculate the select value.</param> /// <returns>The request object to send.</returns> IDeviceConfigurationDeviceStatusesCollectionRequest Select(Expression<Func<DeviceConfigurationDeviceStatus, object>> selectExpression); /// <summary> /// Adds the specified top value to the request. /// </summary> /// <param name="value">The top value.</param> /// <returns>The request object to send.</returns> IDeviceConfigurationDeviceStatusesCollectionRequest Top(int value); /// <summary> /// Adds the specified filter value to the request. /// </summary> /// <param name="value">The filter value.</param> /// <returns>The request object to send.</returns> IDeviceConfigurationDeviceStatusesCollectionRequest Filter(string value); /// <summary> /// Adds the specified skip value to the request. /// </summary> /// <param name="value">The skip value.</param> /// <returns>The request object to send.</returns> IDeviceConfigurationDeviceStatusesCollectionRequest Skip(int value); /// <summary> /// Adds the specified orderby value to the request. /// </summary> /// <param name="value">The orderby value.</param> /// <returns>The request object to send.</returns> IDeviceConfigurationDeviceStatusesCollectionRequest OrderBy(string value); } }
53.045045
213
0.673913
[ "MIT" ]
Aliases/msgraph-sdk-dotnet
src/Microsoft.Graph/Generated/requests/IDeviceConfigurationDeviceStatusesCollectionRequest.cs
5,888
C#
// // Copyright (c) 2004-2021 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen // // 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 Jaroslaw Kowalski 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 OWNER 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; using System.Text; using NLog.MessageTemplates; namespace NLog { /// <summary> /// Render a message template property to a string /// </summary> public interface IValueFormatter { /// <summary> /// Serialization of an object, e.g. JSON and append to <paramref name="builder"/> /// </summary> /// <param name="value">The object to serialize to string.</param> /// <param name="format">Parameter Format</param> /// <param name="captureType">Parameter CaptureType</param> /// <param name="formatProvider">An object that supplies culture-specific formatting information.</param> /// <param name="builder">Output destination.</param> /// <returns>Serialize succeeded (true/false)</returns> bool FormatValue(object value, string format, CaptureType captureType, IFormatProvider formatProvider, StringBuilder builder); } }
45.631579
134
0.722414
[ "BSD-3-Clause" ]
304NotModified/NLog
src/NLog/Abstractions/IValueFormatter.cs
2,601
C#
// <copyright file="HostCollection.cs" company="PlaceholderCompany"> // Copyright (c) PlaceholderCompany. All rights reserved. // </copyright> using System.Collections.Generic; namespace Da { internal class HostCollection { public string Host { get; set; } public List<string> ServiceIds { get; set; } } }
21.375
70
0.669591
[ "Apache-2.0" ]
Eliav2rll2v/Justin-E-Taylorj
component/Opc/Model/HostCollection.cs
344
C#
//------------------------------------------------------------------------------ // <copyright file="PropertyManager.cs" company="Microsoft"> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> //------------------------------------------------------------------------------ /**************************************************************************\ * * Copyright (c) 1998-2002, Microsoft Corp. All Rights Reserved. * * Module Name: * * PropertyManager.cs * * Abstract: * * Revision History: * \**************************************************************************/ namespace System.Windows.Forms { using System; using System.Windows.Forms; using System.ComponentModel; using System.Collections; /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public class PropertyManager : BindingManagerBase { // PropertyManager class // private object dataSource; private PropertyDescriptor propInfo; private bool bound; /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.Current"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public override Object Current { get { return this.dataSource; } } private void PropertyChanged(object sender, EventArgs ea) { EndCurrentEdit(); OnCurrentChanged(EventArgs.Empty); } internal override void SetDataSource(Object dataSource) { this.dataSource = dataSource; } /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.PropertyManager"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public PropertyManager() {} internal PropertyManager(Object dataSource) : base(dataSource){} internal PropertyManager(Object dataSource, string propName) : this(dataSource) { propInfo = TypeDescriptor.GetProperties(dataSource).Find(propName, true); if (propInfo == null) throw new ArgumentException(SR.GetString(SR.PropertyManagerPropDoesNotExist, propName, dataSource.ToString())); propInfo.AddValueChanged(dataSource, new EventHandler(PropertyChanged)); } /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.GetItemProperties"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public override PropertyDescriptorCollection GetItemProperties() { PropertyDescriptorCollection res = TypeDescriptor.GetProperties(dataSource); return res; } internal override Type BindType { get { return dataSource.GetType(); } } internal override String GetListName() { return TypeDescriptor.GetClassName(dataSource) + "." + propInfo.Name; } /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.SuspendBinding"]/*' /> public override void SuspendBinding() { EndCurrentEdit(); if (bound) { try { bound = false; UpdateIsBinding(); } catch (Exception e) { bound = true; UpdateIsBinding(); throw e; } } } /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.ResumeBinding"]/*' /> public override void ResumeBinding() { OnCurrentChanged(new EventArgs()); if (!bound) { try { bound = true; UpdateIsBinding(); } catch (Exception e) { bound = false; UpdateIsBinding(); throw e; } } } /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.GetListName"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> protected internal override String GetListName(ArrayList listAccessors) { return ""; } /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.CancelCurrentEdit"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public override void CancelCurrentEdit() { IEditableObject obj = this.Current as IEditableObject; if (obj != null) obj.CancelEdit(); PushData(); } /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.EndCurrentEdit"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public override void EndCurrentEdit() { PullData(); IEditableObject obj = this.Current as IEditableObject; if (obj != null) obj.EndEdit(); } /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.UpdateIsBinding"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> protected override void UpdateIsBinding() { for (int i = 0; i < this.Bindings.Count; i++) this.Bindings[i].UpdateIsBinding(); } /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.OnCurrentChanged"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> internal protected override void OnCurrentChanged(EventArgs ea) { PushData(); if (this.onCurrentChangedHandler != null) this.onCurrentChangedHandler(this, ea); } internal override object DataSource { get { return this.dataSource; } } internal override bool IsBinding { get { return true; } } // no op on the propertyManager /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.Position"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public override int Position { get { return 0; } set { } } /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.Count"]/*' /> public override int Count { get { return 1; } } // no-op on the propertyManager /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.AddNew"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public override void AddNew() { throw new NotSupportedException(SR.GetString(SR.DataBindingAddNewNotSupportedOnPropertyManager)); } // no-op on the propertyManager /// <include file='doc\PropertyManager.uex' path='docs/doc[@for="PropertyManager.RemoveAt"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public override void RemoveAt(int index) { throw new NotSupportedException(SR.GetString(SR.DataBindingRemoveAtNotSupportedOnPropertyManager)); } } }
35.4
128
0.505085
[ "Unlicense" ]
bestbat/Windows-Server
com/netfx/src/framework/winforms/managed/system/winforms/propertymanager.cs
7,965
C#
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // PermissionState.cool // // The Runtime policy manager. Maintains a set of IdentityMapper objects that map // inbound evidence to groups. Resolves an identity into a set of permissions // namespace System.Security.Permissions { using System; /// <include file='doc\PermissionState.uex' path='docs/doc[@for="PermissionState"]/*' /> [Serializable] public enum PermissionState { /// <include file='doc\PermissionState.uex' path='docs/doc[@for="PermissionState.Unrestricted"]/*' /> Unrestricted = 1, /// <include file='doc\PermissionState.uex' path='docs/doc[@for="PermissionState.None"]/*' /> None = 0, } }
30.423077
110
0.623262
[ "Unlicense" ]
bestbat/Windows-Server
com/netfx/src/clr/bcl/system/security/permissions/permissionstate.cs
791
C#
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using LogisticsManagerModel; namespace LogisticsManager { public partial class CarriersDetils : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindCarriersInfo(Convert.ToInt32(Request.QueryString["id"])); BindrptGoods(Convert.ToInt32(Request.QueryString["id"])); } } public void BindCarriersInfo(int carriersID) { //绑定承运单信息 Carriers carriers = LogisticsManagerBLL.CarriersBLL.GetOneCarriers(carriersID); lblStartTime.Text = carriers.StartTime; lblSendCompany.Text = carriers.SendCompany; lblSendAddress.Text = carriers.SendAddress; lblSendPhone.Text = carriers.SendPhone; lblReceiveLinkman.Text = carriers.ReceiveLinkman; lblReceiveCompany.Text = carriers.ReceiveCompany; lblReceivePhone.Text = carriers.ReceivePhone; //if (carriers.ReceiveDate.ToString() == "0001/1/1 0:00:00") //{ lblReceiveDate.Text = carriers.ReceiveDate.ToString(); //} //else //{ //lblReceiveDate.Text = ""; //} lblTransportCost.Text = carriers.TransportCost.ToString(); lblInsuranceCost.Text = carriers.InsuranceCost.ToString(); lblOtherCost.Text = carriers.OtherCost.ToString(); lblTotalCost.Text = carriers.TotalCost.ToString(); // if (carriers.LeaverDate.ToString() == "0001/1/1 0:00:00") //{ lblLeaverDate.Text = carriers.LeaverDate.ToString(); // } // else //{ // lblLeaverDate.Text = ""; //} lblSendLinkman.Text = carriers.SendLinkman; lblFinishedState.Text = carriers.FinishedState.ToString(); txtRemark.Text = carriers.Remark; if (lblFinishedState.Text == "0") { lblFinishedState.Text = "待调度"; } else if (lblFinishedState.Text == "1") { lblFinishedState.Text = "已调度"; } else if(lblFinishedState.Text == "2") { lblFinishedState.Text = "已签收"; } else { lblFinishedState.Text = "已结算"; } lblStartTime.Text = carriers.LeaverDate.ToString(); lblFK_UserID.Text = LogisticsManagerBLL.UserInfoBLL.GetUserNameById(carriers.FK_UserID); } public void BindrptGoods(int carriersId) { rpt_Goods.DataSource = LogisticsManagerBLL.GoodsBLL.GetGoodsByCarriersId(carriersId); rpt_Goods.DataBind(); } } }
36.666667
100
0.561279
[ "MIT" ]
hc-hub/LogisticsManager
LogisticsManager/LogisticsManager/CarriersDetils.aspx.cs
3,010
C#
using Castle.Core; using Castle.MicroKernel; using Castle.MicroKernel.Registration; using Castle.Windsor; using System; namespace MongoDbFramework.CastleWindsor { public static class Installer { public static IWindsorContainer AddMongoDbContext<TContext>( this IWindsorContainer containerBuilder, Action<MongoDbOptionBuilder> options, LifestyleType contextLifestyle = LifestyleType.Scoped, LifestyleType optionsLifestyle = LifestyleType.Scoped) where TContext : MongoDbContext { containerBuilder.AddMongoDbContext<TContext>((p, b) => options.Invoke(b), contextLifestyle, optionsLifestyle); return containerBuilder; } private static IWindsorContainer AddMongoDbContext<TContext>( this IWindsorContainer containerBuilder, Action<IKernel, MongoDbOptionBuilder> options, LifestyleType contextLifestyle = LifestyleType.Scoped, LifestyleType optionsLifestyle = LifestyleType.Scoped) where TContext : MongoDbContext { if (containerBuilder == null) throw new InvalidOperationException($"{nameof(containerBuilder)} is null."); if (contextLifestyle == LifestyleType.Singleton) { optionsLifestyle = LifestyleType.Singleton; } containerBuilder.Register( Component.For<MongoDbOptions<TContext>>() .UsingFactoryMethod(kernel => MongoDbOptionsFactory<TContext>(kernel, options)) .LifeStyle.Is(optionsLifestyle), Component.For<TContext>().ImplementedBy<TContext>().LifeStyle.Is(contextLifestyle) ); return containerBuilder; } private static MongoDbOptions<TContext> MongoDbOptionsFactory<TContext>( IKernel kernel, Action<IKernel, MongoDbOptionBuilder> optionsAction) where TContext : MongoDbContext { var builder = new MongoDbOptionBuilder<TContext>(); optionsAction.Invoke(kernel, builder); return (MongoDbOptions<TContext>)builder.Options; } } }
38.237288
122
0.640071
[ "MIT" ]
marcrabadan/MongoDbContext
src/MongoDbContext.CastleWindsor/Installer.cs
2,258
C#
using System; using System.Collections.Generic; using System.Linq; using Newtonsoft.Json.Linq; using System.Runtime.Serialization; namespace XBMCRPC.VideoLibrary { public class GetMusicVideos_filterYear { public int year { get; set; } } }
19.692308
41
0.75
[ "MIT" ]
RyanMelenaNoesis/ElveKodiDriver
src/NoesisLabs.Elve.Kodi/XBMCRPC/XBMCRPC/VideoLibrary/GetMusicVideos_filterYear.cs
256
C#
using UnityEngine; using UnityEngine.Events; namespace ScriptableObjectArchitecture { [System.Serializable] public class Vector2Event : UnityEvent<Vector2> { } [CreateAssetMenu( fileName = "Vector2Variable.asset", menuName = SOArchitecture_Utility.VARIABLE_SUBMENU + "Structs/Vector2", order = SOArchitecture_Utility.ASSET_MENU_ORDER_COLLECTIONS + 10)] public sealed class Vector2Variable : BaseVariable<Vector2, Vector2Event> { } }
30.1875
79
0.73706
[ "MIT" ]
YuanSambo/Fruit-Rush
Assets/SO Architecture/Variables/Vector2Variable.cs
483
C#
using UnityEngine; using UnityEngine.UI; using System.Collections; public class Score : MonoBehaviour { public static int score; public Text scoreText; // Use this for initialization void Start () { scoreText = GetComponent<Text>(); score = 0; } // Update is called once per frame void Update () { scoreText.text = "Score: " + score; } }
18.190476
43
0.646597
[ "Apache-2.0" ]
haiquangtran/Skube
Assets/Scripts/Score.cs
384
C#
// Copyright (c) BruTile developers team. All rights reserved. See License.txt in the project root for license information. // This file was created by Tim Ebben (Geodan) 2009 using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Xml.Serialization; using BruTile.Cache; using BruTile.Web; namespace BruTile.Tms { public static class TileMapParser { public delegate void CreateTileSourceCompleted(ITileSource tileSource, Exception error); public static TileSource CreateTileSource(Stream tileMapResource, string overrideUrl = null, Dictionary<string, string> customParameters = null, IPersistentCache<byte[]> persistentCache = null, Func<Uri, byte[]> fetchTile = null) { var reader = new StreamReader(tileMapResource); var serializer = new XmlSerializer(typeof(TileMap)); var tileMap = (TileMap)serializer.Deserialize(reader); var tileSchema = CreateSchema(tileMap); var tileUrls = new Dictionary<string, Uri>(); foreach (TileMapTileSetsTileSet ts in tileMap.TileSets.TileSet) { tileUrls[ts.order] = new Uri(ts.href); } var tileProvider = new HttpTileProvider(CreateRequest(tileUrls, tileSchema.Format, overrideUrl, customParameters), persistentCache, fetchTile); return new TileSource(tileProvider, tileSchema); } public static void CreateTileSourceAsync(string tileMapResourceUrl, CreateTileSourceCompleted callback) { CreateTileSourceAsync(tileMapResourceUrl, callback, null); } public static void CreateTileSourceAsync(string url, CreateTileSourceCompleted callback, string overrideUrl) { var request = (HttpWebRequest)WebRequest.Create(new Uri(url)); request.BeginGetResponse(MethodOnThread, new object[] { callback, request, overrideUrl }); } public static void MethodOnThread(IAsyncResult ar) { CreateTileSourceCompleted callback = null; Exception error = null; ITileSource tileSource = null; try { var args = (object[])ar.AsyncState; callback = (CreateTileSourceCompleted)args[0]; var request = (HttpWebRequest)args[1]; var overrideUrl = (string)args[2]; var response = request.EndGetResponse(ar); tileSource = CreateTileSource(response.GetResponseStream(), overrideUrl); } catch (Exception ex) { error = ex; } if (callback != null) callback(tileSource, error); } private static TileSchema CreateSchema(TileMap tileMap) { var schema = new TileSchema(); schema.OriginX = double.Parse(tileMap.Origin.x, CultureInfo.InvariantCulture); schema.OriginY = double.Parse(tileMap.Origin.y, CultureInfo.InvariantCulture); schema.Srs = tileMap.SRS; var tileWidth = int.Parse(tileMap.TileFormat.width); var tileHeight = int.Parse(tileMap.TileFormat.height); schema.Name = tileMap.Title; schema.Format = tileMap.TileFormat.extension; schema.YAxis = YAxis.TMS; schema.Extent = new Extent( double.Parse(tileMap.BoundingBox.minx, CultureInfo.InvariantCulture), double.Parse(tileMap.BoundingBox.miny, CultureInfo.InvariantCulture), double.Parse(tileMap.BoundingBox.maxx, CultureInfo.InvariantCulture), double.Parse(tileMap.BoundingBox.maxy, CultureInfo.InvariantCulture)); foreach (var tileSet in tileMap.TileSets.TileSet) { double unitsPerPixel = double.Parse(tileSet.unitsperpixel, CultureInfo.InvariantCulture); schema.Resolutions[tileSet.order] = new Resolution ( tileSet.order, unitsPerPixel, tileWidth, tileHeight ); } return schema; } private static IRequest CreateRequest(IDictionary<string, Uri> tileUrls, string format, string overrideUrl, Dictionary<string, string> customParameters = null) { if (string.IsNullOrEmpty(overrideUrl)) return new TmsRequest(tileUrls, format, customParameters); return new TmsRequest(new Uri(overrideUrl), format, customParameters); } } }
40.889831
127
0.607047
[ "Apache-2.0" ]
EastpointSoftware/BruTile
BruTile/Tms/TileMapParser.cs
4,827
C#
using System; using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; using NUnit.Framework; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.TestTools; using Object = UnityEngine.Object; using Unity.Netcode.Transports.UNET; using System.Diagnostics; namespace Unity.Netcode.MultiprocessRuntimeTests { public class MultiprocessTestsAttribute : CategoryAttribute { public const string MultiprocessCategoryName = "Multiprocess"; public MultiprocessTestsAttribute() : base(MultiprocessCategoryName) { } } [MultiprocessTests] public abstract class BaseMultiprocessTests { private string m_LogPath; private bool m_HasSceneLoaded = false; protected virtual bool LaunchRemotely => false; protected virtual bool IsPerformanceTest => true; private string m_Port = "3076"; // TODO This port will need to be reconfigurable private const string k_GlobalEmptySceneName = "EmptyScene"; protected bool ShouldIgnoreTests => IsPerformanceTest && Application.isEditor || !BuildMultiprocessTestPlayer.IsMultiprocessTestPlayerAvailable(); /// <summary> /// Implement this to specify the amount of workers to spawn from your main test runner /// TODO there's a good chance this will be re-factored with something fancier once we start integrating with bokken /// </summary> protected abstract int WorkerCount { get; } protected abstract string[] platformList { get; } private const string k_FirstPartOfTestRunnerSceneName = "InitTestScene"; // Since we want to additively load our BuildMultiprocessTestPlayer.MainSceneName // We want to keep a reference to the private Scene m_OriginalActiveScene; [OneTimeSetUp] public virtual void SetupTestSuite() { MultiprocessLogger.Log("Running SetupTestSuite - OneTimeSetup"); if (LaunchRemotely && !MultiprocessOrchestration.ShouldRunMultiMachineTests()) { Assert.Ignore($"Ignoring tests that require bokken for multimachine testing since as enableMultiMachineTesting Editor command line option not specified"); } if (IsPerformanceTest) { Assert.Ignore("Performance tests should be run from remote test execution on device (this can be ran using the \"run selected tests (your platform)\" button"); } // Build the multiprocess test player if (!BuildMultiprocessTestPlayer.DoesBuildInfoExist()) { Assert.Ignore($"Ignoring tests that require a multiprocess testplayer build"); } var currentlyActiveScene = SceneManager.GetActiveScene(); // Just adding a sanity check here to help with debugging in the event that SetupTestSuite is // being invoked and the TestRunner scene has not been set to the active scene yet. // This could mean that TeardownSuite wasn't called or SceneManager is not finished unloading // or could not unload the BuildMultiprocessTestPlayer.MainSceneName. if (!currentlyActiveScene.name.StartsWith(k_FirstPartOfTestRunnerSceneName)) { MultiprocessLogger.LogError( $"Expected the currently active scene to begin with ({k_FirstPartOfTestRunnerSceneName}) but" + $" currently active scene is {currentlyActiveScene.name}"); } m_OriginalActiveScene = currentlyActiveScene; SceneManager.sceneLoaded += OnSceneLoaded; SceneManager.LoadScene(BuildMultiprocessTestPlayer.MainSceneName, LoadSceneMode.Additive); } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { SceneManager.sceneLoaded -= OnSceneLoaded; var ushortport = ushort.Parse(m_Port); var transport = NetworkManager.Singleton.NetworkConfig.NetworkTransport; switch (transport) { case UNetTransport unetTransport: unetTransport.ConnectPort = ushortport; unetTransport.ServerListenPort = ushortport; break; case UnityTransport unityTransport: unityTransport.ConnectionData.Port = ushortport; MultiprocessLogger.Log($"unityTransport ConnectionData: {unityTransport.ConnectionData.Address}:{unityTransport.ConnectionData.Port}"); break; default: MultiprocessLogger.LogError($"OnSceneLoaded: Transport is {transport} which is an unaccounted for transport case"); break; } if (scene.name == BuildMultiprocessTestPlayer.MainSceneName) { SceneManager.SetActiveScene(scene); } NetworkManager.Singleton.StartHost(); // Use scene verification to make sure we don't try to get clients to synchronize the TestRunner scene NetworkManager.Singleton.SceneManager.VerifySceneBeforeLoading = VerifySceneIsValidForClientsToLoad; m_HasSceneLoaded = true; } /// <summary> /// We want to exclude the TestRunner scene on the host-server side so it won't try to tell clients to /// synchronize to this scene when they connect (host-server side only for multiprocess) /// </summary> /// <returns>true - scene is fine to synchronize/inform clients to load and false - scene should not be loaded by clients</returns> private bool VerifySceneIsValidForClientsToLoad(int sceneIndex, string sceneName, LoadSceneMode loadSceneMode) { if (sceneName.StartsWith(k_FirstPartOfTestRunnerSceneName)) { return false; } return true; } [UnitySetUp] public virtual IEnumerator Setup() { yield return new WaitUntil(() => NetworkManager.Singleton != null); yield return new WaitUntil(() => NetworkManager.Singleton.IsServer); yield return new WaitUntil(() => NetworkManager.Singleton.IsListening); yield return new WaitUntil(() => m_HasSceneLoaded == true); MultiprocessLogger.Log($"Connected client count is {NetworkManager.Singleton.ConnectedClients.Count}"); // Moved this out of OnSceneLoaded as OnSceneLoaded is a callback from the SceneManager and just wanted to avoid creating // processes from within the same callstack/context as the SceneManager. This will instantiate up to the WorkerCount and // then any subsequent calls to Setup if there are already workers it will skip this step if (NetworkManager.Singleton.ConnectedClients.Count - 1 < WorkerCount) { var numProcessesToCreate = WorkerCount - (NetworkManager.Singleton.ConnectedClients.Count - 1); if (!LaunchRemotely) { for (int i = 1; i <= numProcessesToCreate; i++) { MultiprocessLogger.Log($"Spawning testplayer {i} since connected client count is {NetworkManager.Singleton.ConnectedClients.Count} is less than {WorkerCount} and platformList is null"); m_LogPath = MultiprocessOrchestration.StartWorkerNode(); // will automatically start built player as clients MultiprocessLogger.Log($"logPath to new process is {m_LogPath}"); MultiprocessLogger.Log($"connected client count is {NetworkManager.Singleton.ConnectedClients.Count}"); } } else { var machines = new List<BokkenMachine>(); var tasks = new List<Task>(); foreach (var platform in platformList) { MultiprocessLogger.Log($"Provisioning platform {platform} if necessary"); var provisionTask = Task.Factory.StartNew(() => { var machine = MultiprocessOrchestration.ProvisionWorkerNode(platform); machines.Add(machine); }); MultiprocessLogger.Log($"Task {provisionTask.Id} is for {platform}"); tasks.Add(provisionTask); MultiprocessLogger.Log($"Machines list is now : {machines.Count}"); } foreach (var task in tasks) { MultiprocessLogger.Log($"Task id {task.Id}"); task.Wait(); } foreach (var machine in machines) { MultiprocessLogger.Log($"Launching process on remote machine {machine.Name} {machine.Image} {machine.Type}"); machine.Launch(); MultiprocessLogger.Log($"Launching process complete"); } } } else { MultiprocessLogger.Log($"No need to spawn a new test player as there are already connected clients {NetworkManager.Singleton.ConnectedClients.Count}"); } MultiprocessLogger.Log($"Checking timeout {Time.realtimeSinceStartup} + {TestCoordinator.MaxWaitTimeoutSec}"); var timeOutTime = Time.realtimeSinceStartup + TestCoordinator.MaxWaitTimeoutSec; while (NetworkManager.Singleton.ConnectedClients.Count <= WorkerCount) { yield return new WaitForSeconds(0.2f); MultiprocessLogger.Log($"Timeout if {Time.realtimeSinceStartup} > {timeOutTime} while waiting for {NetworkManager.Singleton.ConnectedClients.Count} > {WorkerCount}"); if (Time.realtimeSinceStartup > timeOutTime) { throw new Exception($"Waiting too long to see clients to connect, got {NetworkManager.Singleton.ConnectedClients.Count - 1} clients, but was expecting {WorkerCount}, failing"); } } TestCoordinator.Instance.KeepAliveClientRpc(); MultiprocessLogger.Log($"Connected client count is {NetworkManager.Singleton.ConnectedClients.Count}"); MultiprocessLogger.Log("Setup completed"); } [TearDown] public virtual void Teardown() { MultiprocessLogger.Log("BaseMultiProcessTests - Teardown : Running teardown"); if (LaunchRemotely) { MultiprocessLogger.Log("Kill multi process test player"); MultiprocessOrchestration.KillAllTestPlayersOnRemoteMachines(); MultiprocessLogger.Log("Fetching log files"); BokkenMachine.FetchAllLogFiles(); MultiprocessLogger.Log("Fetching log files ... Done, now running TestRunTearDown"); } TestCoordinator.Instance.TestRunTeardown(); MultiprocessLogger.Log("TestRunTearDown ... Done"); MultiprocessLogger.Log("BaseMultiProcessTests - Teardown : Running teardown ... Complete"); } [OneTimeTearDown] public virtual void TeardownSuite() { MultiprocessLogger.Log($"BaseMultiProcessTests - TeardownSuite : One time teardown"); MultiprocessLogger.Log($"TeardownSuite should have disposed resources"); try { if (MultiprocessOrchestration.ShouldRunMultiMachineTests()) { BokkenMachine.FetchAllLogFiles(); BokkenMachine.DumpProcessList(); Process[] allProcesses = Process.GetProcesses(); foreach (Process process in allProcesses) { if (process.ProcessName.Contains("dotnet")) { MultiprocessLogger.Log($"dotnet process found : {process.StartInfo.Arguments} : {process.StartTime.ToShortTimeString()} {process.Id}"); process.Kill(); } } } } catch (Exception e) { MultiprocessLogger.LogError($"Error getting dotnet process info {e.Message}"); } MultiprocessLogger.Log($"TeardownSuite - ShutdownAllProcesses"); MultiprocessOrchestration.ShutdownAllProcesses(); MultiprocessLogger.Log($"TeardownSuite - NetworkManager.Singleton.Shutdown"); NetworkManager.Singleton.Shutdown(); Object.Destroy(NetworkManager.Singleton.gameObject); // making sure we clear everything before reloading our scene MultiprocessLogger.Log($"Currently active scene {SceneManager.GetActiveScene().name}"); MultiprocessLogger.Log($"m_OriginalActiveScene.IsValid {m_OriginalActiveScene.IsValid()}"); if (m_OriginalActiveScene.IsValid()) { SceneManager.SetActiveScene(m_OriginalActiveScene); } MultiprocessLogger.Log($"TeardownSuite - Unload {BuildMultiprocessTestPlayer.MainSceneName} ... start "); AsyncOperation asyncOperation = SceneManager.UnloadSceneAsync(BuildMultiprocessTestPlayer.MainSceneName); asyncOperation.completed += AsyncOperation_completed; } private void AsyncOperation_completed(AsyncOperation obj) { MultiprocessLogger.Log($"TeardownSuite - Unload - UnloadScene {obj.progress} "); } } }
47.618557
209
0.617955
[ "MIT" ]
Myxcil/com.unity.netcode.gameobjects
testproject/Assets/Tests/Runtime/MultiprocessRuntime/BaseMultiprocessTests.cs
13,857
C#
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using System; using UnityEngine; namespace MixedRealityToolkit.Common.InterpolatedValues { /// <summary> /// Provides interpolation over Color. /// </summary> [Serializable] public class InterpolatedColor : InterpolatedValue<Color> { /// <summary> /// Instantiates the InterpolatedColor with default of Color as initial value and skipping the first update frame. /// </summary> public InterpolatedColor() : this(default(Color)) { } /// <summary> /// Instantiates the InterpolatedColor with a given Color value as initial value and defaulted to skipping the first update frame. /// </summary> /// <param name="initialValue">Initial current value to use.</param> /// <param name="skipFirstUpdateFrame">A flag to skip first update frame after the interpolation target has been set.</param> public InterpolatedColor(Color initialValue, bool skipFirstUpdateFrame = false) : base(initialValue, skipFirstUpdateFrame) { } /// <summary> /// Overrides the method to calculate the current Color interpolation value by using a Color.Lerp function. /// </summary> /// <remarks>This method is public because of a Unity compilation bug when dealing with abstract methods on generics.</remarks> /// <param name="startValue">The Color value that the interpolation started at.</param> /// <param name="targetValue">The target Color value that the interpolation is moving to.</param> /// <param name="curveValue">A curve evaluated interpolation position value. This will be in range of [0, 1]</param> /// <returns>The new calculated Color interpolation value.</returns> public override Color ApplyCurveValue(Color startValue, Color targetValue, float curveValue) { return Color.Lerp(startValue, targetValue, curveValue); } /// <summary> /// Overrides the method to check if two Colors are equal. /// </summary> /// <remarks>This method is public because of a Unity compilation bug when dealing with abstract methods on generics.</remarks> /// <param name="one">First Color value.</param> /// <param name="other">Second Color value.</param> /// <returns>True if the Colors are equal.</returns> public override bool DoValuesEqual(Color one, Color other) { return one == other; } } }
48.888889
138
0.666288
[ "MIT" ]
amngupta/MixedRealityToolkit-Unity
Assets/MixedRealityToolkit/Common/Scripts/InterpolatedValues/InterpolatedColor.cs
2,642
C#
using Rynchodon.Autopilot.Pathfinding; namespace Rynchodon.Autopilot.Instruction.Command { public class Asteroid : ASingleWord { public override ACommand Clone() { return new Asteroid(); } public override string Identifier { get { return "asteroid"; } } public override string AddDescription { get { return "Ignore asteroids until next destination."; } } protected override void ActionMethod(Pathfinder pathfinder) { pathfinder.Mover.NavSet.Settings_Task_NavMove.IgnoreAsteroid = true; } } }
17.933333
71
0.726766
[ "CC0-1.0" ]
Rynchodon/ARMS
Scripts/Autopilot/Instruction/Command/SingleWord/Asteroid.cs
540
C#
using Ship; using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; namespace Upgrade { public class UpgradeSlot { public GenericShip HostShip { get; private set; } public UpgradeType Type { get; private set; } public object GrantedBy { get; set; } public int Counter { get; set; } public int CostDecrease { get; set; } public int MaxCost { get; set; } // Needed for Tie Shuttle Title public bool MustBeDifferent { get; set; } // Needed fot Royal Guard Title public bool MustBeUnique { get; set; } // Needed for Havoc Title public GenericUpgrade InstalledUpgrade { get; private set; } public int InstalledUpgradeCostReduction { get; private set; } public int InstalledUpgradeCostMax { get; private set; } public event Ship.GenericShip.EventHandlerUpgrade OnPreInstallUpgrade; public event Ship.GenericShip.EventHandlerUpgrade OnRemovePreInstallUpgrade; public bool IsEmpty { get { return (InstalledUpgrade == null); } } public UpgradeSlot(UpgradeType type) { Type = type; CostDecrease = 0; MaxCost = int.MaxValue; } public void TryInstallUpgrade(GenericUpgrade upgrade, GenericShip host) { HostShip = host; if (upgrade != null) InstallUpgrade(); } public void PreInstallUpgrade(GenericUpgrade upgrade, GenericShip host) { HostShip = host; InstalledUpgrade = upgrade; upgrade.Slot = this; InstalledUpgrade.PreAttachToShip(host); if (upgrade.UpgradeInfo.UpgradeTypes.Count > 1) { List<UpgradeType> extraSlots = new List<UpgradeType>(upgrade.UpgradeInfo.UpgradeTypes); extraSlots.Remove(extraSlots.First(n => n == this.Type)); foreach (UpgradeType upgradeType in extraSlots) { // Clone upgrade to fill extra slots UpgradesList.EmptyUpgrade emptyUpgrade = new UpgradesList.EmptyUpgrade(); emptyUpgrade.SetUpgradeInfo(upgradeType, upgrade.UpgradeInfo.Name, 0); UpgradeSlot tempSlot = host.UpgradeBar.GetUpgradeSlots().First(n => n.IsEmpty && emptyUpgrade.HasType(n.Type)); tempSlot.PreInstallUpgrade(emptyUpgrade, host); } } if (DebugManager.FreeMode) { if (!host.UpgradeBar.HasFreeSlots()) host.UpgradeBar.AddSlot(UpgradeType.Omni); } OnPreInstallUpgrade?.Invoke(upgrade); } public void RemovePreInstallUpgrade() { InstalledUpgrade.PreDettachFromShip(); OnRemovePreInstallUpgrade?.Invoke(InstalledUpgrade); InstalledUpgrade = null; if (DebugManager.FreeMode) { if (HostShip.UpgradeBar.GetUpgradeSlots().Count(n => n.IsEmpty) > 1) { HostShip.UpgradeBar.RemoveEmptySlot(UpgradeType.Omni); } } } private void InstallUpgrade() { //TODO: Remove host paramater InstalledUpgrade.AttachToShip(InstalledUpgrade.HostShip); } } }
33.54902
131
0.589714
[ "MIT" ]
nickell-andrew/FlyCasual
Assets/Scripts/Model/Content/Core/Ship/UpgradesBar/UpgradeSlot.cs
3,424
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace AGCI.ViewModels { public class DatosViewModel { public string nombre { get; set; } } }
16.615385
42
0.703704
[ "MIT" ]
ArielBlanco1990/AGCI
AGCI/ViewModels/DatosViewModel.cs
218
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Specialized; using System.Configuration.Internal; using System.Diagnostics; using System.IO; namespace System.Configuration { // Configuration host that intercepts calls to filename functions // to support SaveAs to an alternate file stream. internal class UpdateConfigHost : DelegatingConfigHost { private HybridDictionary _streams; // oldStreamname -> StreamUpdate internal UpdateConfigHost(IInternalConfigHost host) { // Delegate to the host provided. Host = host; } // Add a stream to the list of streams to intercept. // // Parameters: // alwaysIntercept - If true, then don't check whether the old stream and the new stream are the same. // SaveAs() will set this to true if oldStreamname is actually referring to a stream // on a remote machine. internal void AddStreamname(string oldStreamname, string newStreamname, bool alwaysIntercept) { // After reviewing all the code paths, oldStreamname shouldn't be Null or Empty. // It actually doesn't make much sense if we're asked to intercept an null or empty stream. Debug.Assert(!string.IsNullOrEmpty(oldStreamname)); if (string.IsNullOrEmpty(oldStreamname)) return; if (!alwaysIntercept && StringUtil.EqualsIgnoreCase(oldStreamname, newStreamname)) return; if (_streams == null) _streams = new HybridDictionary(true); _streams[oldStreamname] = new StreamUpdate(newStreamname); } // Get the new stream name for a stream if a new name exists, otherwise // return the original stream name. internal string GetNewStreamname(string oldStreamname) { StreamUpdate streamUpdate = GetStreamUpdate(oldStreamname, false); return streamUpdate != null ? streamUpdate.NewStreamname : oldStreamname; } // Get the StreamUpdate for a stream. // If alwaysIntercept is true, then the StreamUpdate is // always returned if it exists. // If alwaysIntercept is false, then only return the StreamUpdate // if the new stream has been successfully written to. private StreamUpdate GetStreamUpdate(string oldStreamname, bool alwaysIntercept) { if (_streams == null) return null; StreamUpdate streamUpdate = (StreamUpdate)_streams[oldStreamname]; if ((streamUpdate != null) && !alwaysIntercept && !streamUpdate.WriteCompleted) streamUpdate = null; return streamUpdate; } public override object GetStreamVersion(string streamName) { StreamUpdate streamUpdate = GetStreamUpdate(streamName, false); return streamUpdate != null ? InternalConfigHost.StaticGetStreamVersion(streamUpdate.NewStreamname) : Host.GetStreamVersion(streamName); } public override Stream OpenStreamForRead(string streamName) { StreamUpdate streamUpdate = GetStreamUpdate(streamName, false); return streamUpdate != null ? InternalConfigHost.StaticOpenStreamForRead(streamUpdate.NewStreamname) : Host.OpenStreamForRead(streamName); } public override Stream OpenStreamForWrite(string streamName, string templateStreamName, ref object writeContext) { // Always attempt to write to the new stream name if it exists. StreamUpdate streamUpdate = GetStreamUpdate(streamName, true); if (streamUpdate != null) { return InternalConfigHost.StaticOpenStreamForWrite( streamUpdate.NewStreamname, templateStreamName, ref writeContext); } return Host.OpenStreamForWrite(streamName, templateStreamName, ref writeContext); } public override void WriteCompleted(string streamName, bool success, object writeContext) { StreamUpdate streamUpdate = GetStreamUpdate(streamName, true); if (streamUpdate != null) { InternalConfigHost.StaticWriteCompleted(streamUpdate.NewStreamname, success, writeContext); // Mark the write as having successfully completed, so that subsequent calls // to Read() will use the new stream name. if (success) streamUpdate.WriteCompleted = true; } else { Host.WriteCompleted(streamName, success, writeContext); } } public override bool IsConfigRecordRequired(string configPath) { return true; } public override void DeleteStream(string streamName) { StreamUpdate streamUpdate = GetStreamUpdate(streamName, false); if (streamUpdate != null) InternalConfigHost.StaticDeleteStream(streamUpdate.NewStreamname); else Host.DeleteStream(streamName); } public override bool IsFile(string streamName) { StreamUpdate streamUpdate = GetStreamUpdate(streamName, false); return streamUpdate != null ? InternalConfigHost.StaticIsFile(streamUpdate.NewStreamname) : Host.IsFile(streamName); } } }
41.918519
120
0.643753
[ "MIT" ]
06needhamt/runtime
src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/UpdateConfigHost.cs
5,659
C#
namespace _02.Blobs.Interfaces { public interface IReader { string ReadLine(); } }
13
31
0.605769
[ "MIT" ]
nikolaydechev/CSharp-OOP-Advanced
07 SOLID/Ex.2 Blobs/Interfaces/IReader.cs
106
C#
using System; using System.IO; using System.Linq; using System.Runtime.Serialization.Formatters.Binary; using FluentNHibernate.Automapping.Alterations; using NHibernate.Util; namespace FluentNHibernate.Utils { public static class Extensions { public static bool In<T>(this T instance, params T[] expected) { if(ReferenceEquals(instance, null)) return false; return expected.Any(x => instance.Equals(x)); } public static string ToLowerInvariantString(this object value) { return value.ToString().ToLowerInvariant(); } public static bool Closes(this Type type, Type openGenericType) { return type.IsGenericType && type.GetGenericTypeDefinition() == openGenericType; } public static bool ClosesInterface(this Type type, Type openGenericInterface) { return type.GetInterfaces().Any(x => x.IsGenericType && x.GetGenericTypeDefinition() == openGenericInterface); } public static bool IsEnum(this Type type) { if (type.IsNullable()) return type.GetGenericArguments()[0].IsEnum; return type.IsEnum; } public static bool IsNullable(this Type type) { return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); } public static T InstantiateUsingParameterlessConstructor<T>(this Type type) { return (T)type.InstantiateUsingParameterlessConstructor(); } public static object InstantiateUsingParameterlessConstructor(this Type type) { var constructor = ReflectHelper.GetDefaultConstructor(type); if (constructor == null) throw new MissingConstructorException(type); return constructor.Invoke(null); } public static bool HasInterface(this Type type, Type interfaceType) { return type.GetInterfaces().Contains(interfaceType); } public static T DeepClone<T>(this T obj) { using (var stream = new MemoryStream()) { var formatter = new BinaryFormatter(); formatter.Serialize(stream, obj); stream.Position = 0; return (T)formatter.Deserialize(stream); } } public static bool IsAutoMappingOverrideType(this Type type) { return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(IAutoMappingOverride<>) && type.GetGenericArguments().Length > 0; } } }
32.682353
149
0.590353
[ "BSD-3-Clause" ]
BrunoJuchli/fluent-nhibernate
src/FluentNHibernate/Utils/Extensions.cs
2,778
C#
#region using using Convert = System.Convert; using Network; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Text; using Oxide.Core.Libraries.Covalence; using Oxide.Plugins; using Oxide.Core.Plugins; using Oxide.Core; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.AI; using Rust.Ai; using Oxide.Ext.RustEdit; #endregion namespace Oxide.Plugins{ [Info("Hotzone", "obsol", "0.0.1")] [Description("Makes all scientist brains move towards a specified point on the map")] public class Hotzone : CovalencePlugin{ #region Generic Vars private Game.Rust.Libraries.Player _rustPlayer = Interface.Oxide.GetLibrary<Game.Rust.Libraries.Player>("Player"); private void SendChatMsg(BasePlayer pl, string msg) => _rustPlayer.Message(pl, msg, "<color=#00ff00>[Hotzone]</color>", 0, Array.Empty<object>()); bool debugOnBoot=false;// List<Oxide.Ext.RustEdit.NPC.NPCSpawner> Spawners; #endregion #region Configuration private Configuration config; private void Init(){ permission.RegisterPermission("hotzone.set", this); Spawners = new List<Oxide.Ext.RustEdit.NPC.NPCSpawner>(Resources.FindObjectsOfTypeAll<Oxide.Ext.RustEdit.NPC.NPCSpawner>()); } class Configuration{ [JsonProperty("target", ObjectCreationHandling = ObjectCreationHandling.Replace)] public Vector3 target = new Vector3(0,0,0); [JsonProperty("factionLib", ObjectCreationHandling = ObjectCreationHandling.Replace)] public Dictionary<ulong, Dictionary<FactionController.FactionType,float>> factionLib=new Dictionary<ulong, Dictionary<FactionController.FactionType,float>>(); [JsonProperty("pointGroups", ObjectCreationHandling = ObjectCreationHandling.Replace)] public Dictionary<string,List<Vector3>> pointGroups = new Dictionary<string,List<Vector3>>(); public string ToJson() => JsonConvert.SerializeObject(this); public Dictionary<string, object> ToDictionary() => JsonConvert.DeserializeObject<Dictionary<string, object>>(ToJson()); } protected override void LoadDefaultConfig() => config = new Configuration(); protected override void LoadConfig(){ base.LoadConfig(); try{ config = Config.ReadObject<Configuration>(); if (config == null) throw new JsonException(); if (!config.ToDictionary().Keys.SequenceEqual(Config.ToDictionary(x => x.Key, x => x.Value).Keys)){ LogWarning("Configuration appears to be outdated; updating and saving");SaveConfig();} } catch{LogWarning($"Configuration file {Name}.json is invalid; using defaults");LoadDefaultConfig();} target=config.target; FactionController.factionScores = config.factionLib; } protected override void SaveConfig(){ LogWarning($"Configuration changes saved to {Name}.json"); config.target=target; config.factionLib=FactionController.factionScores; Config.WriteObject(config, true); } #endregion Configuration #region Faction logic #region Utility public static Vector3 target; public BaseEntity getLookingAt(BasePlayer player){ RaycastHit hit; if (Physics.Raycast(player.eyes.HeadRay(), out hit)){ var entity = hit.GetEntity(); if (entity != null){if(entity.GetComponent<BaseEntity>()!=null) return entity.GetComponent<BaseEntity>();} } return null; } #endregion #region Chat commands [Command("hz_set")] private void surv_hotzone(IPlayer player, string command, string[] args){ BasePlayer bp = (BasePlayer)player.Object; if(player.HasPermission("hotzone.set")){ target=bp.transform.position; SendChatMsg(bp,"Target set!" + target.ToString()); SaveConfig(); } else SendChatMsg(bp,"Missing permission!"); } [Command("hz_get")] private void surv_info(IPlayer player, string command, string[] args){ BasePlayer bp = (BasePlayer)player.Object; FactionController fc = bp.GetComponent<FactionController>(); SendChatMsg(bp,"Current Position:" + bp.transform.position.ToString()); SendChatMsg(bp,"Current Target:" + target.ToString()); SendChatMsg(bp,"Current Distance:" + Vector3.Distance(target,bp.transform.position).ToString()); if(fc==null) return; SendChatMsg(bp,"Current Faction:"+bp.GetComponent<FactionController>().faction.ToString()); foreach(KeyValuePair<FactionController.FactionType,float> ff in FactionController.factionScores[bp.userID]){ SendChatMsg(bp,ff.Key.ToString() + ":" + ff.Value.ToString()); } } [Command("hz_save")] private void surv_save(IPlayer player, string command, string[] args){ BasePlayer bp = (BasePlayer)player.Object; SaveConfig(); SendChatMsg(bp,"Saving!"); } [Command("hz_reset")] private void surv_reset(IPlayer player, string command, string[] args){ foreach(HumanNPC hn in GameObject.FindObjectsOfType<HumanNPC>()){ if(hn.GetComponent<FactionController>()!=null){ GameObject.Destroy(hn.GetComponent<FactionController>()); } swapSciRoamState(hn); } } [Command("hz_create")] private void surv_create(IPlayer player, string command, string[] args){ BasePlayer bp = (BasePlayer)player.Object; if(args[0]==null){ SendChatMsg(bp,"Create what? [store]"); return; } switch(args[0]){ case "path": if(args[1]==null){ SendChatMsg(bp,"Create what path?"); return; } if(!config.pointGroups.ContainsKey(args[1]))config.pointGroups.Add(args[1],new List<Vector3>()); config.pointGroups[args[1]].Add(bp.transform.position); break; case "point": if(args[1]==null){ SendChatMsg(bp,"Create point for what group?"); return; } if(!config.pointGroups.ContainsKey(args[1]))config.pointGroups.Add(args[1],new List<Vector3>()); config.pointGroups[args[1]].Add(bp.transform.position); break; } } [Command("hz_assign")] private void surv_assign(IPlayer player, string command, string[] args){ BasePlayer bp = (BasePlayer)player.Object; if(args[0]==null){ SendChatMsg(bp,"Assign what? [store]"); return; } switch(args[0]){ case "store": if(args[1]==null){ SendChatMsg(bp,"Assign store to what faction?"); return; } BaseEntity storeent = getLookingAt(bp); VendingMachine store = storeent.GetComponent<VendingMachine>(); if(store==null){ SendChatMsg(bp,"Not a vending machine"); return; } string basicName = store.shopName.Replace("[Bandit]","").Replace("[Scientist]","").Replace("[Pacifist]",""); switch(args[1].ToLower()){ case "bandit": store.shopName = "[Bandit]"+basicName; break; case "scientist": store.shopName = "[Scientist]"+basicName; break; case "pacifist": store.shopName = "[Pacifist]"+basicName; break; default: SendChatMsg(bp,"Please enter a valid faction [bandit/scientist/pacifist]."); return; } store.UpdateMapMarker(); return; case "npc": if(args[1]==null){ SendChatMsg(bp,"Assign npc to what path?"); return; } BaseEntity ent = getLookingAt(bp); if(ent.GetComponent<FactionController>()==null){ SendChatMsg(bp,"Not a faction npc"); return; } if(!config.pointGroups.ContainsKey(args[1])){config.pointGroups.Add(args[1],new List<Vector3>());} ent.GetComponent<FactionController>().ActivePointGroup = config.pointGroups[args[1]]; return; case "path": if(args[1]==null){ SendChatMsg(bp,"Assign path to what?"); return; } if(args[2]==null){ SendChatMsg(bp,"Assign what path?"); return; } switch(args[1].ToLower()){ case "point": if(!config.pointGroups.ContainsKey(args[2])) config.pointGroups.Add(args[2],new List<Vector3>()); config.pointGroups[args[2]].Add(bp.transform.position); return; case "npc": BaseEntity ent2 = getLookingAt(bp); if(ent2.GetComponent<FactionController>()==null){ SendChatMsg(bp,"Not a faction npc"); return; } if(!config.pointGroups.ContainsKey(args[2]))config.pointGroups.Add(args[2],new List<Vector3>()); ent2.GetComponent<FactionController>().ActivePointGroup = config.pointGroups[args[2]]; return; default: SendChatMsg(bp,"Invalid parameter. Valid path arguments: NPC/Point"); return; } return; case "point": if(args[1]==null){ SendChatMsg(bp,"Assign "+bp.transform.position.ToString()+" to what group?"); return; } if(!config.pointGroups.ContainsKey(args[1]))config.pointGroups.Add(args[1],new List<Vector3>()); config.pointGroups[args[1]].Add(bp.transform.position); return; } return; } public void addPointToGroup(){} #endregion chatcmds //Oxide.Ext.RustEdit.NPC.NPCSpawner #region Faction Initializers void OnPlayerRespawned(BasePlayer player)=>initPlayer(player); void OnPlayerSleepEnded(BasePlayer player)=>initPlayer(player); void OnPlayerDisconnected(BasePlayer player, string reason)=>SaveConfig(); object OnNPCAIInitialized(BaseAIBrain<HumanNPC> player){swapSciRoamState(player.GetComponent<HumanNPC>()); return null;} object OnPlayerDeath(BasePlayer player, HitInfo info){SaveConfig(); return null;} private void swapSciRoamState(HumanNPC s){ if(s.IsNpc)Puts(((char)27)+"[96m"+"IsNpc! Did you fix NPCPlayer with dnSpy?"); //Puts(s.spawnPos.ToString()); if(s.Brain==null) return; ((IAISleepable)s.Brain).SleepAI(); s.Brain.Senses.senseTypes = (EntityType)67; s.Brain.Senses.senseFriendlies = true; s.Brain.Senses.hostileTargetsOnly = false; FactionController fc = s.gameObject.AddComponent<FactionController>(); fc.faction=FactionController.FactionType.Bandit; fc.self=s; if(s.transform.name.ToLower().Contains("scientist")) fc.faction=FactionController.FactionType.Scientist; s.Brain.states[AIState.Idle]=s.Brain.states[AIState.Roam]; s.Brain.SwitchToState(AIState.Roam, s.Brain.currentStateContainerID); ((IAISleepable)s.Brain).WakeAI(); BaseNavigator bn = s.gameObject.GetComponent<BaseNavigator>(); if(bn!=null){ bn.Resume(); } s.Brain.SwitchToState(AIState.Idle, s.Brain.currentStateContainerID); } void initPlayer(BasePlayer player){ FactionController fc = player.gameObject.AddComponent<FactionController>(); FactionController.changeScore(player, FactionController.FactionType.Both, 0.5f); FactionController.changeScore(player, FactionController.FactionType.Scientist, 0f); FactionController.changeScore(player, FactionController.FactionType.Bandit, 0f); SaveConfig(); } #endregion initializers #region Faction NPC Handlers object OnAttackedAIEvent(AttackedAIEvent aievent, BasePlayer bp){ //Puts("OnAttackedAIEvent"); if(bp==null)return null; FactionController shooter = bp.gameObject.GetComponent<FactionController>(); FactionController victim = aievent.combatEntity.gameObject.GetComponent<FactionController>(); //Puts("OnAttackedAIEvent2"); if(shooter==null || victim==null) return null; //Puts(shooter.faction.ToString() + " : " + victim.faction.ToString()); if(shooter.self==null) return null; //Puts("Shooter is NPC"); BaseNavigator bn = aievent.combatEntity.gameObject.GetComponent<BaseNavigator>(); if(bn!=null){ bn.Stop(); bn.SetDestination(bn.transform.position); } if(FactionController.validTarget(victim.GetComponent<BasePlayer>(),bp)) return null; aievent.combatEntity.lastAttacker=null; //Puts("Same Team"); return victim; } object OnBasePlayerAttacked(BasePlayer victimbp, HitInfo info){ //Puts("OnBasePlayerAttacked"); if(victimbp==null)return null; FactionController victim = victimbp.gameObject.GetComponent<FactionController>(); FactionController shooter = info.Initiator.gameObject.GetComponent<FactionController>(); //Puts("OnBasePlayerAttacked"); if(shooter==null || victim==null) return null; //Puts(shooter.faction.ToString() + " : " + victim.faction.ToString()); BaseNavigator bn = victimbp.GetComponent<BaseNavigator>(); if(bn!=null){ bn.Stop(); } if(shooter.self==null) return null; //Puts("Shooter is NPC"); if(FactionController.validTarget(shooter.GetComponent<BasePlayer>(),victimbp)) return null; //Puts("Same Team"); return victim; } object OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info){ if(info.HitEntity==null||info.Initiator==null) return null; if(info.HitEntity.gameObject==null||info.Initiator.gameObject==null) return null; FactionController shooter = info.Initiator.GetComponent<FactionController>(); FactionController victim = info.HitEntity.gameObject.GetComponent<FactionController>(); if(shooter!=null&&victim!=null){// if(shooter.self==null){ BasePlayer bp = shooter.GetComponent<BasePlayer>(); FactionController.changeScore(bp, victim.faction, -0.01f); FactionController.changeScore(bp, FactionController.FactionType.Both, -0.1f); if(victim.faction==FactionController.FactionType.Scientist) FactionController.changeScore(bp, FactionController.FactionType.Bandit, +0.005f); if(victim.faction==FactionController.FactionType.Bandit) FactionController.changeScore(bp, FactionController.FactionType.Scientist, +0.005f); } if(shooter.faction==victim.faction){ if(shooter.self==null){ //Puts("Same team player, halving!"); info.damageTypes.ScaleAll(0.5f); return new object(); } else{ //Puts("Same team NPCs, ignoring!"); return new object(); } } } return null; } bool? OnIsThreat(HumanNPC hn, BaseEntity be){ BasePlayer bp = be.GetComponent<BasePlayer>(); if(bp == null){return false;} return (FactionController.validTarget((BasePlayer)hn,bp)); } bool? OnIsTarget(HumanNPC hn, BaseEntity be){ BasePlayer bp = be.GetComponent<BasePlayer>(); if(bp == null){return false;} return (FactionController.validTarget((BasePlayer)hn,bp)); } bool? OnIsFriendly(HumanNPC hn, BaseEntity be){/* if(hn.Brain.Senses.owner.transform.name==be.transform.name) return true;*/ BasePlayer bp = be.GetComponent<BasePlayer>(); if(bp == null){return true;} return !(FactionController.validTarget((BasePlayer)hn,bp)); } bool? OnCaresAbout(AIBrainSenses hn, BaseEntity be){ //* if( ((be.GetComponent<BasePlayer>()==null)) && ((be.GetComponent<BaseNpc>()==null)) ) return false; if(be.GetComponent<BasePlayer>()!=null && hn.owner.GetComponent<BaseNpc>()!=null){ if (be.GetComponent<BasePlayer>().IsConnected) return true; //else return false; } //*/ return FactionController.validTarget(hn.owner, be); } /* Assign points by faction Walk towards closest point if in range of point, next point. If stuck, next list Follow point chain indefinitely if all lists exhausted, fall into random roam */ #endregion #region vending machine handlers object OnShopCompleteTrade(ShopFront entity){Puts("OnShopCompleteTrade works!"); return null;} object OnBuyVendingItem(VendingMachine machine, BasePlayer player, int sellOrderId, int numberOfTransactions){ FactionController fc = player.GetComponent<FactionController>(); if(fc==null)return fc; if(machine.shopName.Contains("Scientist")) FactionController.changeScore(player, FactionController.FactionType.Scientist, 0.001f*numberOfTransactions); else if(machine.shopName.Contains("Bandit")) FactionController.changeScore(player, FactionController.FactionType.Bandit, 0.001f*numberOfTransactions); else if(machine.shopName.Contains("Pacifist")) FactionController.changeScore(player, FactionController.FactionType.Both, 0.001f*numberOfTransactions); return null; } #endregion #region NPC destination handlers Vector3? OnGetRoamAnchorPosition(BaseAIBrain<HumanNPC> bn){ BaseAIBrain<HumanNPC>.BasicAIState cs = bn.CurrentState; if(cs!=null){ if(target!= new Vector3(0,0,0)){ if(Vector3.Distance(target,bn.transform.position)<70f){ //Puts("Destination set " +pos.ToString()+":"+ target.ToString()); return bn.transform.position; } return target; } } return null; } Vector3? OnSetDestination(Vector3 pos, BaseNavigator bs){ if(bs!=null){ BaseAIBrain<HumanNPC> brain = bs.GetComponent<BaseAIBrain<HumanNPC>>(); if(brain!=null){ BaseAIBrain<HumanNPC>.BasicAIState cs = brain.CurrentState; if(cs!=null){ if(!cs.ToString().ToLower().Contains("combat") && !cs.ToString().ToLower().Contains("attack") && !cs.ToString().ToLower().Contains("flee") && !cs.ToString().ToLower().Contains("chase") ) { if(target!= new Vector3(0,0,0)){ Vector3 result; float dist = Vector3.Distance(target,brain.transform.position); if(dist>70) result=target;// else if(dist<70) result=brain.transform.position+brain.transform.forward + new Vector3(UnityEngine.Random.Range(-0.1f,0.1f),0,UnityEngine.Random.Range(-0.1f,0.1f)); else if(dist<30 ) result=brain.transform.forward+((target+brain.transform.position)/2); else result=(brain.transform.forward*5) + repulsePoint(brain.transform.position,target)+ new Vector3(UnityEngine.Random.Range(-0.1f,0.1f),0,UnityEngine.Random.Range(-0.1f,0.1f)); brain.transform.LookAt(result); return result; } }else if (cs.ToString().ToLower().Contains("cover")){ Vector3 result; result=brain.transform.position+new Vector3(UnityEngine.Random.Range(-5f,5f),0,UnityEngine.Random.Range(-5f,5f)); brain.transform.LookAt(result); return result; } } } } return null; } #endregion #endregion private Vector3 repulsePoint(Vector3 t1, Vector3 t2){ float factor=750f;//This is a guess, viva desmos float Distance = Vector3.Distance(t1,t2); return t1-((t2-t1)/(Distance/factor)); } public class FactionController : MonoBehaviour{ public enum FactionType{ None, Scientist, Bandit, Both } public FactionType faction; public static Dictionary<ulong, Dictionary<FactionType,float>> factionScores = new Dictionary<ulong, Dictionary<FactionType,float>>();// public List<Vector3> ActivePointGroup = new List<Vector3>(); public int PointIndex; public HumanNPC self; public static bool changeScore(BasePlayer bp, FactionType ft, float score){ try{ if(bp==null)return false; if(ft==null)return false; FactionController fc = bp.GetComponent<FactionController>(); if(fc==null)fc=bp.gameObject.AddComponent<FactionController>(); ulong id= bp.userID; if(factionScores==null) return false; Dictionary<FactionType,float> selfFactions; factionScores.TryGetValue(id,out selfFactions); if(selfFactions==null) factionScores.Add(id, new Dictionary<FactionType,float>()); float oldScore;// if(!(selfFactions.TryGetValue(ft,out oldScore))){ oldScore=0.0f; selfFactions.Add(ft,oldScore); } oldScore+=score; factionScores[id][ft]=oldScore; if(factionScores[id][ft]>1)factionScores[id][ft]=1; if(factionScores[id][ft]<-1)factionScores[id][ft]=-1; float maxScore =-2f; List<FactionType> activeFactions = new List<FactionType>(); foreach(KeyValuePair<FactionType,float> f in factionScores[id]){ if(f.Value>0 && f.Key!=FactionType.None){ maxScore=f.Value; activeFactions.Add(f.Key); } } switch(activeFactions.Count()){ case 0 : fc.faction=FactionType.None; break; case 1 : fc.faction=activeFactions[0]; break; default : fc.faction=FactionType.Both; break; } return true; }catch(Exception e){return false;} } public static bool validTarget(BaseEntity self, BaseEntity target){ FactionController selfFC = self.GetComponent<FactionController>(); FactionController targetFC = target.GetComponent<FactionController>(); if(selfFC!=null&&targetFC!=null){ bool result = (!(targetFC.faction==FactionType.Both) && ( targetFC.faction==FactionType.None || selfFC.faction != targetFC.faction)); return result; }else{} return false; } } } } //*/
40.354651
191
0.680161
[ "Unlicense" ]
read-0nly/Rust-coop-survival
Oxide/plugins/Hotzone.cs
20,823
C#
// Decompiled with JetBrains decompiler // Type: Diga.WebView2.Interop.COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON // Assembly: Diga.WebView2.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null // MVID: 1E8B0323-528E-4C9C-8FF8-A486637C87E1 // Assembly location: O:\webview2\V1096133\Diga.WebView2.Interop.dll namespace Diga.WebView2.Interop { public enum COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON { COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NONE, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_MALICIOUS, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED_BY_POLICY, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CERTIFICATE_PROBLEM, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNEXPECTED_RESPONSE, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED, COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_DOWNLOAD_PROCESS_CRASHED, } }
53.465116
89
0.885602
[ "MIT" ]
ITAgnesmeyer/Diga.WebView2
V1096133/Diga.WebView2.Interop.V1096133/COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON.cs
2,301
C#
namespace LogicMonitor.Api.Test; public class CacheTests : TestWithOutput { public CacheTests(ITestOutputHelper iTestOutputHelper) : base(iTestOutputHelper) { } [Fact] public async void CacheTestFasterSecondTimeAround() { // Enable caching LogicMonitorClient.UseCache = true; var stopwatch = Stopwatch.StartNew(); var firstDevice = await GetWindowsDeviceAsync().ConfigureAwait(false); var firstDuration = stopwatch.Elapsed; Logger.LogInformation("Duration 1 {firstDuration}", firstDuration); stopwatch.Restart(); var secondDevice = await GetWindowsDeviceAsync().ConfigureAwait(false); var secondDuration = stopwatch.Elapsed; Logger.LogInformation("Duration 2 {secondDuration}", secondDuration); // The second time should be shorter Assert.True(secondDuration < firstDuration); // The second time should be really fast Assert.True(secondDuration < TimeSpan.FromMilliseconds(100)); // The devices should be identical Assert.Equal(firstDevice.DisplayName, secondDevice.DisplayName); } [Fact] public async void CacheRefetchesAfterTimeout() { // Enable caching LogicMonitorClient.UseCache = true; LogicMonitorClient.CacheTimeSpan = TimeSpan.FromSeconds(3); // Make a call to force authentication var _ = await LogicMonitorClient.GetTimeZoneSettingAsync().ConfigureAwait(false); // Fetch a result var stopwatch = Stopwatch.StartNew(); var firstDevice = await GetWindowsDeviceAsync().ConfigureAwait(false); Assert.NotNull(firstDevice); var firstDuration = stopwatch.Elapsed; Logger.LogInformation($"Duration 1 {firstDuration}"); // Wait for the cache timeout duration await Task.Delay(LogicMonitorClient.CacheTimeSpan).ConfigureAwait(false); // Re-fetch a result stopwatch.Restart(); var secondDevice = await GetWindowsDeviceAsync().ConfigureAwait(false); Assert.NotNull(secondDevice); var secondDuration = stopwatch.Elapsed; Logger.LogInformation($"Duration 2 {secondDuration}"); // The second time should NOT be really fast Assert.True(secondDuration > TimeSpan.FromMilliseconds(100)); // The devices should be identical Assert.Equal(firstDevice.DisplayName, secondDevice.DisplayName); } [Fact] public async void RateLimitCheckGetDeviceByDisplayNameAsync() { var stopwatch = Stopwatch.StartNew(); LogicMonitorClient.UseCache = true; for (var n = 0; n < 1000; n++) { var innerStopwatch = Stopwatch.StartNew(); var _ = await GetWindowsDeviceAsync().ConfigureAwait(false); Logger.LogInformation($"Run {n}: {innerStopwatch.ElapsedMilliseconds}ms"); } Logger.LogInformation($"Complete in {stopwatch.ElapsedMilliseconds}ms"); } }
30.825581
83
0.762731
[ "MIT" ]
panoramicdata/LogicMonitor.Api
LogicMonitor.Api.Test/CacheTests.cs
2,651
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: IEntityRequestBuilder.cs.tt namespace Microsoft.Graph { using System; using System.Collections.Generic; using System.IO; /// <summary> /// The interface IAospDeviceOwnerPkcsCertificateProfileRequestBuilder. /// </summary> public partial interface IAospDeviceOwnerPkcsCertificateProfileRequestBuilder : IAospDeviceOwnerCertificateProfileBaseRequestBuilder { /// <summary> /// Builds the request. /// </summary> /// <returns>The built request.</returns> new IAospDeviceOwnerPkcsCertificateProfileRequest Request(); /// <summary> /// Builds the request. /// </summary> /// <param name="options">The query and header options for the request.</param> /// <returns>The built request.</returns> new IAospDeviceOwnerPkcsCertificateProfileRequest Request(IEnumerable<Option> options); /// <summary> /// Gets the request builder for ManagedDeviceCertificateStates. /// </summary> /// <returns>The <see cref="IAospDeviceOwnerPkcsCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder"/>.</returns> IAospDeviceOwnerPkcsCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder ManagedDeviceCertificateStates { get; } } }
41.97619
153
0.642087
[ "MIT" ]
ScriptBox99/msgraph-beta-sdk-dotnet
src/Microsoft.Graph/Generated/requests/IAospDeviceOwnerPkcsCertificateProfileRequestBuilder.cs
1,763
C#
namespace internet_shop.Helpers { public class AppSettings { public string Secret { get; set; } } }
15.125
42
0.619835
[ "MIT" ]
OlehMarchenko95/internet_shop
internet_shop/Helpers/AppSettings.cs
123
C#
namespace MobileShop.Models.Phones { using MobileShop.Domain.Phones.ServiceModels; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; public class AllPhonesQueryModel { public const int PhonesPerPage = 6; public int CurrentPage { get; init; } = 1; public int TotalPhones { get; set; } public string Brand { get; init; } public string Category { get; init; } [Display(Name = "Search")] public string SearchTerm { get; init; } public IEnumerable<string> Brands { get; set; } public IEnumerable<string> Categories { get; set; } public IEnumerable<PhoneServiceModel> Phones { get; set; } } }
25.172414
66
0.642466
[ "MIT" ]
Vkirovpz/ASP.NET-Project-MobileShop
MobileShop/Models/Phones/AllPhonesQueryModel.cs
732
C#
using Ramulator.MemReq; using System.Collections.Generic; using System.Diagnostics; using Ramulator.Sim; namespace Ramulator.Proc { public class CacheHierarchy { public Cache[] L1List; public Cache[] L2List; public CacheHierarchy(int numCores) { L1List = new Cache[numCores]; L2List = new Cache[numCores]; uint blockSize = (uint)Config.proc.block_size; Cache l2c = null; for (int i = 0; i < numCores; i++) { // Empty L1 cache if we only modeling one shared LLC! if (Config.proc.llc_shared_cache_only) { L1List[i] = new Cache(); Dbg.AssertPrint(Config.proc.shared_l2, "Shared LLC option enabled! So shared_l2 knob needs to be true!"); } else { L1List[i] = new Cache(Config.proc.l1_cache_size, Config.proc.l1_cache_assoc, blockSize, Config.proc.l1_cache_hit_latency, i); } // One slice of private l2 for each core if (!Config.proc.shared_l2) { L2List[i] = new Cache(Config.proc.l2_cache_size, Config.proc.l2_cache_assoc, blockSize, Config.proc.l2_cache_hit_latency, i, true); } else { if (l2c == null) l2c = new Cache(Config.proc.l2_cache_size, Config.proc.l2_cache_assoc, blockSize, Config.proc.l2_cache_hit_latency, -1, true); L2List[i] = l2c; } } } } public class Cache { public uint SetMax; //total number of sets public ulong Hit; //number of cache hits public ulong Miss; //number of cache misses // Cache configs public uint Assoc, Size, BlockSize, HitLatency; // MetaData public ulong[,] cache; //tag for individual blocks [set_index, associativity] public bool[,] Dirty; //dirty bit for individual blocks [set_index, associativity] public int[,] CoreId; // LRU chain based on assoc idx - the head is the MRU and the tail is LRU public LinkedList<int>[] LruChainList; // This queue is used to model latency public LinkedList<Req>[] HitQueuePerCore; // Processor ID: -1 means it's shared among all cores public int CachePid; public bool IsL2C; public bool IsVoid; // This cache is empty and does not really exist /** * Constructor */ public Cache(uint cacheSize, uint cacheAssoc, uint cacheBlockSize, uint hitLatency, int pid = -1, bool isL2C = false) { Hit = Miss = 0; IsVoid = false; // Configs Dbg.Assert(cacheSize > 0); Size = cacheSize; Dbg.Assert(cacheAssoc > 0); Assoc = cacheAssoc; Dbg.Assert(cacheBlockSize > 0); BlockSize = cacheBlockSize; CachePid = pid; if (pid == -1) Dbg.Assert(Config.proc.shared_l2); HitLatency = hitLatency; IsL2C = isL2C; //size of a set in bytes uint setSize = BlockSize * Assoc; //total number of sets Debug.Assert((cacheSize % setSize) == 0); SetMax = Size / setSize; // components cache = new ulong[SetMax, Assoc]; Dirty = new bool[SetMax, Assoc]; CoreId = new int[SetMax, Assoc]; LruChainList = new LinkedList<int>[SetMax]; // initialize tags for (int i = 0; i < SetMax; i++) { for (int j = 0; j < Assoc; j++) { cache[i, j] = Proc.NULL_ADDRESS; CoreId[i, j] = -1; } LruChainList[i] = new LinkedList<int>(); } // Hit queue // Shared cache -- one hit queue for each core // Private cache -- one hit queue only int numCores = (pid == -1) ? Config.N : 1; HitQueuePerCore = new LinkedList<Req>[numCores]; for (int i = 0; i < numCores; i++) HitQueuePerCore[i] = new LinkedList<Req>(); } // Create an empty cache hierarchy! Used for one level of shared LLC. public Cache() { IsVoid = true; HitQueuePerCore = new LinkedList<Req>[1]; HitQueuePerCore[0] = new LinkedList<Req>(); } public LinkedList<Req> get_hit_queue(int pid) { if (IsVoid) return HitQueuePerCore[0]; return CachePid == -1 ? HitQueuePerCore[pid] : HitQueuePerCore[0]; } public void UpdateLRU(int set, int assoc) { if (IsVoid) return; Dbg.Assert(LruChainList[set].Count <= Assoc); Dbg.Assert(LruChainList[set].Remove(assoc)); LruChainList[set].AddFirst(assoc); } /** * Searches for a block within the cache. * Also updates the state of the cache for a dirty block hit. * If found and the access is a write type, sets the dirty bit. * * @param block_addr block address * @param inst_type instruction type * @return if found, true; otherwise, false */ public virtual bool is_cache_hit(ulong block_addr, ReqType inst_type) { if (IsVoid) return false; //calculate set index int setIndex = (int)(block_addr % SetMax); //search for block for (int i = 0; i < Assoc; i++) { if (cache[setIndex, i] == block_addr) { Hit++; UpdateLRU(setIndex, i); if (inst_type == ReqType.WRITE) { Dirty[setIndex, i] = true; } CacheStats(inst_type, true, block_addr); return true; } } // Couldn't find block_addr; miss Miss++; CacheStats(inst_type, false, block_addr); return false; } public virtual void CacheStats(ReqType req_type, bool hit, ulong block_addr = 0) { if (IsVoid) return; int l2Idx = (CachePid == -1) ? 0 : CachePid; // Cache miss if (!hit) { // L1 if (!IsL2C) { Stat.procs[CachePid].l1c_read_hit_rate.collect(0); Stat.procs[CachePid].l1c_write_hit_rate.collect(0); Stat.procs[CachePid].l1c_total_hit_rate.collect(0); if (req_type == ReqType.WRITE) Stat.procs[CachePid].l1c_write_misses.collect(); else if (req_type == ReqType.READ) Stat.procs[CachePid].l1c_read_misses.collect(); } else { Stat.caches[l2Idx].l2c_read_hit_rate.collect(0); Stat.caches[l2Idx].l2c_write_hit_rate.collect(0); Stat.caches[l2Idx].l2c_total_hit_rate.collect(0); if (req_type == ReqType.WRITE) Stat.caches[l2Idx].l2c_write_misses.collect(); else if (req_type == ReqType.READ) Stat.caches[l2Idx].l2c_read_misses.collect(); } return; } // Cache hits if (req_type == ReqType.WRITE) { // L1 if (!IsL2C) { Stat.procs[CachePid].l1c_write_hits.collect(); Stat.procs[CachePid].l1c_write_hit_rate.collect(1); Stat.procs[CachePid].l1c_total_hit_rate.collect(1); } // L2 else { Stat.caches[l2Idx].l2c_write_hits.collect(); Stat.caches[l2Idx].l2c_write_hit_rate.collect(1); Stat.caches[l2Idx].l2c_total_hit_rate.collect(1); } } else { // Stats if (!IsL2C) { Stat.procs[CachePid].l1c_read_hits.collect(); Stat.procs[CachePid].l1c_read_hit_rate.collect(1); Stat.procs[CachePid].l1c_total_hit_rate.collect(1); } else { Stat.caches[l2Idx].l2c_read_hits.collect(); Stat.caches[l2Idx].l2c_read_hit_rate.collect(1); Stat.caches[l2Idx].l2c_total_hit_rate.collect(1); } } } // Simply check if the cacheline is still in the cache without changing the state of the cache public bool in_cache(ulong blockAddr) { if (IsVoid) return false; //calculate set index uint setIndex = (uint)(blockAddr % SetMax); //search for block for (int i = 0; i < Assoc; i++) if (cache[setIndex, i] == blockAddr) return true; return false; } public bool cache_remove(ulong blockAddr, ReqType instType) { if (IsVoid) return false; //calculate set index uint setIndex = (uint)(blockAddr % SetMax); //search for block for (int i = 0; i < Assoc; i++) { if (cache[setIndex, i] == blockAddr) { cache[setIndex, i] = Proc.NULL_ADDRESS; Dbg.Assert(LruChainList[setIndex].Remove(i)); return true; } } //couldn't find block_addr; miss Miss++; return false; } /** * Add block to the cache. * Either an empty or the LRU block is populated. * @param block_addr block address * @param inst_type instruction type * @return if LRU block is populated, its tag; if empty block is populated, 0 */ public virtual ulong cache_add(ulong block_addr, ReqType inst_type, int pid) { if (IsVoid) return Proc.NULL_ADDRESS; //calculate set index int setIndex = (int)(block_addr % SetMax); //empty entry within a set int emptyEntryIndex = -1; //lru entry within a set int lruEntryIndex = -1; //search for empty or lru entry for (int i = 0; i < Assoc; i++) { //make sure not already in cache Dbg.Assert(cache[setIndex, i] != block_addr); if (cache[setIndex, i] == Proc.NULL_ADDRESS) { emptyEntryIndex = i; break; } } // Replace LRU if (emptyEntryIndex == -1) { lruEntryIndex = LruChainList[setIndex].Last.Value; UpdateLRU(setIndex, lruEntryIndex); } else LruChainList[setIndex].AddFirst(emptyEntryIndex); ulong return_addr = Proc.NULL_ADDRESS; int replaceAssocIdx = (emptyEntryIndex != -1) ? emptyEntryIndex : lruEntryIndex; // Check if the replacement is non-empty and dirty if ((replaceAssocIdx == lruEntryIndex) && Dirty[setIndex, lruEntryIndex]) { return_addr = cache[setIndex, lruEntryIndex]; if (!IsL2C) Stat.procs[CachePid].l1c_dirty_eviction.collect(); else Stat.caches[CachePid == -1 ? 0 : CachePid].l2c_dirty_eviction.collect(); } // Add the new block cache[setIndex, replaceAssocIdx] = block_addr; Dirty[setIndex, replaceAssocIdx] = (inst_type == ReqType.WRITE); CoreId[setIndex, replaceAssocIdx] = pid; // for partitioning return return_addr; } }//class }//namespace
35.069519
126
0.469045
[ "BSD-3-Clause" ]
CMU-SAFARI/RamulatorSharp
src/Proc/Cache.cs
13,116
C#
using System; using System.Configuration; using System.Linq; using System.Net.Configuration; using System.Web; using System.Web.Configuration; using System.Web.Hosting; using System.Xml.Linq; using Umbraco.Core.IO; namespace Umbraco.Core.Configuration { // TODO: Replace checking for if the app settings exist and returning an empty string, instead return the defaults! // TODO: need to massively cleanup these configuration classes /// <summary> /// The GlobalSettings Class contains general settings information for the entire Umbraco instance based on information from web.config appsettings /// </summary> public class GlobalSettings : IGlobalSettings { private string _localTempPath; // TODO these should not be static private static string _reservedPaths; private static string _reservedUrls; //ensure the built on (non-changeable) reserved paths are there at all times internal const string StaticReservedPaths = "~/app_plugins/,~/install/,~/mini-profiler-resources/,"; //must end with a comma! internal const string StaticReservedUrls = "~/config/splashes/noNodes.aspx,~/.well-known,"; //must end with a comma! /// <summary> /// Used in unit testing to reset all config items that were set with property setters (i.e. did not come from config) /// </summary> private static void ResetInternal() { GlobalSettingsExtensions.Reset(); _reservedPaths = null; _reservedUrls = null; HasSmtpServer = null; } /// <summary> /// Resets settings that were set programmatically, to their initial values. /// </summary> /// <remarks>To be used in unit tests.</remarks> internal static void Reset() { ResetInternal(); } public static bool HasSmtpServerConfigured(string appPath) { if (HasSmtpServer.HasValue) return HasSmtpServer.Value; var config = WebConfigurationManager.OpenWebConfiguration(appPath); var settings = (MailSettingsSectionGroup)config.GetSectionGroup("system.net/mailSettings"); // note: "noreply@example.com" is/was the sample SMTP from email - we'll regard that as "not configured" if (settings == null || settings.Smtp == null || "noreply@example.com".Equals(settings.Smtp.From, StringComparison.OrdinalIgnoreCase)) return false; if (settings.Smtp.SpecifiedPickupDirectory != null && string.IsNullOrEmpty(settings.Smtp.SpecifiedPickupDirectory.PickupDirectoryLocation) == false) return true; if (settings.Smtp.Network != null && string.IsNullOrEmpty(settings.Smtp.Network.Host) == false) return true; return false; } /// <summary> /// For testing only /// </summary> internal static bool? HasSmtpServer { get; set; } /// <summary> /// Gets the reserved urls from web.config. /// </summary> /// <value>The reserved urls.</value> public string ReservedUrls { get { if (_reservedUrls != null) return _reservedUrls; var urls = ConfigurationManager.AppSettings.ContainsKey(Constants.AppSettings.ReservedUrls) ? ConfigurationManager.AppSettings[Constants.AppSettings.ReservedUrls] : string.Empty; //ensure the built on (non-changeable) reserved paths are there at all times _reservedUrls = StaticReservedUrls + urls; return _reservedUrls; } internal set => _reservedUrls = value; } /// <summary> /// Gets the reserved paths from web.config /// </summary> /// <value>The reserved paths.</value> public string ReservedPaths { get { if (_reservedPaths != null) return _reservedPaths; var reservedPaths = StaticReservedPaths; var umbPath = ConfigurationManager.AppSettings.ContainsKey(Constants.AppSettings.Path) && !ConfigurationManager.AppSettings[Constants.AppSettings.Path].IsNullOrWhiteSpace() ? ConfigurationManager.AppSettings[Constants.AppSettings.Path] : "~/umbraco"; //always add the umbraco path to the list reservedPaths += umbPath.EnsureEndsWith(','); var allPaths = ConfigurationManager.AppSettings.ContainsKey(Constants.AppSettings.ReservedPaths) ? ConfigurationManager.AppSettings[Constants.AppSettings.ReservedPaths] : string.Empty; _reservedPaths = reservedPaths + allPaths; return _reservedPaths; } } /// <summary> /// Gets the name of the content XML file. /// </summary> /// <value>The content XML.</value> /// <remarks> /// Defaults to ~/App_Data/umbraco.config /// </remarks> public string ContentXmlFile { get { return ConfigurationManager.AppSettings.ContainsKey(Constants.AppSettings.ContentXML) ? ConfigurationManager.AppSettings[Constants.AppSettings.ContentXML] : "~/App_Data/umbraco.config"; } } /// <summary> /// Gets the path to umbraco's root directory (/umbraco by default). /// </summary> /// <value>The path.</value> public string Path { get { return ConfigurationManager.AppSettings.ContainsKey(Constants.AppSettings.Path) ? IOHelper.ResolveUrl(ConfigurationManager.AppSettings[Constants.AppSettings.Path]) : string.Empty; } } /// <summary> /// Gets or sets the configuration status. This will return the version number of the currently installed umbraco instance. /// </summary> /// <value>The configuration status.</value> public string ConfigurationStatus { get { return ConfigurationManager.AppSettings.ContainsKey(Constants.AppSettings.ConfigurationStatus) ? ConfigurationManager.AppSettings[Constants.AppSettings.ConfigurationStatus] : string.Empty; } set { SaveSetting(Constants.AppSettings.ConfigurationStatus, value); } } /// <summary> /// Saves a setting into the configuration file. /// </summary> /// <param name="key">Key of the setting to be saved.</param> /// <param name="value">Value of the setting to be saved.</param> internal static void SaveSetting(string key, string value) { var fileName = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root)); var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace); var appSettings = xml.Root.DescendantsAndSelf("appSettings").Single(); // Update appSetting if it exists, or else create a new appSetting for the given key and value var setting = appSettings.Descendants("add").FirstOrDefault(s => s.Attribute("key").Value == key); if (setting == null) appSettings.Add(new XElement("add", new XAttribute("key", key), new XAttribute("value", value))); else setting.Attribute("value").Value = value; xml.Save(fileName, SaveOptions.DisableFormatting); ConfigurationManager.RefreshSection("appSettings"); } /// <summary> /// Removes a setting from the configuration file. /// </summary> /// <param name="key">Key of the setting to be removed.</param> internal static void RemoveSetting(string key) { var fileName = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root)); var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace); var appSettings = xml.Root.DescendantsAndSelf("appSettings").Single(); var setting = appSettings.Descendants("add").FirstOrDefault(s => s.Attribute("key").Value == key); if (setting != null) { setting.Remove(); xml.Save(fileName, SaveOptions.DisableFormatting); ConfigurationManager.RefreshSection("appSettings"); } } /// <summary> /// Gets a value indicating whether umbraco is running in [debug mode]. /// </summary> /// <value><c>true</c> if [debug mode]; otherwise, <c>false</c>.</value> public static bool DebugMode { get { try { if (HttpContext.Current != null) { return HttpContext.Current.IsDebuggingEnabled; } //go and get it from config directly var section = ConfigurationManager.GetSection("system.web/compilation") as CompilationSection; return section != null && section.Debug; } catch { return false; } } } /// <summary> /// Gets the time out in minutes. /// </summary> /// <value>The time out in minutes.</value> public int TimeOutInMinutes { get { try { return int.Parse(ConfigurationManager.AppSettings[Constants.AppSettings.TimeOutInMinutes]); } catch { return 20; } } } /// <summary> /// Returns the number of days that should take place between version checks. /// </summary> /// <value>The version check period in days (0 = never).</value> public int VersionCheckPeriod { get { try { return int.Parse(ConfigurationManager.AppSettings[Constants.AppSettings.VersionCheckPeriod]); } catch { return 7; } } } /// <inheritdoc /> public LocalTempStorage LocalTempStorageLocation { get { var setting = ConfigurationManager.AppSettings[Constants.AppSettings.LocalTempStorage]; if (!string.IsNullOrWhiteSpace(setting)) return Enum<LocalTempStorage>.Parse(setting); return LocalTempStorage.Default; } } /// <inheritdoc /> public string LocalTempPath { get { if (_localTempPath != null) return _localTempPath; switch (LocalTempStorageLocation) { case LocalTempStorage.AspNetTemp: return _localTempPath = System.IO.Path.Combine(HttpRuntime.CodegenDir, "UmbracoData"); case LocalTempStorage.EnvironmentTemp: // environment temp is unique, we need a folder per site // use a hash // combine site name and application id // site name is a Guid on Cloud // application id is eg /LM/W3SVC/123456/ROOT // the combination is unique on one server // and, if a site moves from worker A to B and then back to A... // hopefully it gets a new Guid or new application id? var siteName = HostingEnvironment.SiteName; var applicationId = HostingEnvironment.ApplicationID; // ie HttpRuntime.AppDomainAppId var hashString = siteName + "::" + applicationId; var hash = hashString.GenerateHash(); var siteTemp = System.IO.Path.Combine(Environment.ExpandEnvironmentVariables("%temp%"), "UmbracoData", hash); return _localTempPath = siteTemp; //case LocalTempStorage.Default: //case LocalTempStorage.Unknown: default: return _localTempPath = IOHelper.MapPath("~/App_Data/TEMP"); } } } /// <summary> /// Gets the default UI language. /// </summary> /// <value>The default UI language.</value> // ReSharper disable once InconsistentNaming public string DefaultUILanguage { get { return ConfigurationManager.AppSettings.ContainsKey(Constants.AppSettings.DefaultUILanguage) ? ConfigurationManager.AppSettings[Constants.AppSettings.DefaultUILanguage] : string.Empty; } } /// <summary> /// Gets a value indicating whether umbraco should hide top level nodes from generated urls. /// </summary> /// <value> /// <c>true</c> if umbraco hides top level nodes from urls; otherwise, <c>false</c>. /// </value> public bool HideTopLevelNodeFromPath { get { try { return bool.Parse(ConfigurationManager.AppSettings[Constants.AppSettings.HideTopLevelNodeFromPath]); } catch { return false; } } } /// <summary> /// Gets a value indicating whether umbraco should force a secure (https) connection to the backoffice. /// </summary> public bool UseHttps { get { try { return bool.Parse(ConfigurationManager.AppSettings[Constants.AppSettings.UseHttps]); } catch { return false; } } } } }
38.02611
188
0.548956
[ "MIT" ]
0Neji/Umbraco-CMS
src/Umbraco.Core/Configuration/GlobalSettings.cs
14,566
C#
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Query.Sql; namespace Microsoft.EntityFrameworkCore.Query.Internal { /// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> public interface IShaperCommandContextFactory { /// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> ShaperCommandContext Create([NotNull] Func<IQuerySqlGenerator> sqlGeneratorFunc); } }
41.130435
111
0.711416
[ "Apache-2.0" ]
Alecu100/EntityFrameworkCore
src/EFCore.Relational/Query/Internal/IShaperCommandContextFactory.cs
946
C#
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp) // Distributed under the MIT license. See the LICENSE.md file in the project root for more information. using System; namespace Stride.Core.Assets.Analysis { /// <summary> /// Possible options used when searching asset inheritance. /// </summary> [Flags] public enum AssetInheritanceSearchOptions { /// <summary> /// Search for inheritances from base (direct object inheritance). /// </summary> Base = 1, /// <summary> /// Search for inheritances from compositions. /// </summary> Composition = 2, /// <summary> /// Search for all types of inheritances. /// </summary> All = Base | Composition, } }
29.7
163
0.619529
[ "MIT" ]
Alan-love/xenko
sources/assets/Stride.Core.Assets/Analysis/AssetInheritanceSearchOptions.cs
891
C#
using Microsoft.AspNetCore.Components; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.JSInterop; using Microsoft.AspNetCore.Components.Web; namespace Blazui.Component { public partial class BInput<TValue> : IDisposable { internal HtmlPropertyBuilder wrapperClsBuilder; /// <summary> /// 输入框类型 /// </summary> [Parameter] public InputType Type { get; set; } = InputType.Text; /// <summary> /// 当输入值错误时是否抛出异常 /// </summary> protected virtual bool ThrowOnInvalidValue { get; } = false; /// <summary> /// 在前方加入元素 /// </summary> [Parameter] public RenderFragment Prepend { get; set; } /// <summary> /// 是否启用清空按钮 /// </summary> [Parameter] public bool IsClearButtonClick { get; set; } [Parameter] public EventCallback<bool> EnableClearButtonChanged { get; set; } /// <summary> /// 按钮背景图片 /// </summary> [Parameter] public string Image { get; set; } /// <summary> /// 输入框尺寸 /// </summary> [Parameter] public InputSize Size { get; set; } = InputSize.Normal; [Parameter] public bool EnableClearButton { get; set; } /// <summary> /// 如何格式化 /// </summary> [Parameter] public virtual Func<TValue, string> Formatter { get; set; } = v => Convert.ToString(v); /// <summary> /// 输入框的值 /// </summary> [Parameter] public TValue Value { get; set; } /// <summary> /// 值改变时触发 /// </summary> [Parameter] public EventCallback<TValue> ValueChanged { get; set; } /// <summary> /// Placeholder /// </summary> [Parameter] public virtual string Placeholder { get; set; } = "请输入内容"; /// <summary> /// 是否禁用输入框 /// </summary> [Parameter] public bool IsDisabled { get; set; } = false; /// <summary> /// 是否可清空 /// </summary> [Parameter] public bool IsClearable { get; set; } = false; internal bool IsFocus { get; set; } internal bool IsMouseOver { get; set; } [Parameter] public virtual string PrefixIcon { get; set; } [Parameter] public virtual EventCallback<MouseEventArgs> OnSuffixIconClick { get; set; } [Parameter] public virtual EventCallback<MouseEventArgs> OnPrefixIconClick { get; set; } [Parameter] public virtual EventCallback<MouseEventArgs> OnInputClick { get; set; } [Parameter] public virtual EventCallback<MouseEventArgs> OnClick { get; set; } [Parameter] public virtual string SuffixIcon { get; set; } [Parameter] public virtual string AdditionalClearIcon { get; set; } internal ElementReference Content { get; set; } /// <summary> /// HTML 元素引用 /// </summary> public ElementReference InputElement { get; set; } protected void ClearOnClick() { EnableClearButton = true; if (EnableClearButtonChanged.HasDelegate) { _ = EnableClearButtonChanged.InvokeAsync(EnableClearButton); } Value = default; Console.WriteLine($"ClearOnClick 设置输入框 {Name} 值:" + Value); if (ValueChanged.HasDelegate) { _ = ValueChanged.InvokeAsync(Value); } SetFieldValue(Value, true); } protected virtual Task OnFocusAsync() { if (Value == null) { Value = default; } Console.WriteLine($"OnFocusAsync 设置输入框 {Name} 值:" + Value); IsFocus = true; return Task.CompletedTask; } protected virtual void OnChangeEventArgs(ChangeEventArgs input) { try { Value = (TValue)TypeHelper.ChangeType(input.Value, typeof(TValue)); } catch (FormatException e) { if (ThrowOnInvalidValue) { throw e; } Value = default; } if (ValueChanged.HasDelegate) { _ = ValueChanged.InvokeAsync(Value); } SetFieldValue(Value, true); } protected override async Task OnAfterRenderAsync(bool firstRender) { await base.OnAfterRenderAsync(firstRender); if (IsDisabled) { await InputElement.Dom(JSRuntime).SetDisabledAsync(IsDisabled); } } protected override void FormItem_OnReset(object value, bool requireRender) { if (value == null) { Value = default; } else { Value = (TValue)TypeHelper.ChangeType(value, typeof(TValue)); } Console.WriteLine($"FormItem_OnReset 设置输入框 {Name} 值:" + Value); if (ValueChanged.HasDelegate) { _ = ValueChanged.InvokeAsync(Value); } else { StateHasChanged(); } } protected override void OnParametersSet() { base.OnParametersSet(); wrapperClsBuilder = HtmlPropertyBuilder.CreateCssClassBuilder() .Add("el-input", Cls, $"el-input--{Size.ToString().ToLower()}") .AddIf(IsClearable || !string.IsNullOrWhiteSpace(SuffixIcon), "el-input--suffix") .AddIf(!string.IsNullOrWhiteSpace(PrefixIcon), "el-input--prefix") .AddIf(IsDisabled, "is-disabled") .AddIf(Prepend != null, "el-input-group", "el-input-group--append", "el-input-group--prepend"); if (FormItem == null) { return; } if (FormItem.OriginValueHasRendered) { SetFieldValue(Value ?? FormItem.Value, false); Value = Value ?? FormItem.OriginValue; return; } FormItem.OriginValueHasRendered = true; if (FormItem.Form.Values.Any()) { Value = FormItem.OriginValue; } Console.WriteLine($"OnParametersSet 设置输入框 {Name} 值:" + Value); SetFieldValue(Value, false); } protected override bool ShouldRender() { return true; } } }
29.395652
111
0.516787
[ "MIT" ]
BlazorUI/Element-Blazor
src/Components/BInput.razor.cs
6,973
C#
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace SportsStore.WebUI { public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute(null, "", new { controller = "Product", action = "List", category = (string)null, page = 1 } ); routes.MapRoute(null, "Page{page}", new { controller = "Product", action = "List", category = (string)null }, new { page = @"\d+" } ); routes.MapRoute(null, "{category}", new { controller = "Product", action = "List", page = 1 } ); routes.MapRoute(null, "{category}/Page{page}", new { controller = "Product", action = "List" }, new { page = @"\d+" } ); routes.MapRoute(null, "{controller}/{action}"); } } }
27.125
89
0.430876
[ "Apache-2.0" ]
NJWolf/SportsStore
SportsStore.WebUI/App_Start/RouteConfig.cs
1,304
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 elasticache-2015-02-02.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.ElastiCache.Model { /// <summary> /// Represents a single cache security group and its status. /// </summary> public partial class SecurityGroupMembership { private string _securityGroupId; private string _status; /// <summary> /// Gets and sets the property SecurityGroupId. /// <para> /// The identifier of the cache security group. /// </para> /// </summary> public string SecurityGroupId { get { return this._securityGroupId; } set { this._securityGroupId = value; } } // Check to see if SecurityGroupId property is set internal bool IsSetSecurityGroupId() { return this._securityGroupId != null; } /// <summary> /// Gets and sets the property Status. /// <para> /// The status of the cache security group membership. The status changes whenever a cache /// security group is modified, or when the cache security groups assigned to a cluster /// are modified. /// </para> /// </summary> public string Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } } }
29.948718
109
0.62714
[ "Apache-2.0" ]
DetlefGolze/aws-sdk-net
sdk/src/Services/ElastiCache/Generated/Model/SecurityGroupMembership.cs
2,336
C#
using System; using Forum.App.Services; using Forum.App.UserInterface; namespace Forum.App.Controllers { using App; using Contracts; using UserInterface.Contracts; public class SignUpController : IController, IReadUserInfoController { private enum Command { ReadUsername, ReadPassword, SignUp, Back } public enum SignUpStatus { Success, DetailsError, UsernameTakenError } private const string DETAILS_ERROR = "Invalid Username or Password!"; private const string USERNAME_TAKEN_ERROR = "Username already in use!"; public string Username { get; set; } public string Password { get; set; } private string ErrorMessage { get; set; } public MenuState ExecuteCommand(int index) { switch ((Command)index) { case Command.ReadUsername: this.ReadUsername(); return MenuState.Signup; case Command.ReadPassword: this.ReadPassword(); return MenuState.Signup; case Command.SignUp: SignUpStatus signUp = UserService.TrySignUpUser(this.Username, this.Password); switch (signUp) { case SignUpStatus.Success: return MenuState.SuccessfulLogIn; case SignUpStatus.DetailsError: this.ErrorMessage = DETAILS_ERROR; return MenuState.Error; case SignUpStatus.UsernameTakenError: this.ErrorMessage = USERNAME_TAKEN_ERROR; return MenuState.Error; } return MenuState.Error; case Command.Back: this.ResetSignUp(); return MenuState.Back; } throw new InvalidOperationException(); } public IView GetView(string userName) { return new SignUpView(this.ErrorMessage); } public void ReadPassword() { this.Password = ForumViewEngine.ReadRow(); ForumViewEngine.HideCursor(); } public void ReadUsername() { this.Username = ForumViewEngine.ReadRow(); ForumViewEngine.HideCursor(); } private void ResetSignUp() { this.Username = string.Empty; this.Password = string.Empty; this.ErrorMessage = string.Empty; } } }
29.483871
98
0.51787
[ "MIT" ]
DimchoLakov/CSharpOOPBasics
Forum App/Forum.App/Controllers/SignUpController.cs
2,744
C#
using NBitcoin; namespace Stratis.Bitcoin.Features.SmartContracts.Consensus { public class SmartContractBlockHeader : BlockHeader { /// <summary> /// Root of the state trie after execution of this block. /// </summary> private uint256 hashStateRoot; public uint256 HashStateRoot { get { return this.hashStateRoot; } set { this.hashStateRoot = value; } } public SmartContractBlockHeader() : base() { this.hashStateRoot = 0; } /// <summary> /// <see cref="ReadWrite(BitcoinStream)"/> overridden so that we can write the <see cref="hashStateRoot"/>. /// </summary> public override void ReadWrite(BitcoinStream stream) { base.ReadWrite(stream); stream.ReadWrite(ref this.hashStateRoot); } } }
31.592593
115
0.607268
[ "MIT" ]
kogot/StratisBitcoinFullNode
src/Stratis.Bitcoin.Features.SmartContracts/Consensus/SmartContractBlockHeader.cs
855
C#
using System; using Newtonsoft.Json; namespace XCCDFParser { public class TextBooleanConverter : JsonConverter { public override bool CanWrite => false; public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { throw new NotImplementedException(); } public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { var value = reader.Value; if (String.IsNullOrWhiteSpace(value?.ToString())) { return false; } if (value.Equals("true")) { return true; } return false; } public override bool CanConvert(Type objectType) { if (objectType == typeof(String) || objectType == typeof(Boolean)) { return true; } return false; } } }
24.731707
124
0.544379
[ "MIT" ]
surgicalcoder/XCCDFParser
XCCDFParser/TextBooleanConverter.cs
1,014
C#
using System; using System.Collections.Generic; using System.Linq; using Xamarin.Forms; using Xamarin.Forms.Xaml; namespace Prism.Xaml { public abstract class ParentPageAwareExtension<T> : BindableObject, IMarkupExtension<T> { private IServiceProvider ServiceProvider; private Element _targetElement; protected Element TargetElement { get { if (_targetElement == null) { Initialize(); } return _targetElement; } set => _targetElement = value; } private Page _sourcePage; public Page SourcePage { protected internal get { if (_sourcePage == null) { Initialize(); } return _sourcePage; } set => _sourcePage = value; } public T ProvideValue(IServiceProvider serviceProvider) { ServiceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); return ProvideValue(); } protected abstract T ProvideValue(); object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider) => ProvideValue(serviceProvider); private void Initialize() { var valueTargetProvider = ServiceProvider.GetService<IProvideValueTarget>(); if (valueTargetProvider == null) throw new ArgumentException("The ServiceProvider did not provide a 'IProvideValueTarget'"); _targetElement = valueTargetProvider.TargetObject as Element; if (_targetElement is null) throw new ArgumentNullException(nameof(TargetElement)); var parentPage = (Page)GetBindableStack().FirstOrDefault(p => p.GetType() .IsSubclassOf(typeof(Page))); if (_sourcePage is null && parentPage != null) { SourcePage = parentPage; if (parentPage.Parent is MasterDetailPage mdp && mdp.Master == parentPage) { SourcePage = mdp; } } if(BindingContext == null) { BindingContext = SourcePage.BindingContext; } } protected virtual void OnTargetElementChanged() { } private IEnumerable<Element> GetBindableStack() { var stack = new List<Element>(); if (TargetElement is Element element) { stack.Add(element); while (element.Parent != null) { element = element.Parent; stack.Add(element); } } return stack; } } }
28.065421
107
0.513487
[ "Apache-2.0" ]
Amroll/Prism
Source/Xamarin/Prism.Forms/Xaml/ParentPageAwareExtension.cs
3,005
C#
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // 有关程序集的常规信息通过以下 // 特性集控制。更改这些特性值可修改 // 与程序集关联的信息。 [assembly: AssemblyTitle("com.lover.astd.common")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("com.lover.astd.common")] [assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // 将 ComVisible 设置为 false 使此程序集中的类型 // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, // 则将该类型上的 ComVisible 特性设置为 true。 [assembly: ComVisible(false)] // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID [assembly: Guid("295ebcb6-be19-4616-ae3d-c82ce323e70a")] // 程序集的版本信息由下面四个值组成: // // 主版本 // 次版本 // 内部版本号 // 修订号 // // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, // 方法是按如下所示使用“*”: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
26.243243
56
0.715757
[ "MIT" ]
jewmin/astd
com.lover.astd.common/Properties/AssemblyInfo.cs
1,338
C#
//Write a method that asks the user for his name and prints “Hello, <name>” //Write a program to test this method. namespace SayHello { using System; public class SayHello { static void Main(string[] args) { Console.WriteLine("Enter your name: "); string name = Console.ReadLine(); Console.WriteLine(ReturnGreeting(name)); } public static string ReturnGreeting(string name) { return String.Format("Hello, {0}!", name); } } }
24.545455
76
0.57963
[ "MIT" ]
VProfirov/Telerik-Academy
Module 1/[02] CSharp Advanced/[performance improvement versions] C# Advanced/C# Advanced v0.1/Methods/SayHello/SayHello.cs
546
C#
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using System; using System.Collections.Generic; namespace ForumSystem.Data.Migrations { public partial class Initial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Categories", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), Name = table.Column<string>(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Categories", x => x.Id); }); migrationBuilder.CreateTable( name: "Users", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), Password = table.Column<string>(nullable: false), Username = table.Column<string>(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Users", x => x.Id); table.UniqueConstraint("AK_Users_Username", x => x.Username); }); migrationBuilder.CreateTable( name: "Posts", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), AuthorId = table.Column<int>(nullable: false), CategoryId = table.Column<int>(nullable: false), Content = table.Column<string>(nullable: false), Title = table.Column<string>(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Posts", x => x.Id); table.ForeignKey( name: "FK_Posts_Users_AuthorId", column: x => x.AuthorId, principalTable: "Users", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Posts_Categories_CategoryId", column: x => x.CategoryId, principalTable: "Categories", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "Replies", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), AuthorId = table.Column<int>(nullable: false), Content = table.Column<string>(nullable: false), PostId = table.Column<int>(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Replies", x => x.Id); table.ForeignKey( name: "FK_Replies_Users_AuthorId", column: x => x.AuthorId, principalTable: "Users", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_Replies_Posts_PostId", column: x => x.PostId, principalTable: "Posts", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_Posts_AuthorId", table: "Posts", column: "AuthorId"); migrationBuilder.CreateIndex( name: "IX_Posts_CategoryId", table: "Posts", column: "CategoryId"); migrationBuilder.CreateIndex( name: "IX_Replies_AuthorId", table: "Replies", column: "AuthorId"); migrationBuilder.CreateIndex( name: "IX_Replies_PostId", table: "Replies", column: "PostId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Replies"); migrationBuilder.DropTable( name: "Posts"); migrationBuilder.DropTable( name: "Users"); migrationBuilder.DropTable( name: "Categories"); } } }
39.568182
122
0.484204
[ "MIT" ]
msotiroff/Softuni-learning
C# Fundamentals Module/CSharp-OOP-Basics/Feb 2018 instance/WorkShop/Solution/ForumSystem/ForumSystem.Data/Migrations/20180307192457_Initial.cs
5,225
C#
//------------------------------------------------------------------------------ // <自動產生的> // 這段程式碼是由工具產生的。 // // 變更這個檔案可能會導致不正確的行為,而且如果已重新產生 // 程式碼,則會遺失變更。 // </自動產生的> //------------------------------------------------------------------------------ namespace HelpDesk.Components { public partial class ListViewMeetingsComponent { /// <summary> /// DataPager1 控制項。 /// </summary> /// <remarks> /// 自動產生的欄位。 /// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。 /// </remarks> protected global::System.Web.UI.WebControls.DataPager DataPager1; /// <summary> /// ListViewMain 控制項。 /// </summary> /// <remarks> /// 自動產生的欄位。 /// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。 /// </remarks> protected global::System.Web.UI.WebControls.ListView ListViewMain; } }
26.382353
81
0.434783
[ "MIT" ]
gamegeartw/HelpDesk
HelpDesk/Components/ListViewMeetingsComponent.ascx.designer.cs
1,181
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 databrew-2017-07-25.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.GlueDataBrew.Model { /// <summary> /// This is the response object from the DescribeJob operation. /// </summary> public partial class DescribeJobResponse : AmazonWebServiceResponse { private DateTime? _createDate; private string _createdBy; private List<DatabaseOutput> _databaseOutputs = new List<DatabaseOutput>(); private List<DataCatalogOutput> _dataCatalogOutputs = new List<DataCatalogOutput>(); private string _datasetName; private string _encryptionKeyArn; private EncryptionMode _encryptionMode; private JobSample _jobSample; private string _lastModifiedBy; private DateTime? _lastModifiedDate; private LogSubscription _logSubscription; private int? _maxCapacity; private int? _maxRetries; private string _name; private List<Output> _outputs = new List<Output>(); private ProfileConfiguration _profileConfiguration; private string _projectName; private RecipeReference _recipeReference; private string _resourceArn; private string _roleArn; private Dictionary<string, string> _tags = new Dictionary<string, string>(); private int? _timeout; private JobType _type; private List<ValidationConfiguration> _validationConfigurations = new List<ValidationConfiguration>(); /// <summary> /// Gets and sets the property CreateDate. /// <para> /// The date and time that the job was created. /// </para> /// </summary> public DateTime CreateDate { get { return this._createDate.GetValueOrDefault(); } set { this._createDate = value; } } // Check to see if CreateDate property is set internal bool IsSetCreateDate() { return this._createDate.HasValue; } /// <summary> /// Gets and sets the property CreatedBy. /// <para> /// The identifier (user name) of the user associated with the creation of the job. /// </para> /// </summary> public string CreatedBy { get { return this._createdBy; } set { this._createdBy = value; } } // Check to see if CreatedBy property is set internal bool IsSetCreatedBy() { return this._createdBy != null; } /// <summary> /// Gets and sets the property DatabaseOutputs. /// <para> /// Represents a list of JDBC database output objects which defines the output destination /// for a DataBrew recipe job to write into. /// </para> /// </summary> [AWSProperty(Min=1)] public List<DatabaseOutput> DatabaseOutputs { get { return this._databaseOutputs; } set { this._databaseOutputs = value; } } // Check to see if DatabaseOutputs property is set internal bool IsSetDatabaseOutputs() { return this._databaseOutputs != null && this._databaseOutputs.Count > 0; } /// <summary> /// Gets and sets the property DataCatalogOutputs. /// <para> /// One or more artifacts that represent the Glue Data Catalog output from running the /// job. /// </para> /// </summary> [AWSProperty(Min=1)] public List<DataCatalogOutput> DataCatalogOutputs { get { return this._dataCatalogOutputs; } set { this._dataCatalogOutputs = value; } } // Check to see if DataCatalogOutputs property is set internal bool IsSetDataCatalogOutputs() { return this._dataCatalogOutputs != null && this._dataCatalogOutputs.Count > 0; } /// <summary> /// Gets and sets the property DatasetName. /// <para> /// The dataset that the job acts upon. /// </para> /// </summary> [AWSProperty(Min=1, Max=255)] public string DatasetName { get { return this._datasetName; } set { this._datasetName = value; } } // Check to see if DatasetName property is set internal bool IsSetDatasetName() { return this._datasetName != null; } /// <summary> /// Gets and sets the property EncryptionKeyArn. /// <para> /// The Amazon Resource Name (ARN) of an encryption key that is used to protect the job. /// </para> /// </summary> [AWSProperty(Min=20, Max=2048)] public string EncryptionKeyArn { get { return this._encryptionKeyArn; } set { this._encryptionKeyArn = value; } } // Check to see if EncryptionKeyArn property is set internal bool IsSetEncryptionKeyArn() { return this._encryptionKeyArn != null; } /// <summary> /// Gets and sets the property EncryptionMode. /// <para> /// The encryption mode for the job, which can be one of the following: /// </para> /// <ul> <li> /// <para> /// <code>SSE-KMS</code> - Server-side encryption with keys managed by KMS. /// </para> /// </li> <li> /// <para> /// <code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3. /// </para> /// </li> </ul> /// </summary> public EncryptionMode EncryptionMode { get { return this._encryptionMode; } set { this._encryptionMode = value; } } // Check to see if EncryptionMode property is set internal bool IsSetEncryptionMode() { return this._encryptionMode != null; } /// <summary> /// Gets and sets the property JobSample. /// <para> /// Sample configuration for profile jobs only. Determines the number of rows on which /// the profile job will be executed. /// </para> /// </summary> public JobSample JobSample { get { return this._jobSample; } set { this._jobSample = value; } } // Check to see if JobSample property is set internal bool IsSetJobSample() { return this._jobSample != null; } /// <summary> /// Gets and sets the property LastModifiedBy. /// <para> /// The identifier (user name) of the user who last modified the job. /// </para> /// </summary> public string LastModifiedBy { get { return this._lastModifiedBy; } set { this._lastModifiedBy = value; } } // Check to see if LastModifiedBy property is set internal bool IsSetLastModifiedBy() { return this._lastModifiedBy != null; } /// <summary> /// Gets and sets the property LastModifiedDate. /// <para> /// The date and time that the job was last modified. /// </para> /// </summary> public DateTime LastModifiedDate { get { return this._lastModifiedDate.GetValueOrDefault(); } set { this._lastModifiedDate = value; } } // Check to see if LastModifiedDate property is set internal bool IsSetLastModifiedDate() { return this._lastModifiedDate.HasValue; } /// <summary> /// Gets and sets the property LogSubscription. /// <para> /// Indicates whether Amazon CloudWatch logging is enabled for this job. /// </para> /// </summary> public LogSubscription LogSubscription { get { return this._logSubscription; } set { this._logSubscription = value; } } // Check to see if LogSubscription property is set internal bool IsSetLogSubscription() { return this._logSubscription != null; } /// <summary> /// Gets and sets the property MaxCapacity. /// <para> /// The maximum number of compute nodes that DataBrew can consume when the job processes /// data. /// </para> /// </summary> public int MaxCapacity { get { return this._maxCapacity.GetValueOrDefault(); } set { this._maxCapacity = value; } } // Check to see if MaxCapacity property is set internal bool IsSetMaxCapacity() { return this._maxCapacity.HasValue; } /// <summary> /// Gets and sets the property MaxRetries. /// <para> /// The maximum number of times to retry the job after a job run fails. /// </para> /// </summary> [AWSProperty(Min=0)] public int MaxRetries { get { return this._maxRetries.GetValueOrDefault(); } set { this._maxRetries = value; } } // Check to see if MaxRetries property is set internal bool IsSetMaxRetries() { return this._maxRetries.HasValue; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the job. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=240)] 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 Outputs. /// <para> /// One or more artifacts that represent the output from running the job. /// </para> /// </summary> [AWSProperty(Min=1)] public List<Output> Outputs { get { return this._outputs; } set { this._outputs = value; } } // Check to see if Outputs property is set internal bool IsSetOutputs() { return this._outputs != null && this._outputs.Count > 0; } /// <summary> /// Gets and sets the property ProfileConfiguration. /// <para> /// Configuration for profile jobs. Used to select columns, do evaluations, and override /// default parameters of evaluations. When configuration is null, the profile job will /// run with default settings. /// </para> /// </summary> public ProfileConfiguration ProfileConfiguration { get { return this._profileConfiguration; } set { this._profileConfiguration = value; } } // Check to see if ProfileConfiguration property is set internal bool IsSetProfileConfiguration() { return this._profileConfiguration != null; } /// <summary> /// Gets and sets the property ProjectName. /// <para> /// The DataBrew project associated with this job. /// </para> /// </summary> [AWSProperty(Min=1, Max=255)] public string ProjectName { get { return this._projectName; } set { this._projectName = value; } } // Check to see if ProjectName property is set internal bool IsSetProjectName() { return this._projectName != null; } /// <summary> /// Gets and sets the property RecipeReference. /// </summary> public RecipeReference RecipeReference { get { return this._recipeReference; } set { this._recipeReference = value; } } // Check to see if RecipeReference property is set internal bool IsSetRecipeReference() { return this._recipeReference != null; } /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The Amazon Resource Name (ARN) of the job. /// </para> /// </summary> [AWSProperty(Min=20, Max=2048)] public string ResourceArn { get { return this._resourceArn; } set { this._resourceArn = value; } } // Check to see if ResourceArn property is set internal bool IsSetResourceArn() { return this._resourceArn != null; } /// <summary> /// Gets and sets the property RoleArn. /// <para> /// The ARN of the Identity and Access Management (IAM) role to be assumed when DataBrew /// runs the job. /// </para> /// </summary> [AWSProperty(Min=20, Max=2048)] public string RoleArn { get { return this._roleArn; } set { this._roleArn = value; } } // Check to see if RoleArn property is set internal bool IsSetRoleArn() { return this._roleArn != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// Metadata tags associated with this job. /// </para> /// </summary> [AWSProperty(Min=1, Max=200)] public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// <summary> /// Gets and sets the property Timeout. /// <para> /// The job's timeout in minutes. A job that attempts to run longer than this timeout /// period ends with a status of <code>TIMEOUT</code>. /// </para> /// </summary> [AWSProperty(Min=0)] public int Timeout { get { return this._timeout.GetValueOrDefault(); } set { this._timeout = value; } } // Check to see if Timeout property is set internal bool IsSetTimeout() { return this._timeout.HasValue; } /// <summary> /// Gets and sets the property Type. /// <para> /// The job type, which must be one of the following: /// </para> /// <ul> <li> /// <para> /// <code>PROFILE</code> - The job analyzes the dataset to determine its size, data types, /// data distribution, and more. /// </para> /// </li> <li> /// <para> /// <code>RECIPE</code> - The job applies one or more transformations to a dataset. /// </para> /// </li> </ul> /// </summary> public JobType Type { get { return this._type; } set { this._type = value; } } // Check to see if Type property is set internal bool IsSetType() { return this._type != null; } /// <summary> /// Gets and sets the property ValidationConfigurations. /// <para> /// List of validation configurations that are applied to the profile job. /// </para> /// </summary> [AWSProperty(Min=1)] public List<ValidationConfiguration> ValidationConfigurations { get { return this._validationConfigurations; } set { this._validationConfigurations = value; } } // Check to see if ValidationConfigurations property is set internal bool IsSetValidationConfigurations() { return this._validationConfigurations != null && this._validationConfigurations.Count > 0; } } }
31.717514
110
0.551953
[ "Apache-2.0" ]
EbstaLimited/aws-sdk-net
sdk/src/Services/GlueDataBrew/Generated/Model/DescribeJobResponse.cs
16,842
C#
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Speed Info")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Speed Info")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("b3494cfa-984e-40de-822d-4bae763df983")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
37.513514
84
0.745677
[ "MIT" ]
Karnalow/SoftUni
Programming Basics with C#/02. Simple-Conditions/Speed Info/Properties/AssemblyInfo.cs
1,391
C#
// ------------------------------------------------------------------------------ // <auto-generated> // This code was generated by SpecFlow (http://www.specflow.org/). // SpecFlow Version:1.9.0.77 // SpecFlow Generator Version:1.9.0.0 // Runtime Version:4.0.30319.34003 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable namespace Meganium.SystemTests.Features.Postagens { using TechTalk.SpecFlow; [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Gerenciar Destaques")] public partial class GerenciarDestaquesFeature { private static TechTalk.SpecFlow.ITestRunner testRunner; #line 1 "GerenciarDestaques.feature" #line hidden [NUnit.Framework.TestFixtureSetUpAttribute()] public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("pt-BR"), "Gerenciar Destaques", "Como administrador do site\r\nGostaria de ajustar os objetos que serão destaque no " + "site\r\nDe modo que os usuários finais saibam o que há de mais importante no site", ProgrammingLanguage.CSharp, ((string[])(null))); testRunner.OnFeatureStart(featureInfo); } [NUnit.Framework.TestFixtureTearDownAttribute()] public virtual void FeatureTearDown() { testRunner.OnFeatureEnd(); testRunner = null; } [NUnit.Framework.SetUpAttribute()] public virtual void TestInitialize() { } [NUnit.Framework.TearDownAttribute()] public virtual void ScenarioTearDown() { testRunner.OnScenarioEnd(); } public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) { testRunner.OnScenarioStart(scenarioInfo); } public virtual void ScenarioCleanup() { testRunner.CollectScenarioErrors(); } [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Gerenciar destaques com sucesso")] public virtual void GerenciarDestaquesComSucesso() { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Gerenciar destaques com sucesso", ((string[])(null))); #line 7 this.ScenarioSetup(scenarioInfo); #line 8 testRunner.Given("que estou logado", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Dado "); #line 9 testRunner.And("que o existe um tipo de objeto com todos os comportamentos", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E "); #line hidden TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] { "Título", "Destaque"}); table1.AddRow(new string[] { "Receita de Muffin Azul", "Sim"}); #line 10 testRunner.And("as seguintes postagens existem", ((string)(null)), table1, "E "); #line 13 testRunner.When("entro na página \"/Admin/Featured/Manage\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Quando "); #line 14 testRunner.And("limpo a seleção da caixa de multiseleção", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E "); #line hidden TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] { "Título"}); table2.AddRow(new string[] { "Receita de Muffin Azul"}); #line 15 testRunner.And("seleciono os itens na caixa de multiseleção", ((string)(null)), table2, "E "); #line 18 testRunner.And("clico no botão \"Salvar\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E "); #line 19 testRunner.Then("estou na página \"/Admin/Featured\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Então "); #line 20 testRunner.And("deu uma mensagem de sucesso", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E "); #line hidden TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] { "Título"}); table3.AddRow(new string[] { "Receita de Muffin Azul"}); #line 21 testRunner.And("verifico que o seguinte item existe", ((string)(null)), table3, "E "); #line hidden this.ScenarioCleanup(); } } } #pragma warning restore #endregion
41.773109
247
0.61215
[ "MIT" ]
afonsof/meganium
Tests/SystemTests/Features/Postagens/GerenciarDestaques.feature.cs
4,989
C#
namespace Merchello.Core.Gateways.Taxation { /// <summary> /// The taxation application. /// </summary> public enum TaxationApplication { /// <summary> /// The invoice - US /// </summary> Invoice, /// <summary> /// The product - e.g. VAT /// </summary> Product } }
19.666667
43
0.485876
[ "MIT" ]
HiteshMah-Jan/Merchello
src/Merchello.Core/Gateways/Taxation/TaxationApplication.cs
356
C#
using MFiles.VAF.Configuration.Domain.Dashboards; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; namespace MFiles.VAF.Extensions.Dashboards { public class DashboardCustomContentEx : DashboardContentBase { public IDashboardContent InnerContent { get; set; } public DashboardCustomContentEx(IDashboardContent innerContent) { this.InnerContent = innerContent; } public DashboardCustomContentEx(string htmlContent) { this.InnerContent = new DashboardCustomContent(htmlContent); } protected override XmlDocumentFragment GenerateXmlDocumentFragment(XmlDocument xml) { if (null == this.InnerContent) return null; return this.InnerContent.Generate(xml); } } }
25.225806
85
0.785166
[ "MIT" ]
Link-IT-Developer/VAF.Extensions.Community
MFiles.VAF.Extensions/Dashboards/DashboardCustomContentEx.cs
784
C#
using System; using System.Collections.Generic; using System.Text; using Newtonsoft.Json; namespace PIL_Fantasy_Data_Integration.API.Fantasy_Data.CommonDefinitions.FootBallResponses { public class Team2 { [JsonProperty("id")] public int Id; [JsonProperty("name")] public string Name; [JsonProperty("logo")] public string Logo; } public partial class Goals { [JsonProperty("for")] public int For; [JsonProperty("against")] public int Against; } public class All { [JsonProperty("played")] public int Played; [JsonProperty("win")] public int Win; [JsonProperty("draw")] public int Draw; [JsonProperty("lose")] public int Lose; [JsonProperty("goals")] public Goals Goals; } public class Goals2 { [JsonProperty("for")] public int For; [JsonProperty("against")] public int Against; } public class Home { [JsonProperty("played")] public int Played; [JsonProperty("win")] public int Win; [JsonProperty("draw")] public int Draw; [JsonProperty("lose")] public int Lose; [JsonProperty("goals")] public Goals2 Goals; } public class Goals3 { [JsonProperty("for")] public int For; [JsonProperty("against")] public int Against; } public class Away { [JsonProperty("played")] public int Played; [JsonProperty("win")] public int Win; [JsonProperty("draw")] public int Draw; [JsonProperty("lose")] public int Lose; [JsonProperty("goals")] public Goals3 Goals; } public class FootBallTeamsRes { [JsonProperty("rank")] public int Rank; [JsonProperty("team")] public Team2 Team; [JsonProperty("points")] public int Points; [JsonProperty("goalsDiff")] public int GoalsDiff; [JsonProperty("group")] public string Group; [JsonProperty("form")] public string Form; [JsonProperty("status")] public string Status; [JsonProperty("description")] public string Description; [JsonProperty("all")] public All All; [JsonProperty("home")] public Home Home; [JsonProperty("away")] public Away Away; [JsonProperty("update")] public DateTime Update; } }
18.892086
91
0.547982
[ "MIT" ]
yousseff-alazer/PIL_Fantasy_Data
PIL_Fantasy_Data_Integration.API/Fantasy_Data.CommonDefinitions/FootBallResponses/FootBallTeamsRes.cs
2,628
C#
using System.Numerics; using System.Threading.Tasks; namespace EmptyBox.Devices.Sensors { public interface IMagnetometer : IDevice { public event MagnetometerValueChanged ValueChanged; Task<Vector3> GetValue(); } }
18.923077
59
0.715447
[ "MIT" ]
DjArt/EmptyBox.IO
EmptyBox/Devices/Sensors/IMagnetometer.cs
248
C#
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Numerics; namespace Irony.Interpreter { public partial class LanguageRuntime { public readonly OperatorImplementationTable OperatorImplementations = new OperatorImplementationTable(2000); public object ExecuteBinaryOperator(ExpressionType op, object arg1, object arg2, ref OperatorImplementation previousUsed) { // 1. Get arg types Type arg1Type, arg2Type; try { arg1Type = arg1.GetType(); arg2Type = arg2.GetType(); } catch (NullReferenceException) { // arg1 or arg2 is null - which means never assigned. CheckUnassigned(arg1); CheckUnassigned(arg2); throw; } // 2. If we had prev impl, check if current args types match it; first copy it into local variable // Note: BinaryExpression node might already have tried it directly, without any checks, and // apparently failed. At some point this attempt in BinaryExpressionNode can become disabled. // But we might still try it here, with proper checks var currentImpl = previousUsed; if (currentImpl != null && (arg1Type != currentImpl.Key.Arg1Type || arg2Type != currentImpl.Key.Arg2Type)) currentImpl = null; // 3. Find implementation for arg types OperatorDispatchKey key; if (currentImpl == null) { key = new OperatorDispatchKey(op, arg1Type, arg2Type); if (!OperatorImplementations.TryGetValue(key, out currentImpl)) ThrowScriptError(Resources.ErrOpNotDefinedForTypes, op, arg1Type, arg2Type); } // 4. Actually call try { previousUsed = currentImpl; return currentImpl.EvaluateBinary(arg1, arg2); } catch (OverflowException) { if (currentImpl.OverflowHandler == null) throw; previousUsed = currentImpl.OverflowHandler; //set previousUsed to overflowHandler, so it will be used next time return ExecuteBinaryOperator(op, arg1, arg2, ref previousUsed); //call self recursively } catch (IndexOutOfRangeException) { //We can get here only if we use SmartBoxing - the result is out of range of pre-allocated boxes, // so attempt to lookup a boxed value in _boxes dictionary fails with outOfRange exc if (currentImpl.NoBoxImplementation == null) throw; // If NoBoxImpl is not null, then it is implementation with auto-boxing. // Auto-boxing failed - the result is outside the range of our boxes array. Let's call no-box version. // we also set previousUsed to no-box implementation, so we use it in the future calls previousUsed = currentImpl.NoBoxImplementation; return ExecuteBinaryOperator(op, arg1, arg2, ref previousUsed); //call self recursively } }//method public object ExecuteUnaryOperator(ExpressionType op, object arg1, ref OperatorImplementation previousUsed) { // 1. Get arg type Type arg1Type; try { arg1Type = arg1.GetType(); } catch (NullReferenceException) { CheckUnassigned(arg1); throw; } // 2. If we had prev impl, check if current args types match it; first copy it into local variable OperatorDispatchKey key; var currentImpl = previousUsed; if (currentImpl != null && arg1Type != currentImpl.Key.Arg1Type) currentImpl = null; // 3. Find implementation for arg type if (currentImpl == null) { key = new OperatorDispatchKey(op, arg1Type); if (!OperatorImplementations.TryGetValue(key, out currentImpl)) ThrowError(Resources.ErrOpNotDefinedForType, op, arg1Type); } // 4. Actually call try { previousUsed = currentImpl; //set previousUsed so next time we'll try this impl first return currentImpl.Arg1Converter(arg1); } catch (OverflowException) { if (currentImpl.OverflowHandler == null) throw; previousUsed = currentImpl.OverflowHandler; //set previousUsed to overflowHandler, so it will be used next time return ExecuteUnaryOperator(op, arg1, ref previousUsed); //call self recursively } }//method //TODO: finish this private void CheckUnassigned(object value) { if (value == null) throw new Exception("Variable unassigned."); } }//class }
40.325581
129
0.578047
[ "MIT" ]
Hyperspaces/Hyperspace.DotLua
src/Irony.Interpreter/LanguageRuntime/LanguageRuntime_OpDispatch.cs
5,204
C#
/** * $File: JCS_DisableWithTimeEvent.cs $ * $Date: $ * $Revision: $ * $Creator: Jen-Chieh Shen $ * $Notice: See LICENSE.txt for modification and distribution information * Copyright (c) 2016 by Shen, Jen-Chieh $ */ using System.Collections.Generic; using UnityEngine; namespace JCSUnity { /// <summary> /// Disable behaviours after a certain time. /// </summary> public class JCS_DisableWithTimeEvent : MonoBehaviour { /* Variables */ private float mTimer = 0.0f; [Header("** Runtime Variables (JCS_DisableWithTimeEvent) **")] [Tooltip("Behaviours that take effect.")] [SerializeField] private List<Behaviour> mBehaviours = null; [Tooltip("Time before disable.")] [SerializeField] [Range(0.0f, 3600.0f)] private float mTime = 2.0f; /* Setter & Getter */ public List<Behaviour> Behaviours { get { return this.mBehaviours; } set { this.mBehaviours = value; } } public float time { get { return this.mTime; } set { this.mTime = value; } } public float timer { get { return this.mTimer; } set { this.mTimer = value; } } /* Functions */ private void Update() { mTimer += Time.deltaTime; if (mTime < mTimer) { // reset timer. mTimer = 0.0f; // disable all components foreach (var comp in mBehaviours) comp.enabled = false; } } } }
26.965517
112
0.553708
[ "BSD-3-Clause" ]
MapleStoryUnity/MapleStoryUnity
Assets/JCSUnity/Scripts/Events/Enable/JCS_DisableWithTimeEvent.cs
1,566
C#
using BenchmarkDotNet.Configs; using BenchmarkDotNet.Running; namespace NumericsConverter.Benchmark { public class Program { [System.Obsolete] public static void Main() => BenchmarkRunner.Run<VectorBenchmark>( ManualConfig .Create(DefaultConfig.Instance) .With(ConfigOptions.DisableOptimizationsValidator)); } }
27.266667
72
0.633252
[ "MIT" ]
KuraiAndras/NumericsConverter
NumericsConverter.Benchmark/Program.cs
411
C#
using System; namespace LiarsDiceAPI.Models { public class GameInfo { public int PlayersJoined { get; set; } public int MaxPlayers { get; set; } = Game.MaxPlayers; public string Name { get; set; } public string CreatedBy { get; set; } public Guid Id { get; set; } } }
24.692308
62
0.595016
[ "MIT" ]
Christdej/gathering-gaia
LiarsDiceAPI/Models/GameInfo.cs
323
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 ssm-2014-11-06.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.SimpleSystemsManagement.Model { /// <summary> /// Information about a scheduled execution for a maintenance window. /// </summary> public partial class ScheduledWindowExecution { private string _executionTime; private string _name; private string _windowId; /// <summary> /// Gets and sets the property ExecutionTime. /// <para> /// The time, in ISO-8601 Extended format, that the maintenance window is scheduled to /// be run. /// </para> /// </summary> public string ExecutionTime { get { return this._executionTime; } set { this._executionTime = value; } } // Check to see if ExecutionTime property is set internal bool IsSetExecutionTime() { return this._executionTime != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the maintenance window to be run. /// </para> /// </summary> [AWSProperty(Min=3, Max=128)] 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 WindowId. /// <para> /// The ID of the maintenance window to be run. /// </para> /// </summary> [AWSProperty(Min=20, Max=20)] public string WindowId { get { return this._windowId; } set { this._windowId = value; } } // Check to see if WindowId property is set internal bool IsSetWindowId() { return this._windowId != null; } } }
28.540816
101
0.59099
[ "Apache-2.0" ]
ChristopherButtars/aws-sdk-net
sdk/src/Services/SimpleSystemsManagement/Generated/Model/ScheduledWindowExecution.cs
2,797
C#
#region Apache License Version 2.0 /*---------------------------------------------------------------- Copyright 2021 Jeffrey Su & Suzhou Senparc Network Technology Co.,Ltd. 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. Detail: https://github.com/JeffreySu/WeiXinMPSDK/blob/master/license.md ----------------------------------------------------------------*/ #endregion Apache License Version 2.0 /*---------------------------------------------------------------- Copyright (C) 2022 Senparc 文件名:SingleButton.cs 文件功能描述:所有单击按钮的基类 创建标识:Senparc - 20150211 修改标识:Senparc - 20150303 修改描述:整理接口 ----------------------------------------------------------------*/ namespace Senparc.Weixin.MP.Entities.Menu { /// <summary> /// 所有单击按钮的基类(view,click等) /// </summary> public abstract class SingleButton : BaseButton, IBaseButton { /// <summary> /// 按钮类型(click或view) /// </summary> public string type { get; set; } public SingleButton(string theType) { type = theType; } } }
30.307692
90
0.57297
[ "Apache-2.0" ]
YaChengMu/WeiXinMPSDK
src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/Menu/Buttons/SingleButton.cs
1,696
C#
/* * Copyright(c) 2021 Samsung Electronics Co., Ltd. * * 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; using System.Runtime.CompilerServices; using System.ComponentModel; namespace Tizen.NUI.Binding { /// <summary> /// An abstract class that provides a BindingMode and a formatting option. /// </summary> [EditorBrowsable(EditorBrowsableState.Never)] public abstract class BindingBase { static readonly ConditionalWeakTable<IEnumerable, CollectionSynchronizationContext> SynchronizedCollections = new ConditionalWeakTable<IEnumerable, CollectionSynchronizationContext>(); BindingMode mode = BindingMode.Default; string stringFormat; object targetNullValue; object fallbackValue; internal BindingBase() { } /// <summary> /// Gets or sets the mode for this binding. /// </summary> /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public BindingMode Mode { get { return mode; } set { if (value != BindingMode.Default && value != BindingMode.OneWay && value != BindingMode.OneWayToSource && value != BindingMode.TwoWay && value != BindingMode.OneTime) throw new ArgumentException("mode is not a valid BindingMode", nameof(Mode)); ThrowIfApplied(); mode = value; } } /// <summary> /// Gets or sets the string format for this binding. /// </summary> /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public string StringFormat { get { return stringFormat; } set { ThrowIfApplied(); stringFormat = value; } } /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public object TargetNullValue { get { return targetNullValue; } set { ThrowIfApplied(); targetNullValue = value; } } /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public object FallbackValue { get => fallbackValue; set { ThrowIfApplied(); fallbackValue = value; } } internal bool AllowChaining { get; set; } internal object Context { get; set; } internal bool IsApplied { get; private set; } /// <summary> /// Stops synchronization on the collection. /// </summary> /// <param name="collection">The collection on which to stop synchronization.</param> /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public static void DisableCollectionSynchronization(IEnumerable collection) { if (collection == null) throw new ArgumentNullException(nameof(collection)); SynchronizedCollections.Remove(collection); } /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public static void EnableCollectionSynchronization(IEnumerable collection, object context, CollectionSynchronizationCallback callback) { if (collection == null) throw new ArgumentNullException(nameof(collection)); if (callback == null) throw new ArgumentNullException(nameof(callback)); SynchronizedCollections.Add(collection, new CollectionSynchronizationContext(context, callback)); } /// <summary> /// Throws an InvalidOperationException if the binding has been applied. /// </summary> /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] protected void ThrowIfApplied() { if (IsApplied) throw new InvalidOperationException("Can not change a binding while it's applied"); } internal virtual void Apply(bool fromTarget) { IsApplied = true; } internal virtual void Apply(object context, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged = false) { IsApplied = true; } internal abstract BindingBase Clone(); internal virtual object GetSourceValue(object value, Type targetPropertyType) { if (value == null && TargetNullValue != null) return TargetNullValue; if (StringFormat != null) return string.Format(StringFormat, value); return value; } internal virtual object GetTargetValue(object value, Type sourcePropertyType) { return value; } internal static bool TryGetSynchronizedCollection(IEnumerable collection, out CollectionSynchronizationContext synchronizationContext) { if (collection == null) throw new ArgumentNullException(nameof(collection)); return SynchronizedCollections.TryGetValue(collection, out synchronizationContext); } internal virtual void Unapply(bool fromBindingContextChanged = false) { IsApplied = false; } } }
35.21164
192
0.615928
[ "Apache-2.0", "MIT" ]
AchoWang/TizenFX
src/Tizen.NUI/src/public/XamlBinding/BindingBase.cs
6,655
C#
/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * * 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 OpenSimulator Project 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 DEVELOPERS ``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 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; using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; using LSLInteger = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { public partial class ScriptBaseClass { // SCRIPTS CONSTANTS public static readonly LSLInteger OS_APIVERSION = 2; public static readonly LSLInteger TRUE = 1; public static readonly LSLInteger FALSE = 0; public const int STATUS_PHYSICS = 1; public const int STATUS_ROTATE_X = 2; public const int STATUS_ROTATE_Y = 4; public const int STATUS_ROTATE_Z = 8; public const int STATUS_PHANTOM = 16; public const int STATUS_SANDBOX = 32; public const int STATUS_BLOCK_GRAB = 64; public const int STATUS_DIE_AT_EDGE = 128; public const int STATUS_RETURN_AT_EDGE = 256; public const int STATUS_CAST_SHADOWS = 512; public const int STATUS_BLOCK_GRAB_OBJECT = 1024; public const int AGENT = 1; public const int AGENT_BY_LEGACY_NAME = 1; public const int AGENT_BY_USERNAME = 0x10; public const int NPC = 0x20; //ApiDesc Objects running a script or physically moving public const int ACTIVE = 2; public const int PASSIVE = 4; public const int SCRIPTED = 8; public const int CONTROL_FWD = 1; public const int CONTROL_BACK = 2; public const int CONTROL_LEFT = 4; public const int CONTROL_RIGHT = 8; public const int CONTROL_UP = 16; public const int CONTROL_DOWN = 32; public const int CONTROL_ROT_LEFT = 256; public const int CONTROL_ROT_RIGHT = 512; public const int CONTROL_LBUTTON = 268435456; public const int CONTROL_ML_LBUTTON = 1073741824; //Permissions public const int PERMISSION_DEBIT = 2; public const int PERMISSION_TAKE_CONTROLS = 4; public const int PERMISSION_REMAP_CONTROLS = 8; public const int PERMISSION_TRIGGER_ANIMATION = 16; public const int PERMISSION_ATTACH = 32; public const int PERMISSION_RELEASE_OWNERSHIP = 64; public const int PERMISSION_CHANGE_LINKS = 128; public const int PERMISSION_CHANGE_JOINTS = 256; public const int PERMISSION_CHANGE_PERMISSIONS = 512; public const int PERMISSION_TRACK_CAMERA = 1024; public const int PERMISSION_CONTROL_CAMERA = 2048; public const int PERMISSION_TELEPORT = 4096; public const int PERMISSION_OVERRIDE_ANIMATIONS = 0x8000; public const int AGENT_FLYING = 0x1; //ApiDesc The agent has attachments public const int AGENT_ATTACHMENTS = 0x2; //ApiDesc The agent has scripted attachments public const int AGENT_SCRIPTED = 0x4; public const int AGENT_MOUSELOOK = 0x8; public const int AGENT_SITTING = 0x10; public const int AGENT_ON_OBJECT = 0x20; public const int AGENT_AWAY = 0x40; public const int AGENT_WALKING = 0x80; public const int AGENT_IN_AIR = 0x100; public const int AGENT_TYPING = 0x200; public const int AGENT_CROUCHING = 0x400; public const int AGENT_BUSY = 0x800; public const int AGENT_ALWAYS_RUN = 0x1000; public const int AGENT_AUTOPILOT = 0x2000; public const int AGENT_MALE = 0x40000000; //Particle Systems public const int PSYS_PART_INTERP_COLOR_MASK = 1; public const int PSYS_PART_INTERP_SCALE_MASK = 2; public const int PSYS_PART_BOUNCE_MASK = 4; public const int PSYS_PART_WIND_MASK = 8; public const int PSYS_PART_FOLLOW_SRC_MASK = 16; public const int PSYS_PART_FOLLOW_VELOCITY_MASK = 32; public const int PSYS_PART_TARGET_POS_MASK = 64; public const int PSYS_PART_TARGET_LINEAR_MASK = 128; public const int PSYS_PART_EMISSIVE_MASK = 256; public const int PSYS_PART_RIBBON_MASK = 1024; public const int PSYS_PART_FLAGS = 0; public const int PSYS_PART_START_COLOR = 1; public const int PSYS_PART_START_ALPHA = 2; public const int PSYS_PART_END_COLOR = 3; public const int PSYS_PART_END_ALPHA = 4; public const int PSYS_PART_START_SCALE = 5; public const int PSYS_PART_END_SCALE = 6; public const int PSYS_PART_MAX_AGE = 7; public const int PSYS_SRC_ACCEL = 8; public const int PSYS_SRC_PATTERN = 9; public const int PSYS_SRC_INNERANGLE = 10; public const int PSYS_SRC_OUTERANGLE = 11; public const int PSYS_SRC_TEXTURE = 12; public const int PSYS_SRC_BURST_RATE = 13; public const int PSYS_SRC_BURST_PART_COUNT = 15; public const int PSYS_SRC_BURST_RADIUS = 16; public const int PSYS_SRC_BURST_SPEED_MIN = 17; public const int PSYS_SRC_BURST_SPEED_MAX = 18; public const int PSYS_SRC_MAX_AGE = 19; public const int PSYS_SRC_TARGET_KEY = 20; public const int PSYS_SRC_OMEGA = 21; public const int PSYS_SRC_ANGLE_BEGIN = 22; public const int PSYS_SRC_ANGLE_END = 23; public const int PSYS_PART_BLEND_FUNC_SOURCE = 24; public const int PSYS_PART_BLEND_FUNC_DEST = 25; public const int PSYS_PART_START_GLOW = 26; public const int PSYS_PART_END_GLOW = 27; public const int PSYS_PART_BF_ONE = 0; public const int PSYS_PART_BF_ZERO = 1; public const int PSYS_PART_BF_DEST_COLOR = 2; public const int PSYS_PART_BF_SOURCE_COLOR = 3; public const int PSYS_PART_BF_ONE_MINUS_DEST_COLOR = 4; public const int PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR = 5; public const int PSYS_PART_BF_SOURCE_ALPHA = 7; public const int PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA = 9; public const int PSYS_SRC_PATTERN_DROP = 1; public const int PSYS_SRC_PATTERN_EXPLODE = 2; public const int PSYS_SRC_PATTERN_ANGLE = 4; public const int PSYS_SRC_PATTERN_ANGLE_CONE = 8; public const int PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY = 16; public const int VEHICLE_TYPE_NONE = 0; public const int VEHICLE_TYPE_SLED = 1; public const int VEHICLE_TYPE_CAR = 2; public const int VEHICLE_TYPE_BOAT = 3; public const int VEHICLE_TYPE_AIRPLANE = 4; public const int VEHICLE_TYPE_BALLOON = 5; public const int VEHICLE_LINEAR_FRICTION_TIMESCALE = 16; public const int VEHICLE_ANGULAR_FRICTION_TIMESCALE = 17; public const int VEHICLE_LINEAR_MOTOR_DIRECTION = 18; public const int VEHICLE_LINEAR_MOTOR_OFFSET = 20; public const int VEHICLE_ANGULAR_MOTOR_DIRECTION = 19; public const int VEHICLE_HOVER_HEIGHT = 24; public const int VEHICLE_HOVER_EFFICIENCY = 25; public const int VEHICLE_HOVER_TIMESCALE = 26; public const int VEHICLE_BUOYANCY = 27; public const int VEHICLE_LINEAR_DEFLECTION_EFFICIENCY = 28; public const int VEHICLE_LINEAR_DEFLECTION_TIMESCALE = 29; public const int VEHICLE_LINEAR_MOTOR_TIMESCALE = 30; public const int VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE = 31; public const int VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY = 32; public const int VEHICLE_ANGULAR_DEFLECTION_TIMESCALE = 33; public const int VEHICLE_ANGULAR_MOTOR_TIMESCALE = 34; public const int VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE = 35; public const int VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY = 36; public const int VEHICLE_VERTICAL_ATTRACTION_TIMESCALE = 37; public const int VEHICLE_BANKING_EFFICIENCY = 38; public const int VEHICLE_BANKING_MIX = 39; public const int VEHICLE_BANKING_TIMESCALE = 40; public const int VEHICLE_REFERENCE_FRAME = 44; public const int VEHICLE_RANGE_BLOCK = 45; public const int VEHICLE_ROLL_FRAME = 46; public const int VEHICLE_FLAG_NO_DEFLECTION_UP = 1; public const int VEHICLE_FLAG_LIMIT_ROLL_ONLY = 2; public const int VEHICLE_FLAG_HOVER_WATER_ONLY = 4; public const int VEHICLE_FLAG_HOVER_TERRAIN_ONLY = 8; public const int VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT = 16; public const int VEHICLE_FLAG_HOVER_UP_ONLY = 32; public const int VEHICLE_FLAG_LIMIT_MOTOR_UP = 64; public const int VEHICLE_FLAG_MOUSELOOK_STEER = 128; public const int VEHICLE_FLAG_MOUSELOOK_BANK = 256; public const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512; public const int VEHICLE_FLAG_NO_X = 1024; public const int VEHICLE_FLAG_NO_Y = 2048; public const int VEHICLE_FLAG_NO_Z = 4096; public const int VEHICLE_FLAG_LOCK_HOVER_HEIGHT = 8192; public const int VEHICLE_FLAG_NO_DEFLECTION = 16392; public const int VEHICLE_FLAG_LOCK_ROTATION = 32784; public const int INVENTORY_ALL = -1; public const int INVENTORY_NONE = -1; public const int INVENTORY_TEXTURE = 0; public const int INVENTORY_SOUND = 1; public const int INVENTORY_LANDMARK = 3; public const int INVENTORY_CLOTHING = 5; public const int INVENTORY_OBJECT = 6; public const int INVENTORY_NOTECARD = 7; public const int INVENTORY_SCRIPT = 10; public const int INVENTORY_BODYPART = 13; public const int INVENTORY_ANIMATION = 20; public const int INVENTORY_GESTURE = 21; public const int ATTACH_CHEST = 1; public const int ATTACH_HEAD = 2; public const int ATTACH_LSHOULDER = 3; public const int ATTACH_RSHOULDER = 4; public const int ATTACH_LHAND = 5; public const int ATTACH_RHAND = 6; public const int ATTACH_LFOOT = 7; public const int ATTACH_RFOOT = 8; public const int ATTACH_BACK = 9; public const int ATTACH_PELVIS = 10; public const int ATTACH_MOUTH = 11; public const int ATTACH_CHIN = 12; public const int ATTACH_LEAR = 13; public const int ATTACH_REAR = 14; public const int ATTACH_LEYE = 15; public const int ATTACH_REYE = 16; public const int ATTACH_NOSE = 17; public const int ATTACH_RUARM = 18; public const int ATTACH_RLARM = 19; public const int ATTACH_LUARM = 20; public const int ATTACH_LLARM = 21; public const int ATTACH_RHIP = 22; public const int ATTACH_RULEG = 23; public const int ATTACH_RLLEG = 24; public const int ATTACH_LHIP = 25; public const int ATTACH_LULEG = 26; public const int ATTACH_LLLEG = 27; public const int ATTACH_BELLY = 28; public const int ATTACH_RPEC = 29; public const int ATTACH_LPEC = 30; public const int ATTACH_LEFT_PEC = 29; // Same value as ATTACH_RPEC, see https://jira.secondlife.com/browse/SVC-580 public const int ATTACH_RIGHT_PEC = 30; // Same value as ATTACH_LPEC, see https://jira.secondlife.com/browse/SVC-580 public const int ATTACH_HUD_CENTER_2 = 31; public const int ATTACH_HUD_TOP_RIGHT = 32; public const int ATTACH_HUD_TOP_CENTER = 33; public const int ATTACH_HUD_TOP_LEFT = 34; public const int ATTACH_HUD_CENTER_1 = 35; public const int ATTACH_HUD_BOTTOM_LEFT = 36; public const int ATTACH_HUD_BOTTOM = 37; public const int ATTACH_HUD_BOTTOM_RIGHT = 38; public const int ATTACH_NECK = 39; public const int ATTACH_AVATAR_CENTER = 40; public const int ATTACH_LHAND_RING1 = 41; public const int ATTACH_RHAND_RING1 = 42; public const int ATTACH_TAIL_BASE = 43; public const int ATTACH_TAIL_TIP = 44; public const int ATTACH_LWING = 45; public const int ATTACH_RWING = 46; public const int ATTACH_FACE_JAW = 47; public const int ATTACH_FACE_LEAR = 48; public const int ATTACH_FACE_REAR = 49; public const int ATTACH_FACE_LEYE = 50; public const int ATTACH_FACE_REYE = 51; public const int ATTACH_FACE_TONGUE = 52; public const int ATTACH_GROIN = 53; public const int ATTACH_HIND_LFOOT = 54; public const int ATTACH_HIND_RFOOT = 55; #region osMessageAttachments constants /// <summary> /// Instructs osMessageAttachements to send the message to attachments /// on every point. /// </summary> /// <remarks> /// One might expect this to be named OS_ATTACH_ALL, but then one might /// also expect functions designed to attach or detach or get /// attachments to work with it too. Attaching a no-copy item to /// many attachments could be dangerous. /// when combined with OS_ATTACH_MSG_INVERT_POINTS, will prevent the /// message from being sent. /// if combined with OS_ATTACH_MSG_OBJECT_CREATOR or /// OS_ATTACH_MSG_SCRIPT_CREATOR, could result in no message being /// sent- this is expected behaviour. /// </remarks> public const int OS_ATTACH_MSG_ALL = -65535; /// <summary> /// Instructs osMessageAttachements to invert how the attachment points /// list should be treated (e.g. go from inclusive operation to /// exclusive operation). /// </summary> /// <remarks> /// This might be used if you want to deliver a message to one set of /// attachments and a different message to everything else. With /// this flag, you only need to build one explicit list for both calls. /// </remarks> public const int OS_ATTACH_MSG_INVERT_POINTS = 1; /// <summary> /// Instructs osMessageAttachments to only send the message to /// attachments with a CreatorID that matches the host object CreatorID /// </summary> /// <remarks> /// This would be used if distributed in an object vendor/updater server. /// </remarks> public const int OS_ATTACH_MSG_OBJECT_CREATOR = 2; /// <summary> /// Instructs osMessageAttachments to only send the message to /// attachments with a CreatorID that matches the sending script CreatorID /// </summary> /// <remarks> /// This might be used if the script is distributed independently of a /// containing object. /// </remarks> public const int OS_ATTACH_MSG_SCRIPT_CREATOR = 4; #endregion public const int LAND_LEVEL = 0; public const int LAND_RAISE = 1; public const int LAND_LOWER = 2; public const int LAND_SMOOTH = 3; public const int LAND_NOISE = 4; public const int LAND_REVERT = 5; public const int LAND_SMALL_BRUSH = 1; public const int LAND_MEDIUM_BRUSH = 2; public const int LAND_LARGE_BRUSH = 3; //Agent Dataserver public const int DATA_ONLINE = 1; public const int DATA_NAME = 2; public const int DATA_BORN = 3; public const int DATA_RATING = 4; public const int DATA_SIM_POS = 5; public const int DATA_SIM_STATUS = 6; public const int DATA_SIM_RATING = 7; public const int DATA_PAYINFO = 8; public const int DATA_SIM_RELEASE = 128; public const int ANIM_ON = 1; public const int LOOP = 2; public const int REVERSE = 4; public const int PING_PONG = 8; public const int SMOOTH = 16; public const int ROTATE = 32; public const int SCALE = 64; public const int ALL_SIDES = -1; // LINK flags public const int LINK_SET = -1; public const int LINK_ROOT = 1; public const int LINK_ALL_OTHERS = -2; public const int LINK_ALL_CHILDREN = -3; public const int LINK_THIS = -4; public const int CHANGED_INVENTORY = 1; public const int CHANGED_COLOR = 2; public const int CHANGED_SHAPE = 4; public const int CHANGED_SCALE = 8; public const int CHANGED_TEXTURE = 16; public const int CHANGED_LINK = 32; public const int CHANGED_ALLOWED_DROP = 64; public const int CHANGED_OWNER = 128; public const int CHANGED_REGION = 256; public const int CHANGED_TELEPORT = 512; public const int CHANGED_REGION_RESTART = 1024; public const int CHANGED_REGION_START = 1024; //LL Changed the constant from CHANGED_REGION_RESTART public const int CHANGED_MEDIA = 2048; //ApiDesc opensim specific public const int CHANGED_ANIMATION = 16384; //ApiDesc opensim specific public const int CHANGED_POSITION = 32768; public const int TYPE_INVALID = 0; public const int TYPE_INTEGER = 1; public const int TYPE_FLOAT = 2; public const int TYPE_STRING = 3; public const int TYPE_KEY = 4; public const int TYPE_VECTOR = 5; public const int TYPE_ROTATION = 6; //XML RPC Remote Data Channel public const int REMOTE_DATA_CHANNEL = 1; public const int REMOTE_DATA_REQUEST = 2; public const int REMOTE_DATA_REPLY = 3; //llHTTPRequest public const int HTTP_METHOD = 0; public const int HTTP_MIMETYPE = 1; public const int HTTP_BODY_MAXLENGTH = 2; public const int HTTP_VERIFY_CERT = 3; public const int HTTP_VERBOSE_THROTTLE = 4; public const int HTTP_CUSTOM_HEADER = 5; public const int HTTP_PRAGMA_NO_CACHE = 6; // llSetContentType public const int CONTENT_TYPE_TEXT = 0; //text/plain public const int CONTENT_TYPE_HTML = 1; //text/html public const int CONTENT_TYPE_XML = 2; //application/xml public const int CONTENT_TYPE_XHTML = 3; //application/xhtml+xml public const int CONTENT_TYPE_ATOM = 4; //application/atom+xml public const int CONTENT_TYPE_JSON = 5; //application/json public const int CONTENT_TYPE_LLSD = 6; //application/llsd+xml public const int CONTENT_TYPE_FORM = 7; //application/x-www-form-urlencoded public const int CONTENT_TYPE_RSS = 8; //application/rss+xml //parameters comand flags public const int PRIM_MATERIAL = 2; public const int PRIM_PHYSICS = 3; public const int PRIM_TEMP_ON_REZ = 4; public const int PRIM_PHANTOM = 5; public const int PRIM_POSITION = 6; public const int PRIM_SIZE = 7; public const int PRIM_ROTATION = 8; public const int PRIM_TYPE = 9; // gap 10-16 public const int PRIM_TEXTURE = 17; public const int PRIM_COLOR = 18; public const int PRIM_BUMP_SHINY = 19; public const int PRIM_FULLBRIGHT = 20; public const int PRIM_FLEXIBLE = 21; public const int PRIM_TEXGEN = 22; public const int PRIM_POINT_LIGHT = 23; // Huh? //ApiDesc not supported public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake public const int PRIM_GLOW = 25; public const int PRIM_TEXT = 26; public const int PRIM_NAME = 27; public const int PRIM_DESC = 28; public const int PRIM_ROT_LOCAL = 29; public const int PRIM_PHYSICS_SHAPE_TYPE = 30; public const int PRIM_PHYSICS_MATERIAL = 31; // apparently not on SL wiki public const int PRIM_OMEGA = 32; public const int PRIM_POS_LOCAL = 33; public const int PRIM_LINK_TARGET = 34; public const int PRIM_SLICE = 35; public const int PRIM_SPECULAR = 36; public const int PRIM_NORMAL = 37; public const int PRIM_ALPHA_MODE = 38; //ApiDesc not supported public const int PRIM_ALLOW_UNSIT = 39; // experiences related. unsupported //ApiDesc not supported public const int PRIM_SCRIPTED_SIT_ONLY = 40; // experiences related. unsupported public const int PRIM_SIT_TARGET = 41; // parameters public const int PRIM_ALPHA_MODE_NONE = 0; public const int PRIM_ALPHA_MODE_BLEND = 1; public const int PRIM_ALPHA_MODE_MASK = 2; public const int PRIM_ALPHA_MODE_EMISSIVE = 3; public const int PRIM_TEXGEN_DEFAULT = 0; public const int PRIM_TEXGEN_PLANAR = 1; public const int PRIM_TYPE_BOX = 0; public const int PRIM_TYPE_CYLINDER = 1; public const int PRIM_TYPE_PRISM = 2; public const int PRIM_TYPE_SPHERE = 3; public const int PRIM_TYPE_TORUS = 4; public const int PRIM_TYPE_TUBE = 5; public const int PRIM_TYPE_RING = 6; public const int PRIM_TYPE_SCULPT = 7; public const int PRIM_HOLE_DEFAULT = 0; public const int PRIM_HOLE_CIRCLE = 16; public const int PRIM_HOLE_SQUARE = 32; public const int PRIM_HOLE_TRIANGLE = 48; public const int PRIM_MATERIAL_STONE = 0; public const int PRIM_MATERIAL_METAL = 1; public const int PRIM_MATERIAL_GLASS = 2; public const int PRIM_MATERIAL_WOOD = 3; public const int PRIM_MATERIAL_FLESH = 4; public const int PRIM_MATERIAL_PLASTIC = 5; public const int PRIM_MATERIAL_RUBBER = 6; public const int PRIM_MATERIAL_LIGHT = 7; public const int PRIM_SHINY_NONE = 0; public const int PRIM_SHINY_LOW = 1; public const int PRIM_SHINY_MEDIUM = 2; public const int PRIM_SHINY_HIGH = 3; public const int PRIM_BUMP_NONE = 0; public const int PRIM_BUMP_BRIGHT = 1; public const int PRIM_BUMP_DARK = 2; public const int PRIM_BUMP_WOOD = 3; public const int PRIM_BUMP_BARK = 4; public const int PRIM_BUMP_BRICKS = 5; public const int PRIM_BUMP_CHECKER = 6; public const int PRIM_BUMP_CONCRETE = 7; public const int PRIM_BUMP_TILE = 8; public const int PRIM_BUMP_STONE = 9; public const int PRIM_BUMP_DISKS = 10; public const int PRIM_BUMP_GRAVEL = 11; public const int PRIM_BUMP_BLOBS = 12; public const int PRIM_BUMP_SIDING = 13; public const int PRIM_BUMP_LARGETILE = 14; public const int PRIM_BUMP_STUCCO = 15; public const int PRIM_BUMP_SUCTION = 16; public const int PRIM_BUMP_WEAVE = 17; public const int PRIM_SCULPT_TYPE_SPHERE = 1; public const int PRIM_SCULPT_TYPE_TORUS = 2; public const int PRIM_SCULPT_TYPE_PLANE = 3; public const int PRIM_SCULPT_TYPE_CYLINDER = 4; public const int PRIM_SCULPT_FLAG_INVERT = 0x40; public const int PRIM_SCULPT_FLAG_MIRROR = 0x80; //ApiDesc Auxiliar to clear flags keeping scultp type public const int PRIM_SCULPT_TYPE_MASK = 0x07; // auxiliar mask public const int PRIM_PHYSICS_SHAPE_PRIM = 0; public const int PRIM_PHYSICS_SHAPE_NONE = 1; public const int PRIM_PHYSICS_SHAPE_CONVEX = 2; public const int PROFILE_NONE = 0; public const int PROFILE_SCRIPT_MEMORY = 1; public const int MASK_BASE = 0; public const int MASK_OWNER = 1; public const int MASK_GROUP = 2; public const int MASK_EVERYONE = 3; public const int MASK_NEXT = 4; public const int PERM_TRANSFER = 8192; public const int PERM_MODIFY = 16384; public const int PERM_COPY = 32768; public const int PERM_MOVE = 524288; public const int PERM_ALL = 2147483647; public const int PARCEL_MEDIA_COMMAND_STOP = 0; public const int PARCEL_MEDIA_COMMAND_PAUSE = 1; public const int PARCEL_MEDIA_COMMAND_PLAY = 2; public const int PARCEL_MEDIA_COMMAND_LOOP = 3; public const int PARCEL_MEDIA_COMMAND_TEXTURE = 4; public const int PARCEL_MEDIA_COMMAND_URL = 5; public const int PARCEL_MEDIA_COMMAND_TIME = 6; public const int PARCEL_MEDIA_COMMAND_AGENT = 7; public const int PARCEL_MEDIA_COMMAND_UNLOAD = 8; public const int PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9; public const int PARCEL_MEDIA_COMMAND_TYPE = 10; public const int PARCEL_MEDIA_COMMAND_SIZE = 11; public const int PARCEL_MEDIA_COMMAND_DESC = 12; public const int PARCEL_FLAG_ALLOW_FLY = 0x1; // parcel allows flying public const int PARCEL_FLAG_ALLOW_SCRIPTS = 0x2; // parcel allows outside scripts public const int PARCEL_FLAG_ALLOW_LANDMARK = 0x8; // parcel allows landmarks to be created public const int PARCEL_FLAG_ALLOW_TERRAFORM = 0x10; // parcel allows anyone to terraform the land public const int PARCEL_FLAG_ALLOW_DAMAGE = 0x20; // parcel allows damage public const int PARCEL_FLAG_ALLOW_CREATE_OBJECTS = 0x40; // parcel allows anyone to create objects public const int PARCEL_FLAG_USE_ACCESS_GROUP = 0x100; // parcel limits access to a group public const int PARCEL_FLAG_USE_ACCESS_LIST = 0x200; // parcel limits access to a list of residents public const int PARCEL_FLAG_USE_BAN_LIST = 0x400; // parcel uses a ban list, including restricting access based on payment info public const int PARCEL_FLAG_USE_LAND_PASS_LIST = 0x800; // parcel allows passes to be purchased public const int PARCEL_FLAG_LOCAL_SOUND_ONLY = 0x8000; // parcel restricts spatialized sound to the parcel public const int PARCEL_FLAG_RESTRICT_PUSHOBJECT = 0x200000; // parcel restricts llPushObject public const int PARCEL_FLAG_ALLOW_GROUP_SCRIPTS = 0x2000000; // parcel allows scripts owned by group public const int PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS = 0x4000000; // parcel allows group object creation public const int PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY = 0x8000000; // parcel allows objects owned by any user to enter public const int PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY = 0x10000000; // parcel allows with the same group to enter public const int REGION_FLAG_ALLOW_DAMAGE = 0x1; // region is entirely damage enabled public const int REGION_FLAG_FIXED_SUN = 0x10; // region has a fixed sun position public const int REGION_FLAG_BLOCK_TERRAFORM = 0x40; // region terraforming disabled public const int REGION_FLAG_SANDBOX = 0x100; // region is a sandbox public const int REGION_FLAG_DISABLE_COLLISIONS = 0x1000; // region has disabled collisions public const int REGION_FLAG_DISABLE_PHYSICS = 0x4000; // region has disabled physics public const int REGION_FLAG_BLOCK_FLY = 0x80000; // region blocks flying public const int REGION_FLAG_ALLOW_DIRECT_TELEPORT = 0x100000; // region allows direct teleports public const int REGION_FLAG_RESTRICT_PUSHOBJECT = 0x400000; // region restricts llPushObject //llManageEstateAccess public const int ESTATE_ACCESS_ALLOWED_AGENT_ADD = 0; public const int ESTATE_ACCESS_ALLOWED_AGENT_REMOVE = 1; public const int ESTATE_ACCESS_ALLOWED_GROUP_ADD = 2; public const int ESTATE_ACCESS_ALLOWED_GROUP_REMOVE = 3; public const int ESTATE_ACCESS_BANNED_AGENT_ADD = 4; public const int ESTATE_ACCESS_BANNED_AGENT_REMOVE = 5; public static readonly LSLInteger PAY_HIDE = -1; public static readonly LSLInteger PAY_DEFAULT = -2; public const string NULL_KEY = "00000000-0000-0000-0000-000000000000"; public const string EOF = "\n\n\n"; public const double PI = 3.14159274f; public const double TWO_PI = 6.28318548f; public const double PI_BY_TWO = 1.57079637f; public const double DEG_TO_RAD = 0.01745329238f; public const double RAD_TO_DEG = 57.29578f; public const double SQRT2 = 1.414213538f; public const int STRING_TRIM_HEAD = 1; public const int STRING_TRIM_TAIL = 2; public const int STRING_TRIM = 3; public const int LIST_STAT_RANGE = 0; public const int LIST_STAT_MIN = 1; public const int LIST_STAT_MAX = 2; public const int LIST_STAT_MEAN = 3; public const int LIST_STAT_MEDIAN = 4; public const int LIST_STAT_STD_DEV = 5; public const int LIST_STAT_SUM = 6; public const int LIST_STAT_SUM_SQUARES = 7; public const int LIST_STAT_NUM_COUNT = 8; public const int LIST_STAT_GEOMETRIC_MEAN = 9; public const int LIST_STAT_HARMONIC_MEAN = 100; //ParcelPrim Categories public const int PARCEL_COUNT_TOTAL = 0; public const int PARCEL_COUNT_OWNER = 1; public const int PARCEL_COUNT_GROUP = 2; public const int PARCEL_COUNT_OTHER = 3; public const int PARCEL_COUNT_SELECTED = 4; public const int PARCEL_COUNT_TEMP = 5; public const int DEBUG_CHANNEL = 0x7FFFFFFF; public const int PUBLIC_CHANNEL = 0x00000000; // Constants for llGetObjectDetails public const int OBJECT_UNKNOWN_DETAIL = -1; public const int OBJECT_NAME = 1; public const int OBJECT_DESC = 2; public const int OBJECT_POS = 3; public const int OBJECT_ROT = 4; public const int OBJECT_VELOCITY = 5; public const int OBJECT_OWNER = 6; public const int OBJECT_GROUP = 7; public const int OBJECT_CREATOR = 8; public const int OBJECT_RUNNING_SCRIPT_COUNT = 9; public const int OBJECT_TOTAL_SCRIPT_COUNT = 10; public const int OBJECT_SCRIPT_MEMORY = 11; public const int OBJECT_SCRIPT_TIME = 12; public const int OBJECT_PRIM_EQUIVALENCE = 13; public const int OBJECT_SERVER_COST = 14; public const int OBJECT_STREAMING_COST = 15; public const int OBJECT_PHYSICS_COST = 16; public const int OBJECT_CHARACTER_TIME = 17; public const int OBJECT_ROOT = 18; public const int OBJECT_ATTACHED_POINT = 19; public const int OBJECT_PATHFINDING_TYPE = 20; public const int OBJECT_PHYSICS = 21; public const int OBJECT_PHANTOM = 22; public const int OBJECT_TEMP_ON_REZ = 23; public const int OBJECT_RENDER_WEIGHT = 24; public const int OBJECT_HOVER_HEIGHT = 25; public const int OBJECT_BODY_SHAPE_TYPE = 26; public const int OBJECT_LAST_OWNER_ID = 27; public const int OBJECT_CLICK_ACTION = 28; public const int OBJECT_OMEGA = 29; public const int OBJECT_PRIM_COUNT = 30; public const int OBJECT_TOTAL_INVENTORY_COUNT = 31; public const int OBJECT_REZZER_KEY = 32; public const int OBJECT_GROUP_TAG = 33; public const int OBJECT_TEMP_ATTACHED = 34; public const int OBJECT_ATTACHED_SLOTS_AVAILABLE = 35; // Pathfinding types //ApiDesc not supported public const int OPT_OTHER = -1; //ApiDesc not supported public const int OPT_LEGACY_LINKSET = 0; //ApiDesc not supported public const int OPT_AVATAR = 1; //ApiDesc not supported public const int OPT_CHARACTER = 2; //ApiDesc not supported public const int OPT_WALKABLE = 3; //ApiDesc not supported public const int OPT_STATIC_OBSTACLE = 4; //ApiDesc not supported public const int OPT_MATERIAL_VOLUME = 5; //ApiDesc not supported public const int OPT_EXCLUSION_VOLUME = 6; // for llGetAgentList public const int AGENT_LIST_PARCEL = 0x1; public const int AGENT_LIST_PARCEL_OWNER = 2; public const int AGENT_LIST_REGION = 4; public const int AGENT_LIST_EXCLUDENPC = 0x4000000; // Can not be public const? public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); public static readonly rotation ZERO_ROTATION = new rotation(0.0, 0.0, 0.0, 1.0); // constants for llSetCameraParams public const int CAMERA_PITCH = 0; public const int CAMERA_FOCUS_OFFSET = 1; public const int CAMERA_FOCUS_OFFSET_X = 2; public const int CAMERA_FOCUS_OFFSET_Y = 3; public const int CAMERA_FOCUS_OFFSET_Z = 4; public const int CAMERA_POSITION_LAG = 5; public const int CAMERA_FOCUS_LAG = 6; public const int CAMERA_DISTANCE = 7; public const int CAMERA_BEHINDNESS_ANGLE = 8; public const int CAMERA_BEHINDNESS_LAG = 9; public const int CAMERA_POSITION_THRESHOLD = 10; public const int CAMERA_FOCUS_THRESHOLD = 11; public const int CAMERA_ACTIVE = 12; public const int CAMERA_POSITION = 13; public const int CAMERA_POSITION_X = 14; public const int CAMERA_POSITION_Y = 15; public const int CAMERA_POSITION_Z = 16; public const int CAMERA_FOCUS = 17; public const int CAMERA_FOCUS_X = 18; public const int CAMERA_FOCUS_Y = 19; public const int CAMERA_FOCUS_Z = 20; public const int CAMERA_POSITION_LOCKED = 21; public const int CAMERA_FOCUS_LOCKED = 22; // constants for llGetParcelDetails public const int PARCEL_DETAILS_NAME = 0; public const int PARCEL_DETAILS_DESC = 1; public const int PARCEL_DETAILS_OWNER = 2; public const int PARCEL_DETAILS_GROUP = 3; public const int PARCEL_DETAILS_AREA = 4; public const int PARCEL_DETAILS_ID = 5; public const int PARCEL_DETAILS_SEE_AVATARS = 6; public const int PARCEL_DETAILS_ANY_AVATAR_SOUNDS = 7; public const int PARCEL_DETAILS_GROUP_SOUNDS = 8; //osSetParcelDetails public const int PARCEL_DETAILS_CLAIMDATE = 10; // constants for llSetClickAction public const int CLICK_ACTION_NONE = 0; public const int CLICK_ACTION_TOUCH = 0; public const int CLICK_ACTION_SIT = 1; public const int CLICK_ACTION_BUY = 2; public const int CLICK_ACTION_PAY = 3; public const int CLICK_ACTION_OPEN = 4; public const int CLICK_ACTION_PLAY = 5; public const int CLICK_ACTION_OPEN_MEDIA = 6; public const int CLICK_ACTION_ZOOM = 7; // constants for the llDetectedTouch* functions public const int TOUCH_INVALID_FACE = -1; public static readonly vector TOUCH_INVALID_TEXCOORD = new vector(-1.0, -1.0, 0.0); public static readonly vector TOUCH_INVALID_VECTOR = ZERO_VECTOR; // constants for llGetPrimMediaParams/llSetPrimMediaParams public const int PRIM_MEDIA_ALT_IMAGE_ENABLE = 0; public const int PRIM_MEDIA_CONTROLS = 1; public const int PRIM_MEDIA_CURRENT_URL = 2; public const int PRIM_MEDIA_HOME_URL = 3; public const int PRIM_MEDIA_AUTO_LOOP = 4; public const int PRIM_MEDIA_AUTO_PLAY = 5; public const int PRIM_MEDIA_AUTO_SCALE = 6; public const int PRIM_MEDIA_AUTO_ZOOM = 7; public const int PRIM_MEDIA_FIRST_CLICK_INTERACT = 8; public const int PRIM_MEDIA_WIDTH_PIXELS = 9; public const int PRIM_MEDIA_HEIGHT_PIXELS = 10; public const int PRIM_MEDIA_WHITELIST_ENABLE = 11; public const int PRIM_MEDIA_WHITELIST = 12; public const int PRIM_MEDIA_PERMS_INTERACT = 13; public const int PRIM_MEDIA_PERMS_CONTROL = 14; public const int PRIM_MEDIA_CONTROLS_STANDARD = 0; public const int PRIM_MEDIA_CONTROLS_MINI = 1; public const int PRIM_MEDIA_PERM_NONE = 0; public const int PRIM_MEDIA_PERM_OWNER = 1; public const int PRIM_MEDIA_PERM_GROUP = 2; public const int PRIM_MEDIA_PERM_ANYONE = 4; public const int DENSITY = 1; public const int FRICTION = 2; public const int RESTITUTION = 4; public const int GRAVITY_MULTIPLIER = 8; // extra constants for llSetPrimMediaParams public static readonly LSLInteger LSL_STATUS_OK = 0; public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = 1000; public static readonly LSLInteger LSL_STATUS_TYPE_MISMATCH = 1001; public static readonly LSLInteger LSL_STATUS_BOUNDS_ERROR = 1002; public static readonly LSLInteger LSL_STATUS_NOT_FOUND = 1003; public static readonly LSLInteger LSL_STATUS_NOT_SUPPORTED = 1004; public static readonly LSLInteger LSL_STATUS_INTERNAL_ERROR = 1999; public static readonly LSLInteger LSL_STATUS_WHITELIST_FAILED = 2001; // Constants for default textures public const string TEXTURE_BLANK = "5748decc-f629-461c-9a36-a35a221fe21f"; public const string TEXTURE_DEFAULT = "89556747-24cb-43ed-920b-47caed15465f"; public const string TEXTURE_PLYWOOD = "89556747-24cb-43ed-920b-47caed15465f"; public const string TEXTURE_TRANSPARENT = "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"; public const string TEXTURE_MEDIA = "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361"; // Constants for osGetRegionStats public const int STATS_TIME_DILATION = 0; public const int STATS_SIM_FPS = 1; public const int STATS_PHYSICS_FPS = 2; public const int STATS_AGENT_UPDATES = 3; public const int STATS_ROOT_AGENTS = 4; public const int STATS_CHILD_AGENTS = 5; public const int STATS_TOTAL_PRIMS = 6; public const int STATS_ACTIVE_PRIMS = 7; public const int STATS_FRAME_MS = 8; public const int STATS_NET_MS = 9; public const int STATS_PHYSICS_MS = 10; public const int STATS_IMAGE_MS = 11; public const int STATS_OTHER_MS = 12; public const int STATS_IN_PACKETS_PER_SECOND = 13; public const int STATS_OUT_PACKETS_PER_SECOND = 14; public const int STATS_UNACKED_BYTES = 15; public const int STATS_AGENT_MS = 16; public const int STATS_PENDING_DOWNLOADS = 17; public const int STATS_PENDING_UPLOADS = 18; public const int STATS_ACTIVE_SCRIPTS = 19; public const int STATS_SCRIPT_LPS = 20; // Constants for osNpc* functions public const int OS_NPC_FLY = 0; public const int OS_NPC_NO_FLY = 1; public const int OS_NPC_LAND_AT_TARGET = 2; public const int OS_NPC_RUNNING = 4; public const int OS_NPC_SIT_NOW = 0; public const int OS_NPC_CREATOR_OWNED = 0x1; public const int OS_NPC_NOT_OWNED = 0x2; public const int OS_NPC_SENSE_AS_AGENT = 0x4; public const int OS_NPC_OBJECT_GROUP = 0x08; public const string URL_REQUEST_GRANTED = "URL_REQUEST_GRANTED"; public const string URL_REQUEST_DENIED = "URL_REQUEST_DENIED"; public static readonly LSLInteger RC_REJECT_TYPES = 0; public static readonly LSLInteger RC_DETECT_PHANTOM = 1; public static readonly LSLInteger RC_DATA_FLAGS = 2; public static readonly LSLInteger RC_MAX_HITS = 3; public static readonly LSLInteger RC_REJECT_AGENTS = 1; public static readonly LSLInteger RC_REJECT_PHYSICAL = 2; public static readonly LSLInteger RC_REJECT_NONPHYSICAL = 4; public static readonly LSLInteger RC_REJECT_LAND = 8; public static readonly LSLInteger RC_REJECT_HOST = 0x20000000; public static readonly LSLInteger RC_REJECT_HOSTGROUP = 0x40000000; public static readonly LSLInteger RC_GET_NORMAL = 1; public static readonly LSLInteger RC_GET_ROOT_KEY = 2; public static readonly LSLInteger RC_GET_LINK_NUM = 4; public static readonly LSLInteger RCERR_UNKNOWN = -1; public static readonly LSLInteger RCERR_SIM_PERF_LOW = -2; public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = -3; public const int KFM_MODE = 1; public const int KFM_LOOP = 1; public const int KFM_REVERSE = 3; public const int KFM_FORWARD = 0; public const int KFM_PING_PONG = 2; public const int KFM_DATA = 2; public const int KFM_TRANSLATION = 2; public const int KFM_ROTATION = 1; public const int KFM_COMMAND = 0; public const int KFM_CMD_PLAY = 0; public const int KFM_CMD_STOP = 1; public const int KFM_CMD_PAUSE = 2; public const string JSON_INVALID = "\uFDD0"; public const string JSON_OBJECT = "\uFDD1"; public const string JSON_ARRAY = "\uFDD2"; public const string JSON_NUMBER = "\uFDD3"; public const string JSON_STRING = "\uFDD4"; public const string JSON_NULL = "\uFDD5"; public const string JSON_TRUE = "\uFDD6"; public const string JSON_FALSE = "\uFDD7"; public const string JSON_DELETE = "\uFDD8"; public const string JSON_APPEND = "-1"; /// <summary> /// process name parameter as regex /// </summary> public const int OS_LISTEN_REGEX_NAME = 0x1; /// <summary> /// process message parameter as regex /// </summary> public const int OS_LISTEN_REGEX_MESSAGE = 0x2; // Constants for osTeleportObject //ApiDesc osTeleportObject no flags public const int OSTPOBJ_NONE = 0x0; //ApiDesc osTeleportObject flag: stop at destination public const int OSTPOBJ_STOPATTARGET = 0x1; //ApiDesc osTeleportObject flag: stop at jump point if tp fails public const int OSTPOBJ_STOPONFAIL = 0x2; //ApiDesc osTeleportObject flag: the rotation is the final rotation, otherwise is a added rotation public const int OSTPOBJ_SETROT = 0x4; // Constants for Windlight public const int WL_WATER_COLOR = 0; public const int WL_WATER_FOG_DENSITY_EXPONENT = 1; public const int WL_UNDERWATER_FOG_MODIFIER = 2; public const int WL_REFLECTION_WAVELET_SCALE = 3; public const int WL_FRESNEL_SCALE = 4; public const int WL_FRESNEL_OFFSET = 5; public const int WL_REFRACT_SCALE_ABOVE = 6; public const int WL_REFRACT_SCALE_BELOW = 7; public const int WL_BLUR_MULTIPLIER = 8; public const int WL_BIG_WAVE_DIRECTION = 9; public const int WL_LITTLE_WAVE_DIRECTION = 10; public const int WL_NORMAL_MAP_TEXTURE = 11; public const int WL_HORIZON = 12; public const int WL_HAZE_HORIZON = 13; public const int WL_BLUE_DENSITY = 14; public const int WL_HAZE_DENSITY = 15; public const int WL_DENSITY_MULTIPLIER = 16; public const int WL_DISTANCE_MULTIPLIER = 17; public const int WL_MAX_ALTITUDE = 18; public const int WL_SUN_MOON_COLOR = 19; public const int WL_AMBIENT = 20; public const int WL_EAST_ANGLE = 21; public const int WL_SUN_GLOW_FOCUS = 22; public const int WL_SUN_GLOW_SIZE = 23; public const int WL_SCENE_GAMMA = 24; public const int WL_STAR_BRIGHTNESS = 25; public const int WL_CLOUD_COLOR = 26; public const int WL_CLOUD_XY_DENSITY = 27; public const int WL_CLOUD_COVERAGE = 28; public const int WL_CLOUD_SCALE = 29; public const int WL_CLOUD_DETAIL_XY_DENSITY = 30; public const int WL_CLOUD_SCROLL_X = 31; public const int WL_CLOUD_SCROLL_Y = 32; public const int WL_CLOUD_SCROLL_Y_LOCK = 33; public const int WL_CLOUD_SCROLL_X_LOCK = 34; public const int WL_DRAW_CLASSIC_CLOUDS = 35; public const int WL_SUN_MOON_POSITION = 36; } }
48.336876
157
0.676179
[ "BSD-3-Clause" ]
Wikilook-LiveLIVE/opensim
OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
45,485
C#
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.Aws.ElasticTranscoder.Outputs { [OutputType] public sealed class PipelineThumbnailConfigPermission { /// <summary> /// The permission that you want to give to the AWS user that you specified in `thumbnail_config_permissions.grantee`. Valid values are `Read`, `ReadAcp`, `WriteAcp` or `FullControl`. /// </summary> public readonly ImmutableArray<string> Accesses; /// <summary> /// The AWS user or group that you want to have access to thumbnail files. /// </summary> public readonly string? Grantee; /// <summary> /// Specify the type of value that appears in the `thumbnail_config_permissions.grantee` object. Valid values are `Canonical`, `Email` or `Group`. /// </summary> public readonly string? GranteeType; [OutputConstructor] private PipelineThumbnailConfigPermission( ImmutableArray<string> accesses, string? grantee, string? granteeType) { Accesses = accesses; Grantee = grantee; GranteeType = granteeType; } } }
34.27907
191
0.649932
[ "ECL-2.0", "Apache-2.0" ]
RafalSumislawski/pulumi-aws
sdk/dotnet/ElasticTranscoder/Outputs/PipelineThumbnailConfigPermission.cs
1,474
C#