content
stringlengths
5
1.04M
avg_line_length
float64
1.75
12.9k
max_line_length
int64
2
244k
alphanum_fraction
float64
0
0.98
licenses
list
repository_name
stringlengths
7
92
path
stringlengths
3
249
size
int64
5
1.04M
lang
stringclasses
2 values
/* * Copyright 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 machinelearning-2014-12-12.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.MachineLearning.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.MachineLearning.Model.Internal.MarshallTransformations { /// <summary> /// UpdateMLModel Request Marshaller /// </summary> public class UpdateMLModelRequestMarshaller : IMarshaller<IRequest, UpdateMLModelRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((UpdateMLModelRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(UpdateMLModelRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.MachineLearning"); string target = "AmazonML_20141212.UpdateMLModel"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2014-12-12"; request.HttpMethod = "POST"; request.ResourcePath = "/"; request.MarshallerVersion = 2; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetMLModelId()) { context.Writer.WritePropertyName("MLModelId"); context.Writer.Write(publicRequest.MLModelId); } if(publicRequest.IsSetMLModelName()) { context.Writer.WritePropertyName("MLModelName"); context.Writer.Write(publicRequest.MLModelName); } if(publicRequest.IsSetScoreThreshold()) { context.Writer.WritePropertyName("ScoreThreshold"); context.Writer.Write(publicRequest.ScoreThreshold); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static UpdateMLModelRequestMarshaller _instance = new UpdateMLModelRequestMarshaller(); internal static UpdateMLModelRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static UpdateMLModelRequestMarshaller Instance { get { return _instance; } } } }
36.512821
142
0.599953
[ "Apache-2.0" ]
philasmar/aws-sdk-net
sdk/src/Services/MachineLearning/Generated/Model/Internal/MarshallTransformations/UpdateMLModelRequestMarshaller.cs
4,272
C#
using System; using System.Collections.Generic; using System.Threading.Tasks; using MediatR; using Moq; using NLog; using NUnit.Framework; using SFA.DAS.EmployerUsers.Application.Commands.RequestChangeEmail; using SFA.DAS.EmployerUsers.Application.Exceptions; using SFA.DAS.EmployerUsers.Application.Queries.GetRelyingParty; using SFA.DAS.EmployerUsers.Web.Authentication; using SFA.DAS.EmployerUsers.Web.Models; using SFA.DAS.EmployerUsers.Web.Models.SFA.DAS.EAS.Web.Models; using SFA.DAS.EmployerUsers.Web.Orchestrators; namespace SFA.DAS.EmployerUsers.Web.UnitTests.OrchestratorTests.AccountOrchestratorTests { public class WhenRequestingChangeEmail { private const string UserId = "USER1"; private const string EmailAddress = "user.one@unit.test"; private const string ReturnUrl = "http://unit.test"; private ChangeEmailViewModel _model; private Mock<IMediator> _mediator; private Mock<IOwinWrapper> _owinWrapper; private AccountOrchestrator _orchestrator; private Mock<ILogger> _logger; [SetUp] public void Arrange() { _model = new ChangeEmailViewModel { UserId = UserId, NewEmailAddress = EmailAddress, ConfirmEmailAddress = EmailAddress, ClientId = "MyClient", ReturnUrl = ReturnUrl }; _mediator = new Mock<IMediator>(); _mediator.Setup(m => m.SendAsync(It.Is<GetRelyingPartyQuery>(q => q.Id == "MyClient"))) .ReturnsAsync(new Domain.RelyingParty { Id = "MyClient", ApplicationUrl = "http://unit.test" }); _mediator.Setup(m => m.SendAsync(ItIsRequestChangeEmailCommandForModel())) .Returns(Task.FromResult(new RequestChangeEmailCommandResponse())); _owinWrapper = new Mock<IOwinWrapper>(); _logger = new Mock<ILogger>(); _orchestrator = new AccountOrchestrator(_mediator.Object, _owinWrapper.Object, _logger.Object); } [Test] public async Task ThenItShouldReturnAnInstanceOfChangeEmailViewModel() { // Act var actual = await _orchestrator.RequestChangeEmail(_model); // Assert Assert.IsNotNull(actual); } [Test] public async Task ThenItShouldReturnValidIfNoErrors() { // Act var actual = await _orchestrator.RequestChangeEmail(_model); // Assert Assert.IsTrue(actual.Data.Valid); } [Test] public async Task ThenItShouldReturnInvalidAndErrorDetailsIfValidationErrorsOccurs() { //Arrange _mediator.Setup(m => m.SendAsync(ItIsRequestChangeEmailCommandForModel())) .ThrowsAsync(new InvalidRequestException(new Dictionary<string, string> { { "ConfirmEmailAddress", "Error" } })); // Act var actual = await _orchestrator.RequestChangeEmail(_model); // Assert Assert.IsFalse(actual.Data.Valid); Assert.IsNotNull(actual.Data.ErrorDictionary); Assert.IsTrue(actual.Data.ErrorDictionary.ContainsKey("ConfirmEmailAddress")); Assert.AreEqual(FlashMessageSeverityLevel.Error,actual.FlashMessage.Severity); } [Test] public async Task ThenItShouldReturnInvalidAndErrorDetailsIfNonValidationErrorsOccurs() { //Arrange _mediator.Setup(m => m.SendAsync(ItIsRequestChangeEmailCommandForModel())) .ThrowsAsync(new Exception("Error")); // Act var actual = await _orchestrator.RequestChangeEmail(_model); // Assert Assert.IsFalse(actual.Data.Valid); Assert.IsNotNull(actual.Data.ErrorDictionary); Assert.IsTrue(actual.Data.ErrorDictionary.ContainsKey("")); Assert.AreEqual("Error", actual.Data.ErrorDictionary[""]); } [TestCase("MyClient", "http://unit.test")] [TestCase("MyClient", "http://unit.test/")] [TestCase("MyClient", "http://unit.test/some/path")] public async Task ThenItShouldReturnAValidModelIfReturnUrlValidForClientId(string requestedClientId, string requestedReturnUrl) { // Arrange _model.ClientId = requestedClientId; _model.ReturnUrl = requestedReturnUrl; // Act var actual = await _orchestrator.RequestChangeEmail(_model); // Assert Assert.IsNotNull(actual); Assert.IsTrue(actual.Data.Valid); } [Test] public async Task ThenItShouldReturnInvalidModelIfClientIdNotFound() { // Arrange _model.ClientId = "NotMyClient"; _model.ReturnUrl = "http://unit.test"; // Act var actual = await _orchestrator.RequestChangeEmail(_model); // Assert Assert.IsNotNull(actual); Assert.IsFalse(actual.Data.Valid); } [TestCase("http://sub.unit.test")] [TestCase("https://unit.test")] [TestCase("https://another.domain")] public async Task ThenItShouldReturnInvalidModelIfReturnUrlNotValidForClientId(string returnUrl) { // Arrange _model.ClientId = "MyClient"; _model.ReturnUrl = returnUrl; // Act var actual = await _orchestrator.RequestChangeEmail(_model); // Assert Assert.IsNotNull(actual); Assert.IsFalse(actual.Data.Valid); } private RequestChangeEmailCommand ItIsRequestChangeEmailCommandForModel() { return It.Is<RequestChangeEmailCommand>(c => c.UserId == _model.UserId && c.NewEmailAddress == _model.NewEmailAddress && c.ConfirmEmailAddress == _model.ConfirmEmailAddress && c.ReturnUrl == ReturnUrl); } } }
36.936416
136
0.588419
[ "MIT" ]
SkillsFundingAgency/das-employerusers
src/SFA.DAS.EmployerUsers.Web.UnitTests/OrchestratorTests/AccountOrchestratorTests/WhenRequestingChangeEmail.cs
6,392
C#
// <copyright file="Timeouts.cs" company="WebDriver Committers"> // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // </copyright> using System; using System.Collections.Generic; using System.Globalization; namespace OpenQA.Selenium { /// <summary> /// Defines the interface through which the user can define timeouts. /// </summary> internal class Timeouts : ITimeouts { private const string ImplicitTimeoutName = "implicit"; private const string AsyncScriptTimeoutName = "script"; private const string PageLoadTimeoutName = "pageLoad"; private const string LegacyPageLoadTimeoutName = "page load"; private readonly TimeSpan DefaultImplicitWaitTimeout = TimeSpan.FromSeconds(0); private readonly TimeSpan DefaultAsyncScriptTimeout = TimeSpan.FromSeconds(30); private readonly TimeSpan DefaultPageLoadTimeout = TimeSpan.FromSeconds(300); private WebDriver driver; /// <summary> /// Initializes a new instance of the <see cref="Timeouts"/> class /// </summary> /// <param name="driver">The driver that is currently in use</param> public Timeouts(WebDriver driver) { this.driver = driver; } /// <summary> /// Gets or sets the implicit wait timeout, which is the amount of time the /// driver should wait when searching for an element if it is not immediately /// present. /// </summary> /// <remarks> /// When searching for a single element, the driver should poll the page /// until the element has been found, or this timeout expires before throwing /// a <see cref="NoSuchElementException"/>. When searching for multiple elements, /// the driver should poll the page until at least one element has been found /// or this timeout has expired. /// <para> /// Increasing the implicit wait timeout should be used judiciously as it /// will have an adverse effect on test run time, especially when used with /// slower location strategies like XPath. /// </para> /// </remarks> public TimeSpan ImplicitWait { get { return this.ExecuteGetTimeout(ImplicitTimeoutName); } set { this.ExecuteSetTimeout(ImplicitTimeoutName, value); } } /// <summary> /// Gets or sets the asynchronous script timeout, which is the amount /// of time the driver should wait when executing JavaScript asynchronously. /// This timeout only affects the <see cref="IJavaScriptExecutor.ExecuteAsyncScript(string, object[])"/> /// method. /// </summary> public TimeSpan AsynchronousJavaScript { get { return this.ExecuteGetTimeout(AsyncScriptTimeoutName); } set { this.ExecuteSetTimeout(AsyncScriptTimeoutName, value); } } /// <summary> /// Gets or sets the page load timeout, which is the amount of time the driver /// should wait for a page to load when setting the <see cref="IWebDriver.Url"/> /// property. /// </summary> public TimeSpan PageLoad { get { string timeoutName = PageLoadTimeoutName; return this.ExecuteGetTimeout(timeoutName); } set { string timeoutName = PageLoadTimeoutName; this.ExecuteSetTimeout(timeoutName, value); } } private TimeSpan ExecuteGetTimeout(string timeoutType) { Response commandResponse = this.driver.InternalExecute(DriverCommand.GetTimeouts, null); Dictionary<string, object> responseValue = (Dictionary<string, object>)commandResponse.Value; if (!responseValue.ContainsKey(timeoutType)) { throw new WebDriverException("Specified timeout type not defined"); } return TimeSpan.FromMilliseconds(Convert.ToDouble(responseValue[timeoutType], CultureInfo.InvariantCulture)); } private void ExecuteSetTimeout(string timeoutType, TimeSpan timeToWait) { double milliseconds = timeToWait.TotalMilliseconds; if (timeToWait == TimeSpan.MinValue) { if (timeoutType == ImplicitTimeoutName) { milliseconds = DefaultImplicitWaitTimeout.TotalMilliseconds; } else if (timeoutType == AsyncScriptTimeoutName) { milliseconds = DefaultAsyncScriptTimeout.TotalMilliseconds; } else { milliseconds = DefaultPageLoadTimeout.TotalMilliseconds; } } Dictionary<string, object> parameters = new Dictionary<string, object>(); parameters.Add(timeoutType, Convert.ToInt64(milliseconds)); this.driver.InternalExecute(DriverCommand.SetTimeouts, parameters); } } }
41.253521
121
0.634517
[ "Apache-2.0" ]
10088/selenium
dotnet/src/webdriver/Timeouts.cs
5,858
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("SharedComponents")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("SharedComponents")] [assembly: AssemblyCopyright("Copyright © Microsoft 2015")] [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("581a9c04-4407-4db7-a139-8e6ca64915a9")] // 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.297297
84
0.752999
[ "MIT" ]
GeoSTGames/penumbra
Samples/Shared/Common/Properties/AssemblyInfo.cs
1,418
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 elasticmapreduce-2009-03-31.normal.json service model. */ using System; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Amazon.Runtime; using Amazon.ElasticMapReduce.Model; namespace Amazon.ElasticMapReduce { /// <summary> /// Interface for accessing ElasticMapReduce /// /// Amazon EMR is a web service that makes it easy to process large amounts of data efficiently. /// Amazon EMR uses Hadoop processing combined with several AWS products to do tasks such /// as web indexing, data mining, log file analysis, machine learning, scientific simulation, /// and data warehousing. /// </summary> public partial interface IAmazonElasticMapReduce : IAmazonService, IDisposable { #region AddInstanceFleet /// <summary> /// Adds an instance fleet to a running cluster. /// /// <note> /// <para> /// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and /// later, excluding 5.0.x. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddInstanceFleet service method.</param> /// /// <returns>The response from the AddInstanceFleet service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceFleet">REST API Reference for AddInstanceFleet Operation</seealso> AddInstanceFleetResponse AddInstanceFleet(AddInstanceFleetRequest request); /// <summary> /// Adds an instance fleet to a running cluster. /// /// <note> /// <para> /// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and /// later, excluding 5.0.x. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddInstanceFleet 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 AddInstanceFleet service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceFleet">REST API Reference for AddInstanceFleet Operation</seealso> Task<AddInstanceFleetResponse> AddInstanceFleetAsync(AddInstanceFleetRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region AddInstanceGroups /// <summary> /// Adds one or more instance groups to a running cluster. /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddInstanceGroups service method.</param> /// /// <returns>The response from the AddInstanceGroups service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceGroups">REST API Reference for AddInstanceGroups Operation</seealso> AddInstanceGroupsResponse AddInstanceGroups(AddInstanceGroupsRequest request); /// <summary> /// Adds one or more instance groups to a running cluster. /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddInstanceGroups 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 AddInstanceGroups service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceGroups">REST API Reference for AddInstanceGroups Operation</seealso> Task<AddInstanceGroupsResponse> AddInstanceGroupsAsync(AddInstanceGroupsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region AddJobFlowSteps /// <summary> /// AddJobFlowSteps adds new steps to a running cluster. A maximum of 256 steps are allowed /// in each job flow. /// /// /// <para> /// If your cluster is long-running (such as a Hive data warehouse) or complex, you may /// require more than 256 steps to process your data. You can bypass the 256-step limitation /// in various ways, including using SSH to connect to the master node and submitting /// queries directly to the software running on the master node, such as Hive and Hadoop. /// For more information on how to do this, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html">Add /// More than 256 Steps to a Cluster</a> in the <i>Amazon EMR Management Guide</i>. /// </para> /// /// <para> /// A step specifies the location of a JAR file stored either on the master node of the /// cluster or in Amazon S3. Each step is performed by the main function of the main class /// of the JAR file. The main class can be specified either in the manifest of the JAR /// or by using the MainFunction parameter of the step. /// </para> /// /// <para> /// Amazon EMR executes each step in the order listed. For a step to be considered complete, /// the main function must exit with a zero exit code and all Hadoop jobs started while /// the step was running must have completed and run successfully. /// </para> /// /// <para> /// You can only add steps to a cluster that is in one of the following states: STARTING, /// BOOTSTRAPPING, RUNNING, or WAITING. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddJobFlowSteps service method.</param> /// /// <returns>The response from the AddJobFlowSteps service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddJobFlowSteps">REST API Reference for AddJobFlowSteps Operation</seealso> AddJobFlowStepsResponse AddJobFlowSteps(AddJobFlowStepsRequest request); /// <summary> /// AddJobFlowSteps adds new steps to a running cluster. A maximum of 256 steps are allowed /// in each job flow. /// /// /// <para> /// If your cluster is long-running (such as a Hive data warehouse) or complex, you may /// require more than 256 steps to process your data. You can bypass the 256-step limitation /// in various ways, including using SSH to connect to the master node and submitting /// queries directly to the software running on the master node, such as Hive and Hadoop. /// For more information on how to do this, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html">Add /// More than 256 Steps to a Cluster</a> in the <i>Amazon EMR Management Guide</i>. /// </para> /// /// <para> /// A step specifies the location of a JAR file stored either on the master node of the /// cluster or in Amazon S3. Each step is performed by the main function of the main class /// of the JAR file. The main class can be specified either in the manifest of the JAR /// or by using the MainFunction parameter of the step. /// </para> /// /// <para> /// Amazon EMR executes each step in the order listed. For a step to be considered complete, /// the main function must exit with a zero exit code and all Hadoop jobs started while /// the step was running must have completed and run successfully. /// </para> /// /// <para> /// You can only add steps to a cluster that is in one of the following states: STARTING, /// BOOTSTRAPPING, RUNNING, or WAITING. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddJobFlowSteps 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 AddJobFlowSteps service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddJobFlowSteps">REST API Reference for AddJobFlowSteps Operation</seealso> Task<AddJobFlowStepsResponse> AddJobFlowStepsAsync(AddJobFlowStepsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region AddTags /// <summary> /// Adds tags to an Amazon EMR resource. Tags make it easier to associate clusters in /// various ways, such as grouping clusters to track your Amazon EMR resource allocation /// costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag /// Clusters</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param> /// /// <returns>The response from the AddTags service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddTags">REST API Reference for AddTags Operation</seealso> AddTagsResponse AddTags(AddTagsRequest request); /// <summary> /// Adds tags to an Amazon EMR resource. Tags make it easier to associate clusters in /// various ways, such as grouping clusters to track your Amazon EMR resource allocation /// costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag /// Clusters</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddTags 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 AddTags service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddTags">REST API Reference for AddTags Operation</seealso> Task<AddTagsResponse> AddTagsAsync(AddTagsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CancelSteps /// <summary> /// Cancels a pending step or steps in a running cluster. Available only in Amazon EMR /// versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed /// in each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not /// guarantee a step will be canceled, even if the request is successfully submitted. /// You can only cancel steps that are in a <code>PENDING</code> state. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CancelSteps service method.</param> /// /// <returns>The response from the CancelSteps service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CancelSteps">REST API Reference for CancelSteps Operation</seealso> CancelStepsResponse CancelSteps(CancelStepsRequest request); /// <summary> /// Cancels a pending step or steps in a running cluster. Available only in Amazon EMR /// versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed /// in each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not /// guarantee a step will be canceled, even if the request is successfully submitted. /// You can only cancel steps that are in a <code>PENDING</code> state. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CancelSteps 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 CancelSteps service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CancelSteps">REST API Reference for CancelSteps Operation</seealso> Task<CancelStepsResponse> CancelStepsAsync(CancelStepsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateSecurityConfiguration /// <summary> /// Creates a security configuration, which is stored in the service and can be specified /// when a cluster is created. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateSecurityConfiguration service method.</param> /// /// <returns>The response from the CreateSecurityConfiguration service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateSecurityConfiguration">REST API Reference for CreateSecurityConfiguration Operation</seealso> CreateSecurityConfigurationResponse CreateSecurityConfiguration(CreateSecurityConfigurationRequest request); /// <summary> /// Creates a security configuration, which is stored in the service and can be specified /// when a cluster is created. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateSecurityConfiguration 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 CreateSecurityConfiguration service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateSecurityConfiguration">REST API Reference for CreateSecurityConfiguration Operation</seealso> Task<CreateSecurityConfigurationResponse> CreateSecurityConfigurationAsync(CreateSecurityConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteSecurityConfiguration /// <summary> /// Deletes a security configuration. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteSecurityConfiguration service method.</param> /// /// <returns>The response from the DeleteSecurityConfiguration service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteSecurityConfiguration">REST API Reference for DeleteSecurityConfiguration Operation</seealso> DeleteSecurityConfigurationResponse DeleteSecurityConfiguration(DeleteSecurityConfigurationRequest request); /// <summary> /// Deletes a security configuration. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteSecurityConfiguration 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 DeleteSecurityConfiguration service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteSecurityConfiguration">REST API Reference for DeleteSecurityConfiguration Operation</seealso> Task<DeleteSecurityConfigurationResponse> DeleteSecurityConfigurationAsync(DeleteSecurityConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeCluster /// <summary> /// Provides cluster-level details including status, hardware and software configuration, /// VPC settings, and so on. /// </summary> /// /// <returns>The response from the DescribeCluster service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeCluster">REST API Reference for DescribeCluster Operation</seealso> DescribeClusterResponse DescribeCluster(); /// <summary> /// Provides cluster-level details including status, hardware and software configuration, /// VPC settings, and so on. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeCluster service method.</param> /// /// <returns>The response from the DescribeCluster service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeCluster">REST API Reference for DescribeCluster Operation</seealso> DescribeClusterResponse DescribeCluster(DescribeClusterRequest request); /// <summary> /// Provides cluster-level details including status, hardware and software configuration, /// VPC settings, and so on. /// </summary> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeCluster service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeCluster">REST API Reference for DescribeCluster Operation</seealso> Task<DescribeClusterResponse> DescribeClusterAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// <summary> /// Provides cluster-level details including status, hardware and software configuration, /// VPC settings, and so on. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeCluster 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 DescribeCluster service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeCluster">REST API Reference for DescribeCluster Operation</seealso> Task<DescribeClusterResponse> DescribeClusterAsync(DescribeClusterRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeJobFlows /// <summary> /// This API is deprecated and will eventually be removed. We recommend you use <a>ListClusters</a>, /// <a>DescribeCluster</a>, <a>ListSteps</a>, <a>ListInstanceGroups</a> and <a>ListBootstrapActions</a> /// instead. /// /// /// <para> /// DescribeJobFlows returns a list of job flows that match all of the supplied parameters. /// The parameters can include a list of job flow IDs, job flow states, and restrictions /// on job flow creation date and time. /// </para> /// /// <para> /// Regardless of supplied parameters, only job flows created within the last two months /// are returned. /// </para> /// /// <para> /// If no parameters are supplied, then job flows matching either of the following criteria /// are returned: /// </para> /// <ul> <li> /// <para> /// Job flows created and completed in the last two weeks /// </para> /// </li> <li> /// <para> /// Job flows created within the last two months that are in one of the following states: /// <code>RUNNING</code>, <code>WAITING</code>, <code>SHUTTING_DOWN</code>, <code>STARTING</code> /// /// </para> /// </li> </ul> /// <para> /// Amazon EMR can return a maximum of 512 job flow descriptions. /// </para> /// </summary> /// /// <returns>The response from the DescribeJobFlows service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows">REST API Reference for DescribeJobFlows Operation</seealso> [Obsolete("This API is deprecated and will eventually be removed. We recommend that you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.")] DescribeJobFlowsResponse DescribeJobFlows(); /// <summary> /// This API is deprecated and will eventually be removed. We recommend you use <a>ListClusters</a>, /// <a>DescribeCluster</a>, <a>ListSteps</a>, <a>ListInstanceGroups</a> and <a>ListBootstrapActions</a> /// instead. /// /// /// <para> /// DescribeJobFlows returns a list of job flows that match all of the supplied parameters. /// The parameters can include a list of job flow IDs, job flow states, and restrictions /// on job flow creation date and time. /// </para> /// /// <para> /// Regardless of supplied parameters, only job flows created within the last two months /// are returned. /// </para> /// /// <para> /// If no parameters are supplied, then job flows matching either of the following criteria /// are returned: /// </para> /// <ul> <li> /// <para> /// Job flows created and completed in the last two weeks /// </para> /// </li> <li> /// <para> /// Job flows created within the last two months that are in one of the following states: /// <code>RUNNING</code>, <code>WAITING</code>, <code>SHUTTING_DOWN</code>, <code>STARTING</code> /// /// </para> /// </li> </ul> /// <para> /// Amazon EMR can return a maximum of 512 job flow descriptions. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeJobFlows service method.</param> /// /// <returns>The response from the DescribeJobFlows service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows">REST API Reference for DescribeJobFlows Operation</seealso> [Obsolete("This API is deprecated and will eventually be removed. We recommend that you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.")] DescribeJobFlowsResponse DescribeJobFlows(DescribeJobFlowsRequest request); /// <summary> /// This API is deprecated and will eventually be removed. We recommend you use <a>ListClusters</a>, /// <a>DescribeCluster</a>, <a>ListSteps</a>, <a>ListInstanceGroups</a> and <a>ListBootstrapActions</a> /// instead. /// /// /// <para> /// DescribeJobFlows returns a list of job flows that match all of the supplied parameters. /// The parameters can include a list of job flow IDs, job flow states, and restrictions /// on job flow creation date and time. /// </para> /// /// <para> /// Regardless of supplied parameters, only job flows created within the last two months /// are returned. /// </para> /// /// <para> /// If no parameters are supplied, then job flows matching either of the following criteria /// are returned: /// </para> /// <ul> <li> /// <para> /// Job flows created and completed in the last two weeks /// </para> /// </li> <li> /// <para> /// Job flows created within the last two months that are in one of the following states: /// <code>RUNNING</code>, <code>WAITING</code>, <code>SHUTTING_DOWN</code>, <code>STARTING</code> /// /// </para> /// </li> </ul> /// <para> /// Amazon EMR can return a maximum of 512 job flow descriptions. /// </para> /// </summary> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeJobFlows service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows">REST API Reference for DescribeJobFlows Operation</seealso> [Obsolete("This API is deprecated and will eventually be removed. We recommend that you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.")] Task<DescribeJobFlowsResponse> DescribeJobFlowsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// <summary> /// This API is deprecated and will eventually be removed. We recommend you use <a>ListClusters</a>, /// <a>DescribeCluster</a>, <a>ListSteps</a>, <a>ListInstanceGroups</a> and <a>ListBootstrapActions</a> /// instead. /// /// /// <para> /// DescribeJobFlows returns a list of job flows that match all of the supplied parameters. /// The parameters can include a list of job flow IDs, job flow states, and restrictions /// on job flow creation date and time. /// </para> /// /// <para> /// Regardless of supplied parameters, only job flows created within the last two months /// are returned. /// </para> /// /// <para> /// If no parameters are supplied, then job flows matching either of the following criteria /// are returned: /// </para> /// <ul> <li> /// <para> /// Job flows created and completed in the last two weeks /// </para> /// </li> <li> /// <para> /// Job flows created within the last two months that are in one of the following states: /// <code>RUNNING</code>, <code>WAITING</code>, <code>SHUTTING_DOWN</code>, <code>STARTING</code> /// /// </para> /// </li> </ul> /// <para> /// Amazon EMR can return a maximum of 512 job flow descriptions. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeJobFlows 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 DescribeJobFlows service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows">REST API Reference for DescribeJobFlows Operation</seealso> [Obsolete("This API is deprecated and will eventually be removed. We recommend that you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.")] Task<DescribeJobFlowsResponse> DescribeJobFlowsAsync(DescribeJobFlowsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeSecurityConfiguration /// <summary> /// Provides the details of a security configuration by returning the configuration JSON. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeSecurityConfiguration service method.</param> /// /// <returns>The response from the DescribeSecurityConfiguration service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeSecurityConfiguration">REST API Reference for DescribeSecurityConfiguration Operation</seealso> DescribeSecurityConfigurationResponse DescribeSecurityConfiguration(DescribeSecurityConfigurationRequest request); /// <summary> /// Provides the details of a security configuration by returning the configuration JSON. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeSecurityConfiguration 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 DescribeSecurityConfiguration service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeSecurityConfiguration">REST API Reference for DescribeSecurityConfiguration Operation</seealso> Task<DescribeSecurityConfigurationResponse> DescribeSecurityConfigurationAsync(DescribeSecurityConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeStep /// <summary> /// Provides more detail about the cluster step. /// </summary> /// /// <returns>The response from the DescribeStep service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStep">REST API Reference for DescribeStep Operation</seealso> DescribeStepResponse DescribeStep(); /// <summary> /// Provides more detail about the cluster step. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeStep service method.</param> /// /// <returns>The response from the DescribeStep service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStep">REST API Reference for DescribeStep Operation</seealso> DescribeStepResponse DescribeStep(DescribeStepRequest request); /// <summary> /// Provides more detail about the cluster step. /// </summary> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeStep service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStep">REST API Reference for DescribeStep Operation</seealso> Task<DescribeStepResponse> DescribeStepAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// <summary> /// Provides more detail about the cluster step. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeStep 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 DescribeStep service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStep">REST API Reference for DescribeStep Operation</seealso> Task<DescribeStepResponse> DescribeStepAsync(DescribeStepRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region GetBlockPublicAccessConfiguration /// <summary> /// Returns the Amazon EMR block public access configuration for your AWS account in the /// current Region. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html">Configure /// Block Public Access for Amazon EMR</a> in the <i>Amazon EMR Management Guide</i>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetBlockPublicAccessConfiguration service method.</param> /// /// <returns>The response from the GetBlockPublicAccessConfiguration service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetBlockPublicAccessConfiguration">REST API Reference for GetBlockPublicAccessConfiguration Operation</seealso> GetBlockPublicAccessConfigurationResponse GetBlockPublicAccessConfiguration(GetBlockPublicAccessConfigurationRequest request); /// <summary> /// Returns the Amazon EMR block public access configuration for your AWS account in the /// current Region. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html">Configure /// Block Public Access for Amazon EMR</a> in the <i>Amazon EMR Management Guide</i>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetBlockPublicAccessConfiguration 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 GetBlockPublicAccessConfiguration service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetBlockPublicAccessConfiguration">REST API Reference for GetBlockPublicAccessConfiguration Operation</seealso> Task<GetBlockPublicAccessConfigurationResponse> GetBlockPublicAccessConfigurationAsync(GetBlockPublicAccessConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListBootstrapActions /// <summary> /// Provides information about the bootstrap actions associated with a cluster. /// </summary> /// /// <returns>The response from the ListBootstrapActions service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListBootstrapActions">REST API Reference for ListBootstrapActions Operation</seealso> ListBootstrapActionsResponse ListBootstrapActions(); /// <summary> /// Provides information about the bootstrap actions associated with a cluster. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListBootstrapActions service method.</param> /// /// <returns>The response from the ListBootstrapActions service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListBootstrapActions">REST API Reference for ListBootstrapActions Operation</seealso> ListBootstrapActionsResponse ListBootstrapActions(ListBootstrapActionsRequest request); /// <summary> /// Provides information about the bootstrap actions associated with a cluster. /// </summary> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListBootstrapActions service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListBootstrapActions">REST API Reference for ListBootstrapActions Operation</seealso> Task<ListBootstrapActionsResponse> ListBootstrapActionsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// <summary> /// Provides information about the bootstrap actions associated with a cluster. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListBootstrapActions 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 ListBootstrapActions service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListBootstrapActions">REST API Reference for ListBootstrapActions Operation</seealso> Task<ListBootstrapActionsResponse> ListBootstrapActionsAsync(ListBootstrapActionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListClusters /// <summary> /// Provides the status of all clusters visible to this AWS account. Allows you to filter /// the list of clusters based on certain criteria; for example, filtering by cluster /// creation date and time or by status. This call returns a maximum of 50 clusters per /// call, but returns a marker to track the paging of the cluster list across multiple /// ListClusters calls. /// </summary> /// /// <returns>The response from the ListClusters service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListClusters">REST API Reference for ListClusters Operation</seealso> ListClustersResponse ListClusters(); /// <summary> /// Provides the status of all clusters visible to this AWS account. Allows you to filter /// the list of clusters based on certain criteria; for example, filtering by cluster /// creation date and time or by status. This call returns a maximum of 50 clusters per /// call, but returns a marker to track the paging of the cluster list across multiple /// ListClusters calls. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListClusters service method.</param> /// /// <returns>The response from the ListClusters service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListClusters">REST API Reference for ListClusters Operation</seealso> ListClustersResponse ListClusters(ListClustersRequest request); /// <summary> /// Provides the status of all clusters visible to this AWS account. Allows you to filter /// the list of clusters based on certain criteria; for example, filtering by cluster /// creation date and time or by status. This call returns a maximum of 50 clusters per /// call, but returns a marker to track the paging of the cluster list across multiple /// ListClusters calls. /// </summary> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListClusters service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListClusters">REST API Reference for ListClusters Operation</seealso> Task<ListClustersResponse> ListClustersAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// <summary> /// Provides the status of all clusters visible to this AWS account. Allows you to filter /// the list of clusters based on certain criteria; for example, filtering by cluster /// creation date and time or by status. This call returns a maximum of 50 clusters per /// call, but returns a marker to track the paging of the cluster list across multiple /// ListClusters calls. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListClusters 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 ListClusters service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListClusters">REST API Reference for ListClusters Operation</seealso> Task<ListClustersResponse> ListClustersAsync(ListClustersRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListInstanceFleets /// <summary> /// Lists all available details about the instance fleets in a cluster. /// /// <note> /// <para> /// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and /// later, excluding 5.0.x versions. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListInstanceFleets service method.</param> /// /// <returns>The response from the ListInstanceFleets service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceFleets">REST API Reference for ListInstanceFleets Operation</seealso> ListInstanceFleetsResponse ListInstanceFleets(ListInstanceFleetsRequest request); /// <summary> /// Lists all available details about the instance fleets in a cluster. /// /// <note> /// <para> /// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and /// later, excluding 5.0.x versions. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListInstanceFleets 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 ListInstanceFleets service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceFleets">REST API Reference for ListInstanceFleets Operation</seealso> Task<ListInstanceFleetsResponse> ListInstanceFleetsAsync(ListInstanceFleetsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListInstanceGroups /// <summary> /// Provides all available details about the instance groups in a cluster. /// </summary> /// /// <returns>The response from the ListInstanceGroups service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceGroups">REST API Reference for ListInstanceGroups Operation</seealso> ListInstanceGroupsResponse ListInstanceGroups(); /// <summary> /// Provides all available details about the instance groups in a cluster. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListInstanceGroups service method.</param> /// /// <returns>The response from the ListInstanceGroups service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceGroups">REST API Reference for ListInstanceGroups Operation</seealso> ListInstanceGroupsResponse ListInstanceGroups(ListInstanceGroupsRequest request); /// <summary> /// Provides all available details about the instance groups in a cluster. /// </summary> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListInstanceGroups service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceGroups">REST API Reference for ListInstanceGroups Operation</seealso> Task<ListInstanceGroupsResponse> ListInstanceGroupsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// <summary> /// Provides all available details about the instance groups in a cluster. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListInstanceGroups 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 ListInstanceGroups service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceGroups">REST API Reference for ListInstanceGroups Operation</seealso> Task<ListInstanceGroupsResponse> ListInstanceGroupsAsync(ListInstanceGroupsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListInstances /// <summary> /// Provides information for all active EC2 instances and EC2 instances terminated in /// the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following /// states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING. /// </summary> /// /// <returns>The response from the ListInstances service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstances">REST API Reference for ListInstances Operation</seealso> ListInstancesResponse ListInstances(); /// <summary> /// Provides information for all active EC2 instances and EC2 instances terminated in /// the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following /// states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListInstances service method.</param> /// /// <returns>The response from the ListInstances service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstances">REST API Reference for ListInstances Operation</seealso> ListInstancesResponse ListInstances(ListInstancesRequest request); /// <summary> /// Provides information for all active EC2 instances and EC2 instances terminated in /// the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following /// states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING. /// </summary> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListInstances service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstances">REST API Reference for ListInstances Operation</seealso> Task<ListInstancesResponse> ListInstancesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// <summary> /// Provides information for all active EC2 instances and EC2 instances terminated in /// the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following /// states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListInstances 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 ListInstances service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstances">REST API Reference for ListInstances Operation</seealso> Task<ListInstancesResponse> ListInstancesAsync(ListInstancesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListSecurityConfigurations /// <summary> /// Lists all the security configurations visible to this account, providing their creation /// dates and times, and their names. This call returns a maximum of 50 clusters per call, /// but returns a marker to track the paging of the cluster list across multiple ListSecurityConfigurations /// calls. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListSecurityConfigurations service method.</param> /// /// <returns>The response from the ListSecurityConfigurations service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSecurityConfigurations">REST API Reference for ListSecurityConfigurations Operation</seealso> ListSecurityConfigurationsResponse ListSecurityConfigurations(ListSecurityConfigurationsRequest request); /// <summary> /// Lists all the security configurations visible to this account, providing their creation /// dates and times, and their names. This call returns a maximum of 50 clusters per call, /// but returns a marker to track the paging of the cluster list across multiple ListSecurityConfigurations /// calls. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListSecurityConfigurations 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 ListSecurityConfigurations service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSecurityConfigurations">REST API Reference for ListSecurityConfigurations Operation</seealso> Task<ListSecurityConfigurationsResponse> ListSecurityConfigurationsAsync(ListSecurityConfigurationsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListSteps /// <summary> /// Provides a list of steps for the cluster in reverse order unless you specify stepIds /// with the request. /// </summary> /// /// <returns>The response from the ListSteps service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSteps">REST API Reference for ListSteps Operation</seealso> ListStepsResponse ListSteps(); /// <summary> /// Provides a list of steps for the cluster in reverse order unless you specify stepIds /// with the request. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListSteps service method.</param> /// /// <returns>The response from the ListSteps service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSteps">REST API Reference for ListSteps Operation</seealso> ListStepsResponse ListSteps(ListStepsRequest request); /// <summary> /// Provides a list of steps for the cluster in reverse order unless you specify stepIds /// with the request. /// </summary> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListSteps service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSteps">REST API Reference for ListSteps Operation</seealso> Task<ListStepsResponse> ListStepsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// <summary> /// Provides a list of steps for the cluster in reverse order unless you specify stepIds /// with the request. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListSteps 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 ListSteps service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSteps">REST API Reference for ListSteps Operation</seealso> Task<ListStepsResponse> ListStepsAsync(ListStepsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ModifyInstanceFleet /// <summary> /// Modifies the target On-Demand and target Spot capacities for the instance fleet with /// the specified InstanceFleetID within the cluster specified using ClusterID. The call /// either succeeds or fails atomically. /// /// <note> /// <para> /// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and /// later, excluding 5.0.x versions. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ModifyInstanceFleet service method.</param> /// /// <returns>The response from the ModifyInstanceFleet service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceFleet">REST API Reference for ModifyInstanceFleet Operation</seealso> ModifyInstanceFleetResponse ModifyInstanceFleet(ModifyInstanceFleetRequest request); /// <summary> /// Modifies the target On-Demand and target Spot capacities for the instance fleet with /// the specified InstanceFleetID within the cluster specified using ClusterID. The call /// either succeeds or fails atomically. /// /// <note> /// <para> /// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and /// later, excluding 5.0.x versions. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ModifyInstanceFleet 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 ModifyInstanceFleet service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceFleet">REST API Reference for ModifyInstanceFleet Operation</seealso> Task<ModifyInstanceFleetResponse> ModifyInstanceFleetAsync(ModifyInstanceFleetRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ModifyInstanceGroups /// <summary> /// ModifyInstanceGroups modifies the number of nodes and configuration settings of an /// instance group. The input parameters include the new target instance count for the /// group and the instance group ID. The call will either succeed or fail atomically. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ModifyInstanceGroups service method.</param> /// /// <returns>The response from the ModifyInstanceGroups service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceGroups">REST API Reference for ModifyInstanceGroups Operation</seealso> ModifyInstanceGroupsResponse ModifyInstanceGroups(ModifyInstanceGroupsRequest request); /// <summary> /// ModifyInstanceGroups modifies the number of nodes and configuration settings of an /// instance group. The input parameters include the new target instance count for the /// group and the instance group ID. The call will either succeed or fail atomically. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ModifyInstanceGroups 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 ModifyInstanceGroups service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceGroups">REST API Reference for ModifyInstanceGroups Operation</seealso> Task<ModifyInstanceGroupsResponse> ModifyInstanceGroupsAsync(ModifyInstanceGroupsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region PutAutoScalingPolicy /// <summary> /// Creates or updates an automatic scaling policy for a core instance group or task instance /// group in an Amazon EMR cluster. The automatic scaling policy defines how an instance /// group dynamically adds and terminates EC2 instances in response to the value of a /// CloudWatch metric. /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutAutoScalingPolicy service method.</param> /// /// <returns>The response from the PutAutoScalingPolicy service method, as returned by ElasticMapReduce.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoScalingPolicy">REST API Reference for PutAutoScalingPolicy Operation</seealso> PutAutoScalingPolicyResponse PutAutoScalingPolicy(PutAutoScalingPolicyRequest request); /// <summary> /// Creates or updates an automatic scaling policy for a core instance group or task instance /// group in an Amazon EMR cluster. The automatic scaling policy defines how an instance /// group dynamically adds and terminates EC2 instances in response to the value of a /// CloudWatch metric. /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutAutoScalingPolicy 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 PutAutoScalingPolicy service method, as returned by ElasticMapReduce.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoScalingPolicy">REST API Reference for PutAutoScalingPolicy Operation</seealso> Task<PutAutoScalingPolicyResponse> PutAutoScalingPolicyAsync(PutAutoScalingPolicyRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region PutBlockPublicAccessConfiguration /// <summary> /// Creates or updates an Amazon EMR block public access configuration for your AWS account /// in the current Region. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html">Configure /// Block Public Access for Amazon EMR</a> in the <i>Amazon EMR Management Guide</i>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutBlockPublicAccessConfiguration service method.</param> /// /// <returns>The response from the PutBlockPublicAccessConfiguration service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutBlockPublicAccessConfiguration">REST API Reference for PutBlockPublicAccessConfiguration Operation</seealso> PutBlockPublicAccessConfigurationResponse PutBlockPublicAccessConfiguration(PutBlockPublicAccessConfigurationRequest request); /// <summary> /// Creates or updates an Amazon EMR block public access configuration for your AWS account /// in the current Region. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html">Configure /// Block Public Access for Amazon EMR</a> in the <i>Amazon EMR Management Guide</i>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutBlockPublicAccessConfiguration 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 PutBlockPublicAccessConfiguration service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutBlockPublicAccessConfiguration">REST API Reference for PutBlockPublicAccessConfiguration Operation</seealso> Task<PutBlockPublicAccessConfigurationResponse> PutBlockPublicAccessConfigurationAsync(PutBlockPublicAccessConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region RemoveAutoScalingPolicy /// <summary> /// Removes an automatic scaling policy from a specified instance group within an EMR /// cluster. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RemoveAutoScalingPolicy service method.</param> /// /// <returns>The response from the RemoveAutoScalingPolicy service method, as returned by ElasticMapReduce.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoScalingPolicy">REST API Reference for RemoveAutoScalingPolicy Operation</seealso> RemoveAutoScalingPolicyResponse RemoveAutoScalingPolicy(RemoveAutoScalingPolicyRequest request); /// <summary> /// Removes an automatic scaling policy from a specified instance group within an EMR /// cluster. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RemoveAutoScalingPolicy 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 RemoveAutoScalingPolicy service method, as returned by ElasticMapReduce.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoScalingPolicy">REST API Reference for RemoveAutoScalingPolicy Operation</seealso> Task<RemoveAutoScalingPolicyResponse> RemoveAutoScalingPolicyAsync(RemoveAutoScalingPolicyRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region RemoveTags /// <summary> /// Removes tags from an Amazon EMR resource. Tags make it easier to associate clusters /// in various ways, such as grouping clusters to track your Amazon EMR resource allocation /// costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag /// Clusters</a>. /// /// /// <para> /// The following example removes the stack tag with value Prod from a cluster: /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param> /// /// <returns>The response from the RemoveTags service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveTags">REST API Reference for RemoveTags Operation</seealso> RemoveTagsResponse RemoveTags(RemoveTagsRequest request); /// <summary> /// Removes tags from an Amazon EMR resource. Tags make it easier to associate clusters /// in various ways, such as grouping clusters to track your Amazon EMR resource allocation /// costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag /// Clusters</a>. /// /// /// <para> /// The following example removes the stack tag with value Prod from a cluster: /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the RemoveTags 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 RemoveTags service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException"> /// This exception occurs when there is an internal failure in the EMR service. /// </exception> /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException"> /// This exception occurs when there is something wrong with user input. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveTags">REST API Reference for RemoveTags Operation</seealso> Task<RemoveTagsResponse> RemoveTagsAsync(RemoveTagsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region RunJobFlow /// <summary> /// RunJobFlow creates and starts running a new cluster (job flow). The cluster runs the /// steps specified. After the steps complete, the cluster stops and the HDFS partition /// is lost. To prevent loss of data, configure the last step of the job flow to store /// results in Amazon S3. If the <a>JobFlowInstancesConfig</a> <code>KeepJobFlowAliveWhenNoSteps</code> /// parameter is set to <code>TRUE</code>, the cluster transitions to the WAITING state /// rather than shutting down after the steps have completed. /// /// /// <para> /// For additional protection, you can set the <a>JobFlowInstancesConfig</a> <code>TerminationProtected</code> /// parameter to <code>TRUE</code> to lock the cluster and prevent it from being terminated /// by API call, user intervention, or in the event of a job flow error. /// </para> /// /// <para> /// A maximum of 256 steps are allowed in each job flow. /// </para> /// /// <para> /// If your cluster is long-running (such as a Hive data warehouse) or complex, you may /// require more than 256 steps to process your data. You can bypass the 256-step limitation /// in various ways, including using the SSH shell to connect to the master node and submitting /// queries directly to the software running on the master node, such as Hive and Hadoop. /// For more information on how to do this, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html">Add /// More than 256 Steps to a Cluster</a> in the <i>Amazon EMR Management Guide</i>. /// </para> /// /// <para> /// For long running clusters, we recommend that you periodically store your results. /// </para> /// <note> /// <para> /// The instance fleets configuration is available only in Amazon EMR versions 4.8.0 and /// later, excluding 5.0.x versions. The RunJobFlow request can contain InstanceFleets /// parameters or InstanceGroups parameters, but not both. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the RunJobFlow service method.</param> /// /// <returns>The response from the RunJobFlow service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RunJobFlow">REST API Reference for RunJobFlow Operation</seealso> RunJobFlowResponse RunJobFlow(RunJobFlowRequest request); /// <summary> /// RunJobFlow creates and starts running a new cluster (job flow). The cluster runs the /// steps specified. After the steps complete, the cluster stops and the HDFS partition /// is lost. To prevent loss of data, configure the last step of the job flow to store /// results in Amazon S3. If the <a>JobFlowInstancesConfig</a> <code>KeepJobFlowAliveWhenNoSteps</code> /// parameter is set to <code>TRUE</code>, the cluster transitions to the WAITING state /// rather than shutting down after the steps have completed. /// /// /// <para> /// For additional protection, you can set the <a>JobFlowInstancesConfig</a> <code>TerminationProtected</code> /// parameter to <code>TRUE</code> to lock the cluster and prevent it from being terminated /// by API call, user intervention, or in the event of a job flow error. /// </para> /// /// <para> /// A maximum of 256 steps are allowed in each job flow. /// </para> /// /// <para> /// If your cluster is long-running (such as a Hive data warehouse) or complex, you may /// require more than 256 steps to process your data. You can bypass the 256-step limitation /// in various ways, including using the SSH shell to connect to the master node and submitting /// queries directly to the software running on the master node, such as Hive and Hadoop. /// For more information on how to do this, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html">Add /// More than 256 Steps to a Cluster</a> in the <i>Amazon EMR Management Guide</i>. /// </para> /// /// <para> /// For long running clusters, we recommend that you periodically store your results. /// </para> /// <note> /// <para> /// The instance fleets configuration is available only in Amazon EMR versions 4.8.0 and /// later, excluding 5.0.x versions. The RunJobFlow request can contain InstanceFleets /// parameters or InstanceGroups parameters, but not both. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the RunJobFlow 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 RunJobFlow service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RunJobFlow">REST API Reference for RunJobFlow Operation</seealso> Task<RunJobFlowResponse> RunJobFlowAsync(RunJobFlowRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region SetTerminationProtection /// <summary> /// SetTerminationProtection locks a cluster (job flow) so the EC2 instances in the cluster /// cannot be terminated by user intervention, an API call, or in the event of a job-flow /// error. The cluster still terminates upon successful completion of the job flow. Calling /// <code>SetTerminationProtection</code> on a cluster is similar to calling the Amazon /// EC2 <code>DisableAPITermination</code> API on all EC2 instances in a cluster. /// /// /// <para> /// <code>SetTerminationProtection</code> is used to prevent accidental termination of /// a cluster and to ensure that in the event of an error, the instances persist so that /// you can recover any data stored in their ephemeral instance storage. /// </para> /// /// <para> /// To terminate a cluster that has been locked by setting <code>SetTerminationProtection</code> /// to <code>true</code>, you must first unlock the job flow by a subsequent call to <code>SetTerminationProtection</code> /// in which you set the value to <code>false</code>. /// </para> /// /// <para> /// For more information, see<a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_TerminationProtection.html">Managing /// Cluster Termination</a> in the <i>Amazon EMR Management Guide</i>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the SetTerminationProtection service method.</param> /// /// <returns>The response from the SetTerminationProtection service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetTerminationProtection">REST API Reference for SetTerminationProtection Operation</seealso> SetTerminationProtectionResponse SetTerminationProtection(SetTerminationProtectionRequest request); /// <summary> /// SetTerminationProtection locks a cluster (job flow) so the EC2 instances in the cluster /// cannot be terminated by user intervention, an API call, or in the event of a job-flow /// error. The cluster still terminates upon successful completion of the job flow. Calling /// <code>SetTerminationProtection</code> on a cluster is similar to calling the Amazon /// EC2 <code>DisableAPITermination</code> API on all EC2 instances in a cluster. /// /// /// <para> /// <code>SetTerminationProtection</code> is used to prevent accidental termination of /// a cluster and to ensure that in the event of an error, the instances persist so that /// you can recover any data stored in their ephemeral instance storage. /// </para> /// /// <para> /// To terminate a cluster that has been locked by setting <code>SetTerminationProtection</code> /// to <code>true</code>, you must first unlock the job flow by a subsequent call to <code>SetTerminationProtection</code> /// in which you set the value to <code>false</code>. /// </para> /// /// <para> /// For more information, see<a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_TerminationProtection.html">Managing /// Cluster Termination</a> in the <i>Amazon EMR Management Guide</i>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the SetTerminationProtection 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 SetTerminationProtection service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetTerminationProtection">REST API Reference for SetTerminationProtection Operation</seealso> Task<SetTerminationProtectionResponse> SetTerminationProtectionAsync(SetTerminationProtectionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region SetVisibleToAllUsers /// <summary> /// <i>This member will be deprecated.</i> /// /// /// <para> /// Sets whether all AWS Identity and Access Management (IAM) users under your account /// can access the specified clusters (job flows). This action works on running clusters. /// You can also set the visibility of a cluster when you launch it using the <code>VisibleToAllUsers</code> /// parameter of <a>RunJobFlow</a>. The SetVisibleToAllUsers action can be called only /// by an IAM user who created the cluster or the AWS account that owns the cluster. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the SetVisibleToAllUsers service method.</param> /// /// <returns>The response from the SetVisibleToAllUsers service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetVisibleToAllUsers">REST API Reference for SetVisibleToAllUsers Operation</seealso> SetVisibleToAllUsersResponse SetVisibleToAllUsers(SetVisibleToAllUsersRequest request); /// <summary> /// <i>This member will be deprecated.</i> /// /// /// <para> /// Sets whether all AWS Identity and Access Management (IAM) users under your account /// can access the specified clusters (job flows). This action works on running clusters. /// You can also set the visibility of a cluster when you launch it using the <code>VisibleToAllUsers</code> /// parameter of <a>RunJobFlow</a>. The SetVisibleToAllUsers action can be called only /// by an IAM user who created the cluster or the AWS account that owns the cluster. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the SetVisibleToAllUsers 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 SetVisibleToAllUsers service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetVisibleToAllUsers">REST API Reference for SetVisibleToAllUsers Operation</seealso> Task<SetVisibleToAllUsersResponse> SetVisibleToAllUsersAsync(SetVisibleToAllUsersRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region TerminateJobFlows /// <summary> /// TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut /// down, any step not yet completed is canceled and the EC2 instances on which the cluster /// is running are stopped. Any log files not already saved are uploaded to Amazon S3 /// if a LogUri was specified when the cluster was created. /// /// /// <para> /// The maximum number of clusters allowed is 10. The call to <code>TerminateJobFlows</code> /// is asynchronous. Depending on the configuration of the cluster, it may take up to /// 1-5 minutes for the cluster to completely terminate and release allocated resources, /// such as Amazon EC2 instances. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the TerminateJobFlows service method.</param> /// /// <returns>The response from the TerminateJobFlows service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/TerminateJobFlows">REST API Reference for TerminateJobFlows Operation</seealso> TerminateJobFlowsResponse TerminateJobFlows(TerminateJobFlowsRequest request); /// <summary> /// TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut /// down, any step not yet completed is canceled and the EC2 instances on which the cluster /// is running are stopped. Any log files not already saved are uploaded to Amazon S3 /// if a LogUri was specified when the cluster was created. /// /// /// <para> /// The maximum number of clusters allowed is 10. The call to <code>TerminateJobFlows</code> /// is asynchronous. Depending on the configuration of the cluster, it may take up to /// 1-5 minutes for the cluster to completely terminate and release allocated resources, /// such as Amazon EC2 instances. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the TerminateJobFlows 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 TerminateJobFlows service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/TerminateJobFlows">REST API Reference for TerminateJobFlows Operation</seealso> Task<TerminateJobFlowsResponse> TerminateJobFlowsAsync(TerminateJobFlowsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion } }
59.029536
211
0.675929
[ "Apache-2.0" ]
TallyUpTeam/aws-sdk-net
sdk/src/Services/ElasticMapReduce/Generated/_bcl45/IAmazonElasticMapReduce.cs
111,920
C#
// <copyright file="TagContextRoundtripTest.cs" company="OpenTelemetry Authors"> // Copyright 2018, OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // </copyright> namespace OpenTelemetry.Tags.Propagation.Test { using System; using Xunit; public class TagContextRoundtripTest { private static readonly TagKey K1 = TagKey.Create("k1"); private static readonly TagKey K2 = TagKey.Create("k2"); private static readonly TagKey K3 = TagKey.Create("k3"); private static readonly TagValue V_EMPTY = TagValue.Create(""); private static readonly TagValue V1 = TagValue.Create("v1"); private static readonly TagValue V2 = TagValue.Create("v2"); private static readonly TagValue V3 = TagValue.Create("v3"); private readonly CurrentTaggingState state; private readonly ITagger tagger; private readonly ITagContextBinarySerializer serializer; public TagContextRoundtripTest() { state = new CurrentTaggingState(); tagger = new Tagger(state); serializer = new TagContextBinarySerializer(state); } [Fact] public void TestRoundtripSerialization_NormalTagContext() { TestRoundtripSerialization(tagger.Empty); TestRoundtripSerialization(tagger.EmptyBuilder.Put(K1, V1).Build()); TestRoundtripSerialization(tagger.EmptyBuilder.Put(K1, V1).Put(K2, V2).Put(K3, V3).Build()); TestRoundtripSerialization(tagger.EmptyBuilder.Put(K1, V_EMPTY).Build()); } [Fact] public void TestRoundtrip_TagContextWithMaximumSize() { var builder = tagger.EmptyBuilder; for (var i = 0; i < SerializationUtils.TagContextSerializedSizeLimit / 8; i++) { // Each tag will be with format {key : "0123", value : "0123"}, so the length of it is 8. // Add 1024 tags, the total size should just be 8192. String str; if (i < 10) { str = "000" + i; } else if (i < 100) { str = "00" + i; } else if (i < 1000) { str = "0" + i; } else { str = "" + i; } builder.Put(TagKey.Create(str), TagValue.Create(str)); } TestRoundtripSerialization(builder.Build()); } private void TestRoundtripSerialization(ITagContext expected) { var bytes = serializer.ToByteArray(expected); var actual = serializer.FromByteArray(bytes); Assert.Equal(expected, actual); } } }
36.565217
105
0.591558
[ "Apache-2.0" ]
gibletto/opentelemetry-dotnet
test/OpenTelemetry.Tests/Impl/Tags/Propagation/TagContextRoundtripTest.cs
3,366
C#
using System; namespace WinRTXamlToolkit.Tools { /// <summary> /// Extension methods that help simplify some math operations. /// </summary> public static class MathEx { /// <summary> /// Returns the minimum of this and right value. /// </summary> /// <param name="lv">The left value.</param> /// <param name="rv">The right value.</param> /// <returns>The minimum of left and right value.</returns> public static double Min(this double lv, double rv) { return (lv < rv) ? lv : rv; } /// <summary> /// Returns the maximum of this and right value. /// </summary> /// <param name="lv">The left value.</param> /// <param name="rv">The right value.</param> /// <returns>The maximum of left and right value.</returns> public static double Max(this double lv, double rv) { return (lv > rv) ? lv : rv; } /// <summary> /// Returns the distance between this and right value. /// </summary> /// <param name="lv">The left value.</param> /// <param name="rv">The right value.</param> /// <returns>The distance between the left and right value.</returns> public static double Distance(this double lv, double rv) { return Math.Abs(lv - rv); } /// <summary> /// Returns linear interpolation between start and end values at position specified as 0..1 range value. /// </summary> /// <param name="start">The start value.</param> /// <param name="end">The end value.</param> /// <param name="progress">The progress between start and end values /// where for progress value of 0 - the start value is returned and for 1 - the right value is returned.</param> /// <returns>Linear interpolation between start and end.</returns> public static double Lerp(double start, double end, double progress) { return start * (1 - progress) + end * progress; } /// <summary> /// Returns the value limited by the range of min..max. /// </summary> /// <remarks> /// If either min or max are double.NaN - they are not limiting the range. /// </remarks> /// <param name="value">The starting value.</param> /// <param name="min">The range minimum.</param> /// <param name="max">The range maximum.</param> /// <returns>The value limited by the range of min..max.</returns> public static double Clamp(this double @value, double min, double max) { if (!double.IsNaN(min) && @value < min) @value = min; else if (!double.IsNaN(max) && @value > max) @value = max; return @value; } } }
38.571429
121
0.538047
[ "MIT" ]
JUV-Studios/WinRTXamlToolk
WinRTXamlToolkit/Tools/MathEx.cs
2,972
C#
//----------------------------------------------------------------------- // <copyright file="FSMTimingSpec.cs" company="Akka.NET Project"> // Copyright (C) 2009-2018 Lightbend Inc. <http://www.lightbend.com> // Copyright (C) 2013-2018 .NET Foundation <https://github.com/akkadotnet/akka.net> // </copyright> //----------------------------------------------------------------------- using System; using System.Threading.Tasks; using Akka.Actor; using Akka.Event; using Akka.TestKit; using Akka.Util.Internal; using FluentAssertions; using FluentAssertions.Extensions; using Xunit; using static Akka.Actor.FSMBase; namespace Akka.Tests.Actor { public class FSMTimingSpec : AkkaSpec { public IActorRef FSM { get; } public FSMTimingSpec() { FSM = Sys.ActorOf(Props.Create(() => new StateMachine(TestActor)), "fsm"); FSM.Tell(new SubscribeTransitionCallBack(TestActor)); ExpectMsg(new CurrentState<FsmState>(FSM, FsmState.Initial)); } [Fact] public void FSM_must_receive_StateTimeout() { FSM.Tell(FsmState.TestStateTimeout); ExpectMsg(new Transition<FsmState>(FSM, FsmState.Initial, FsmState.TestStateTimeout)); ExpectMsg(new Transition<FsmState>(FSM, FsmState.TestStateTimeout, FsmState.Initial)); ExpectNoMsg(50.Milliseconds()); } [Fact] public void FSM_must_cancel_a_StateTimeout() { FSM.Tell(FsmState.TestStateTimeout); FSM.Tell(Cancel.Instance); ExpectMsg(new Transition<FsmState>(FSM, FsmState.Initial, FsmState.TestStateTimeout)); ExpectMsg<Cancel>(); ExpectMsg(new Transition<FsmState>(FSM, FsmState.TestStateTimeout, FsmState.Initial)); ExpectNoMsg(50.Milliseconds()); } [Fact] public void FSM_must_cancel_a_StateTimeout_when_actor_is_stopped() { var stoppingActor = Sys.ActorOf(Props.Create<StoppingActor>()); Sys.EventStream.Subscribe(TestActor, typeof(DeadLetter)); stoppingActor.Tell(FsmState.TestStoppingActorStateTimeout); ExpectNoMsg(300.Milliseconds()); } [Fact] public void FSM_must_allow_StateTimeout_override() { //the timeout in state TestStateTimeout is 800ms, then it will change back to Initial Within(400.Milliseconds(), () => { FSM.Tell(FsmState.TestStateTimeoutOverride); ExpectMsg(new Transition<FsmState>(FSM, FsmState.Initial, FsmState.TestStateTimeout)); ExpectNoMsg(300.Milliseconds()); }); Within(1.Seconds(), () => { FSM.Tell(Cancel.Instance); ExpectMsg<Cancel>(); ExpectMsg(new Transition<FsmState>(FSM, FsmState.TestStateTimeout, FsmState.Initial)); }); } [Fact] public void FSM_must_receive_single_shot_timer() { Within(2.Seconds(), () => { Within(500.Milliseconds(), 1.Seconds(), () => { FSM.Tell(FsmState.TestSingleTimer); ExpectMsg(new Transition<FsmState>(FSM, FsmState.Initial, FsmState.TestSingleTimer)); ExpectMsg<Tick>(); ExpectMsg(new Transition<FsmState>(FSM, FsmState.TestSingleTimer, FsmState.Initial)); }); ExpectNoMsg(500.Milliseconds()); }); } [Fact] public void FSM_must_resubmit_single_shot_timer() { Within(TimeSpan.FromSeconds(2.5), () => { Within(500.Milliseconds(), 1.Seconds(), () => { FSM.Tell(FsmState.TestSingleTimerResubmit); ExpectMsg(new Transition<FsmState>(FSM, FsmState.Initial, FsmState.TestSingleTimerResubmit)); ExpectMsg<Tick>(); }); Within(1.Seconds(), () => { ExpectMsg<Tock>(); ExpectMsg(new Transition<FsmState>(FSM, FsmState.TestSingleTimerResubmit, FsmState.Initial)); }); ExpectNoMsg(500.Milliseconds()); }); } [Fact] public void FSM_must_correctly_cancel_a_named_timer() { FSM.Tell(FsmState.TestCancelTimer); ExpectMsg(new Transition<FsmState>(FSM, FsmState.Initial, FsmState.TestCancelTimer)); Within(500.Milliseconds(), () => { FSM.Tell(Tick.Instance); ExpectMsg<Tick>(); }); Within(300.Milliseconds(), 1.Seconds(), () => { ExpectMsg<Tock>(); }); FSM.Tell(Cancel.Instance); ExpectMsg(new Transition<FsmState>(FSM, FsmState.TestCancelTimer, FsmState.Initial), 1.Seconds()); } [Fact] public void FSM_must_not_get_confused_between_named_and_state_timers() { FSM.Tell(FsmState.TestCancelStateTimerInNamedTimerMessage); FSM.Tell(Tick.Instance); ExpectMsg(new Transition<FsmState>(FSM, FsmState.Initial, FsmState.TestCancelStateTimerInNamedTimerMessage)); ExpectMsg<Tick>(500.Milliseconds()); Task.Delay(200.Milliseconds()); Resume(FSM); ExpectMsg(new Transition<FsmState>(FSM, FsmState.TestCancelStateTimerInNamedTimerMessage, FsmState.TestCancelStateTimerInNamedTimerMessage2), 500.Milliseconds()); FSM.Tell(Cancel.Instance); Within(500.Milliseconds(), () => { ExpectMsg<Cancel>(); ExpectMsg(new Transition<FsmState>(FSM, FsmState.TestCancelStateTimerInNamedTimerMessage2, FsmState.Initial)); }); } [Fact] public void FSM_must_receive_and_cancel_a_repeated_timer() { FSM.Tell(FsmState.TestRepeatedTimer); ExpectMsg(new Transition<FsmState>(FSM, FsmState.Initial, FsmState.TestRepeatedTimer)); var seq = ReceiveWhile(2.Seconds(), o => { if (o is Tick) return o; return null; }); seq.Should().HaveCount(5); Within(500.Milliseconds(), () => { ExpectMsg(new Transition<FsmState>(FSM, FsmState.TestRepeatedTimer, FsmState.Initial)); }); } [Fact] public void FSM_must_notify_unhandled_messages() { // EventFilter // .Warning("unhandled event Akka.Tests.Actor.FSMTimingSpec+Tick in state TestUnhandled", source: fsm.Path.ToString()) // .And // .Warning("unhandled event Akka.Tests.Actor.FSMTimingSpec+Unhandled in state TestUnhandled", source: fsm.Path.ToString()) // .ExpectOne( // () => // { FSM.Tell(FsmState.TestUnhandled); ExpectMsg(new Transition<FsmState>(FSM, FsmState.Initial, FsmState.TestUnhandled)); Within(3.Seconds(), () => { FSM.Tell(Tick.Instance); FSM.Tell(SetHandler.Instance); FSM.Tell(Tick.Instance); ExpectMsg<Unhandled>().Msg.Should().BeOfType<Tick>(); FSM.Tell(new Unhandled("test")); FSM.Tell(Cancel.Instance); var transition = ExpectMsg<Transition<FsmState>>(); transition.FsmRef.Should().Be(FSM); transition.From.Should().Be(FsmState.TestUnhandled); transition.To.Should().Be(FsmState.Initial); }); // }); } #region Actors static void Suspend(IActorRef actorRef) { var l = actorRef as ActorRefWithCell; l?.Suspend(); } static void Resume(IActorRef actorRef) { var l = actorRef as ActorRefWithCell; l?.Resume(); } public enum FsmState { Initial, TestStateTimeout, TestStateTimeoutOverride, TestSingleTimer, TestSingleTimerResubmit, TestRepeatedTimer, TestUnhandled, TestCancelTimer, TestCancelStateTimerInNamedTimerMessage, TestCancelStateTimerInNamedTimerMessage2, TestStoppingActorStateTimeout } public class Tick { private Tick() { } public static Tick Instance { get; } = new Tick(); } public class Tock { private Tock() { } public static Tock Instance { get; } = new Tock(); } public class Cancel { private Cancel() { } public static Cancel Instance { get; } = new Cancel(); } public class SetHandler { private SetHandler() { } public static SetHandler Instance { get; } = new SetHandler(); } public class Unhandled { public Unhandled(object msg) { Msg = msg; } public object Msg { get; } } public static void StaticAwaitCond(Func<bool> evaluator, TimeSpan max, TimeSpan? interval) { InternalAwaitCondition(evaluator, max, interval,(format,args)=> XAssert.Fail(string.Format(format,args))); } public class StateMachine : FSM<FsmState, int>, ILoggingFSM { public StateMachine(IActorRef tester) { Tester = tester; StartWith(FsmState.Initial, 0); When(FsmState.Initial, @event => { if (@event.FsmEvent is FsmState) { var s = (FsmState)@event.FsmEvent; switch (s) { case FsmState.TestSingleTimer: SetTimer("tester", Tick.Instance, 500.Milliseconds(), false); return GoTo(FsmState.TestSingleTimer); case FsmState.TestRepeatedTimer: SetTimer("tester", Tick.Instance, 100.Milliseconds(), true); return GoTo(FsmState.TestRepeatedTimer).Using(4); case FsmState.TestStateTimeoutOverride: return GoTo(FsmState.TestStateTimeout).ForMax(TimeSpan.MaxValue); default: return GoTo(s); } } return null; }); When(FsmState.TestStateTimeout, @event => { if (@event.FsmEvent is StateTimeout) { return GoTo(FsmState.Initial); } else if (@event.FsmEvent is Cancel) { return GoTo(FsmState.Initial).Replying(Cancel.Instance); } return null; }, 800.Milliseconds()); When(FsmState.TestSingleTimer, @event => { if (@event.FsmEvent is Tick) { Tester.Tell(Tick.Instance); return GoTo(FsmState.Initial); } return null; }); OnTransition((state1, state2) => { if (state1 == FsmState.Initial && state2 == FsmState.TestSingleTimerResubmit) SetTimer("blah", Tick.Instance, 500.Milliseconds()); }); When(FsmState.TestSingleTimerResubmit, @event => { if (@event.FsmEvent is Tick) { Tester.Tell(Tick.Instance); SetTimer("blah", Tock.Instance, 500.Milliseconds()); return Stay(); } else if (@event.FsmEvent is Tock) { Tester.Tell(Tock.Instance); return GoTo(FsmState.Initial); } return null; }); When(FsmState.TestCancelTimer, @event => { if (@event.FsmEvent is Tick) { var contextLocal = Context.AsInstanceOf<ActorCell>(); SetTimer("hallo", Tock.Instance, 1.Milliseconds()); StaticAwaitCond(() => contextLocal.Mailbox.HasMessages, 1.Seconds(), 50.Milliseconds()); CancelTimer("hallo"); Sender.Tell(Tick.Instance); SetTimer("hallo", Tock.Instance, 500.Milliseconds()); return Stay(); } else if (@event.FsmEvent is Tock) { Tester.Tell(Tock.Instance); return Stay(); } else if (@event.FsmEvent is Cancel) { CancelTimer("hallo"); return GoTo(FsmState.Initial); } return null; }); When(FsmState.TestRepeatedTimer, @event => { if (@event.FsmEvent is Tick) { var remaining = @event.StateData; Tester.Tell(Tick.Instance); if (remaining == 0) { CancelTimer("tester"); return GoTo(FsmState.Initial); } else { return Stay().Using(remaining - 1); } } return null; }); When(FsmState.TestCancelStateTimerInNamedTimerMessage, @event => { // FSM is suspended after processing this message and resumed 500s later if (@event.FsmEvent is Tick) { Suspend(Self); SetTimer("named", Tock.Instance, 1.Milliseconds()); var contextLocal = Context.AsInstanceOf<ActorCell>(); StaticAwaitCond(() => contextLocal.Mailbox.HasMessages, 1.Seconds(), 50.Milliseconds()); return Stay().ForMax(1.Milliseconds()).Replying(Tick.Instance); } else if (@event.FsmEvent is Tock) { return GoTo(FsmState.TestCancelStateTimerInNamedTimerMessage2); } return null; }); When(FsmState.TestCancelStateTimerInNamedTimerMessage2, @event => { if (@event.FsmEvent is StateTimeout) { return GoTo(FsmState.Initial); } else if (@event.FsmEvent is Cancel) { return GoTo(FsmState.Initial).Replying(Cancel.Instance); } return null; }); When(FsmState.TestUnhandled, @event => { if (@event.FsmEvent is SetHandler) { WhenUnhandled(evt => { if (evt.FsmEvent is Tick) { Tester.Tell(new Unhandled(Tick.Instance)); return Stay(); } return null; }); return Stay(); } else if (@event.FsmEvent is Cancel) { // whenUnhandled(NullFunction) return GoTo(FsmState.Initial); } return null; }); } public IActorRef Tester { get; } } public class StoppingActor : FSM<FsmState, int> { public StoppingActor() { StartWith(FsmState.Initial, 0); When(FsmState.Initial, evt => { if (evt.FsmEvent is FsmState) { var state = (FsmState)evt.FsmEvent; if (state == FsmState.TestStoppingActorStateTimeout) { Context.Stop(Self); return Stay(); } } return null; }, 200.Milliseconds()); } } #endregion } }
37.027601
174
0.472018
[ "Apache-2.0" ]
cuteant/akka.net
test/Akka.Tests/Actor/FSMTimingSpec.cs
17,442
C#
using System; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; namespace Xamarin.Forms.Platform.WinRT { public sealed partial class StepperControl : UserControl { public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(double), typeof(StepperControl), new PropertyMetadata(default(double), OnValueChanged)); public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(double), typeof(StepperControl), new PropertyMetadata(default(double), OnMaxMinChanged)); public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register("Minimum", typeof(double), typeof(StepperControl), new PropertyMetadata(default(double), OnMaxMinChanged)); public static readonly DependencyProperty IncrementProperty = DependencyProperty.Register("Increment", typeof(double), typeof(StepperControl), new PropertyMetadata(default(double), OnIncrementChanged)); public StepperControl() { InitializeComponent(); } public double Increment { get { return (double)GetValue(IncrementProperty); } set { SetValue(IncrementProperty, value); } } public double Maximum { get { return (double)GetValue(MaximumProperty); } set { SetValue(MaximumProperty, value); } } public double Minimum { get { return (double)GetValue(MinimumProperty); } set { SetValue(MinimumProperty, value); } } public double Value { get { return (double)GetValue(ValueProperty); } set { SetValue(ValueProperty, value); } } public event EventHandler ValueChanged; static void OnIncrementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var stepper = (StepperControl)d; stepper.UpdateEnabled(stepper.Value); } static void OnMaxMinChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var stepper = (StepperControl)d; stepper.UpdateEnabled(stepper.Value); } void OnMinusClicked(object sender, RoutedEventArgs e) { UpdateValue(-Increment); } void OnPlusClicked(object sender, RoutedEventArgs e) { UpdateValue(+Increment); } static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var stepper = (StepperControl)d; stepper.UpdateEnabled((double)e.NewValue); EventHandler changed = stepper.ValueChanged; if (changed != null) changed(d, EventArgs.Empty); } void UpdateEnabled(double value) { double increment = Increment; Plus.IsEnabled = value + increment <= Maximum; Minus.IsEnabled = value - increment >= Minimum; } void UpdateValue(double delta) { double newValue = Value + delta; Value = newValue; } } }
28.744681
197
0.747964
[ "MIT" ]
akihikodaki/Xamarin.Forms
Xamarin.Forms.Platform.WinRT/StepperControl.xaml.cs
2,704
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model { /// <summary> /// The details of a message in a channel. /// </summary> public partial class ChannelMessage { private string _channelArn; private string _content; private DateTime? _createdTimestamp; private DateTime? _lastEditedTimestamp; private DateTime? _lastUpdatedTimestamp; private string _messageId; private string _metadata; private ChannelMessagePersistenceType _persistence; private bool? _redacted; private Identity _sender; private ChannelMessageType _type; /// <summary> /// Gets and sets the property ChannelArn. /// <para> /// The ARN of the channel. /// </para> /// </summary> [AWSProperty(Min=5, Max=1600)] public string ChannelArn { get { return this._channelArn; } set { this._channelArn = value; } } // Check to see if ChannelArn property is set internal bool IsSetChannelArn() { return this._channelArn != null; } /// <summary> /// Gets and sets the property Content. /// <para> /// The message content. /// </para> /// </summary> [AWSProperty(Min=0, Max=4096)] public string Content { get { return this._content; } set { this._content = value; } } // Check to see if Content property is set internal bool IsSetContent() { return this._content != null; } /// <summary> /// Gets and sets the property CreatedTimestamp. /// <para> /// The time at which the message was created. /// </para> /// </summary> public DateTime CreatedTimestamp { get { return this._createdTimestamp.GetValueOrDefault(); } set { this._createdTimestamp = value; } } // Check to see if CreatedTimestamp property is set internal bool IsSetCreatedTimestamp() { return this._createdTimestamp.HasValue; } /// <summary> /// Gets and sets the property LastEditedTimestamp. /// <para> /// The time at which a message was edited. /// </para> /// </summary> public DateTime LastEditedTimestamp { get { return this._lastEditedTimestamp.GetValueOrDefault(); } set { this._lastEditedTimestamp = value; } } // Check to see if LastEditedTimestamp property is set internal bool IsSetLastEditedTimestamp() { return this._lastEditedTimestamp.HasValue; } /// <summary> /// Gets and sets the property LastUpdatedTimestamp. /// <para> /// The time at which a message was updated. /// </para> /// </summary> public DateTime LastUpdatedTimestamp { get { return this._lastUpdatedTimestamp.GetValueOrDefault(); } set { this._lastUpdatedTimestamp = value; } } // Check to see if LastUpdatedTimestamp property is set internal bool IsSetLastUpdatedTimestamp() { return this._lastUpdatedTimestamp.HasValue; } /// <summary> /// Gets and sets the property MessageId. /// <para> /// The ID of a message. /// </para> /// </summary> [AWSProperty(Min=1, Max=128)] public string MessageId { get { return this._messageId; } set { this._messageId = value; } } // Check to see if MessageId property is set internal bool IsSetMessageId() { return this._messageId != null; } /// <summary> /// Gets and sets the property Metadata. /// <para> /// The message metadata. /// </para> /// </summary> [AWSProperty(Min=0, Max=1024)] public string Metadata { get { return this._metadata; } set { this._metadata = value; } } // Check to see if Metadata property is set internal bool IsSetMetadata() { return this._metadata != null; } /// <summary> /// Gets and sets the property Persistence. /// <para> /// The persistence setting for a channel message. /// </para> /// </summary> public ChannelMessagePersistenceType Persistence { get { return this._persistence; } set { this._persistence = value; } } // Check to see if Persistence property is set internal bool IsSetPersistence() { return this._persistence != null; } /// <summary> /// Gets and sets the property Redacted. /// <para> /// Hides the content of a message. /// </para> /// </summary> public bool Redacted { get { return this._redacted.GetValueOrDefault(); } set { this._redacted = value; } } // Check to see if Redacted property is set internal bool IsSetRedacted() { return this._redacted.HasValue; } /// <summary> /// Gets and sets the property Sender. /// <para> /// The message sender. /// </para> /// </summary> public Identity Sender { get { return this._sender; } set { this._sender = value; } } // Check to see if Sender property is set internal bool IsSetSender() { return this._sender != null; } /// <summary> /// Gets and sets the property Type. /// <para> /// The message type. /// </para> /// </summary> public ChannelMessageType Type { get { return this._type; } set { this._type = value; } } // Check to see if Type property is set internal bool IsSetType() { return this._type != null; } } }
28.585657
117
0.547596
[ "Apache-2.0" ]
ChristopherButtars/aws-sdk-net
sdk/src/Services/ChimeSDKMessaging/Generated/Model/ChannelMessage.cs
7,175
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace AspNetCore2Angular5.Services { public interface IEmailSender { Task SendEmailAsync(string email, string subject, string message); } }
20.230769
74
0.752852
[ "MIT" ]
DreamzDevelopment/AspNetCore2Angular5
Services/IEmailSender.cs
265
C#
using System; namespace P04.VariationsWithRepetition { internal class Program { private static string[] elements; private static int k; private static string[] variations; static void Main(string[] args) { elements = Console.ReadLine().Split(); k = int.Parse(Console.ReadLine()); variations = new string[k]; Variations(0); } private static void Variations(int variationsIndex) { if (variationsIndex >= variations.Length) { Console.WriteLine(string.Join(" ", variations)); return; } for (int i = 0; i < elements.Length; i++) { variations[variationsIndex] = elements[i]; Variations(variationsIndex + 1); } } } }
24.555556
64
0.510181
[ "MIT" ]
Iceto04/SoftUni
Algorithms Fundamentals/02. Combinatorial Problems/Lab/P04.VariationsWithRepetition/Program.cs
886
C#
using System; using System.Buffers; using System.Numerics; using StackItem = Neo.VM.Types.StackItem; using StackItemType = Neo.VM.Types.StackItemType; using PrimitiveType = Neo.VM.Types.PrimitiveType; using NeoArray = Neo.VM.Types.Array; using NeoBoolean = Neo.VM.Types.Boolean; using NeoBuffer = Neo.VM.Types.Buffer; using NeoByteString = Neo.VM.Types.ByteString; using NeoInteger = Neo.VM.Types.Integer; using NeoInteropInterface = Neo.VM.Types.InteropInterface; using TraceInteropInterface = Neo.BlockchainToolkit.TraceDebug.TraceInteropInterface; using NeoMap = Neo.VM.Types.Map; using NeoNull = Neo.VM.Types.Null; using NeoPointer = Neo.VM.Types.Pointer; using NeoStruct = Neo.VM.Types.Struct; namespace MessagePack.Formatters.Neo.BlockchainToolkit { public class StackItemFormatter : IMessagePackFormatter<StackItem> { public static readonly StackItemFormatter Instance = new StackItemFormatter(); public StackItem Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) { var count = reader.ReadArrayHeader(); if (count != 2) throw new MessagePackSerializationException($"Invalid StackItem Array Header {count}"); var type = options.Resolver.GetFormatterWithVerify<StackItemType>().Deserialize(ref reader, options); switch (type) { case StackItemType.Any: reader.ReadNil(); return StackItem.Null; case StackItemType.Boolean: return reader.ReadBoolean() ? StackItem.True : StackItem.False; case StackItemType.Buffer: { var bytes = options.Resolver.GetFormatter<byte[]>().Deserialize(ref reader, options); return new NeoBuffer(bytes); } case StackItemType.ByteString: { var bytes = options.Resolver.GetFormatter<byte[]>().Deserialize(ref reader, options); return new NeoByteString(bytes); } case StackItemType.Integer: { var integer = options.Resolver.GetFormatterWithVerify<BigInteger>().Deserialize(ref reader, options); return new NeoInteger(integer); } case StackItemType.InteropInterface: { var typeName = options.Resolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options); return new TraceInteropInterface(typeName); } case StackItemType.Pointer: reader.ReadNil(); return new NeoPointer(Array.Empty<byte>(), 0); case StackItemType.Map: { var map = new NeoMap(); var mapCount = reader.ReadMapHeader(); for (int i = 0; i < mapCount; i++) { var key = (PrimitiveType)Deserialize(ref reader, options); map[key] = Deserialize(ref reader, options); } return map; } case StackItemType.Array: case StackItemType.Struct: { var array = type == StackItemType.Array ? new NeoArray() : new NeoStruct(); var arrayCount = reader.ReadArrayHeader(); for (int i = 0; i < arrayCount; i++) { array.Add(Deserialize(ref reader, options)); } return array; } } throw new MessagePackSerializationException($"Invalid StackItem {type}"); } public void Serialize(ref MessagePackWriter writer, StackItem value, MessagePackSerializerOptions options) { var resolver = options.Resolver; var stackItemTypeResolver = resolver.GetFormatterWithVerify<StackItemType>(); writer.WriteArrayHeader(2); switch (value) { case NeoBoolean _: stackItemTypeResolver.Serialize(ref writer, StackItemType.Boolean, options); writer.Write(value.GetBoolean()); break; case NeoBuffer buffer: stackItemTypeResolver.Serialize(ref writer, StackItemType.Buffer, options); writer.Write(buffer.InnerBuffer.Span); break; case NeoByteString byteString: stackItemTypeResolver.Serialize(ref writer, StackItemType.ByteString, options); writer.Write(byteString.GetSpan()); break; case NeoInteger integer: stackItemTypeResolver.Serialize(ref writer, StackItemType.Integer, options); resolver.GetFormatterWithVerify<BigInteger>().Serialize(ref writer, integer.GetInteger(), options); break; case NeoInteropInterface interopInterface: { stackItemTypeResolver.Serialize(ref writer, StackItemType.InteropInterface, options); var typeName = interopInterface.GetInterface<object>().GetType().FullName ?? "<unknown InteropInterface>"; resolver.GetFormatterWithVerify<string>().Serialize(ref writer, typeName, options); } break; case NeoMap map: stackItemTypeResolver.Serialize(ref writer, StackItemType.Map, options); writer.WriteMapHeader(map.Count); foreach (var kvp in map) { Serialize(ref writer, kvp.Key, options); Serialize(ref writer, kvp.Value, options); } break; case NeoNull _: stackItemTypeResolver.Serialize(ref writer, StackItemType.Any, options); writer.WriteNil(); break; case NeoPointer _: stackItemTypeResolver.Serialize(ref writer, StackItemType.Pointer, options); writer.WriteNil(); break; case NeoArray array: { var stackItemType = array is NeoStruct ? StackItemType.Struct : StackItemType.Array; stackItemTypeResolver.Serialize(ref writer, stackItemType, options); writer.WriteArrayHeader(array.Count); for (int i = 0; i < array.Count; i++) { Serialize(ref writer, array[i], options); } break; } default: throw new MessagePackSerializationException($"Invalid StackItem {value.GetType()}"); } } } }
46.643312
130
0.531749
[ "MIT" ]
ngdseattle/neo-blockchaintoolkit-library
src/bctklib/formatters/StackItemFormatter.cs
7,323
C#
// defined: use a single thread // not defined: thread count = (# logical processors on system - 1) //#define useSingleThread using AutoMapper; using DFB_v1_40; using DFB_v1_40.Asm; using DFB_v1_40.Simulator; using DFBSimulatorWrapper.DFBStateModel; using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; using DFBProject; namespace DFBSimulatorWrapper { public class Wrapper : IDisposable { #region Constants #endregion #region Members private static bool mapperInitialized; private CyCodeTab cyCodeTab; private CySimulator cySimulator; private static CyDfbAsm cyDfbAsm; private CyParameters cyParameters; private List<InputSequence> inputSequence { get; set; } private int stepsRequested; private int stepsExecuted; private bool simExecuted; private bool simStepExecuted; private List<CySimulator> simulatorHistory; int batchSize; /// <summary> /// DFB assembler instance /// </summary> public static CyDfbAsm DfbAsm { get { return cyDfbAsm; } } /// <summary> /// DFM simulator parameters /// </summary> public CyParameters Parameters { get { return cyParameters; } } /// <summary> /// Number of cycles captured in this simulator /// </summary> public int SimulatorCyclesCaptured { get { return simulatorHistory.Count; } } #endregion #region Constructor /// <summary> /// Initialize the wrapper /// </summary> public Wrapper() { if (!mapperInitialized) { // Automapper to clone CySimulator object Mapper.Initialize(i => { //i.ShouldMapProperty = p => p.GetMethod.IsPublic || p.GetMethod.IsAssembly || p.GetMethod.IsPrivate; i.ShouldMapProperty = p => false; i.ShouldMapField = p => true; i.CreateMap<CySimulator, CySimulator>(); i.CreateMap<CyControlWord, CyControlWord>(); }); mapperInitialized = true; } simulatorHistory = new List<CySimulator>(); #if useSingleThread batchSize = 1; #else batchSize = Environment.ProcessorCount > 1 ? Environment.ProcessorCount - 1 : 1; #endif } #endregion #region Methods /// <summary> /// Run the simulations asynchronously /// </summary> /// <param name="parameters">Simulation parameters</param> /// <param name="numCycles">Number of cycles to simulate</param> /// <param name="progress">Progress report update object</param> /// <param name="cancellationToken">Cancellation token for UI</param> /// <param name="inputSequence">List of globals to set at specifiec cycle numbers</param> /// <param name="cyCodeTab">CyCodeTab instance</param> /// <param name="containerPx">Bounding box of diagram container</param> /// <param name="dpiX">DPI of system - x</param> /// <param name="dpiY">DPI of system - y</param> /// <returns></returns> public Task<DFBState> RunDFBSimulations( CyParameters parameters, int numCycles, IProgress<SimProgressReport> progress, CancellationToken cancellationToken, List<InputSequence> inputSequence, CyCodeTab cyCodeTab, Rectangle containerPx, float dpiX, float dpiY) { var progressReport = new SimProgressReport(); this.inputSequence = inputSequence; stepsRequested = numCycles; cyParameters = parameters; // CyCodeTab must be instantiated on the WInForms side, with references to // UIFramework.Product4.WinForms and UIFramework.Product6.WinForms this.cyCodeTab = cyCodeTab; Assemble(); // Create state view manager var dfbState = new DFBState(this, DFBValueFormat.q23Decimal); // Return on error var errors = cyDfbAsm.Errors.GetFullList(); if (errors.Where(x => x.Type == CyMessageType.Error).Count() > 0) { return Task.Run(() => { return dfbState; }); } // Check pending async cancel if (cancellationToken.IsCancellationRequested == true) { return Task.Run(() => { return dfbState; }); } // Execute the simulation steps with status reports return Task.Run(() => { // Execute DFB simulator for all cycles while (true) { bool sim; sim = SimulateStep(); if (sim && stepsExecuted < numCycles) { stepsExecuted++; } else { break; } } progressReport.TotalSteps = simulatorHistory.Count; // Generate state frames in batches if (batchSize > simulatorHistory.Count) { batchSize = simulatorHistory.Count; } var batchStartIdx = 0; var batchEndIdx = batchStartIdx + batchSize; var framesTmp = new Dictionary<int, DFBStateFrame>(); while (true) { // Check pending async cancel if (cancellationToken.IsCancellationRequested == true) { progressReport.Cancelled = true; progress.Report(progressReport); return dfbState; } // Generate a batch of frames framesTmp.Clear(); var curBatch = batchStartIdx; Parallel.For(batchStartIdx, batchEndIdx, b => { framesTmp.Add(b, DFBState.GenerateFrame(this, b, containerPx, dpiX, dpiY)); curBatch++; progressReport.CurrentStep = curBatch; progress.Report(progressReport); }); dfbState.StateFrames.AddRange(framesTmp .OrderBy(x => x.Key) .Select(x => x.Value)); batchStartIdx = batchStartIdx + batchSize; if (batchStartIdx > simulatorHistory.Count - 1) { // Last batch finished all frames break; } batchEndIdx = batchEndIdx + batchSize; // Note that batchEndIdx is exclusive in Parallel.For() if (batchEndIdx > simulatorHistory.Count) { batchEndIdx = simulatorHistory.Count; } } return dfbState; }); } /// <summary> /// Return the simulator object at the specified step /// </summary> /// <param name="cycle">Zero-based program cycle number</param> /// <returns>CySimulator object if cycle exists, otherwise null</returns> public CySimulator GetSimulatorAtCycle(int cycle) { if (cycle < 0 || cycle > simulatorHistory.Count - 1) { return null; } return simulatorHistory[cycle]; } /// <summary> /// Simulate a step /// </summary> /// <returns></returns> private bool SimulateStep() { bool simulationContinues = true; bool flagInitializationCycle = false; if (!this.simStepExecuted) { this.simStepExecuted = true; if (this.cySimulator == null) { this.Simulate(null, null); // init flagInitializationCycle = true; } // Set global properties if user entered a value for this cycle if (inputSequence.Where(x => x.Cycle == stepsExecuted - 1).Any()) { var globals = inputSequence.Where(x => x.Cycle == stepsExecuted - 1).First(); cySimulator.GlobalInput1 = Convert.ToByte(globals.GlobalInput1); cySimulator.GlobalInput2 = Convert.ToByte(globals.GlobalInput2); cySimulator.Semaphore0 = Convert.ToByte(globals.Semaphore0); cySimulator.Semaphore1 = Convert.ToByte(globals.Semaphore1); cySimulator.Semaphore2 = Convert.ToByte(globals.Semaphore2); } if (this.cySimulator != null) { // MakeStep() is short-circuited on first execution if (flagInitializationCycle || this.cySimulator.MakeStep()) { //this.propertyGridDebug.Refresh(); } else { this.TryEndSimulation(); simulationContinues = false; } this.DisplaySimulatorDebugInfo(); if (!flagInitializationCycle && simulationContinues) { CaptureHistory(); } } else { this.TryEndSimulation(); simulationContinues = false; } this.simStepExecuted = false; } return simulationContinues; } /// <summary> /// Runs simulation /// </summary> /// <param name="sender"></param> /// <param name="s"></param> private void Simulate(object sender, EventArgs s) { if (!this.simExecuted) { this.simExecuted = true; if (this.cySimulator == null) { if (cyDfbAsm != null /*&& this.ErrorsCount() <= 0*/) { int[] values = GetBusInValues(cyParameters.Bus1_data); int[] values2 = GetBusInValues(cyParameters.Bus2_data); this.cySimulator = new CySimulator(); bool flag = this.cySimulator.InitializeSimulator(values, values2, cyDfbAsm.GetRamStringArrays()); if (sender != null && flag) { this.cySimulator.SimulateAllSteps(this.TryEndSimulation); } this.simExecuted = false; return; } this.simExecuted = false; return; } this.TryEndSimulation(); this.simExecuted = false; return; } return; } /// <summary> /// Runs the assembler /// </summary> private void Assemble() { cyDfbAsm = new CyDfbAsm(); cyDfbAsm.Compile(cyParameters.Code, cyParameters.OptimizeAssembly); } /// <summary> /// Reads the bus in values /// </summary> /// <param name="text"></param> /// <returns></returns> private int[] GetBusInValues(string text) { List<int> list = new List<int>(); StringReader stringReader = new StringReader(text); string text2 = stringReader.ReadLine(); while (!string.IsNullOrEmpty(text2)) { uint uIntValue = CyParameters.GetUIntValue(text2); if (uIntValue > 16777216) { throw new ArgumentOutOfRangeException(string.Format( "Out of range input value detected: {0} ({1} exceeds maximum value of {2}", text2, uIntValue, 16777216)); } list.Add((int)uIntValue); text2 = stringReader.ReadLine(); } return list.ToArray(); } /// <summary> /// Try to end the simulation /// </summary> private void TryEndSimulation() { // Not implemented for this use case // this is required for UI updates on the forms side but not here } /// <summary> /// Display debug info /// </summary> private void DisplaySimulatorDebugInfo() { // Not implemented for this use case } /// <summary> /// Clones the simulator object and saves it to simulatorHistory /// </summary> private void CaptureHistory() { // Capture values for next step var simulatorHistoryClone = (CySimulator)Mapper.Map(cySimulator, typeof(CySimulator), typeof(CySimulator)); simulatorHistory.Add(simulatorHistoryClone); } /// <summary> /// Retrieves the private field value from the current simulator object /// </summary> /// <param name="memberName"></param> /// <returns></returns> public static object GetCyDfbAsmPrivateFieldCurr(string memberName) { if (cyDfbAsm == null) { return null; } else { return PrivateValueAccessor.GetPrivateFieldValue(typeof(CyDfbAsm), memberName, Wrapper.DfbAsm); } } #region IDisposable Support private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { for (int i = 0; i < simulatorHistory.Count; i++) { this.simulatorHistory[i] = null; } this.cySimulator = null; this.cyCodeTab = null; } // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. // TODO: set large fields to null. disposedValue = true; } } // TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources. // ~Wrapper() { // // Do not change this code. Put cleanup code in Dispose(bool disposing) above. // Dispose(false); // } // This code added to correctly implement the disposable pattern. public void Dispose() { // Do not change this code. Put cleanup code in Dispose(bool disposing) above. Dispose(true); // TODO: uncomment the following line if the finalizer is overridden above. // GC.SuppressFinalize(this); } #endregion #endregion } }
25.456897
110
0.66297
[ "MIT" ]
paphillips/DFB
DFBSimulatorWrapper/Wrapper.cs
11,814
C#
using Examples.Charge.Domain.Aggregates.PersonAggregate; using Examples.Charge.Domain.Aggregates.PersonAggregate.Interfaces; using Examples.Charge.Infra.Data.Context; using System; using System.Collections.Generic; using System.Threading.Tasks; namespace Examples.Charge.Infra.Data.Repositories { public class PersonRepository : IPersonRepository { private readonly ExampleContext _context; public PersonRepository(ExampleContext context) { _context = context ?? throw new ArgumentNullException(nameof(context)); } public async Task<IEnumerable<Person>> FindAllAsync() => await Task.Run(() => _context.Person); } }
31.045455
103
0.739385
[ "MIT" ]
MelhoresSolucoes/FrontAngular
Web Charge/Examples.Charge.Infra.Data/Repositories/PersonRepository.cs
685
C#
using Revitalize.Framework.Player.Managers; namespace Revitalize.Framework.Player { public class PlayerInfo { public SittingInfo sittingInfo; public MagicManager magicManager; public bool justPlacedACustomObject; public PlayerInfo() { this.sittingInfo = new SittingInfo(); this.magicManager = new MagicManager(); } public void update() { this.sittingInfo.update(); } } }
21.478261
51
0.601215
[ "MIT" ]
JitterDev/Stardew_Valley_Mods
GeneralMods/Revitalize/Framework/Player/PlayerInfo.cs
494
C#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; using osu.Framework.Logging; using osu.Framework.Platform; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osu.Game.Screens.Backgrounds; using osu.Game.Screens.Tournament.Components; using osu.Game.Screens.Tournament.Teams; using OpenTK; using OpenTK.Graphics; using osu.Framework.IO.Stores; using osu.Framework.Graphics.Shapes; namespace osu.Game.Screens.Tournament { public class Drawings : OsuScreen { private const string results_filename = "drawings_results.txt"; protected override bool HideOverlaysOnEnter => true; protected override BackgroundScreen CreateBackground() => new BackgroundScreenDefault(); private ScrollingTeamContainer teamsContainer; private GroupContainer groupsContainer; private OsuSpriteText fullTeamNameText; private readonly List<DrawingsTeam> allTeams = new List<DrawingsTeam>(); private DrawingsConfigManager drawingsConfig; private Task writeOp; private Storage storage; public ITeamList TeamList; private DependencyContainer dependencies; protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) => dependencies = new DependencyContainer(base.CreateChildDependencies(parent)); [BackgroundDependencyLoader] private void load(TextureStore textures, Storage storage) { this.storage = storage; TextureStore flagStore = new TextureStore(); // Local flag store flagStore.AddStore(new RawTextureLoaderStore(new NamespacedResourceStore<byte[]>(new StorageBackedResourceStore(storage), "Drawings"))); // Default texture store flagStore.AddStore(textures); dependencies.Cache(flagStore); if (TeamList == null) TeamList = new StorageBackedTeamList(storage); if (!TeamList.Teams.Any()) { Exit(); return; } drawingsConfig = new DrawingsConfigManager(storage); Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = new Color4(77, 77, 77, 255) }, new Sprite { RelativeSizeAxes = Axes.Both, FillMode = FillMode.Fill, Texture = textures.Get(@"Backgrounds/Drawings/background.png") }, new FillFlowContainer { RelativeSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Children = new Drawable[] { // Main container new Container { RelativeSizeAxes = Axes.Both, Width = 0.85f, Children = new Drawable[] { // Visualiser new VisualiserContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.X, Size = new Vector2(1, 10), Colour = new Color4(255, 204, 34, 255), Lines = 6 }, // Groups groupsContainer = new GroupContainer(drawingsConfig.Get<int>(DrawingsConfig.Groups), drawingsConfig.Get<int>(DrawingsConfig.TeamsPerGroup)) { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Padding = new MarginPadding { Top = 35f, Bottom = 35f } }, // Scrolling teams teamsContainer = new ScrollingTeamContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.X, }, // Scrolling team name fullTeamNameText = new OsuSpriteText { Anchor = Anchor.Centre, Origin = Anchor.TopCentre, Position = new Vector2(0, 45f), Alpha = 0, Font = "Exo2.0-Light", TextSize = 42f } } }, // Control panel container new Container { RelativeSizeAxes = Axes.Both, Width = 0.15f, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = new Color4(54, 54, 54, 255) }, new OsuSpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Text = "Control Panel", TextSize = 22f, Font = "Exo2.0-Bold" }, new FillFlowContainer { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Width = 0.75f, Position = new Vector2(0, 35f), Direction = FillDirection.Vertical, Spacing = new Vector2(0, 5f), Children = new Drawable[] { new TriangleButton { RelativeSizeAxes = Axes.X, Text = "Begin random", Action = teamsContainer.StartScrolling, }, new TriangleButton { RelativeSizeAxes = Axes.X, Text = "Stop random", Action = teamsContainer.StopScrolling, }, new TriangleButton { RelativeSizeAxes = Axes.X, Text = "Reload", Action = reloadTeams } } }, new FillFlowContainer { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Width = 0.75f, Position = new Vector2(0, -5f), Direction = FillDirection.Vertical, Spacing = new Vector2(0, 5f), Children = new Drawable[] { new TriangleButton { RelativeSizeAxes = Axes.X, Text = "Reset", Action = () => reset() } } } } } } } }; teamsContainer.OnSelected += onTeamSelected; teamsContainer.OnScrollStarted += () => fullTeamNameText.FadeOut(200); reset(true); } private void onTeamSelected(DrawingsTeam team) { groupsContainer.AddTeam(team); fullTeamNameText.Text = team.FullName; fullTeamNameText.FadeIn(200); writeResults(groupsContainer.GetStringRepresentation()); } private void writeResults(string text) { void writeAction() { try { // Write to drawings_results using (Stream stream = storage.GetStream(results_filename, FileAccess.Write, FileMode.Create)) using (StreamWriter sw = new StreamWriter(stream)) { sw.Write(text); } } catch (Exception ex) { Logger.Error(ex, "Failed to write results."); } } writeOp = writeOp?.ContinueWith(t => { writeAction(); }) ?? Task.Run((Action)writeAction); } private void reloadTeams() { teamsContainer.ClearTeams(); allTeams.Clear(); foreach (DrawingsTeam t in TeamList.Teams) { if (groupsContainer.ContainsTeam(t.FullName)) continue; allTeams.Add(t); teamsContainer.AddTeam(t); } } private void reset(bool loadLastResults = false) { groupsContainer.ClearTeams(); reloadTeams(); if (!storage.Exists(results_filename)) return; if (loadLastResults) { try { // Read from drawings_results using (Stream stream = storage.GetStream(results_filename, FileAccess.Read, FileMode.Open)) using (StreamReader sr = new StreamReader(stream)) { string line; while ((line = sr.ReadLine()?.Trim()) != null) { if (string.IsNullOrEmpty(line)) continue; if (line.ToUpper().StartsWith("GROUP")) continue; // ReSharper disable once AccessToModifiedClosure DrawingsTeam teamToAdd = allTeams.FirstOrDefault(t => t.FullName == line); if (teamToAdd == null) continue; groupsContainer.AddTeam(teamToAdd); teamsContainer.RemoveTeam(teamToAdd); } } } catch (Exception ex) { Logger.Error(ex, "Failed to read last drawings results."); } } else { writeResults(string.Empty); } } } }
38.275568
172
0.382914
[ "MIT" ]
JamesMighty/osu
osu.Game/Screens/Tournament/Drawings.cs
13,124
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameStateManager { private static GameStateManager _instance; public static GameStateManager Instance { get { if (_instance == null) _instance = new GameStateManager(); return _instance; } } public GameState CurrentGameState { get; private set; } public delegate void GameStateChangeHandler(GameState newGameState); public event GameStateChangeHandler OnGameStateChanged; public void SetState(GameState newGameState) { if (newGameState == CurrentGameState) return; CurrentGameState = newGameState; OnGameStateChanged?.Invoke(newGameState); } }
23.69697
72
0.670077
[ "MIT" ]
14t-s/crater-quest
Assets/Scripts/GameStateManager.cs
782
C#
using System; using System.Threading; namespace LiteNetLib { public sealed class NetPacketPool { private readonly NetPacket[] _pool = new NetPacket[NetConstants.PacketPoolSize]; private readonly ReaderWriterLockSlim _lock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); private int _count; public NetPacket GetWithData(PacketProperty property, byte[] data, int start, int length) { var packet = GetWithProperty(property, length); Buffer.BlockCopy(data, start, packet.RawData, NetPacket.GetHeaderSize(property), length); return packet; } public NetPacket GetPacket(int size, bool clear) { NetPacket packet = null; if (size <= NetConstants.MaxPacketSize) { _lock.EnterUpgradeableReadLock(); if (_count > 0) { _lock.EnterWriteLock(); _count--; packet = _pool[_count]; _pool[_count] = null; _lock.ExitWriteLock(); } _lock.ExitUpgradeableReadLock(); } if (packet == null) { //allocate new packet packet = new NetPacket(size); } else { //reallocate packet data if packet not fits packet.Realloc(size, clear); } return packet; } //Get packet with size public NetPacket GetWithProperty(PacketProperty property, int size) { size += NetPacket.GetHeaderSize(property); NetPacket packet = GetPacket(size, true); packet.Property = property; return packet; } public void Recycle(NetPacket packet) { if (packet.RawData.Length > NetConstants.MaxPacketSize) { //Dont pool big packets. Save memory return; } //Clean fragmented flag packet.RawData[0] = 0; _lock.EnterUpgradeableReadLock(); if (_count == NetConstants.PacketPoolSize) { _lock.ExitUpgradeableReadLock(); return; } _lock.EnterWriteLock(); _pool[_count] = packet; _count++; _lock.ExitWriteLock(); _lock.ExitUpgradeableReadLock(); } } }
30.878049
112
0.518957
[ "CC0-1.0" ]
francescozoccheddu/VGD
Assets/Scripts/LiteNetLib/NetPacketPool.cs
2,534
C#
using AdvancedClipboard.Wpf.ViewModels; using System.ComponentModel; namespace AdvancedClipboard.Wpf.Interfaces { public interface IEntryHostViewModel { #region Properties BindingList<HistoryPageEntryViewModel> Entries { get; } BindingList<LaneEntryViewModel> Lanes { get; } public void ItemDeletedCallback(HistoryPageEntryViewModel deletdItem); #endregion Properties } }
22.388889
74
0.781638
[ "MIT" ]
ultradr3mer/AdvancedClipboard.Wpf
AdvancedClipboard.Wpf/Interfaces/IEntryHostViewModel.cs
405
C#
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Diagnostics; using Python.Runtime.Slots; using static Python.Runtime.PythonException; namespace Python.Runtime { /// <summary> /// The TypeManager class is responsible for building binary-compatible /// Python type objects that are implemented in managed code. /// </summary> internal class TypeManager { internal static IntPtr subtype_traverse; internal static IntPtr subtype_clear; private const BindingFlags tbFlags = BindingFlags.Public | BindingFlags.Static; private static Dictionary<Type, IntPtr> cache = new Dictionary<Type, IntPtr>(); private static readonly Dictionary<IntPtr, SlotsHolder> _slotsHolders = new Dictionary<IntPtr, SlotsHolder>(); private static Dictionary<Type, Type> _slotsImpls = new Dictionary<Type, Type>(); // Slots which must be set private static readonly string[] _requiredSlots = new string[] { "tp_traverse", "tp_clear", }; internal static void Initialize() { Debug.Assert(cache.Count == 0, "Cache should be empty", "Some errors may occurred on last shutdown"); IntPtr type = SlotHelper.CreateObjectType(); subtype_traverse = Marshal.ReadIntPtr(type, TypeOffset.tp_traverse); subtype_clear = Marshal.ReadIntPtr(type, TypeOffset.tp_clear); Runtime.XDecref(type); } internal static void RemoveTypes() { foreach (var tpHandle in cache.Values) { SlotsHolder holder; if (_slotsHolders.TryGetValue(tpHandle, out holder)) { // If refcount > 1, it needs to reset the managed slot, // otherwise it can dealloc without any trick. if (Runtime.Refcount(tpHandle) > 1) { holder.ResetSlots(); } } Runtime.XDecref(tpHandle); } cache.Clear(); _slotsImpls.Clear(); _slotsHolders.Clear(); } internal static void SaveRuntimeData(RuntimeDataStorage storage) { foreach (var tpHandle in cache.Values) { Runtime.XIncref(tpHandle); } storage.AddValue("cache", cache); storage.AddValue("slots", _slotsImpls); } internal static void RestoreRuntimeData(RuntimeDataStorage storage) { Debug.Assert(cache == null || cache.Count == 0); storage.GetValue("slots", out _slotsImpls); storage.GetValue("cache", out cache); foreach (var entry in cache) { Type type = entry.Key; IntPtr handle = entry.Value; SlotsHolder holder = CreateSolotsHolder(handle); InitializeSlots(handle, _slotsImpls[type], holder); // FIXME: mp_length_slot.CanAssgin(clrType) } } /// <summary> /// Return value: Borrowed reference. /// Given a managed Type derived from ExtensionType, get the handle to /// a Python type object that delegates its implementation to the Type /// object. These Python type instances are used to implement internal /// descriptor and utility types like ModuleObject, PropertyObject, etc. /// </summary> internal static IntPtr GetTypeHandle(Type type) { // Note that these types are cached with a refcount of 1, so they // effectively exist until the CPython runtime is finalized. IntPtr handle; cache.TryGetValue(type, out handle); if (handle != IntPtr.Zero) { return handle; } handle = CreateType(type); cache[type] = handle; _slotsImpls.Add(type, type); return handle; } /// <summary> /// Return value: Borrowed reference. /// Get the handle of a Python type that reflects the given CLR type. /// The given ManagedType instance is a managed object that implements /// the appropriate semantics in Python for the reflected managed type. /// </summary> internal static IntPtr GetTypeHandle(ManagedType obj, Type type) { IntPtr handle; cache.TryGetValue(type, out handle); if (handle != IntPtr.Zero) { return handle; } handle = CreateType(obj, type); cache[type] = handle; _slotsImpls.Add(type, obj.GetType()); return handle; } /// <summary> /// The following CreateType implementations do the necessary work to /// create Python types to represent managed extension types, reflected /// types, subclasses of reflected types and the managed metatype. The /// dance is slightly different for each kind of type due to different /// behavior needed and the desire to have the existing Python runtime /// do as much of the allocation and initialization work as possible. /// </summary> internal static IntPtr CreateType(Type impl) { IntPtr type = AllocateTypeObject(impl.Name, metatype: Runtime.PyTypeType); int ob_size = ObjectOffset.Size(type); // Set tp_basicsize to the size of our managed instance objects. Marshal.WriteIntPtr(type, TypeOffset.tp_basicsize, (IntPtr)ob_size); var offset = (IntPtr)ObjectOffset.TypeDictOffset(type); Marshal.WriteIntPtr(type, TypeOffset.tp_dictoffset, offset); SlotsHolder slotsHolder = CreateSolotsHolder(type); InitializeSlots(type, impl, slotsHolder); int flags = TypeFlags.Default | TypeFlags.Managed | TypeFlags.HeapType | TypeFlags.HaveGC; Util.WriteCLong(type, TypeOffset.tp_flags, flags); if (Runtime.PyType_Ready(type) != 0) { throw new PythonException(); } IntPtr dict = Marshal.ReadIntPtr(type, TypeOffset.tp_dict); IntPtr mod = Runtime.PyString_FromString("CLR"); Runtime.PyDict_SetItem(dict, PyIdentifier.__module__, mod); Runtime.XDecref(mod); InitMethods(type, impl); return type; } internal static IntPtr CreateType(ManagedType impl, Type clrType) { // Cleanup the type name to get rid of funny nested type names. string name = $"clr.{clrType.FullName}"; int i = name.LastIndexOf('+'); if (i > -1) { name = name.Substring(i + 1); } i = name.LastIndexOf('.'); if (i > -1) { name = name.Substring(i + 1); } IntPtr base_ = IntPtr.Zero; int ob_size = ObjectOffset.Size(Runtime.PyTypeType); // XXX Hack, use a different base class for System.Exception // Python 2.5+ allows new style class exceptions but they *must* // subclass BaseException (or better Exception). if (typeof(Exception).IsAssignableFrom(clrType)) { ob_size = ObjectOffset.Size(Exceptions.Exception); } int tp_dictoffset = ob_size + ManagedDataOffsets.ob_dict; if (clrType == typeof(Exception)) { base_ = Exceptions.Exception; } else if (clrType.BaseType != null) { ClassBase bc = ClassManager.GetClass(clrType.BaseType); base_ = bc.pyHandle; } IntPtr type = AllocateTypeObject(name, Runtime.PyCLRMetaType); Marshal.WriteIntPtr(type, TypeOffset.ob_type, Runtime.PyCLRMetaType); Runtime.XIncref(Runtime.PyCLRMetaType); Marshal.WriteIntPtr(type, TypeOffset.tp_basicsize, (IntPtr)ob_size); Marshal.WriteIntPtr(type, TypeOffset.tp_itemsize, IntPtr.Zero); Marshal.WriteIntPtr(type, TypeOffset.tp_dictoffset, (IntPtr)tp_dictoffset); // we want to do this after the slot stuff above in case the class itself implements a slot method SlotsHolder slotsHolder = CreateSolotsHolder(type); InitializeSlots(type, impl.GetType(), slotsHolder); if (Marshal.ReadIntPtr(type, TypeOffset.mp_length) == IntPtr.Zero && mp_length_slot.CanAssign(clrType)) { InitializeSlot(type, TypeOffset.mp_length, mp_length_slot.Method, slotsHolder); } if (!typeof(IEnumerable).IsAssignableFrom(clrType) && !typeof(IEnumerator).IsAssignableFrom(clrType)) { // The tp_iter slot should only be set for enumerable types. Marshal.WriteIntPtr(type, TypeOffset.tp_iter, IntPtr.Zero); } // Only set mp_subscript and mp_ass_subscript for types with indexers if (impl is ClassBase cb) { if (!(impl is ArrayObject)) { if (cb.indexer == null || !cb.indexer.CanGet) { Marshal.WriteIntPtr(type, TypeOffset.mp_subscript, IntPtr.Zero); } if (cb.indexer == null || !cb.indexer.CanSet) { Marshal.WriteIntPtr(type, TypeOffset.mp_ass_subscript, IntPtr.Zero); } } } else { Marshal.WriteIntPtr(type, TypeOffset.mp_subscript, IntPtr.Zero); Marshal.WriteIntPtr(type, TypeOffset.mp_ass_subscript, IntPtr.Zero); } if (base_ != IntPtr.Zero) { Marshal.WriteIntPtr(type, TypeOffset.tp_base, base_); Runtime.XIncref(base_); } const int flags = TypeFlags.Default | TypeFlags.Managed | TypeFlags.HeapType | TypeFlags.BaseType | TypeFlags.HaveGC; Util.WriteCLong(type, TypeOffset.tp_flags, flags); // Leverage followup initialization from the Python runtime. Note // that the type of the new type must PyType_Type at the time we // call this, else PyType_Ready will skip some slot initialization. if (Runtime.PyType_Ready(type) != 0) { throw new PythonException(); } IntPtr dict = Marshal.ReadIntPtr(type, TypeOffset.tp_dict); string mn = clrType.Namespace ?? ""; IntPtr mod = Runtime.PyString_FromString(mn); Runtime.PyDict_SetItem(dict, PyIdentifier.__module__, mod); Runtime.XDecref(mod); // Hide the gchandle of the implementation in a magic type slot. GCHandle gc = impl.AllocGCHandle(); Marshal.WriteIntPtr(type, TypeOffset.magic(), (IntPtr)gc); // Set the handle attributes on the implementing instance. impl.tpHandle = type; impl.pyHandle = type; //DebugUtil.DumpType(type); return type; } internal static IntPtr CreateSubType(IntPtr py_name, IntPtr py_base_type, IntPtr py_dict) { var dictRef = new BorrowedReference(py_dict); // Utility to create a subtype of a managed type with the ability for the // a python subtype able to override the managed implementation string name = Runtime.GetManagedString(py_name); // the derived class can have class attributes __assembly__ and __module__ which // control the name of the assembly and module the new type is created in. object assembly = null; object namespaceStr = null; using (var assemblyKey = new PyString("__assembly__")) { var assemblyPtr = Runtime.PyDict_GetItemWithError(dictRef, assemblyKey.Reference); if (assemblyPtr.IsNull) { if (Exceptions.ErrorOccurred()) return IntPtr.Zero; } else if (!Converter.ToManagedValue(assemblyPtr, typeof(string), out assembly, false)) { return Exceptions.RaiseTypeError("Couldn't convert __assembly__ value to string"); } using (var namespaceKey = new PyString("__namespace__")) { var pyNamespace = Runtime.PyDict_GetItemWithError(dictRef, namespaceKey.Reference); if (pyNamespace.IsNull) { if (Exceptions.ErrorOccurred()) return IntPtr.Zero; } else if (!Converter.ToManagedValue(pyNamespace, typeof(string), out namespaceStr, false)) { return Exceptions.RaiseTypeError("Couldn't convert __namespace__ value to string"); } } } // create the new managed type subclassing the base managed type var baseClass = ManagedType.GetManagedObject(py_base_type) as ClassBase; if (null == baseClass) { return Exceptions.RaiseTypeError("invalid base class, expected CLR class type"); } try { Type subType = ClassDerivedObject.CreateDerivedType(name, baseClass.type, py_dict, (string)namespaceStr, (string)assembly); // create the new ManagedType and python type ClassBase subClass = ClassManager.GetClass(subType); IntPtr py_type = GetTypeHandle(subClass, subType); // by default the class dict will have all the C# methods in it, but as this is a // derived class we want the python overrides in there instead if they exist. IntPtr cls_dict = Marshal.ReadIntPtr(py_type, TypeOffset.tp_dict); ThrowIfIsNotZero(Runtime.PyDict_Update(cls_dict, py_dict)); Runtime.XIncref(py_type); // Update the __classcell__ if it exists var cell = new BorrowedReference(Runtime.PyDict_GetItemString(cls_dict, "__classcell__")); if (!cell.IsNull) { ThrowIfIsNotZero(Runtime.PyCell_Set(cell, py_type)); ThrowIfIsNotZero(Runtime.PyDict_DelItemString(cls_dict, "__classcell__")); } return py_type; } catch (Exception e) { return Exceptions.RaiseTypeError(e.Message); } } internal static IntPtr WriteMethodDef(IntPtr mdef, IntPtr name, IntPtr func, int flags, IntPtr doc) { Marshal.WriteIntPtr(mdef, name); Marshal.WriteIntPtr(mdef, 1 * IntPtr.Size, func); Marshal.WriteInt32(mdef, 2 * IntPtr.Size, flags); Marshal.WriteIntPtr(mdef, 3 * IntPtr.Size, doc); return mdef + 4 * IntPtr.Size; } internal static IntPtr WriteMethodDef(IntPtr mdef, string name, IntPtr func, int flags = 0x0001, string doc = null) { IntPtr namePtr = Marshal.StringToHGlobalAnsi(name); IntPtr docPtr = doc != null ? Marshal.StringToHGlobalAnsi(doc) : IntPtr.Zero; return WriteMethodDef(mdef, namePtr, func, flags, docPtr); } internal static IntPtr WriteMethodDefSentinel(IntPtr mdef) { return WriteMethodDef(mdef, IntPtr.Zero, IntPtr.Zero, 0, IntPtr.Zero); } internal static void FreeMethodDef(IntPtr mdef) { unsafe { var def = (PyMethodDef*)mdef; if (def->ml_name != IntPtr.Zero) { Marshal.FreeHGlobal(def->ml_name); def->ml_name = IntPtr.Zero; } if (def->ml_doc != IntPtr.Zero) { Marshal.FreeHGlobal(def->ml_doc); def->ml_doc = IntPtr.Zero; } } } internal static IntPtr CreateMetaType(Type impl, out SlotsHolder slotsHolder) { // The managed metatype is functionally little different than the // standard Python metatype (PyType_Type). It overrides certain of // the standard type slots, and has to subclass PyType_Type for // certain functions in the C runtime to work correctly with it. IntPtr type = AllocateTypeObject("CLR Metatype", metatype: Runtime.PyTypeType); IntPtr py_type = Runtime.PyTypeType; Marshal.WriteIntPtr(type, TypeOffset.tp_base, py_type); Runtime.XIncref(py_type); int size = TypeOffset.magic() + IntPtr.Size; Marshal.WriteIntPtr(type, TypeOffset.tp_basicsize, new IntPtr(size)); const int flags = TypeFlags.Default | TypeFlags.Managed | TypeFlags.HeapType | TypeFlags.HaveGC; Util.WriteCLong(type, TypeOffset.tp_flags, flags); // Slots will inherit from TypeType, it's not neccesary for setting them. // Inheried slots: // tp_basicsize, tp_itemsize, // tp_dictoffset, tp_weaklistoffset, // tp_traverse, tp_clear, tp_is_gc, etc. slotsHolder = SetupMetaSlots(impl, type); if (Runtime.PyType_Ready(type) != 0) { throw new PythonException(); } IntPtr dict = Marshal.ReadIntPtr(type, TypeOffset.tp_dict); IntPtr mod = Runtime.PyString_FromString("CLR"); Runtime.PyDict_SetItemString(dict, "__module__", mod); //DebugUtil.DumpType(type); return type; } internal static SlotsHolder SetupMetaSlots(Type impl, IntPtr type) { // Override type slots with those of the managed implementation. SlotsHolder slotsHolder = new SlotsHolder(type); InitializeSlots(type, impl, slotsHolder); // We need space for 3 PyMethodDef structs. int mdefSize = (MetaType.CustomMethods.Length + 1) * Marshal.SizeOf(typeof(PyMethodDef)); IntPtr mdef = Runtime.PyMem_Malloc(mdefSize); IntPtr mdefStart = mdef; foreach (var methodName in MetaType.CustomMethods) { mdef = AddCustomMetaMethod(methodName, type, mdef, slotsHolder); } mdef = WriteMethodDefSentinel(mdef); Debug.Assert((long)(mdefStart + mdefSize) <= (long)mdef); Marshal.WriteIntPtr(type, TypeOffset.tp_methods, mdefStart); // XXX: Hard code with mode check. if (Runtime.ShutdownMode != ShutdownMode.Reload) { slotsHolder.Set(TypeOffset.tp_methods, (t, offset) => { var p = Marshal.ReadIntPtr(t, offset); Runtime.PyMem_Free(p); Marshal.WriteIntPtr(t, offset, IntPtr.Zero); }); } return slotsHolder; } private static IntPtr AddCustomMetaMethod(string name, IntPtr type, IntPtr mdef, SlotsHolder slotsHolder) { MethodInfo mi = typeof(MetaType).GetMethod(name); ThunkInfo thunkInfo = Interop.GetThunk(mi, "BinaryFunc"); slotsHolder.KeeapAlive(thunkInfo); // XXX: Hard code with mode check. if (Runtime.ShutdownMode != ShutdownMode.Reload) { IntPtr mdefAddr = mdef; slotsHolder.AddDealloctor(() => { IntPtr tp_dict = Marshal.ReadIntPtr(type, TypeOffset.tp_dict); if (Runtime.PyDict_DelItemString(tp_dict, name) != 0) { Runtime.PyErr_Print(); Debug.Fail($"Cannot remove {name} from metatype"); } FreeMethodDef(mdefAddr); }); } mdef = WriteMethodDef(mdef, name, thunkInfo.Address); return mdef; } internal static IntPtr BasicSubType(string name, IntPtr base_, Type impl) { // Utility to create a subtype of a std Python type, but with // a managed type able to override implementation IntPtr type = AllocateTypeObject(name, metatype: Runtime.PyTypeType); //Marshal.WriteIntPtr(type, TypeOffset.tp_basicsize, (IntPtr)obSize); //Marshal.WriteIntPtr(type, TypeOffset.tp_itemsize, IntPtr.Zero); //IntPtr offset = (IntPtr)ObjectOffset.ob_dict; //Marshal.WriteIntPtr(type, TypeOffset.tp_dictoffset, offset); //IntPtr dc = Runtime.PyDict_Copy(dict); //Marshal.WriteIntPtr(type, TypeOffset.tp_dict, dc); Marshal.WriteIntPtr(type, TypeOffset.tp_base, base_); Runtime.XIncref(base_); int flags = TypeFlags.Default; flags |= TypeFlags.Managed; flags |= TypeFlags.HeapType; flags |= TypeFlags.HaveGC; Util.WriteCLong(type, TypeOffset.tp_flags, flags); CopySlot(base_, type, TypeOffset.tp_traverse); CopySlot(base_, type, TypeOffset.tp_clear); CopySlot(base_, type, TypeOffset.tp_is_gc); SlotsHolder slotsHolder = CreateSolotsHolder(type); InitializeSlots(type, impl, slotsHolder); if (Runtime.PyType_Ready(type) != 0) { throw new PythonException(); } IntPtr tp_dict = Marshal.ReadIntPtr(type, TypeOffset.tp_dict); IntPtr mod = Runtime.PyString_FromString("CLR"); Runtime.PyDict_SetItem(tp_dict, PyIdentifier.__module__, mod); return type; } /// <summary> /// Utility method to allocate a type object &amp; do basic initialization. /// </summary> internal static IntPtr AllocateTypeObject(string name, IntPtr metatype) { IntPtr type = Runtime.PyType_GenericAlloc(metatype, 0); // Clr type would not use __slots__, // and the PyMemberDef after PyHeapTypeObject will have other uses(e.g. type handle), // thus set the ob_size to 0 for avoiding slots iterations. Marshal.WriteIntPtr(type, TypeOffset.ob_size, IntPtr.Zero); // Cheat a little: we'll set tp_name to the internal char * of // the Python version of the type name - otherwise we'd have to // allocate the tp_name and would have no way to free it. IntPtr temp = Runtime.PyUnicode_FromString(name); IntPtr raw = Runtime.PyUnicode_AsUTF8(temp); Marshal.WriteIntPtr(type, TypeOffset.tp_name, raw); Marshal.WriteIntPtr(type, TypeOffset.name, temp); Runtime.XIncref(temp); Marshal.WriteIntPtr(type, TypeOffset.qualname, temp); temp = type + TypeOffset.nb_add; Marshal.WriteIntPtr(type, TypeOffset.tp_as_number, temp); temp = type + TypeOffset.sq_length; Marshal.WriteIntPtr(type, TypeOffset.tp_as_sequence, temp); temp = type + TypeOffset.mp_length; Marshal.WriteIntPtr(type, TypeOffset.tp_as_mapping, temp); temp = type + TypeOffset.bf_getbuffer; Marshal.WriteIntPtr(type, TypeOffset.tp_as_buffer, temp); return type; } /// <summary> /// Given a newly allocated Python type object and a managed Type that /// provides the implementation for the type, connect the type slots of /// the Python object to the managed methods of the implementing Type. /// </summary> internal static void InitializeSlots(IntPtr type, Type impl, SlotsHolder slotsHolder = null) { // We work from the most-derived class up; make sure to get // the most-derived slot and not to override it with a base // class's slot. var seen = new HashSet<string>(); while (impl != null) { MethodInfo[] methods = impl.GetMethods(tbFlags); foreach (MethodInfo method in methods) { string name = method.Name; if (!name.StartsWith("tp_") && !TypeOffset.IsSupportedSlotName(name)) { Debug.Assert(!name.Contains("_") || name.StartsWith("_") || method.IsSpecialName); continue; } if (seen.Contains(name)) { continue; } InitializeSlot(type, Interop.GetThunk(method), name, slotsHolder); seen.Add(name); } impl = impl.BaseType; } foreach (string slot in _requiredSlots) { if (seen.Contains(slot)) { continue; } var offset = ManagedDataOffsets.GetSlotOffset(slot); Marshal.WriteIntPtr(type, offset, SlotsHolder.GetDefaultSlot(offset)); } } /// <summary> /// Helper for InitializeSlots. /// /// Initializes one slot to point to a function pointer. /// The function pointer might be a thunk for C#, or it may be /// an address in the NativeCodePage. /// </summary> /// <param name="type">Type being initialized.</param> /// <param name="slot">Function pointer.</param> /// <param name="name">Name of the method.</param> /// <param name="canOverride">Can override the slot when it existed</param> static void InitializeSlot(IntPtr type, IntPtr slot, string name, bool canOverride = true) { var offset = ManagedDataOffsets.GetSlotOffset(name); if (!canOverride && Marshal.ReadIntPtr(type, offset) != IntPtr.Zero) { return; } Marshal.WriteIntPtr(type, offset, slot); } static void InitializeSlot(IntPtr type, ThunkInfo thunk, string name, SlotsHolder slotsHolder = null, bool canOverride = true) { int offset = ManagedDataOffsets.GetSlotOffset(name); if (!canOverride && Marshal.ReadIntPtr(type, offset) != IntPtr.Zero) { return; } Marshal.WriteIntPtr(type, offset, thunk.Address); if (slotsHolder != null) { slotsHolder.Set(offset, thunk); } } static void InitializeSlot(IntPtr type, int slotOffset, MethodInfo method, SlotsHolder slotsHolder = null) { var thunk = Interop.GetThunk(method); Marshal.WriteIntPtr(type, slotOffset, thunk.Address); if (slotsHolder != null) { slotsHolder.Set(slotOffset, thunk); } } static bool IsSlotSet(IntPtr type, string name) { int offset = ManagedDataOffsets.GetSlotOffset(name); return Marshal.ReadIntPtr(type, offset) != IntPtr.Zero; } /// <summary> /// Given a newly allocated Python type object and a managed Type that /// implements it, initialize any methods defined by the Type that need /// to appear in the Python type __dict__ (based on custom attribute). /// </summary> private static void InitMethods(IntPtr pytype, Type type) { IntPtr dict = Marshal.ReadIntPtr(pytype, TypeOffset.tp_dict); Type marker = typeof(PythonMethodAttribute); BindingFlags flags = BindingFlags.Public | BindingFlags.Static; var addedMethods = new HashSet<string>(); while (type != null) { MethodInfo[] methods = type.GetMethods(flags); foreach (MethodInfo method in methods) { if (!addedMethods.Contains(method.Name)) { object[] attrs = method.GetCustomAttributes(marker, false); if (attrs.Length > 0) { string method_name = method.Name; var mi = new MethodInfo[1]; mi[0] = method; MethodObject m = new TypeMethod(type, method_name, mi); Runtime.PyDict_SetItemString(dict, method_name, m.pyHandle); m.DecrRefCount(); addedMethods.Add(method_name); } } } type = type.BaseType; } } /// <summary> /// Utility method to copy slots from a given type to another type. /// </summary> internal static void CopySlot(IntPtr from, IntPtr to, int offset) { IntPtr fp = Marshal.ReadIntPtr(from, offset); Marshal.WriteIntPtr(to, offset, fp); } private static SlotsHolder CreateSolotsHolder(IntPtr type) { var holder = new SlotsHolder(type); _slotsHolders.Add(type, holder); return holder; } } class SlotsHolder { public delegate void Resetor(IntPtr type, int offset); private readonly IntPtr _type; private Dictionary<int, ThunkInfo> _slots = new Dictionary<int, ThunkInfo>(); private List<ThunkInfo> _keepalive = new List<ThunkInfo>(); private Dictionary<int, Resetor> _customResetors = new Dictionary<int, Resetor>(); private List<Action> _deallocators = new List<Action>(); private bool _alreadyReset = false; /// <summary> /// Create slots holder for holding the delegate of slots and be able to reset them. /// </summary> /// <param name="type">Steals a reference to target type</param> public SlotsHolder(IntPtr type) { _type = type; } public void Set(int offset, ThunkInfo thunk) { _slots[offset] = thunk; } public void Set(int offset, Resetor resetor) { _customResetors[offset] = resetor; } public void AddDealloctor(Action deallocate) { _deallocators.Add(deallocate); } public void KeeapAlive(ThunkInfo thunk) { _keepalive.Add(thunk); } public void ResetSlots() { if (_alreadyReset) { return; } _alreadyReset = true; #if DEBUG IntPtr tp_name = Marshal.ReadIntPtr(_type, TypeOffset.tp_name); string typeName = Marshal.PtrToStringAnsi(tp_name); #endif foreach (var offset in _slots.Keys) { IntPtr ptr = GetDefaultSlot(offset); #if DEBUG //DebugUtil.Print($"Set slot<{TypeOffsetHelper.GetSlotNameByOffset(offset)}> to 0x{ptr.ToString("X")} at {typeName}<0x{_type}>"); #endif Marshal.WriteIntPtr(_type, offset, ptr); } foreach (var action in _deallocators) { action(); } foreach (var pair in _customResetors) { int offset = pair.Key; var resetor = pair.Value; resetor?.Invoke(_type, offset); } _customResetors.Clear(); _slots.Clear(); _keepalive.Clear(); _deallocators.Clear(); // Custom reset IntPtr handlePtr = Marshal.ReadIntPtr(_type, TypeOffset.magic()); if (handlePtr != IntPtr.Zero) { GCHandle handle = GCHandle.FromIntPtr(handlePtr); if (handle.IsAllocated) { handle.Free(); } Marshal.WriteIntPtr(_type, TypeOffset.magic(), IntPtr.Zero); } } public static IntPtr GetDefaultSlot(int offset) { if (offset == TypeOffset.tp_clear) { return TypeManager.subtype_clear; } else if (offset == TypeOffset.tp_traverse) { return TypeManager.subtype_traverse; } else if (offset == TypeOffset.tp_dealloc) { // tp_free of PyTypeType is point to PyObejct_GC_Del. return Marshal.ReadIntPtr(Runtime.PyTypeType, TypeOffset.tp_free); } else if (offset == TypeOffset.tp_free) { // PyObject_GC_Del return Marshal.ReadIntPtr(Runtime.PyTypeType, TypeOffset.tp_free); } else if (offset == TypeOffset.tp_call) { return IntPtr.Zero; } else if (offset == TypeOffset.tp_new) { // PyType_GenericNew return Marshal.ReadIntPtr(Runtime.PySuper_Type, TypeOffset.tp_new); } else if (offset == TypeOffset.tp_getattro) { // PyObject_GenericGetAttr return Marshal.ReadIntPtr(Runtime.PyBaseObjectType, TypeOffset.tp_getattro); } else if (offset == TypeOffset.tp_setattro) { // PyObject_GenericSetAttr return Marshal.ReadIntPtr(Runtime.PyBaseObjectType, TypeOffset.tp_setattro); } return Marshal.ReadIntPtr(Runtime.PyTypeType, offset); } } static class SlotHelper { public static IntPtr CreateObjectType() { IntPtr globals = Runtime.PyDict_New(); if (Runtime.PyDict_SetItemString(globals, "__builtins__", Runtime.PyEval_GetBuiltins()) != 0) { Runtime.XDecref(globals); throw new PythonException(); } const string code = "class A(object): pass"; var resRef = Runtime.PyRun_String(code, RunFlagType.File, globals, globals); IntPtr res = resRef.DangerousGetAddress(); if (res == IntPtr.Zero) { try { throw new PythonException(); } finally { Runtime.XDecref(globals); } } resRef.Dispose(); IntPtr A = Runtime.PyDict_GetItemString(globals, "A"); Debug.Assert(A != IntPtr.Zero); Runtime.XIncref(A); Runtime.XDecref(globals); return A; } } }
38.667387
145
0.55231
[ "MIT" ]
unparalleled-js/pythonnet
src/runtime/typemanager.cs
35,806
C#
using System.Collections.Generic; using UnityEngine; namespace Kayac { public abstract class DebugPrimitiveRenderer : System.IDisposable { public enum AlignX { Left, Center, Right, } public enum AlignY { Top, Center, Bottom, } public enum TextOverflow { Scale, // 箱に収めるようスケール Wrap, } public const float DefaultLineSpacingRatio = 0f; protected const int DefaultTriangleCapacity = 1024; const int InitialSubMeshCapacity = 16; Shader _textShader; Shader _texturedShader; Mesh _mesh; MaterialPropertyBlock _materialPropertyBlock; Material _textMaterial; Material _texturedMaterial; int _textureShaderPropertyId; protected Font _font; protected int _vertexCount; protected int _capacity; protected Vector2 _whiteUv; protected Vector3[] _vertices; protected int _indexCount; protected Vector2[] _uv; protected Color32[] _colors; protected int[] _indices; protected List<Vector2> _temporaryUv; // SetTriangles寸前に使う protected List<Vector3> _temporaryVertices; // SetTriangles寸前に使う protected List<Color32> _temporaryColors; // SetTriangles寸前に使う protected List<int> _temporaryIndices; // SetTriangles寸前に使う #if UNITY_WEBGL const char _whiteChar = '.'; #else const char _whiteChar = '■'; #endif string _whiteString = new string(_whiteChar, 1); class SubMesh { public void FixIndexCount(int indexPosition) { indexCount = indexPosition - indexStart; } public Material material; public Texture texture; public int indexStart; public int indexCount; } List<SubMesh> _subMeshes; // 毎フレーム0にリセットする。 int _subMeshCount; Texture _texture; MeshFilter _meshFilter; MeshRenderer _meshRenderer; public Color32 color { get; set; } protected Texture fontTexture { get; private set; } public DebugPrimitiveRenderer( Shader textShader, Shader texturedShader, Font font, MeshRenderer meshRenderer, MeshFilter meshFilter, int capacity = DefaultTriangleCapacity) { _textShader = textShader; _texturedShader = texturedShader; _font = font; _meshRenderer = meshRenderer; _meshFilter = meshFilter; color = new Color32(255, 255, 255, 255); _mesh = new Mesh(); _mesh.MarkDynamic(); _meshFilter.mesh = _mesh; _textMaterial = new Material(_textShader); _texturedMaterial = new Material(_texturedShader); _materialPropertyBlock = new MaterialPropertyBlock(); _textureShaderPropertyId = Shader.PropertyToID("_MainTex"); Font.textureRebuilt += OnFontTextureRebuilt; _font.RequestCharactersInTexture(_whiteString); SetCapacity(capacity); // 初回は手動 OnFontTextureRebuilt(_font); } public void SetCapacity(int triangleCapacity) { _capacity = triangleCapacity * 3; if (_capacity >= 0xffff) { Debug.LogWarning("triangleCapacity must be < 0xffff/3. clamped."); _capacity = 0xffff; } _vertices = new Vector3[_capacity]; _uv = new Vector2[_capacity]; _colors = new Color32[_capacity]; _indices = new int[_capacity]; _temporaryVertices = new List<Vector3>(_capacity); // SetTriangles寸前に使う _temporaryColors = new List<Color32>(_capacity); // SetTriangles寸前に使う _temporaryUv = new List<Vector2>(_capacity); // SetTriangles寸前に使う _temporaryIndices = new List<int>(_capacity); // SetTriangles寸前に使う _vertexCount = 0; _indexCount = 0; // すぐ足すことになる _subMeshes = new List<SubMesh>(); _subMeshes.Capacity = InitialSubMeshCapacity; } public void Dispose() { Font.textureRebuilt -= OnFontTextureRebuilt; } // 描画キックを行う public void UpdateMesh() { // ■だけは常に入れておく。他は文字描画要求の都度投げる _font.RequestCharactersInTexture(_whiteString); // 描画キック _mesh.Clear(); Material[] materials = null; if (_subMeshCount > 0) { _subMeshes[_subMeshCount - 1].FixIndexCount(_indexCount); // 使用量が半分以下の場合、テンポラリにコピーしてから渡す if (_vertexCount < (_capacity / 2)) // 閾値は研究が必要だが、とりあえず。 { UnityEngine.Profiling.Profiler.BeginSample("DebugPrimitiveRenderer.UpdateMesh.FillTemporary"); _temporaryVertices.Clear(); _temporaryUv.Clear(); _temporaryColors.Clear(); var tmpV = new System.ArraySegment<Vector3>(_vertices, 0, _vertexCount); var tmpUv = new System.ArraySegment<Vector2>(_uv, 0, _vertexCount); var tmpC = new System.ArraySegment<Color32>(_colors, 0, _vertexCount); _temporaryVertices.AddRange(tmpV); _temporaryUv.AddRange(tmpUv); _temporaryColors.AddRange(tmpC); _mesh.SetVertices(_temporaryVertices); _mesh.SetUVs(0, _temporaryUv); _mesh.SetColors(_temporaryColors); UnityEngine.Profiling.Profiler.EndSample(); } else // 半分以上使っている場合、そのまま渡す。 { UnityEngine.Profiling.Profiler.BeginSample("DebugPrimitiveRenderer.UpdateMesh.CopyAll"); _mesh.vertices = _vertices; _mesh.uv = _uv; _mesh.colors32 = _colors; UnityEngine.Profiling.Profiler.EndSample(); } _mesh.subMeshCount = _subMeshCount; materials = new Material[_subMeshCount]; for (int i = 0; i < _subMeshCount; i++) { materials[i] = _subMeshes[i].material; } _meshRenderer.sharedMaterials = materials; var matrix = Matrix4x4.identity; for (int i = 0; i < _subMeshCount; i++) { UnityEngine.Profiling.Profiler.BeginSample("DebugPrimitiveRenderer.UpdateMesh.FillIndices"); var subMesh = _subMeshes[i]; _temporaryIndices.Clear(); var tmpI = new System.ArraySegment<int>(_indices, subMesh.indexStart, subMesh.indexCount); _temporaryIndices.AddRange(tmpI); _mesh.SetTriangles(_temporaryIndices, i, true); _materialPropertyBlock.SetTexture( _textureShaderPropertyId, subMesh.texture); _meshRenderer.SetPropertyBlock(_materialPropertyBlock, i); UnityEngine.Profiling.Profiler.EndSample(); } } _meshFilter.sharedMesh = _mesh; _vertexCount = 0; _indexCount = 0; _texture = null; // 毎フレーム白にリセット color = new Color32(255, 255, 255, 255); _subMeshCount = 0; // どうもおかしいので毎フレーム取ってみる。 CharacterInfo ch; _font.GetCharacterInfo(_whiteChar, out ch); _whiteUv = ch.uvTopLeft; _whiteUv += ch.uvTopRight; _whiteUv += ch.uvBottomLeft; _whiteUv += ch.uvBottomRight; _whiteUv *= 0.25f; } // ■の中心のUVを取り直す void OnFontTextureRebuilt(Font font) { if (font == _font) { this.fontTexture = font.material.mainTexture; // テクスチャ別物になってる可能性があるので刺しなおし CharacterInfo ch; _font.GetCharacterInfo(_whiteChar, out ch); _whiteUv = ch.uvTopLeft; _whiteUv += ch.uvTopRight; _whiteUv += ch.uvBottomLeft; _whiteUv += ch.uvBottomRight; _whiteUv *= 0.25f; } } public void SetTexture(Texture texture) { if (_texture != texture) { // ここまででSubMeshを終わらせる AddSubMesh(texture); _texture = texture; } } void AddSubMesh(Texture texture, int minimumIndexCount = 0) { // 現インデクス数を記録 if (_subMeshCount > 0) { _subMeshes[_subMeshCount - 1].FixIndexCount(_indexCount); } SubMesh subMesh = null; // 足りていれば使う。ただしインデクスは作り直す。TODO: もっとマシにできる。何フレームか経ったら使い回す、ということはできるはず。 if (_subMeshCount < _subMeshes.Count) { subMesh = _subMeshes[_subMeshCount]; } // 足りなければ足す else { subMesh = new SubMesh(); subMesh.indexStart = _indexCount; _subMeshes.Add(subMesh); } // フォントテクスチャならテキストシェーダが差さったマテリアルを選択 if (texture == _font.material.mainTexture) { subMesh.material = _textMaterial; } else { subMesh.material = _texturedMaterial; } subMesh.texture = texture; _subMeshCount++; _indexCount = 0; } // 時計回りの相対頂点番号を3つ設定して三角形を生成 protected void AddTriangleIndices(int i0, int i1, int i2) { _indices[_indexCount + 0] = _vertexCount + i0; _indices[_indexCount + 1] = _vertexCount + i1; _indices[_indexCount + 2] = _vertexCount + i2; _indexCount += 3; } // 時計回り4頂点で三角形を2個生成 protected void AddQuadIndices(int i0, int i1, int i2, int i3) { _indices[_indexCount + 0] = _vertexCount + i0; _indices[_indexCount + 1] = _vertexCount + i1; _indices[_indexCount + 2] = _vertexCount + i2; _indices[_indexCount + 3] = _vertexCount + i2; _indices[_indexCount + 4] = _vertexCount + i3; _indices[_indexCount + 5] = _vertexCount + i0; _indexCount += 6; } protected void AddIndices(IList<ushort> src) { var count = src.Count; for (int i = 0; i < count; i++) { _indices[_indexCount + i] = _vertexCount + src[i]; } _indexCount += count; } protected void AddIndices(IList<int> src) { var count = src.Count; for (int i = 0; i < count; i++) { _indices[_indexCount + i] = _vertexCount + src[i]; } _indexCount += count; } // 書き込み行数を返す protected int AddTextNormalized( out float widthOut, out float heightOut, string text, float boxWidth, float boxHeight, float lineSpacingRatio, bool wrap) { UnityEngine.Profiling.Profiler.BeginSample("DebugPrimitiveRenderer.AddTextNormalized"); int letterCount = text.Length; _font.RequestCharactersInTexture(text); SetTexture(fontTexture); var verticesBegin = _vertexCount; widthOut = heightOut = 0f; // 高さが不足して一行も入らないケースに対処 var lineHeight = (float)_font.lineHeight; if (lineHeight > boxHeight) { return 0; } heightOut = lineHeight; // 二行目以降行間込みにする lineHeight *= (1f + lineSpacingRatio); // まず原点開始、z=0,xyがfont内整数座標、という状態で頂点を生成してしまう。 var pos = 0; var lines = 1; var p = Vector2.zero; p.y += _font.ascent; var waitNewLine = false; while (pos < letterCount) { CharacterInfo ch; var c = text[pos]; if (c == '\n') { waitNewLine = false; p.y += lineHeight; p.x = 0f; // 縦はみ出しは即時終了 if ((heightOut + lineHeight) > boxHeight) { break; } heightOut += lineHeight; lines++; } else if (!waitNewLine && _font.GetCharacterInfo(c, out ch)) { if ((p.x + ch.advance) > boxWidth) // 横にはみ出した { if (wrap) // 折り返し { p.y += lineHeight; p.x = 0f; // 縦はみ出しは即時終了 if ((heightOut + lineHeight) > boxHeight) { break; } heightOut += lineHeight; lines++; } else // 次の改行まで捨てる { waitNewLine = true; break; } } if (!AddCharNormalized(ref p, ref ch)) { break; } p.x += ch.advance; widthOut = Mathf.Max(p.x, widthOut); } pos++; } UnityEngine.Profiling.Profiler.EndSample(); return lines; } bool AddCharNormalized( ref Vector2 p, // 原点(Xは左端、Yは上端+Font.ascent) ref CharacterInfo ch) { if (((_vertexCount + 4) > _capacity) || ((_indexCount + 6) > _capacity)) { return false; } float x = (float)(ch.minX); float y = (float)(-ch.maxY); float w = (float)(ch.maxX - ch.minX); float h = (float)(ch.maxY - ch.minY); var p0 = new Vector3(p.x + x, p.y + y, 0f); // 左上 var p1 = new Vector3(p0.x + w, p0.y, 0f); // 右上 var p2 = new Vector3(p1.x, p0.y + h, 0f); // 右下 var p3 = new Vector3(p0.x, p2.y, 0f); // 左下 // 頂点は左上から時計回り _vertices[_vertexCount + 0] = p0; _vertices[_vertexCount + 1] = p1; _vertices[_vertexCount + 2] = p2; _vertices[_vertexCount + 3] = p3; _uv[_vertexCount + 0] = ch.uvTopLeft; _uv[_vertexCount + 1] = ch.uvTopRight; _uv[_vertexCount + 2] = ch.uvBottomRight; _uv[_vertexCount + 3] = ch.uvBottomLeft; for (int j = 0; j < 4; j++) { _colors[_vertexCount + j] = color; } AddQuadIndices(0, 1, 2, 3); _vertexCount += 4; return true; } protected void TransformVertices(int verticesBegin, ref Matrix4x4 matrix) { int vertexCount = _vertexCount - verticesBegin; for (int i = 0; i < vertexCount; i++) { var v = _vertices[verticesBegin + i]; v = matrix.MultiplyPoint(v); _vertices[verticesBegin + i] = v; } } protected void TransformVertices(int verticesBegin, float scale, ref Vector2 translation) { int vertexCount = _vertexCount - verticesBegin; for (int i = 0; i < vertexCount; i++) { var v = _vertices[verticesBegin + i]; v.x *= scale; v.y *= scale; v.x += translation.x; v.y += translation.y; _vertices[verticesBegin + i] = v; } } // 以下未実装。箱だけ作っておく。数字の文字列化に伴うGC Alloc抹殺のため public static void ToStringAsCharArray(out int writeCount, char[] dst, int dstPos, int value, int precision) { writeCount = 0; } public static void ToStringAsCharArray(out int writeCount, char[] dst, int dstPos, float value, int precision) { writeCount = 0; } } }
25.545825
112
0.666826
[ "MIT" ]
hiryma/UnitySamples
DebugUi/Assets/Kayac/DebugUi/DebugPrimitiveRenderer.cs
13,697
C#
using System; using System.Collections.Generic; using NBitcoin; using Stratis.Bitcoin.Utilities; using Stratis.Features.FederatedPeg.Wallet; namespace Stratis.Features.FederatedPeg.Interfaces { /// <summary> /// Interface for a manager providing operations on wallets. /// </summary> public interface IFederationWalletManager : ILockProtected { /// <summary> /// Starts this wallet manager. /// </summary> void Start(); /// <summary> /// Stops the wallet manager. /// <para>Internally it waits for async loops to complete before saving the wallets to disk.</para> /// </summary> void Stop(); /// <summary> The last processed block's hash.</summary> uint256 WalletTipHash { get; set; } /// <summary> The last processed block's height.</summary> int WalletTipHeight { get; set; } /// <summary> /// Lists all spendable transactions from all accounts in the wallet. /// </summary> /// <returns>A collection of spendable outputs</returns> IEnumerable<UnspentOutputReference> GetSpendableTransactionsInWallet(int confirmations = 0); /// <summary> /// Gets the hash of the last block received by the wallet. /// </summary> /// <returns>Hash height pair of the last block received by the wallet.</returns> HashHeightPair LastBlockSyncedHashHeight(); /// <summary> /// Remove all the transactions in the wallet that are above this block height /// </summary> void RemoveBlocks(ChainedHeader fork); /// <summary> /// Processes a block received from the network. /// </summary> /// <param name="block">The block.</param> /// <param name="chainedBlock">The blocks chain of headers.</param> void ProcessBlock(Block block, ChainedHeader chainedBlock); /// <summary> /// Processes a transaction received from the network. /// <para>The caller should be responsible for saving the wallet if it has been updated.</para> /// </summary> /// <param name="transaction">The transaction.</param> /// <param name="blockHeight">The height of the block this transaction came from. Null if it was not a transaction included in a block.</param> /// <param name="blockHash">The hash of the block this transaction came from. Null if it was not a transaction included in a block.</param> /// <param name="block">The block in which this transaction was included.</param> /// <returns>A value indicating whether this transaction affects the wallet.</returns> bool ProcessTransaction(Transaction transaction, int? blockHeight = null, uint256 blockHash = null, Block block = null); /// <summary> /// Verifies that the transaction's input UTXO's have been reserved by the wallet. /// Also checks that an earlier transaction for the same deposit id does not exist. /// </summary> /// <param name="transaction">The transaction to check.</param> /// <param name="checkSignature">Indicates whether to check the signature.</param> /// <returns><c>True</c> if all's well and <c>false</c> otherwise.</returns> ValidateTransactionResult ValidateTransaction(Transaction transaction, bool checkSignature = false); /// <summary> /// Verifies that a transaction's inputs aren't being consumed by any other transactions. /// </summary> /// <param name="transaction">The transaction to check.</param> /// <param name="checkSignature">Indicates whether to check the signature.</param> /// <returns><c>True</c> if all's well and <c>false</c> otherwise.</returns> bool ValidateConsolidatingTransaction(Transaction transaction, bool checkSignature = false); /// <summary> /// Saves the wallet into the file system. /// </summary> void SaveWallet(); /// <summary> /// Gets some general information about a wallet. /// </summary> /// <returns>The federation wallet instance.</returns> FederationWallet GetWallet(); /// <summary> /// Updates the wallet with the height of the last block synced. /// </summary> /// <param name="chainedBlock">The height of the last block synced.</param> void UpdateLastBlockSyncedHeight(ChainedHeader chainedBlock); /// <summary> /// Gets whether there are any wallet files loaded or not. /// </summary> /// <returns>Whether any wallet files are loaded.</returns> bool ContainsWallets { get; } WalletSecret Secret { get; set; } /// <summary> /// Finds all withdrawal transactions with optional filtering by deposit id or transaction id. /// </summary> /// <param name="depositId">Filters by this deposit id if not <c>null</c>.</param> /// <param name="sort">Sorts the results ascending according to earliest input UTXO.</param> /// <returns>The transaction data containing the withdrawal transaction.</returns> List<(Transaction, IWithdrawal)> FindWithdrawalTransactions(uint256 depositId = null, bool sort = false); /// <summary> /// Removes the withdrawal transaction(s) associated with the corresponding deposit id. /// </summary> /// <param name="depositId">The deposit id identifying the withdrawal transaction(s) to remove.</param> bool RemoveWithdrawalTransactions(uint256 depositId); /// <summary> /// Removes transaction data that is still to be confirmed in a block. /// </summary> bool RemoveUnconfirmedTransactionData(); /// <summary> /// Determines if federation has been activated. /// </summary> /// <returns><c>True</c> if federation is active and <c>false</c> otherwise.</returns> bool IsFederationWalletActive(); /// <summary> /// Enables federation. /// </summary> /// <param name="password">The federation wallet password.</param> /// <param name="mnemonic">The user's mnemonic.</param> /// <param name="passphrase">A passphrase used to derive the private key from the mnemonic.</param> void EnableFederationWallet(string password, string mnemonic = null, string passphrase = null); /// <summary> /// Removes all the transactions from the federation wallet. /// </summary> /// <returns>A list of objects made up of transaction IDs along with the time at which they were created.</returns> HashSet<(uint256, DateTimeOffset)> RemoveAllTransactions(); /// <summary> /// Get the accounts total spendable value for both confirmed and unconfirmed UTXO. /// </summary> /// <returns>A tuple containing the confirmed and unconfirmed balances.</returns> (Money ConfirmedAmount, Money UnConfirmedAmount) GetSpendableAmount(); } }
46.038961
151
0.639351
[ "MIT" ]
0tim0/StratisFullNode
src/Stratis.Features.FederatedPeg/Interfaces/IFederationWalletManager.cs
7,092
C#
using System; using UnityEngine; namespace RFG.Platformer { [CreateAssetMenu(fileName = "New Weapon Charged State", menuName = "RFG/Platformer/Items/Equipable/Weapon/States/Charged")] public class WeaponChargedState : WeaponState { public override Type Execute(Weapon weapon) { return null; } } }
24
126
0.696429
[ "Apache-2.0" ]
retro-fall-games/RFGEngine
Assets/RFGEngine/Platformer/Items/Equipables/Weapon/States/WeaponChargedState.cs
336
C#
using System; using System.Collections.Generic; using Unity.Entities; using Unity.Transforms; using UnityEngine; using UnityEngine.XR; [GenerateAuthoringComponent] public struct CameraRigData : IComponentData { public Entity head; public Entity leftHand; public Entity rightHand; } public class NonNetworkCameraRigSystem : SystemBase { protected override void OnUpdate() { EntityManager entityManager = EntityManager; var heads = new List<InputDevice>(); InputDevices.GetDevicesAtXRNode(XRNode.Head, heads); var leftHandDevices = new List<InputDevice>(); InputDevices.GetDevicesAtXRNode(XRNode.LeftHand, leftHandDevices); var rightHandDevices = new List<InputDevice>(); InputDevices.GetDevicesAtXRNode(XRNode.RightHand, rightHandDevices); InputDevice head = new InputDevice(); if (heads.Count == 1) { head = heads[0]; } InputDevice leftHand = new InputDevice(); if (leftHandDevices.Count == 1) { leftHand = leftHandDevices[0]; } InputDevice rightHand = new InputDevice(); if (rightHandDevices.Count == 1) { rightHand = rightHandDevices[0]; } var pInput = InputManager.pilotInput; head.TryGetFeatureValue(CommonUsages.centerEyePosition, out Vector3 headPosition); head.TryGetFeatureValue(CommonUsages.centerEyeRotation, out Quaternion headRotation); leftHand.TryGetFeatureValue(CommonUsages.devicePosition, out Vector3 leftPosition); leftHand.TryGetFeatureValue(CommonUsages.deviceRotation, out Quaternion leftRotation); rightHand.TryGetFeatureValue(CommonUsages.devicePosition, out Vector3 rightPosition); rightHand.TryGetFeatureValue(CommonUsages.deviceRotation, out Quaternion rightRotation); Entities.ForEach((CameraRigData cameraRig) => { SetComponent(cameraRig.head, new Translation { Value = headPosition }); SetComponent(cameraRig.head, new Rotation { Value = headRotation }); SetComponent(cameraRig.leftHand, new Translation { Value = leftPosition }); SetComponent(cameraRig.leftHand, new Rotation { Value = leftRotation }); SetComponent(cameraRig.rightHand, new Translation { Value = rightPosition }); SetComponent(cameraRig.rightHand, new Rotation { Value = rightRotation }); }).Run(); } }
37.590909
96
0.685611
[ "Apache-2.0" ]
WireWhiz/OpenFall
Assets/Scripts/CameraRigData.cs
2,483
C#
/* * Copyright © 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.Serialization; using System.Text; using Spring.Core.TypeResolution; using Spring.Objects.Factory.Config; using Spring.Util; using Spring.Collections.Generic; namespace Spring.Objects.Factory.Support { /// <summary> /// Common base class for object definitions, factoring out common /// functionality from /// <see cref="Spring.Objects.Factory.Support.RootObjectDefinition"/> and /// <see cref="Spring.Objects.Factory.Support.ChildObjectDefinition"/>. /// </summary> /// <author>Rod Johnson</author> /// <author>Juergen Hoeller</author> /// <author>Rick Evans (.NET)</author> [Serializable] public abstract class AbstractObjectDefinition : ObjectMetadataAttributeAccessor, IConfigurableObjectDefinition, ISerializable { private const string ScopeSingleton = "singleton"; private const string ScopePrototype = "prototype"; private ConstructorArgumentValues constructorArgumentValues = new ConstructorArgumentValues(); private MutablePropertyValues propertyValues = new MutablePropertyValues(); private EventValues eventHandlerValues = new EventValues(); private MethodOverrides methodOverrides = new MethodOverrides(); private string resourceDescription; private bool isSingleton = true; private bool isPrototype; private bool isLazyInit; private bool isAbstract; private string scope = ScopeSingleton; private ObjectRole role = ObjectRole.ROLE_APPLICATION; private string objectTypeName; private Type objectType; private AutoWiringMode autowireMode = AutoWiringMode.No; private DependencyCheckingMode dependencyCheck = DependencyCheckingMode.None; internal List<string> dependsOn; private bool autowireCandidate = true; private bool primary; private Dictionary<string, AutowireCandidateQualifier> qualifiers; private string initMethodName; private string destroyMethodName; private string factoryMethodName; private string factoryObjectName; /// <summary> /// Creates a new instance of the /// <see cref="Spring.Objects.Factory.Support.AbstractObjectDefinition"/> /// class. /// </summary> /// <remarks> /// <p> /// This is an <see langword="abstract"/> class, and as such exposes no /// public constructors. /// </p> /// </remarks> protected AbstractObjectDefinition() : this(null, null) { } /// <summary> /// Creates a new instance of the /// <see cref="Spring.Objects.Factory.Support.AbstractObjectDefinition"/> /// class. /// </summary> /// <remarks> /// <p> /// This is an <see langword="abstract"/> class, and as such exposes no /// public constructors. /// </p> /// </remarks> protected AbstractObjectDefinition(ConstructorArgumentValues arguments, MutablePropertyValues properties) { constructorArgumentValues = arguments ?? constructorArgumentValues ?? new ConstructorArgumentValues(); propertyValues = properties ?? propertyValues ?? new MutablePropertyValues(); } /// <summary> /// Creates a new instance of the /// <see cref="Spring.Objects.Factory.Support.AbstractObjectDefinition"/> /// class. /// </summary> /// <param name="other"> /// The object definition used to initialise the member fields of this /// instance. /// </param> /// <remarks> /// <p> /// This is an <see langword="abstract"/> class, and as such exposes no /// public constructors. /// </p> /// </remarks> protected AbstractObjectDefinition(IObjectDefinition other) { AssertUtils.ArgumentNotNull(other, "other"); OverrideFrom(other); AbstractObjectDefinition aod = other as AbstractObjectDefinition; if (aod != null) { if (aod.HasObjectType) { ObjectType = other.ObjectType; } else { ObjectTypeName = other.ObjectTypeName; } MethodOverrides = new MethodOverrides(aod.MethodOverrides); DependencyCheck = aod.DependencyCheck; } ParentName = other.ParentName; IsAbstract = other.IsAbstract; // IsSingleton = other.IsSingleton; Scope = other.Scope; Role = other.Role; IsLazyInit = other.IsLazyInit; ConstructorArgumentValues = new ConstructorArgumentValues(other.ConstructorArgumentValues); PropertyValues = new MutablePropertyValues(other.PropertyValues); EventHandlerValues = new EventValues(other.EventHandlerValues); InitMethodName = other.InitMethodName; DestroyMethodName = other.DestroyMethodName; IsAutowireCandidate = other.IsAutowireCandidate; IsPrimary = other.IsPrimary; CopyQualifiersFrom(aod); if (other.DependsOn.Count > 0) { DependsOn = other.DependsOn; } FactoryMethodName = other.FactoryMethodName; FactoryObjectName = other.FactoryObjectName; AutowireMode = other.AutowireMode; ResourceDescription = other.ResourceDescription; } /// <summary> /// The name of the parent definition of this object definition, if any. /// </summary> public abstract string ParentName { get; set; } /// <summary> /// The property values that are to be applied to the object /// upon creation. /// </summary> /// <remarks> /// <p> /// Setting the value of this property to <see langword="null"/> /// will merely result in a new (and empty) /// <see cref="Spring.Objects.MutablePropertyValues"/> /// collection being assigned to the property value. /// </p> /// </remarks> /// <value> /// The property values (if any) for this object; may be an /// empty collection but is guaranteed not to be /// <see langword="null"/>. /// </value> public MutablePropertyValues PropertyValues { get => propertyValues; set => propertyValues = value ?? new MutablePropertyValues(); } /// <summary> /// Does this definition have any /// <see cref="Spring.Objects.Factory.Support.MethodOverrides"/>? /// </summary> /// <value> /// <see langword="true"/> if this definition has at least one /// <see cref="Spring.Objects.Factory.Support.MethodOverride"/>. /// </value> public bool HasMethodOverrides => !MethodOverrides.IsEmpty; /// <summary> /// The constructor argument values for this object. /// </summary> /// <remarks> /// <p> /// Setting the value of this property to <see langword="null"/> /// will merely result in a new (and empty) /// <see cref="Spring.Objects.Factory.Config.ConstructorArgumentValues"/> /// collection being assigned. /// </p> /// </remarks> /// <value> /// The constructor argument values (if any) for this object; may be an /// empty collection but is guaranteed not to be /// <see langword="null"/>. /// </value> public ConstructorArgumentValues ConstructorArgumentValues { get => constructorArgumentValues; set => constructorArgumentValues = value ?? new ConstructorArgumentValues(); } /// <summary> /// The event handler values for this object. /// </summary> /// <remarks> /// <p> /// Setting the value of this property to <see langword="null"/> /// will merely result in a new (and empty) /// <see cref="Spring.Objects.Factory.Config.EventValues"/> /// collection being assigned. /// </p> /// </remarks> /// <value> /// The event handler values (if any) for this object; may be an /// empty collection but is guaranteed not to be /// <see langword="null"/>. /// </value> public EventValues EventHandlerValues { get => eventHandlerValues; set => eventHandlerValues = value ?? new EventValues(); } /// <summary> /// The method overrides (if any) for this object. /// </summary> /// <remarks> /// <p> /// Setting the value of this property to <see langword="null"/> /// will merely result in a new (and empty) /// <see cref="Spring.Objects.Factory.Support.MethodOverrides"/> /// collection being assigned to the property value. /// </p> /// </remarks> /// <value> /// The method overrides (if any) for this object; may be an /// empty collection but is guaranteed not to be /// <see langword="null"/>. /// </value> public MethodOverrides MethodOverrides { get => methodOverrides; set => methodOverrides = value ?? new MethodOverrides(); } /// <summary> /// The name of the target scope for the object. /// Defaults to "singleton", ootb alternative is "prototype". Extended object factories /// might support further scopes. /// </summary> public virtual string Scope { get => scope; set { AssertUtils.ArgumentNotNull(value, "Scope"); scope = value; isPrototype = 0 == string.Compare(ScopePrototype, value, StringComparison.OrdinalIgnoreCase); isSingleton = !isPrototype; // 0 == string.Compare(SCOPE_SINGLETON, value, true); } } /// <summary> /// Get or set the role hint for this object definition /// </summary> public virtual ObjectRole Role { get => role; set => role = value; } /// <summary> /// Is this definition a <b>singleton</b>, with /// a single, shared instance returned on all calls to an enclosing /// container (typically an /// <see cref="Spring.Objects.Factory.IObjectFactory"/> or /// <see cref="Spring.Context.IApplicationContext"/>). /// </summary> /// <remarks> /// <p> /// If <see langword="false"/>, an object factory will apply the /// <b>prototype</b> design pattern, with each caller requesting an /// instance getting an independent instance. How this is defined /// will depend on the object factory implementation. <b>singletons</b> /// are the commoner type. /// </p> /// </remarks> /// <seealso cref="Spring.Objects.Factory.IObjectFactory"/> public virtual bool IsSingleton { get => isSingleton; set { scope = (value ? ScopeSingleton : ScopePrototype); isSingleton = value; isPrototype = !value; } } /// <summary> /// Gets a value indicating whether this instance is prototype, with an independent instance /// returned for each call. /// </summary> /// <value> /// <c>true</c> if this instance is prototype; otherwise, <c>false</c>. /// </value> public virtual bool IsPrototype => isPrototype; /// <summary> /// Is this object lazily initialized?</summary> /// <remarks> /// <p> /// Only applicable to a singleton object. /// </p> /// <p> /// If <see langword="false"/>, it will get instantiated on startup /// by object factories that perform eager initialization of /// singletons. /// </p> /// </remarks> public bool IsLazyInit { get => isLazyInit; set => isLazyInit = value; } /// <summary> /// Is this object definition a "template", i.e. not meant to be instantiated /// itself but rather just serving as an object definition for configuration /// templates used by <see cref="Spring.Objects.Factory.IObjectFactory.ConfigureObject(object, string)"/>. /// </summary> /// <value> /// <see langword="true"/> if this object definition is a "template". /// </value> public bool IsTemplate => isAbstract || (objectType == null && StringUtils.IsNullOrEmpty(factoryObjectName)); /// <summary> /// Is this object definition "abstract", i.e. not meant to be /// instantiated itself but rather just serving as a parent for concrete /// child object definitions. /// </summary> /// <value> /// <see langword="true"/> if this object definition is "abstract". /// </value> public bool IsAbstract { get => isAbstract; set => isAbstract = value; } /// <summary> /// The <see cref="System.Type"/> of the object definition (if any). /// </summary> /// <value> /// A resolved object <see cref="System.Type"/>. /// </value> /// <exception cref="ApplicationException"> /// If the <see cref="System.Type"/> of the object definition is not a /// resolved <see cref="System.Type"/> or <see langword="null"/>. /// </exception> /// <seealso cref="AbstractObjectDefinition.HasObjectType"/> public Type ObjectType { get { if (objectType == null) { ThrowApplicationException("Object definition does not carry a resolved System.Type"); return null; } return objectType; } set => objectType = value; } private static void ThrowApplicationException(string message) { throw new ApplicationException(message); } /// <summary> /// Is the <see cref="System.Type"/> of the object definition a resolved /// <see cref="System.Type"/>? /// </summary> public bool HasObjectType => objectType != null; /// <summary> /// Returns the <see cref="System.Type.FullName"/> of the /// <see cref="System.Type"/> of the object definition (if any). /// </summary> public string ObjectTypeName { get => objectTypeName ?? objectType?.FullName; set => objectTypeName = StringUtils.GetTextOrNull(value); } /// <summary> /// A description of the resource that this object definition /// came from (for the purpose of showing context in case of errors). /// </summary> public string ResourceDescription { get => resourceDescription; set => resourceDescription = StringUtils.GetTextOrNull(value); } /// <summary> /// The autowire mode as specified in the object definition. /// </summary> /// <remarks> /// <p> /// This determines whether any automagical detection and setting of /// object references will happen. The default is /// <see cref="Spring.Objects.Factory.Config.AutoWiringMode.No"/>, /// which means that no autowiring will be performed. /// </p> /// </remarks> public AutoWiringMode AutowireMode { get => autowireMode; set => autowireMode = value; } /// <summary> /// Gets the resolved autowire mode. /// </summary> /// <remarks> /// <p> /// This resolves /// <see cref="Spring.Objects.Factory.Config.AutoWiringMode.AutoDetect"/> /// to one of /// <see cref="Spring.Objects.Factory.Config.AutoWiringMode.Constructor"/> /// or /// <see cref="Spring.Objects.Factory.Config.AutoWiringMode.ByType"/>. /// </p> /// </remarks> public AutoWiringMode ResolvedAutowireMode { get { if (AutowireMode == AutoWiringMode.AutoDetect) { // Work out whether to apply setter autowiring or constructor autowiring. // If it has a no-arg constructor it's deemed to be setter autowiring, // otherwise we'll try constructor autowiring. ConstructorInfo[] constructors = ObjectType.GetConstructors(); foreach (ConstructorInfo ctor in constructors) { if (ctor.GetParameters().Length == 0) { return AutoWiringMode.ByType; } } return AutoWiringMode.Constructor; } else { return AutowireMode; } } } /// <summary> /// The dependency checking mode. /// </summary> /// <remarks> /// <p> /// The default is /// <see cref="Spring.Objects.Factory.Support.DependencyCheckingMode.None"/>. /// </p> /// </remarks> public DependencyCheckingMode DependencyCheck { get => dependencyCheck; set => dependencyCheck = value; } /// <summary> /// The object names that this object depends on. /// </summary> /// <remarks> /// <p> /// The object factory will guarantee that these objects get initialized /// before this object definition. /// </p> /// <note> /// Dependencies are normally expressed through object properties /// or constructor arguments. This property should just be necessary for /// other kinds of dependencies such as statics (*ugh*) or database /// preparation on startup. /// </note> /// </remarks> public IReadOnlyList<string> DependsOn { get => dependsOn ?? StringUtils.EmptyStringsList; set => dependsOn = value != null && value.Count > 0 ? new List<string>(value) : null; } /// <summary> /// Gets or sets a value indicating whether this instance a candidate for getting autowired into some other /// object. /// </summary> /// <value> /// <c>true</c> if this instance is autowire candidate; otherwise, <c>false</c>. /// </value> public bool IsAutowireCandidate { get => autowireCandidate; set => autowireCandidate = value; } /// <summary> /// Set whether this bean is a primary autowire candidate. /// If this value is true for exactly one bean among multiple /// matching candidates, it will serve as a tie-breaker. /// </summary> public bool IsPrimary { get => primary; set => primary = value; } /// <summary> /// Register a qualifier to be used for autowire candidate resolution, /// keyed by the qualifier's type name. /// <see cref="AutowireCandidateQualifier"/> /// </summary> public void AddQualifier(AutowireCandidateQualifier qualifier) { qualifiers = qualifiers ?? new Dictionary<string, AutowireCandidateQualifier>(); qualifiers.Add(qualifier.TypeName, qualifier); } /// <summary> /// Return whether this bean has the specified qualifier. /// </summary> public bool HasQualifier(string typeName) { return qualifiers != null && qualifiers.ContainsKey(typeName); } /// <summary> /// Return the qualifier mapped to the provided type name. /// </summary> public AutowireCandidateQualifier GetQualifier(string typeName) { if (qualifiers != null && qualifiers.TryGetValue(typeName, out var qualifier)) { return qualifier; } return null; } /// <summary> /// Return all registered qualifiers. /// </summary> /// <returns>the Set of <see cref="AutowireCandidateQualifier"/> objects.</returns> public Set<AutowireCandidateQualifier> GetQualifiers() { return qualifiers != null ? new OrderedSet<AutowireCandidateQualifier>(qualifiers.Values) : new OrderedSet<AutowireCandidateQualifier>(); } /// <summary> /// Copy the qualifiers from the supplied AbstractBeanDefinition to this bean definition. /// </summary> /// <param name="source">the AbstractBeanDefinition to copy from</param> public void CopyQualifiersFrom(AbstractObjectDefinition source) { Trace.Assert(source != null, "Source must not be null"); if (source.qualifiers != null && source.qualifiers.Count > 0) { qualifiers = qualifiers ?? new Dictionary<string, AutowireCandidateQualifier>(); foreach (var qualifier in source.qualifiers) { if (!qualifiers.ContainsKey(qualifier.Key)) { qualifiers.Add(qualifier.Key, qualifier.Value); } } } } /// <summary> /// The name of the initializer method. /// </summary> /// <remarks> /// <p> /// The default value is the <see cref="String.Empty"/> constant, /// in which case there is no initializer method. /// </p> /// </remarks> public string InitMethodName { get => initMethodName; set => initMethodName = StringUtils.GetTextOrNull(value); } /// <summary> /// Return the name of the destroy method. /// </summary> /// <remarks> /// <p> /// The default value is the <see cref="String.Empty"/> constant, /// in which case there is no destroy method. /// </p> /// </remarks> public string DestroyMethodName { get => destroyMethodName; set => destroyMethodName = StringUtils.GetTextOrNull(value); } /// <summary> /// The name of the factory method to use (if any). /// </summary> /// <remarks> /// <p> /// This method will be invoked with constructor arguments, or with no /// arguments if none are specified. The <see langword="static"/> /// method will be invoked on the specified /// <see cref="Spring.Objects.Factory.Config.IObjectDefinition.ObjectType"/>. /// </p> /// </remarks> public string FactoryMethodName { get => factoryMethodName; set => factoryMethodName = StringUtils.GetTextOrNull(value); } /// <summary> /// The name of the factory object to use (if any). /// </summary> public string FactoryObjectName { get => factoryObjectName; set => factoryObjectName = StringUtils.GetTextOrNull(value); } /// <summary> /// Does this object definition have any constructor argument values? /// </summary> /// <value> /// <see langword="true"/> if his object definition has at least one /// element in it's /// <see cref="Spring.Objects.Factory.Support.AbstractObjectDefinition.ConstructorArgumentValues"/> /// property. /// </value> public bool HasConstructorArgumentValues => constructorArgumentValues != null && !constructorArgumentValues.Empty; /// <summary> /// Resolves the type of the object, resolving it from a specified /// object type name if necessary. /// </summary> /// <returns> /// A resolved <see cref="System.Type"/> instance. /// </returns> /// <exception cref="System.TypeLoadException"> /// If the type cannot be resolved. /// </exception> public Type ResolveObjectType() { string typeName = ObjectTypeName; if (typeName == null) { return null; } Type resolvedType = TypeResolutionUtils.ResolveType(typeName); ObjectType = resolvedType; return resolvedType; } /// <summary> /// Validate this object definition. /// </summary> /// <exception cref="Spring.Objects.Factory.Support.ObjectDefinitionValidationException"> /// In the case of a validation failure. /// </exception> public virtual void Validate() { if (IsLazyInit && !IsSingleton) { throw new ObjectDefinitionValidationException( "Lazy initialization is only applicable to singleton objects."); } if (HasMethodOverrides && StringUtils.HasText(FactoryMethodName)) { throw new ObjectDefinitionValidationException( "Cannot combine static factory method with method overrides: " + "the static factory method must create the instance."); } if (HasObjectType) { PrepareMethodOverrides(); } } /// <summary> /// Validates all <see cref="MethodOverrides"/> /// </summary> public virtual void PrepareMethodOverrides() { // ascertain that the various lookup methods exist... foreach (MethodOverride mo in MethodOverrides) { PrepareMethodOverride(mo); } } /// <summary> /// Validate the supplied <paramref name="methodOverride"/>. /// </summary> /// <param name="methodOverride"> /// The <see cref="Spring.Objects.Factory.Support.MethodOverride"/> /// to be validated. /// </param> protected void PrepareMethodOverride(MethodOverride methodOverride) { if (!ReflectionUtils.HasAtLeastOneMethodWithName(ObjectType, methodOverride.MethodName)) { throw new ObjectDefinitionValidationException( string.Format( CultureInfo.InvariantCulture, "Invalid method override: no method with name '{0}' on class [{1}].", methodOverride.MethodName, ObjectTypeName)); } //TODO investigate setting overloaded at this point using MethodCountForName... //Test SunnyDayReplaceMethod_WithArgumentAcceptingReplacerWithNoTypeFragmentsSpecified // will fail if doing this optimization. } /// <summary> /// Override settings in this object definition from the supplied /// <paramref name="other"/> object definition. /// </summary> /// <param name="other"> /// The object definition used to override the member fields of this instance. /// </param> public virtual void OverrideFrom(IObjectDefinition other) { AssertUtils.ArgumentNotNull(other, "other"); IsAbstract = other.IsAbstract; Scope = other.Scope; IsLazyInit = other.IsLazyInit; ConstructorArgumentValues.AddAll(other.ConstructorArgumentValues); PropertyValues.AddAll(other.PropertyValues.PropertyValues); EventHandlerValues.AddAll(other.EventHandlerValues); if (StringUtils.HasText(other.ObjectTypeName)) { ObjectTypeName = other.ObjectTypeName; } if (StringUtils.HasText(other.InitMethodName)) { InitMethodName = other.InitMethodName; } if (StringUtils.HasText(other.DestroyMethodName)) { DestroyMethodName = other.DestroyMethodName; } if (StringUtils.HasText(other.FactoryObjectName)) { FactoryObjectName = other.FactoryObjectName; } if (StringUtils.HasText(other.FactoryMethodName)) { FactoryMethodName = other.FactoryMethodName; } if (other.DependsOn != null && other.DependsOn.Count > 0) { var deps = new List<string>(other.DependsOn.Count + (DependsOn?.Count).GetValueOrDefault()); deps.AddRange(other.DependsOn); if (DependsOn != null && DependsOn.Count > 0) { deps.AddRange(DependsOn); } DependsOn = deps; } AutowireMode = other.AutowireMode; ResourceDescription = other.ResourceDescription; IsPrimary = other.IsPrimary; IsAutowireCandidate = other.IsAutowireCandidate; if (other is AbstractObjectDefinition aod) { if (other.ObjectTypeName != null) { ObjectTypeName = other.ObjectTypeName; } if (aod.HasObjectType) { ObjectType = other.ObjectType; } MethodOverrides.AddAll(aod.MethodOverrides); DependencyCheck = aod.DependencyCheck; CopyQualifiersFrom(aod); } } /// <summary> /// Returns a <see cref="System.String"/> that represents the current /// <see cref="System.Object"/>. /// </summary> /// <returns> /// A <see cref="System.String"/> that represents the current /// <see cref="System.Object"/>. /// </returns> public override string ToString() { StringBuilder buffer = new StringBuilder(string.Format("Class [{0}]", ObjectTypeName)); buffer.Append("; Abstract = ").Append(IsAbstract); buffer.Append("; Parent = ").Append(ParentName); buffer.Append("; Scope = ").Append(Scope); buffer.Append("; Singleton = ").Append(IsSingleton); buffer.Append("; LazyInit = ").Append(IsLazyInit); buffer.Append("; Autowire = ").Append(AutowireMode); buffer.Append("; Autowire-Candidate = ").Append(IsAutowireCandidate); buffer.Append("; Primary = ").Append(IsPrimary); buffer.Append("; DependencyCheck = ").Append(DependencyCheck); buffer.Append("; InitMethodName = ").Append(InitMethodName); buffer.Append("; DestroyMethodName = ").Append(DestroyMethodName); buffer.Append("; FactoryMethodName = ").Append(FactoryMethodName); buffer.Append("; FactoryObjectName = ").Append(FactoryObjectName); if (StringUtils.HasText(ResourceDescription)) { buffer.Append("; defined in = ").Append(ResourceDescription); } return buffer.ToString(); } protected AbstractObjectDefinition(SerializationInfo info, StreamingContext context) { constructorArgumentValues = (ConstructorArgumentValues) info.GetValue("constructorArgumentValues", typeof(ConstructorArgumentValues)); propertyValues = (MutablePropertyValues) info.GetValue("propertyValues", typeof(MutablePropertyValues)); eventHandlerValues= (EventValues) info.GetValue("eventHandlerValues", typeof(EventValues)); methodOverrides= (MethodOverrides) info.GetValue("methodOverrides", typeof(MethodOverrides)); resourceDescription = info.GetString("resourceDescription"); isSingleton = info.GetBoolean("isSingleton"); isPrototype = info.GetBoolean("isPrototype"); isLazyInit = info.GetBoolean("isLazyInit"); isAbstract = info.GetBoolean("isAbstract"); scope= info.GetString("scope"); role = (ObjectRole) info.GetValue("role", typeof(ObjectRole)); var objectTypeName = info.GetString("objectTypeName"); objectType = objectTypeName != null ? Type.GetType(objectTypeName) : null; autowireMode = (AutoWiringMode) info.GetValue("autowireMode", typeof(AutoWiringMode)); dependencyCheck= (DependencyCheckingMode) info.GetValue("dependencyCheck", typeof(DependencyCheckingMode)); dependsOn = (List<string>) info.GetValue("dependsOn", typeof(List<string>)); autowireCandidate = info.GetBoolean("autowireCandidate"); primary = info.GetBoolean("primary"); qualifiers = (Dictionary<string, AutowireCandidateQualifier>) info.GetValue("qualifiers", typeof(Dictionary<string, AutowireCandidateQualifier>)); initMethodName = info.GetString("initMethodName"); destroyMethodName = info.GetString("destroyMethodName"); factoryMethodName = info.GetString("factoryMethodName" ); factoryObjectName= info.GetString("factoryObjectName"); } public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("constructorArgumentValues", constructorArgumentValues); info.AddValue("propertyValues", propertyValues); info.AddValue("eventHandlerValues", eventHandlerValues); info.AddValue("methodOverrides", methodOverrides); info.AddValue("resourceDescription", resourceDescription); info.AddValue("isSingleton", isSingleton); info.AddValue("isPrototype", isPrototype); info.AddValue("isLazyInit", isLazyInit); info.AddValue("isAbstract", isAbstract); info.AddValue("scope", scope); info.AddValue("role", role); info.AddValue("objectTypeName", objectType.AssemblyQualifiedName); info.AddValue("autowireMode", autowireMode); info.AddValue("dependencyCheck", dependencyCheck); info.AddValue("dependsOn", dependsOn); info.AddValue("autowireCandidate", autowireCandidate); info.AddValue("primary", primary); info.AddValue("qualifiers", qualifiers); info.AddValue("initMethodName", initMethodName); info.AddValue("destroyMethodName", destroyMethodName); info.AddValue("factoryMethodName", factoryMethodName); info.AddValue("factoryObjectName", factoryObjectName); } } }
40.641138
159
0.554084
[ "Apache-2.0" ]
Magicianred/spring-net
src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectDefinition.cs
37,147
C#
#region Header // Vorspire _,-'/-'/ Thrones.cs // . __,-; ,'( '/ // \. `-.__`-._`:_,-._ _ , . `` // `:-._,------' ` _,`--` -: `_ , ` ,' : // `---..__,,--' (C) 2018 ` -'. -' // # Vita-Nex [http://core.vita-nex.com] # // {o)xxx|===============- # -===============|xxx(o} // # The MIT License (MIT) # #endregion #region References using Server; using Server.Items; #endregion namespace VitaNex.Items { public abstract class BaseThrowableThrone : ThrowableFurniture { public BaseThrowableThrone(int itemID) : base(itemID) { Weight = 10.0; } public BaseThrowableThrone(Serial serial) : base(serial) { } public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.SetVersion(0); } public override void Deserialize(GenericReader reader) { base.Deserialize(reader); reader.GetVersion(); } } [Furniture, Flipable(0xB32, 0xB33)] public class ThrowableThrone : BaseThrowableThrone { [Constructable] public ThrowableThrone() : base(Utility.RandomList(0xB32, 0xB33)) { } public ThrowableThrone(Serial serial) : base(serial) { } public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.SetVersion(0); } public override void Deserialize(GenericReader reader) { base.Deserialize(reader); reader.GetVersion(); } } [Furniture, Flipable(0xB2E, 0xB2F, 0xB31, 0xB30)] public class ThrowableWoodenThrone : BaseThrowableThrone { [Constructable] public ThrowableWoodenThrone() : base(Utility.RandomList(0xB2E, 0xB2F, 0xB31, 0xB30)) { } public ThrowableWoodenThrone(Serial serial) : base(serial) { } public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.SetVersion(0); } public override void Deserialize(GenericReader reader) { base.Deserialize(reader); reader.GetVersion(); } } }
20.888889
64
0.596712
[ "MIT" ]
Vita-Nex/Core
Items/Throwables/AtMobiles/Fun/Furniture/Thrones.cs
2,068
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; // Handles loading and unloading between main menu and gameplay // Scenes are always loaded on top of SceneManager scene, which holds important game logic stuff // This script needs to be in a prefab in order to use buttons for calling the methods public class SceneLoader : MonoBehaviour { public void LoadGame() // Loads gameplay and unloads main menu { SceneManager.LoadSceneAsync("Gameplay", LoadSceneMode.Additive); if (SceneManager.GetSceneByBuildIndex(1).isLoaded) { SceneManager.UnloadSceneAsync("MainMenu"); } if (SceneManager.GetSceneByBuildIndex(3).isLoaded) { SceneManager.UnloadSceneAsync("Ending"); } Stats.ResetStats(); } public void LoadMainMenu() // Loads main menu and unloads gameplay { SceneManager.LoadSceneAsync("MainMenu", LoadSceneMode.Additive); if (SceneManager.GetSceneByBuildIndex(2).isLoaded) { SceneManager.UnloadSceneAsync("Gameplay"); } if (SceneManager.GetSceneByBuildIndex(3).isLoaded) { SceneManager.UnloadSceneAsync("Ending"); } } public void LoadEnding() { SceneManager.LoadSceneAsync("Ending", LoadSceneMode.Additive); SceneManager.UnloadSceneAsync("Gameplay"); } }
30.479167
97
0.668489
[ "MIT" ]
M4R774/lojojam
Assets/Scripts/SceneLoader.cs
1,465
C#
namespace GitVersion { using System.Linq; using LibGit2Sharp; public static class GitHelper { public static void NormalizeGitDirectory(string gitDirectory, Arguments arguments, string branch = null) { using (var repo = new Repository(gitDirectory)) { var remote = EnsureOnlyOneRemoteIsDefined(repo); AddMissingRefSpecs(repo, remote); Logger.WriteInfo(string.Format("Fetching from remote '{0}' using the following refspecs: {1}.", remote.Name, string.Join(", ", remote.FetchRefSpecs.Select(r => r.Specification)))); var fetchOptions = BuildFetchOptions(arguments.Username, arguments.Password); repo.Network.Fetch(remote, fetchOptions); CreateMissingLocalBranchesFromRemoteTrackingOnes(repo, remote.Name); if (!repo.Info.IsHeadDetached) { Logger.WriteInfo(string.Format("HEAD points at branch '{0}'.", repo.Refs.Head.TargetIdentifier)); return; } Logger.WriteInfo(string.Format("HEAD is detached and points at commit '{0}'.", repo.Refs.Head.TargetIdentifier)); if (branch != null) { Logger.WriteInfo(string.Format("Checking out local branch 'refs/heads/{0}'.", branch)); repo.Checkout("refs/heads/" + branch); } else { CreateFakeBranchPointingAtThePullRequestTip(repo); } } } static void AddMissingRefSpecs(Repository repo, Remote remote) { if (remote.FetchRefSpecs.Any(r => r.Source == "refs/heads/*")) return; var allBranchesFetchRefSpec = string.Format("+refs/heads/*:refs/remotes/{0}/*", remote.Name); Logger.WriteInfo(string.Format("Adding refspec: {0}", allBranchesFetchRefSpec)); repo.Network.Remotes.Update(remote, r => r.FetchRefSpecs.Add(allBranchesFetchRefSpec)); } static FetchOptions BuildFetchOptions(string username, string password) { var fetchOptions = new FetchOptions(); if (!string.IsNullOrEmpty(username)) { fetchOptions.Credentials = new UsernamePasswordCredentials { Username = username, Password = password }; } return fetchOptions; } static void CreateFakeBranchPointingAtThePullRequestTip(Repository repo) { var remote = repo.Network.Remotes.Single(); var remoteTips = repo.Network.ListReferences(remote); var headTipSha = repo.Head.Tip.Sha; var refs = remoteTips.Where(r => r.TargetIdentifier == headTipSha).ToList(); if (refs.Count == 0) { var message = string.Format("Couldn't find any remote tips from remote '{0}' pointing at the commit '{1}'.", remote.Url, headTipSha); throw new ErrorException(message); } if (refs.Count > 1) { var names = string.Join(", ", refs.Select(r => r.CanonicalName)); var message = string.Format("Found more than one remote tip from remote '{0}' pointing at the commit '{1}'. Unable to determine which one to use ({2}).", remote.Url, headTipSha, names); throw new ErrorException(message); } var canonicalName = refs[0].CanonicalName; Logger.WriteInfo(string.Format("Found remote tip '{0}' pointing at the commit '{1}'.", canonicalName, headTipSha)); if (!canonicalName.StartsWith("refs/pull/")) { var message = string.Format("Remote tip '{0}' from remote '{1}' doesn't look like a valid pull request.", canonicalName, remote.Url); throw new ErrorException(message); } var fakeBranchName = canonicalName.Replace("refs/pull/", "refs/heads/pull/"); Logger.WriteInfo(string.Format("Creating fake local branch '{0}'.", fakeBranchName)); repo.Refs.Add(fakeBranchName, new ObjectId(headTipSha)); Logger.WriteInfo(string.Format("Checking local branch '{0}' out.", fakeBranchName)); repo.Checkout(fakeBranchName); } static void CreateMissingLocalBranchesFromRemoteTrackingOnes(Repository repo, string remoteName) { var prefix = string.Format("refs/remotes/{0}/", remoteName); foreach (var remoteTrackingReference in repo.Refs.FromGlob(prefix + "*")) { var localCanonicalName = "refs/heads/" + remoteTrackingReference.CanonicalName.Substring(prefix.Length); if (repo.Refs.Any(x => x.CanonicalName == localCanonicalName)) { Logger.WriteInfo(string.Format("Skipping local branch creation since it already exists '{0}'.", remoteTrackingReference.CanonicalName)); continue; } Logger.WriteInfo(string.Format("Creating local branch from remote tracking '{0}'.", remoteTrackingReference.CanonicalName)); var symbolicReference = remoteTrackingReference as SymbolicReference; if (symbolicReference == null) { repo.Refs.Add(localCanonicalName, new ObjectId(remoteTrackingReference.TargetIdentifier), true); } else { repo.Refs.Add(localCanonicalName, new ObjectId(symbolicReference.ResolveToDirectReference().TargetIdentifier), true); } } } static Remote EnsureOnlyOneRemoteIsDefined(IRepository repo) { var remotes = repo.Network.Remotes; var howMany = remotes.Count(); if (howMany == 1) { var remote = remotes.Single(); Logger.WriteInfo(string.Format("One remote found ({0} -> '{1}').", remote.Name, remote.Url)); return remote; } var message = string.Format("{0} remote(s) have been detected. When being run on a TeamCity agent, the Git repository is expected to bear one (and no more than one) remote.", howMany); throw new ErrorException(message); } } }
43.141935
202
0.560939
[ "MIT" ]
potherca-contrib/GitVersion
GitVersionCore/BuildServers/GitHelper.cs
6,533
C#
using System; using System.Xml.Serialization; using System.Collections.Generic; using Top.Api; namespace DingTalk.Api.Response { /// <summary> /// OapiChatGetResponse. /// </summary> public class OapiChatGetResponse : DingTalkResponse { /// <summary> /// chat_info /// </summary> [XmlElement("chat_info")] public ChatInfoDomain ChatInfo { get; set; } /// <summary> /// errcode /// </summary> [XmlElement("errcode")] public long Errcode { get; set; } /// <summary> /// errmsg /// </summary> [XmlElement("errmsg")] public string Errmsg { get; set; } /// <summary> /// ChatInfoDomain Data Structure. /// </summary> [Serializable] public class ChatInfoDomain : TopObject { /// <summary> /// agentidlist /// </summary> [XmlArray("agentidlist")] [XmlArrayItem("string")] public List<string> Agentidlist { get; set; } /// <summary> /// 是否全员禁用 0 不禁言 1 全员禁言 /// </summary> [XmlElement("chatBannedType")] public long ChatBannedType { get; set; } /// <summary> /// conversationTag /// </summary> [XmlElement("conversationTag")] public long ConversationTag { get; set; } /// <summary> /// extidlist /// </summary> [XmlArray("extidlist")] [XmlArrayItem("string")] public List<string> Extidlist { get; set; } /// <summary> /// 群头像mediaId /// </summary> [XmlElement("icon")] public string Icon { get; set; } /// <summary> /// 仅群主和群管理员可管理 0否 1 是 /// </summary> [XmlElement("managementType")] public long ManagementType { get; set; } /// <summary> /// 尽群主和管理员可@所有人 0 否 1 是 /// </summary> [XmlElement("mentionAllAuthority")] public long MentionAllAuthority { get; set; } /// <summary> /// name /// </summary> [XmlElement("name")] public string Name { get; set; } /// <summary> /// owner /// </summary> [XmlElement("owner")] public string Owner { get; set; } /// <summary> /// 是否可以搜索群名 0 不可以 1可以搜索 /// </summary> [XmlElement("searchable")] public long Searchable { get; set; } /// <summary> /// 新成员可查看聊天历史 0否 1是 /// </summary> [XmlElement("showHistoryType")] public long ShowHistoryType { get; set; } /// <summary> /// 群状态 1-正常 2-已解散 /// </summary> [XmlElement("status")] public long Status { get; set; } /// <summary> /// useridlist /// </summary> [XmlArray("useridlist")] [XmlArrayItem("string")] public List<string> Useridlist { get; set; } /// <summary> /// 入群需群主或群管理员同意 0不需要 1需要 /// </summary> [XmlElement("validationType")] public long ValidationType { get; set; } } } }
24.9375
55
0.491855
[ "MIT" ]
lee890720/YiShaAdmin
YiSha.Util/YsSha.Dingtalk/DingTalk/Response/OapiChatGetResponse.cs
3,380
C#
using System; using System.Collections.Generic; using NUnit.Framework; using Xamarin.ProjectTools; using System.IO; using System.Linq; using Microsoft.Build.Framework; using System.Text; using Xamarin.Android.Tasks; using Microsoft.Build.Utilities; using System.Diagnostics; using System.Text.RegularExpressions; namespace Xamarin.Android.Build.Tests { [TestFixture] [Category ("Node-2")] [Parallelizable (ParallelScope.Children)] public class ManagedResourceParserTests : BaseTest { const string ValuesXml = @"<?xml version=""1.0"" encoding=""utf-8""?> <resources> <bool name=""a_bool"">false</bool> <color name=""a_color"">#FFFFFFFF</color> <integer name=""an_integer"">0</integer> <integer-array name=""int_array""> <item>0</item> <item>1</item> </integer-array> <array name=""array_of_colors""> <item>#FFFF0000</item> <item>#FF00FF00</item> <item>#FF0000FF</item> </array> </resources> "; const string StringsXml = @"<?xml version=""1.0"" encoding=""utf-8""?> <resources> <string name=""hello"">Hello World, Click Me!</string> <string name=""app_name"">App1</string> <plurals name=""num_locations_reported""> <item quantity=""zero"">No location reported</item> <item quantity=""one""> One location reported</item> <item quantity=""other"">%d locations reported</item> </plurals> </resources> "; const string StringsXml2 = @"<?xml version=""1.0"" encoding=""utf-8""?> <resources> <string name=""foo"">Hello World, Click Me!</string> <string-array name=""widths_array""> <item>Thin</item> <item>Thinish</item> <item>Medium</item> <item>Thickish</item> <item>Thick</item> </string-array> <string name=""menu_settings"">Android Beam settings</string> <string name=""fixed""></string> </resources> "; const string Menu = @"<menu xmlns:android=""http://schemas.android.com/apk/res/android""> <item android:id=""@+id/menu_settings"" android:icon=""@drawable/ic_menu_preferences"" android:showAsAction=""ifRoom"" android:title=""@string/menu_settings"" /> </menu>"; const string Animator = @"<?xml version=""1.0"" encoding=""utf-8""?> <objectAnimator xmlns:android=""http://schemas.android.com/apk/res/android"" android:duration=""600"" android:interpolator=""@android:interpolator/fast_out_linear_in"" android:propertyName=""y"" android:valueFrom=""5000"" android:valueTo=""0"" android:valueType=""floatType"" />"; const string Animation = @"<?xml version=""1.0"" encoding=""utf-8""?> <set xmlns:android=""http://schemas.android.com/apk/res/android"" android:shareInterpolator=""false""> <alpha android:fromAlpha=""0.0"" android:toAlpha=""1.0"" /> </set> "; const string Array = @"<?xml version=""1.0"" encoding=""utf-8""?> <resources> <array name=""alphabet""> <item>A</item> <item>Z</item> </array> </resources> "; const string Dimen = @"<?xml version=""1.0"" encoding=""utf-8""?> <resources> <dimen name=""main_text_item_size"">17dp</dimen> </resources>"; const string Styleable = @"<?xml version=""1.0"" encoding=""utf-8""?> <resources> <declare-styleable name=""CustomFonts""> <attr name=""android:scrollX"" /> <attr name=""customFont"" /> </declare-styleable> <declare-styleable name=""MultiSelectListPreference""> <attr name=""entries"">value</attr> <attr name=""android:entries""/> <attr name=""entryValues"">value</attr> <attr name=""android:entryValues""/> </declare-styleable> <attr name=""customFont"" format=""enum""> <enum name=""regular"" value=""0""/> </attr> <attr name=""entries"" format=""enum""> <enum name=""entry_1"" value=""0""/> </attr> <attr name=""entryValues"" format=""enum""> <enum name=""entry_1_value"" value=""0""/> </attr> </resources>"; const string Styleablev21 = @"<?xml version=""1.0"" encoding=""utf-8""?> <resources> <declare-styleable name=""MultiSelectListPreference""> <attr name=""entries"">value</attr> <attr name=""android:entries""/> <attr name=""entryValues"">value</attr> <attr name=""android:entryValues""/> </declare-styleable> </resources>"; const string Selector = @"<?xml version=""1.0"" encoding=""utf-8""?> <selector xmlns:android=""http://schemas.android.com/apk/res/android""> <item android:state_pressed=""true"" android:color=""#ffff0000""/> <item android:state_focused=""true"" android:color=""#ff0000ff""/> <item android:color=""#ff000000""/> </selector> "; const string Transition = @"<?xml version=""1.0"" encoding=""utf-8""?> <changeBounds xmlns:android=""http://schemas.android.com/apk/res/android"" android:duration=""5000"" android:interpolator=""@android:anim/overshoot_interpolator"" /> "; const string Main = @"<?xml version=""1.0"" encoding=""utf-8""?> <LinearLayout xmlns:android=""http://schemas.android.com/apk/res/android""> <TextView android:id=""@+id/seekBar"" /> <TextView android:id=""@+id/seekbar"" /> <TextView android:id=""@+id/textview.withperiod"" /> <TextView android:id=""@+id/Føø-Bar"" /> </LinearLayout> "; const string CustomId = @"<?xml version=""1.0"" encoding=""utf-8""?> <LinearLayout xmlns:android=""http://schemas.android.com/apk/res/android""> <TextView android:id=""@+MyCustomID/HelloWorldTextView""/> <TextView android:id=""@+ACustomID/foo1""/> </LinearLayout> "; const string CustomInterpolator = @"<?xml version=""1.0"" encoding=""utf-8""?> <accelerateInterpolator xmlns:android=""http://schemas.android.com/apk/res/android"" android:factor=""2"" /> "; const string Xml = @"<?xml version=""1.0"" encoding=""utf-8""?> <MyXml> </MyXml> "; const string AndroidManifest = @"<?xml version='1.0'?> <manifest xmlns:android=""http://schemas.android.com/apk/res/android"" package=""MonoAndroidApplication4.MonoAndroidApplication4"" />"; /// <summary> /// When you add new resources to the code blocks above, the following /// Rtxt string needs to be updated with the correct values. /// You can do this manually OR use aapt2 /// /// Run the GenerateDesignerFileFromRtxt test and let it fail. /// You can then go to the appropriate resource directory /// and run the following commands. /// /// aapt2 compile -o compile.flata --dir res/ /// aapt2 compile -o lp.flata --dir lp/res/ /// aapt2 link -o foo.apk --manifest AndroidManifest.xml -R lp.flata -R compile.flata --auto-add-overlay --output-text-symbols R.txt -I ~/android-toolchain-xa/sdk/platforms/android-Q/android.jar /// /// Then copy the values from the R.txt file and place them below. /// </summary> /// int ACustomID foo1 0x7f160000 /// int MyCustomID HelloWorldTextView 0x7f150000 const string Rtxt = @"int anim custominterpolator 0x7f010000 int anim some_animation 0x7f010001 int animator slide_in_bottom 0x7f020000 int array alphabet 0x7f030000 int array array_of_colors 0x7f030001 int array int_array 0x7f030002 int array widths_array 0x7f030003 int attr customFont 0x7f040000 int attr entries 0x7f040001 int attr entryValues 0x7f040002 int bool a_bool 0x7f050000 int color a_color 0x7f060000 int color selector1 0x7f060001 int dimen main_text_item_size 0x7f070000 int drawable ic_menu_preferences 0x7f080000 int font arial 0x7f090000 int id Føø_Bar 0x7f0a0000 int id entry_1 0x7f0a0001 int id entry_1_value 0x7f0a0002 int id menu_settings 0x7f0a0003 int id regular 0x7f0a0004 int id seekBar 0x7f0a0005 int id seekbar 0x7f0a0006 int id textview_withperiod 0x7f0a0007 int integer an_integer 0x7f0b0000 int layout main 0x7f0c0000 int menu options 0x7f0d0000 int mipmap icon 0x7f0e0000 int plurals num_locations_reported 0x7f0f0000 int raw afoo 0x7f100000 int raw foo 0x7f100001 int string app_name 0x7f110000 int string fixed 0x7f110001 int string foo 0x7f110002 int string hello 0x7f110003 int string menu_settings 0x7f110004 int[] styleable CustomFonts { 0x010100d2, 0x7f040000 } int styleable CustomFonts_android_scrollX 0 int styleable CustomFonts_customFont 1 int[] styleable MultiSelectListPreference { 0x010100b2, 0x010101f8, 0x7f040001, 0x7f040002 } int styleable MultiSelectListPreference_android_entries 0 int styleable MultiSelectListPreference_android_entryValues 1 int styleable MultiSelectListPreference_entries 2 int styleable MultiSelectListPreference_entryValues 3 int transition transition 0x7f130000 int xml myxml 0x7f140000 "; public string AndroidSdkDirectory { get; set; } = AndroidSdkResolver.GetAndroidSdkPath (); public void CreateResourceDirectory (string path) { Directory.CreateDirectory (Path.Combine (Root, path)); Directory.CreateDirectory (Path.Combine (Root, path, "res", "animator")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "anim")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "color")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "drawable")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "mipmap")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "menu")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "font")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "layout")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "values")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "values-v21")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "transition")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "raw")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "xml")); File.WriteAllText (Path.Combine (Root, path, "AndroidManifest.xml"), AndroidManifest); File.WriteAllText (Path.Combine (Root, path, "res", "color", "selector1.xml"), Selector); File.WriteAllText (Path.Combine (Root, path, "res", "anim", "custominterpolator.xml"), CustomInterpolator); File.WriteAllText (Path.Combine (Root, path, "res", "values", "arrays.xml"), Array); File.WriteAllText (Path.Combine (Root, path, "res", "values", "values.xml"), ValuesXml); File.WriteAllText (Path.Combine (Root, path, "res", "values", "strings.xml"), StringsXml); File.WriteAllText (Path.Combine (Root, path, "res", "values", "attrs.xml"), Styleable); File.WriteAllText (Path.Combine (Root, path, "res", "values-v21", "attrs.xml"), Styleablev21); File.WriteAllText (Path.Combine (Root, path, "res", "transition", "transition.xml"), Transition); File.WriteAllText (Path.Combine (Root, path, "res", "raw", "afoo.txt"), "AFoo"); File.WriteAllText (Path.Combine (Root, path, "res", "raw", "foo.txt"), "Foo"); File.WriteAllText (Path.Combine (Root, path, "res", "layout", "main.xml"), Main); File.WriteAllText (Path.Combine (Root, path, "res", "xml", "myxml.xml"), Xml); Directory.CreateDirectory (Path.Combine (Root, path, "lp", "res", "animator")); Directory.CreateDirectory (Path.Combine (Root, path, "lp", "res", "anim")); Directory.CreateDirectory (Path.Combine (Root, path, "lp", "res", "font")); Directory.CreateDirectory (Path.Combine (Root, path, "lp", "res", "values")); Directory.CreateDirectory (Path.Combine (Root, path, "lp", "res", "drawable")); Directory.CreateDirectory (Path.Combine (Root, path, "lp", "res", "menu")); Directory.CreateDirectory (Path.Combine (Root, path, "lp", "res", "mipmap-hdpi")); File.WriteAllText (Path.Combine (Root, path, "lp", "res", "animator", "slide_in_bottom.xml"), Animator); File.WriteAllText (Path.Combine (Root, path, "lp", "res", "anim", "some_animation.xml"), Animation); File.WriteAllText (Path.Combine (Root, path, "lp", "res", "font", "arial.ttf"), ""); File.WriteAllText (Path.Combine (Root, path, "lp", "res", "values", "strings.xml"), StringsXml2); File.WriteAllText (Path.Combine (Root, path, "lp", "res", "values", "dimen.xml"), Dimen); using (var stream = typeof (XamarinAndroidCommonProject).Assembly.GetManifestResourceStream ("Xamarin.ProjectTools.Resources.Base.Icon.png")) { var icon_binary_mdpi = new byte [stream.Length]; stream.Read (icon_binary_mdpi, 0, (int)stream.Length); File.WriteAllBytes (Path.Combine (Root, path, "lp", "res", "drawable", "ic_menu_preferences.png"), icon_binary_mdpi); File.WriteAllBytes (Path.Combine (Root, path, "lp", "res", "mipmap-hdpi", "icon.png"), icon_binary_mdpi); } File.WriteAllText (Path.Combine (Root, path, "lp", "res", "menu", "options.xml"), Menu); File.WriteAllText (Path.Combine (Root, path, "lp", "__res_name_case_map.txt"), "menu/Options.xml;menu/options.xml"); } void BuildLibraryWithResources (string path) { var library = new XamarinAndroidLibraryProject () { ProjectName = "Library", }; var libraryStrings = library.AndroidResources.FirstOrDefault (r => r.Include () == @"Resources\values\Strings.xml"); library.AndroidResources.Clear (); library.AndroidResources.Add (libraryStrings); library.AndroidResources.Add (new AndroidItem.AndroidResource (Path.Combine ("Resources", "animator", "slide_in_bottom.xml")) { TextContent = () => Animator }); library.AndroidResources.Add (new AndroidItem.AndroidResource (Path.Combine ("Resources", "font", "arial.ttf")) { TextContent = () => "" }); library.AndroidResources.Add (new AndroidItem.AndroidResource (Path.Combine ("Resources", "values", "strings2.xml")) { TextContent = () => StringsXml2 }); library.AndroidResources.Add (new AndroidItem.AndroidResource (Path.Combine ("Resources", "values", "dimen.xml")) { TextContent = () => Dimen }); using (var stream = typeof (XamarinAndroidCommonProject).Assembly.GetManifestResourceStream ("Xamarin.ProjectTools.Resources.Base.Icon.png")) { var icon_binary_mdpi = new byte [stream.Length]; stream.Read (icon_binary_mdpi, 0, (int)stream.Length); library.AndroidResources.Add (new AndroidItem.AndroidResource (Path.Combine ("Resources", "drawable", "ic_menu_preferences.png")) { BinaryContent = () => icon_binary_mdpi }); library.AndroidResources.Add (new AndroidItem.AndroidResource (Path.Combine ("Resources", "mipmap-hdpi", "icon.png")) { BinaryContent = () => icon_binary_mdpi }); } library.AndroidResources.Add (new AndroidItem.AndroidResource (Path.Combine ("Resources", "menu", "options.xml")) { TextContent = () => Menu }); using (ProjectBuilder builder = CreateDllBuilder (Path.Combine (Root, path))) { Assert.IsTrue (builder.Build (library), "Build should have succeeded"); } } void CompareFilesIgnoreRuntimeInfoString (string file1, string file2) { FileAssert.Exists (file1); FileAssert.Exists (file2); var content1 = File.ReadAllText (file1); var content2 = File.ReadAllText (file2); // This string is only generated when running on mono, replace with a new line that will be stripped when comparing. var runtimeVersionRegex = new Regex (@"//\s*Runtime Version:.*"); content1 = runtimeVersionRegex.Replace (content1, Environment.NewLine); content2 = runtimeVersionRegex.Replace (content2, Environment.NewLine); using (var s1 = new MemoryStream (Encoding.UTF8.GetBytes (content1))) using (var s2 = new MemoryStream (Encoding.UTF8.GetBytes (content2))) { if (!StreamCompare (s1, s2)) { TestContext.AddTestAttachment (file1, Path.GetFileName (file1)); TestContext.AddTestAttachment (file2, Path.GetFileName (file2)); Assert.Fail ($"{file1} and {file2} do not match."); } } } [Test] public void GenerateDesignerFileWithÜmläüts () { var path = Path.Combine ("temp", TestName + " Some Space"); CreateResourceDirectory (path); IBuildEngine engine = new MockBuildEngine (TestContext.Out); var task = new GenerateResourceDesigner { BuildEngine = engine }; task.UseManagedResourceGenerator = true; task.DesignTimeBuild = true; task.Namespace = "Foo.Foo"; task.NetResgenOutputFile = Path.Combine (Root, path, "Resource.designer.cs"); task.ProjectDir = Path.Combine (Root, path); task.ResourceDirectory = Path.Combine (Root, path, "res") + Path.DirectorySeparatorChar; task.Resources = new TaskItem [] { new TaskItem (Path.Combine (Root, path, "res", "values", "strings.xml"), new Dictionary<string, string> () { { "LogicalName", "values\\strings.xml" }, }), }; task.AdditionalResourceDirectories = new TaskItem [] { new TaskItem (Path.Combine (Root, path, "lp", "res")), }; task.IsApplication = true; task.JavaPlatformJarPath = Path.Combine (AndroidSdkDirectory, "platforms", "android-27", "android.jar"); Assert.IsTrue (task.Execute (), "Task should have executed successfully."); Assert.IsTrue (File.Exists (task.NetResgenOutputFile), $"{task.NetResgenOutputFile} should have been created."); var expected = Path.Combine (Root, "Expected", "GenerateDesignerFileExpected.cs"); CompareFilesIgnoreRuntimeInfoString (task.NetResgenOutputFile, expected); Directory.Delete (Path.Combine (Root, path), recursive: true); } [Test] public void GenerateDesignerFileFromRtxt ([Values (false, true)] bool withLibraryReference) { var path = Path.Combine ("temp", TestName + " Some Space"); CreateResourceDirectory (path); File.WriteAllText (Path.Combine (Root, path, "R.txt"), Rtxt); IBuildEngine engine = new MockBuildEngine (TestContext.Out); var task = new GenerateResourceDesigner { BuildEngine = engine }; task.UseManagedResourceGenerator = true; task.DesignTimeBuild = true; task.Namespace = "Foo.Foo"; task.NetResgenOutputFile = Path.Combine (Root, path, "Resource.designer.cs"); task.ProjectDir = Path.Combine (Root, path); task.ResourceDirectory = Path.Combine (Root, path, "res") + Path.DirectorySeparatorChar; task.Resources = new TaskItem [] { new TaskItem (Path.Combine (Root, path, "res", "values", "strings.xml"), new Dictionary<string, string> () { { "LogicalName", "values\\strings.xml" }, }), }; task.AdditionalResourceDirectories = new TaskItem [] { new TaskItem (Path.Combine (Root, path, "lp", "res")), }; task.IsApplication = true; task.JavaPlatformJarPath = Path.Combine (AndroidSdkDirectory, "platforms", "android-27", "android.jar"); if (withLibraryReference) { var libraryPath = Path.Combine (path, "Library"); BuildLibraryWithResources (libraryPath); task.References = new TaskItem [] { new TaskItem (Path.Combine (Root, libraryPath, "bin", "Debug", "Library.dll")) }; } Assert.IsTrue (task.Execute (), "Task should have executed successfully."); Assert.IsTrue (File.Exists (task.NetResgenOutputFile), $"{task.NetResgenOutputFile} should have been created."); var expected = Path.Combine (Root, "Expected", withLibraryReference ? "GenerateDesignerFileWithLibraryReferenceExpected.cs" : "GenerateDesignerFileExpected.cs"); CompareFilesIgnoreRuntimeInfoString (task.NetResgenOutputFile, expected); Directory.Delete (Path.Combine (Root, path), recursive: true); } [Test] public void UpdateLayoutIdIsIncludedInDesigner ([Values(true, false)] bool useRtxt) { var path = Path.Combine ("temp", TestName + " Some Space"); CreateResourceDirectory (path); if (useRtxt) File.WriteAllText (Path.Combine (Root, path, "R.txt"), Rtxt); IBuildEngine engine = new MockBuildEngine (TestContext.Out); var task = new GenerateResourceDesigner { BuildEngine = engine }; task.UseManagedResourceGenerator = true; task.DesignTimeBuild = true; task.Namespace = "Foo.Foo"; task.NetResgenOutputFile = Path.Combine (Root, path, "Resource.designer.cs"); task.ProjectDir = Path.Combine (Root, path); task.ResourceDirectory = Path.Combine (Root, path, "res") + Path.DirectorySeparatorChar; task.Resources = new TaskItem [] { new TaskItem (Path.Combine (Root, path, "res", "values", "strings.xml"), new Dictionary<string, string> () { { "LogicalName", "values\\strings.xml" }, }), }; task.AdditionalResourceDirectories = new TaskItem [] { new TaskItem (Path.Combine (Root, path, "lp", "res")), }; task.ResourceFlagFile = Path.Combine (Root, path, "AndroidResgen.flag"); File.WriteAllText (task.ResourceFlagFile, string.Empty); task.IsApplication = true; task.JavaPlatformJarPath = Path.Combine (AndroidSdkDirectory, "platforms", "android-27", "android.jar"); Assert.IsTrue (task.Execute (), "Task should have executed successfully."); Assert.IsTrue (File.Exists (task.NetResgenOutputFile), $"{task.NetResgenOutputFile} should have been created."); var expected = Path.Combine (Root, "Expected", "GenerateDesignerFileExpected.cs"); CompareFilesIgnoreRuntimeInfoString (task.NetResgenOutputFile, expected); // Update the id, and force the managed parser to re-parse the output File.WriteAllText (Path.Combine (Root, path, "res", "layout", "main.xml"), Main.Replace ("@+id/textview.withperiod", "@+id/textview.withperiod2")); File.SetLastWriteTimeUtc (task.ResourceFlagFile, DateTime.UtcNow); Assert.IsTrue (task.Execute (), "Task should have executed successfully."); Assert.IsTrue (File.Exists (task.NetResgenOutputFile), $"{task.NetResgenOutputFile} should have been created."); var data = File.ReadAllText (expected); var expectedWithNewId = Path.Combine (Root, path, "GenerateDesignerFileExpectedWithNewId.cs"); File.WriteAllText (expectedWithNewId, data.Replace ("withperiod", "withperiod2")); CompareFilesIgnoreRuntimeInfoString (task.NetResgenOutputFile, expectedWithNewId); Directory.Delete (Path.Combine (Root, path), recursive: true); } [Test] [Category ("SmokeTests")] public void CompareAapt2AndManagedParserOutput () { var path = Path.Combine ("temp", TestName); CreateResourceDirectory (path); File.WriteAllText (Path.Combine (Root, path, "foo.map"), @"a\nb"); Directory.CreateDirectory (Path.Combine (Root, path, "java")); List<BuildErrorEventArgs> errors = new List<BuildErrorEventArgs> (); IBuildEngine engine = new MockBuildEngine (TestContext.Out, errors: errors); var aapt2Compile = new Aapt2Compile { BuildEngine = engine, ToolPath = GetPathToAapt2 (), ResourceDirectories = new ITaskItem [] { new TaskItem(Path.Combine (Root, path, "lp", "res"), new Dictionary<string, string> { { "Hash", "lp" } }), new TaskItem(Path.Combine (Root, path, "res"), new Dictionary<string, string> { { "Hash", "compiled" } }), }, FlatArchivesDirectory = Path.Combine (Root, path), FlatFilesDirectory = Path.Combine (Root, path), }; Assert.IsTrue (aapt2Compile.Execute (), $"Aapt2 Compile should have succeeded. {string.Join (" ", errors.Select (x => x.Message))}"); int platform = AndroidSdkResolver.GetMaxInstalledPlatform (); string resPath = Path.Combine (Root, path, "res"); string rTxt = Path.Combine (Root, path, "R.txt"); var aapt2Link = new Aapt2Link { BuildEngine = engine, ToolPath = GetPathToAapt2 (), ResourceDirectories = new ITaskItem [] { new TaskItem (resPath) }, ManifestFiles = new ITaskItem [] { new TaskItem (Path.Combine (Root, path, "AndroidManifest.xml")) }, AdditionalResourceArchives = new ITaskItem [] { new TaskItem (Path.Combine (Root, path, "lp.flata")) }, CompiledResourceFlatArchive = new TaskItem (Path.Combine (Root, path, "compiled.flata")), OutputFile = Path.Combine (Root, path, "foo.apk"), AssemblyIdentityMapFile = Path.Combine (Root, path, "foo.map"), JavaPlatformJarPath = Path.Combine (AndroidSdkDirectory, "platforms", $"android-{platform}", "android.jar"), JavaDesignerOutputDirectory = Path.Combine (Root, path, "java"), ResourceSymbolsTextFile = rTxt, }; Assert.IsTrue (aapt2Link.Execute (), "Aapt2 Link should have succeeded."); FileAssert.Exists (rTxt, $"{rTxt} should have been created."); var task = new GenerateResourceDesigner { BuildEngine = engine }; task.UseManagedResourceGenerator = true; task.DesignTimeBuild = false; task.Namespace = "MonoAndroidApplication4.MonoAndroidApplication4"; task.NetResgenOutputFile = Path.Combine (Root, path, "Resource.designer.aapt2.cs"); task.ProjectDir = Path.Combine (Root, path); task.ResourceDirectory = Path.Combine (Root, path, "res") + Path.DirectorySeparatorChar; task.Resources = new TaskItem [] { new TaskItem (Path.Combine (Root, path, "res", "values", "strings.xml"), new Dictionary<string, string> () { { "LogicalName", "values\\strings.xml" }, }), }; task.AdditionalResourceDirectories = new TaskItem [] { new TaskItem (Path.Combine (Root, path, "lp", "res")), }; task.ResourceFlagFile = Path.Combine (Root, path, "AndroidResgen.flag"); task.IsApplication = true; task.JavaPlatformJarPath = aapt2Link.JavaPlatformJarPath; Assert.IsTrue (task.Execute (), "Task should have executed successfully."); File.WriteAllText (task.ResourceFlagFile, string.Empty); File.Delete (Path.Combine (Root, path, "R.txt.bak")); File.Move (rTxt, Path.Combine (Root, path, "R.txt.bak")); task.UseManagedResourceGenerator = true; task.DesignTimeBuild = true; task.NetResgenOutputFile = Path.Combine (Root, path, "Resource.designer.managed.cs"); Assert.IsTrue (task.Execute (), "Task should have executed successfully."); string aapt2Designer = Path.Combine (Root, path, "Resource.designer.aapt2.cs"); string managedDesigner = Path.Combine (Root, path, "Resource.designer.managed.cs"); CompareFilesIgnoreRuntimeInfoString (managedDesigner, aapt2Designer); Directory.Delete (Path.Combine (Root, path), recursive: true); } [Test] public void CompareAaptAndManagedParserOutputWithCustomIds () { var path = Path.Combine ("temp", TestName); CreateResourceDirectory (path); File.WriteAllText (Path.Combine (Root, path, "res", "layout", "custom.xml"), CustomId); File.WriteAllText (Path.Combine (Root, path, "foo.map"), @"a\nb"); Directory.CreateDirectory (Path.Combine (Root, path, "java")); string resPath = Path.Combine (Root, path, "res"); int platform = AndroidSdkResolver.GetMaxInstalledPlatform (); IBuildEngine engine = new MockBuildEngine (TestContext.Out); var aapt = new Aapt () { BuildEngine = engine, ToolPath = GetPathToAapt (), ResourceDirectory = resPath, ManifestFiles = new ITaskItem [] { new TaskItem (Path.Combine (Root, path, "AndroidManifest.xml")) }, ResourceOutputFile = Path.Combine (Root, path, "foo.apk"), AssemblyIdentityMapFile = Path.Combine (Root, path, "foo.map"), JavaPlatformJarPath = Path.Combine (AndroidSdkDirectory, "platforms", $"android-{platform}", "android.jar"), JavaDesignerOutputDirectory = Path.Combine (Root, path, "java"), ResourceSymbolsTextFileDirectory = Path.Combine (Root, path), AdditionalResourceDirectories = new ITaskItem [] { new TaskItem (Path.Combine (Root, path, "lp", "res")) }, AndroidUseLatestPlatformSdk = true, ApiLevel = $"{platform}", }; Assert.IsTrue (aapt.Execute (), "Aapt should have succeeded."); string rTxt = Path.Combine (Root, path, "R.txt"); FileAssert.Exists (rTxt, $"{rTxt} should have been created."); var task = new GenerateResourceDesigner { BuildEngine = engine }; task.UseManagedResourceGenerator = true; task.DesignTimeBuild = false; task.Namespace = "MonoAndroidApplication4.MonoAndroidApplication4"; task.NetResgenOutputFile = Path.Combine (Root, path, "Resource.designer.aapt.cs"); task.ProjectDir = Path.Combine (Root, path); task.ResourceDirectory = Path.Combine (Root, path, "res") + Path.DirectorySeparatorChar; task.Resources = new TaskItem [] { new TaskItem (Path.Combine (Root, path, "res", "values", "strings.xml"), new Dictionary<string, string> () { { "LogicalName", "values\\strings.xml" }, }), }; task.AdditionalResourceDirectories = new TaskItem [] { new TaskItem (Path.Combine (Root, path, "lp", "res")), }; task.ResourceFlagFile = Path.Combine (Root, path, "AndroidResgen.flag"); task.IsApplication = true; task.JavaPlatformJarPath = aapt.JavaPlatformJarPath; Assert.IsTrue (task.Execute (), "Task should have executed successfully."); string aaptDesigner = Path.Combine (Root, path, "Resource.designer.aapt.cs"); var aaptDesignerText = File.ReadAllText (aaptDesigner); StringAssert.Contains ("MyCustomID", aaptDesignerText, ""); StringAssert.Contains ("HelloWorldTextView", aaptDesignerText, ""); StringAssert.Contains ("ACustomID", aaptDesignerText, ""); StringAssert.Contains ("foo1", aaptDesignerText, ""); task.UseManagedResourceGenerator = true; task.DesignTimeBuild = true; task.NetResgenOutputFile = Path.Combine (Root, path, "Resource.designer.managedrtxt.cs"); Assert.IsTrue (task.Execute (), "Task should have executed successfully."); string managedDesignerRtxt = Path.Combine (Root, path, "Resource.designer.managedrtxt.cs"); CompareFilesIgnoreRuntimeInfoString (managedDesignerRtxt, aaptDesigner); File.WriteAllText (task.ResourceFlagFile, string.Empty); File.Delete (Path.Combine (Root, path, "R.txt.bak")); File.Move (rTxt, Path.Combine (Root, path, "R.txt.bak")); task.UseManagedResourceGenerator = true; task.DesignTimeBuild = true; task.NetResgenOutputFile = Path.Combine (Root, path, "Resource.designer.managed.cs"); Assert.IsTrue (task.Execute (), "Task should have executed successfully."); string managedDesigner = Path.Combine (Root, path, "Resource.designer.managed.cs"); var managedDesignerText = File.ReadAllText (managedDesigner); StringAssert.Contains ("MyCustomID", managedDesignerText, ""); StringAssert.Contains ("HelloWorldTextView", managedDesignerText, ""); StringAssert.Contains ("ACustomID", managedDesignerText, ""); StringAssert.Contains ("foo1", managedDesignerText, ""); Directory.Delete (Path.Combine (Root, path), recursive: true); } [Test] [NonParallelizable] // Test measures performance public void CheckPerformanceOfManagedParser () { var path = Path.Combine ("temp", TestName); CreateResourceDirectory (path); IBuildEngine engine = new MockBuildEngine (TestContext.Out); TaskLoggingHelper loggingHelper = new TaskLoggingHelper (engine, nameof (ManagedResourceParser)); string resPath = Path.Combine (Root, path, "res"); int platform = AndroidSdkResolver.GetMaxInstalledPlatform (); var flagFile = Path.Combine (Root, path, "AndroidResgen.flag"); var lp = new string [] { Path.Combine (Root, path, "lp", "res") }; Stopwatch sw = new Stopwatch (); long totalMS = 0; int i; for (i = 0; i < 100; i++) { var parser = new ManagedResourceParser () { Log = loggingHelper, JavaPlatformDirectory = Path.Combine (AndroidSdkDirectory, "platforms", $"android-{platform}"), ResourceFlagFile = flagFile, }; sw.Start (); var codeDom = parser.Parse (resPath, lp, isApp: true, resourceMap: new Dictionary<string, string> ()); sw.Stop (); TestContext.Out.WriteLine ($"Pass {i} took {sw.ElapsedMilliseconds} ms"); totalMS += sw.ElapsedMilliseconds; sw.Reset (); Assert.AreEqual (20, codeDom.Members.Count, "Expected 20 Classes to be generated"); } TestContext.Out.WriteLine ($"Average {totalMS / i} ms"); Assert.LessOrEqual (totalMS / i, 160, "Parser should have taken on average less than 160 ms."); } [Test] public void GenerateDesignerFileWithElevenStyleableAttributesFromRtxt () { var styleable = @"<resources> <declare-styleable name = ""ElevenAttributes""> <attr name = ""attr00"" format=""string"" /> <attr name = ""attr01"" format=""string"" /> <attr name = ""attr02"" format=""string"" /> <attr name = ""attr03"" format=""string"" /> <attr name = ""attr04"" format=""string"" /> <attr name = ""attr05"" format=""string"" /> <attr name = ""attr06"" format=""string"" /> <attr name = ""attr07"" format=""string"" /> <attr name = ""attr08"" format=""string"" /> <attr name = ""attr09"" format=""string"" /> <attr name = ""attr10"" format=""string"" /> </declare-styleable> </resources>"; var rtxt = @"int attr attr00 0x7f010000 int attr attr01 0x7f010001 int attr attr02 0x7f010002 int attr attr03 0x7f010003 int attr attr04 0x7f010004 int attr attr05 0x7f010005 int attr attr06 0x7f010006 int attr attr07 0x7f010007 int attr attr08 0x7f010008 int attr attr09 0x7f010009 int attr attr10 0x7f01000a int[] styleable ElevenAttributes { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a } int styleable ElevenAttributes_attr00 0 int styleable ElevenAttributes_attr01 1 int styleable ElevenAttributes_attr02 2 int styleable ElevenAttributes_attr03 3 int styleable ElevenAttributes_attr04 4 int styleable ElevenAttributes_attr05 5 int styleable ElevenAttributes_attr06 6 int styleable ElevenAttributes_attr07 7 int styleable ElevenAttributes_attr08 8 int styleable ElevenAttributes_attr09 9 int styleable ElevenAttributes_attr10 10"; var path = Path.Combine ("temp", TestName); Directory.CreateDirectory (Path.Combine (Root, path)); File.WriteAllText (Path.Combine (Root, path, "AndroidManifest.xml"), AndroidManifest); Directory.CreateDirectory (Path.Combine (Root, path, "res")); Directory.CreateDirectory (Path.Combine (Root, path, "res", "values")); File.WriteAllText (Path.Combine (Root, path, "res", "values", "attrs.xml"), styleable); File.WriteAllText (Path.Combine (Root, path, "R.txt"), rtxt); IBuildEngine engine = new MockBuildEngine (TestContext.Out); var task = new GenerateResourceDesigner { BuildEngine = engine }; task.UseManagedResourceGenerator = true; task.DesignTimeBuild = true; task.Namespace = "Foo.Foo"; task.NetResgenOutputFile = Path.Combine (Root, path, "Resource.designer.cs"); task.ProjectDir = Path.Combine (Root, path); task.ResourceDirectory = Path.Combine (Root, path, "res"); task.Resources = new TaskItem [] {}; task.IsApplication = true; task.JavaPlatformJarPath = Path.Combine (AndroidSdkDirectory, "platforms", "android-27", "android.jar"); Assert.IsTrue (task.Execute (), "Task should have executed successfully."); Assert.IsTrue (File.Exists (task.NetResgenOutputFile), $"{task.NetResgenOutputFile} should have been created."); var expected = Path.Combine (Root, "Expected", "GenerateDesignerFileWithElevenStyleableAttributesExpected.cs"); CompareFilesIgnoreRuntimeInfoString (task.NetResgenOutputFile, expected); Directory.Delete (Path.Combine (Root, path), recursive: true); } } }
46.82337
196
0.708055
[ "MIT" ]
MrAlbin/xamarin-android
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/ManagedResourceParserTests.cs
34,469
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Management; using System.Threading; using System.Net.Sockets; using NetWorking_1_0; using IO_1_0; using Symon_Data_Types_1_0; using Helpers_1_0; namespace Network_Monitor_1_0 { class Http_Get { public string server = ""; }; class Network_Monitor { public Network_Monitor() { message_count_symon = 0; symon = new Win_Socket_Server(); // Incoming message from symon message_symon = null; // Response message to symon response_symon = null; ip4_address_symon = null; port_symon = null; message_count_l_server_clients = new List<uint>(); server = new Win_Socket_Server_2(); // Incoming message from symon message_l_server_clients = new List<string>(); // Response message to symon response_l_server_clients = new List<string>(); ip4_address_server = null; port_server = null; settings_ie = new File_Access(); b_exit = false; b_pause = false; } ~Network_Monitor() { } Win_Socket_Server symon; string ip4_address_symon; string port_symon; // Incoming message from symon public byte[] message_symon; // Response message to symon public byte[] response_symon; uint message_count_symon; Win_Socket_Server_2 server; string ip4_address_server; string port_server; // Request message from client public List<string> message_l_server_clients; // Response message to client public List<string> response_l_server_clients; List<uint> message_count_l_server_clients; bool b_exit; bool b_pause; File_Access settings_ie; string settings_file = "settings_nm"; string user = ""; string computer = ""; string workgroup = ""; string domain = ""; Mutex m_lock_received_message = new Mutex(); Mutex m_lock_disconnection = new Mutex(); Mutex m_lock_connection = new Mutex(); bool load_QS_Settings() { try { //read settings int length = 0; byte[] temp; //symon ip_address temp = new byte[sizeof(int)]; settings_ie.read_File_To_Byte_Array(temp, 0, temp.Length); length = BitConverter.ToInt32(temp, 0); temp = new byte[length]; settings_ie.read_File_To_Byte_Array(temp, 0, length); ip4_address_symon = System.Text.Encoding.UTF8.GetString(temp); //symon port temp = new byte[sizeof(int)]; settings_ie.read_File_To_Byte_Array(temp, 0, temp.Length); length = BitConverter.ToInt32(temp, 0); temp = new byte[length]; settings_ie.read_File_To_Byte_Array(temp, 0, length); port_symon = System.Text.Encoding.UTF8.GetString(temp); //server ip_address temp = new byte[sizeof(int)]; settings_ie.read_File_To_Byte_Array(temp, 0, temp.Length); length = BitConverter.ToInt32(temp, 0); temp = new byte[length]; settings_ie.read_File_To_Byte_Array(temp, 0, length); ip4_address_server = System.Text.Encoding.UTF8.GetString(temp); //symon port temp = new byte[sizeof(int)]; settings_ie.read_File_To_Byte_Array(temp, 0, temp.Length); length = BitConverter.ToInt32(temp, 0); temp = new byte[length]; settings_ie.read_File_To_Byte_Array(temp, 0, length); port_server = System.Text.Encoding.UTF8.GetString(temp); return true; } catch (Exception e) { Console.Write("\nload_QS_Settings failed.." + e.Message); return false; } } public void start() { SelectQuery query = new SelectQuery("Win32_ComputerSystem"); using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(query)) { foreach (ManagementObject mo in searcher.Get()) { if (mo["partofdomain"] != null) { domain = mo["domain"].ToString(); } if (mo["workgroup"] != null) { workgroup = mo["workgroup"].ToString(); } } } if (domain == workgroup) { domain = ""; } //object result = computer_system["Workgroup"]; user = Environment.UserName; computer = Environment.MachineName; //we want to get 1 connections //symon symon.set_Max_Backlog(1); { settings_ie.update_File(settings_file); { //settings_ie.close_File(); //settings_ie.create_File(settings_file); ////local symon //int length = "127.0.0.1".Length; //settings_ie.write_Bytes(BitConverter.GetBytes(length), 0, sizeof(int)); //settings_ie.write_Bytes(System.Text.Encoding.UTF8.GetBytes("127.0.0.1"), 0, length); //length = "10000".Length; //settings_ie.write_Bytes(BitConverter.GetBytes(length), 0, sizeof(int)); //settings_ie.write_Bytes(System.Text.Encoding.UTF8.GetBytes("10000"), 0, length); ////server //length = "127.0.0.1".Length; //settings_ie.write_Bytes(BitConverter.GetBytes(length), 0, sizeof(int)); //settings_ie.write_Bytes(System.Text.Encoding.UTF8.GetBytes("127.0.0.1"), 0, length); //length = "11000".Length; //settings_ie.write_Bytes(BitConverter.GetBytes(length), 0, sizeof(int)); //settings_ie.write_Bytes(System.Text.Encoding.UTF8.GetBytes("11000"), 0, length); //settings_ie.close_File(); //settings_ie.update_File(settings_file); } load_QS_Settings(); ////async listen for symon //symon.eprm = new Win_Socket.ext_Process_Received_Message(process_Received_Message_Async_Symon); //symon.set_Send_Buffer(1024); //symon.set_Receive_Buffer(1024); //symon.listen_For_Client_IPV4_Async(ip4_address_symon, port_symon); //async listen for symon //server.set_Max_Backlog(10); server.set_Max_Backlog(1); server.eprm = new Win_Socket.ext_Process_Received_Message(process_Received_Message_Async_Server); //server.epdiscon = new Win_Socket.ext_Process_Disconnection(process_Disconnection_Server); //server.epsm = new Win_Socket.ext_Process_Send_Message(process_Send_Message_Async_Server); server.epcon = new Win_Socket.ext_Process_Connection(process_Connection_Server); server.set_Send_Buffer(1024); server.set_Receive_Buffer(1024); server.listen_For_Client_IPV4_Async(ip4_address_server, port_server); } } public void run() { while (!b_exit)//exit when symon says bye(shutdown) or connect retries to symon fail { //if (!symon.is_Alive()) //{ // symon.set_Send_Buffer(1024); // symon.set_Receive_Buffer(1024); // symon.listen_For_Client_IPV4_Async(ip4_address_symon, port_symon); //} //else // if (!symon.connection_Attempt()) // { // if (!symon.connection_Attempt()) // { // if (!b_pause) // { // //screen k = new screen(); // //k.type = Data_Types.SCREEN_SHOT; // //if (image != null) // //{ // // SYSTEMTIME st = new SYSTEMTIME(); // // st.collect(DateTime.Now); // // k.collect(image, image.Length, // // Encoding.UTF8.GetBytes(user), // // Encoding.UTF8.GetBytes(computer), // // Encoding.UTF8.GetBytes(domain), // // Encoding.UTF8.GetBytes(workgroup), // // st); // // byte[] packet = k.byte_packet(); // // //todo send back to symon for writing to qdata // // ie_packet p = new ie_packet(); // // p.collect("SYMON_IE_DATA", packet); // // symon.send_Bytes_Message_Async(p.byte_packet()); // // image = null; // // packet = null; // //} // //k.destroy(); // } // } // } //foreach(Win_Socket in Thread.Sleep(10); //Console.WriteLine("\npress any key to continue.."); //Console.ReadLine(); }//while } public void stop() { settings_ie.close_File(); //save_New_Data_File(); if (symon != null) { //symon.send_Message("IE_SYMON_BYE"); symon.shutdown_Socket(); } if (server != null) { server.shutdown(); } b_exit = true; } /*symon*/ public void process_Received_Message_Async_Symon(Win_Socket client) { message_symon = client.received_Message(); if (message_symon != null) { process_Symon_Packet(message_symon); } } void process_Symon_Packet(byte[] packet) { //byte[] packet_byte = packet; //int i = 0; //while (i < packet_byte.Length) //{ // byte[] command_length; // //byte[] command; // byte[] data_length; // //byte[] data; // int length = 0; // byte[] remaining; // if ((packet_byte.Length - 1) - i >= sizeof(int)) // { // //command_length // command_length = new byte[sizeof(int)]; // Buffer.BlockCopy(packet_byte, i, command_length, 0, command_length.Length); // //command // i += command_length.Length; // //command = new byte[BitConverter.ToInt32(command_length,0)]; // //Buffer.BlockCopy(packet_byte, i, command, 0, command.Length ); // //data_length // i += BitConverter.ToInt32(command_length, 0); // //i+=command.Length; // data_length = new byte[sizeof(int)]; // Buffer.BlockCopy(packet_byte, i, data_length, 0, data_length.Length); // //data // i += data_length.Length; // //data = new byte[BitConverter.ToInt32(data_length, 0)]; // //Buffer.BlockCopy(packet_byte, i, data, 0, data.Length ); // i += BitConverter.ToInt32(data_length, 0); // //i += data.Length; // length = i; // remaining = new byte[length]; // Buffer.BlockCopy(packet_byte, i - length, remaining, 0, length); // pop_Data(remaining); // } //} //pop_Data(packet); Console.WriteLine(System.Text.Encoding.UTF8.GetString(packet)); } bool pop_Data(byte[] data) { ie_packet iep = new ie_packet(); if (iep.unpack(data)) { command_Match_Symon_Async(iep); return true; } return false; } public void command_Match_Symon_Async(ie_packet iep) { string msg = Encoding.UTF8.GetString(iep.command); switch (msg) { case "SYMON_IE_PAUSE": { b_pause = true; } break; case "SYMON_IE_CONTINUE": { b_pause = false; //send ack to symon ? } break; case "SYMON_IE_KILL": { stop(); //send ack to symon ? } break; case "IE_DATA_ACK": { Console.Write("\n" + msg); } break; default: { Console.Write("\nUnknown message: " + msg); } break; } message_count_symon++; Console.Write(" symon_count= " + message_count_symon); } bool pop_Data_Symon(byte[] packet) { int type; byte[] temp = new byte[sizeof(int)]; Buffer.BlockCopy(packet, 0, temp, 0, temp.Length); type = BitConverter.ToInt32(temp, 0); byte[] remaining = new byte[packet.Length - temp.Length]; Buffer.BlockCopy(packet, temp.Length, remaining, 0, remaining.Length); switch (type) { //case Data_Types.SCREEN_SHOT: // { // screen k = new screen(); // k.type = Data_Types.SCREEN_SHOT; // k.unpack(remaining); // //encode screen_shot from bmp to jpeg // byte[] image = null; // Graphics_Helpers.encode_BMP_To_JPEG(ref k.screen_shot, ref image); // if (image != null) // { // k.screen_shot = image; // k.screen_shot_length = image.Length; // //packet = k.byte_packet(); // //todo send back to symon for writing to qdata // ie_packet p = new ie_packet(); // p.collect("SYMON_IE_DATA", packet); // symon.send_Bytes_Message_Async(p.byte_packet()); // image = null; // } // k.destroy(); // } // return true; default: { Console.Write("\nno match for type: " + type); return false; } } } /*Server*/ public void process_Connection_Server(Win_Socket socket) { //lock //if (m_lock_connection.WaitOne(Timeout.Infinite)) { //Console.WriteLine("\nentering con: " + Thread.CurrentThread.ManagedThreadId); int index = server.clients.FindIndex(item => item == socket); message_l_server_clients.Add(""); Console.WriteLine("\nclients: " + server.clients.Count); //Console.WriteLine("leaving con: " + Thread.CurrentThread.ManagedThreadId); // m_lock_connection.ReleaseMutex(); // Thread.Sleep(1000); } } public void process_Disconnection_Server(Win_Socket socket) { //lock //if(m_lock_disconnection.WaitOne(Timeout.Infinite)) { //Console.WriteLine("\nentering discon: " + Thread.CurrentThread.ManagedThreadId); int index = server.clients.FindIndex(item => item == socket); server.remove_Client(socket); message_l_server_clients.RemoveAt(index); Console.WriteLine("\nclients: " + server.clients.Count); //Console.WriteLine("leaving discon: " + Thread.CurrentThread.ManagedThreadId); //m_lock_disconnection.ReleaseMutex(); //Thread.Sleep(1000); } } public void process_Send_Message_Async_Server(Win_Socket socket) { process_Disconnection_Server(socket); } public void process_Received_Message_Async_Server(Win_Socket socket) { //if (m_lock_received_message.WaitOne(Timeout.Infinite)) { //Console.WriteLine("entering recieve: " + Thread.CurrentThread.ManagedThreadId); Win_Socket client = socket as Win_Socket; int index = server.clients.FindIndex(item => item == socket); byte[] message = client.received_Message(); if (message != null) { //if (index == message_l_server_clients.Count)//add new message store for new client { //message_l_server_clients.Add(Encoding.UTF8.GetString(message)); //Console.Write(Encoding.UTF8.GetString(message)); } //else { message_l_server_clients[index] += Encoding.UTF8.GetString(message); //Console.Write(Encoding.UTF8.GetString(message)); } } if (!client.is_Data_Available()) { //Console.WriteLine("left?:" + socket.handler.Available); //Console.WriteLine("\n"+message_l_server_clients[index]); process_Client_Packet(message_l_server_clients[index], index); message_l_server_clients[index] = ""; } //Thread.Sleep(1000); } } Http_Get extract_Get_Header(string message) { //lock Http_Get get = new Http_Get(); string[] parts = message.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); get.server = parts[0].Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries)[1]; return get; } void process_Client_Packet(string message, int index) { Console.WriteLine("\nclient:" + index); string ip = ""; Http_Get get = new Http_Get(); if (message.ToLower().Contains("get")) { get = extract_Get_Header(message); ip = get.server; } Web_Client wbc = new Web_Client(); wbc.set_Address(ip); byte[] data = wbc.download_Data(); //Console.WriteLine(Encoding.UTF8.GetString(data)); if(data!=null && data.Length>0) { server.clients[index].send_Bytes_Message_Async(data); } //m_lock_received_message.ReleaseMutex(); //Console.WriteLine("leaving recieve: " + Thread.CurrentThread.ManagedThreadId); } }//class QStorage_Client }
35.680067
114
0.45796
[ "MIT" ]
anileapen05/Helpers
Net_Monitor.cs
21,303
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.Asw.V20200722 { using Newtonsoft.Json; using System.Threading.Tasks; using TencentCloud.Common; using TencentCloud.Common.Profile; using TencentCloud.Asw.V20200722.Models; public class AswClient : AbstractClient{ private const string endpoint = "asw.tencentcloudapi.com"; private const string version = "2020-07-22"; /// <summary> /// Client constructor. /// </summary> /// <param name="credential">Credentials.</param> /// <param name="region">Region name, such as "ap-guangzhou".</param> public AswClient(Credential credential, string region) : this(credential, region, new ClientProfile()) { } /// <summary> /// Client Constructor. /// </summary> /// <param name="credential">Credentials.</param> /// <param name="region">Region name, such as "ap-guangzhou".</param> /// <param name="profile">Client profiles.</param> public AswClient(Credential credential, string region, ClientProfile profile) : base(endpoint, version, credential, region, profile) { } /// <summary> /// 该接口用于生成状态机服务 /// </summary> /// <param name="req"><see cref="CreateFlowServiceRequest"/></param> /// <returns><see cref="CreateFlowServiceResponse"/></returns> public async Task<CreateFlowServiceResponse> CreateFlowService(CreateFlowServiceRequest req) { JsonResponseModel<CreateFlowServiceResponse> rsp = null; try { var strResp = await this.InternalRequest(req, "CreateFlowService"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<CreateFlowServiceResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 该接口用于生成状态机服务 /// </summary> /// <param name="req"><see cref="CreateFlowServiceRequest"/></param> /// <returns><see cref="CreateFlowServiceResponse"/></returns> public CreateFlowServiceResponse CreateFlowServiceSync(CreateFlowServiceRequest req) { JsonResponseModel<CreateFlowServiceResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "CreateFlowService"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<CreateFlowServiceResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 查询执行详细信息 /// </summary> /// <param name="req"><see cref="DescribeExecutionRequest"/></param> /// <returns><see cref="DescribeExecutionResponse"/></returns> public async Task<DescribeExecutionResponse> DescribeExecution(DescribeExecutionRequest req) { JsonResponseModel<DescribeExecutionResponse> rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeExecution"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeExecutionResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 查询执行详细信息 /// </summary> /// <param name="req"><see cref="DescribeExecutionRequest"/></param> /// <returns><see cref="DescribeExecutionResponse"/></returns> public DescribeExecutionResponse DescribeExecutionSync(DescribeExecutionRequest req) { JsonResponseModel<DescribeExecutionResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeExecution"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeExecutionResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 一次执行会有很多步骤,经过很多节点,这个接口描述某一次执行的事件的历史 /// </summary> /// <param name="req"><see cref="DescribeExecutionHistoryRequest"/></param> /// <returns><see cref="DescribeExecutionHistoryResponse"/></returns> public async Task<DescribeExecutionHistoryResponse> DescribeExecutionHistory(DescribeExecutionHistoryRequest req) { JsonResponseModel<DescribeExecutionHistoryResponse> rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeExecutionHistory"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeExecutionHistoryResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 一次执行会有很多步骤,经过很多节点,这个接口描述某一次执行的事件的历史 /// </summary> /// <param name="req"><see cref="DescribeExecutionHistoryRequest"/></param> /// <returns><see cref="DescribeExecutionHistoryResponse"/></returns> public DescribeExecutionHistoryResponse DescribeExecutionHistorySync(DescribeExecutionHistoryRequest req) { JsonResponseModel<DescribeExecutionHistoryResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeExecutionHistory"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeExecutionHistoryResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 对状态机的执行历史进行描述. /// </summary> /// <param name="req"><see cref="DescribeExecutionsRequest"/></param> /// <returns><see cref="DescribeExecutionsResponse"/></returns> public async Task<DescribeExecutionsResponse> DescribeExecutions(DescribeExecutionsRequest req) { JsonResponseModel<DescribeExecutionsResponse> rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeExecutions"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeExecutionsResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 对状态机的执行历史进行描述. /// </summary> /// <param name="req"><see cref="DescribeExecutionsRequest"/></param> /// <returns><see cref="DescribeExecutionsResponse"/></returns> public DescribeExecutionsResponse DescribeExecutionsSync(DescribeExecutionsRequest req) { JsonResponseModel<DescribeExecutionsResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeExecutions"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeExecutionsResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 查询该用户指定状态机下的详情数据。 /// </summary> /// <param name="req"><see cref="DescribeFlowServiceDetailRequest"/></param> /// <returns><see cref="DescribeFlowServiceDetailResponse"/></returns> public async Task<DescribeFlowServiceDetailResponse> DescribeFlowServiceDetail(DescribeFlowServiceDetailRequest req) { JsonResponseModel<DescribeFlowServiceDetailResponse> rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeFlowServiceDetail"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeFlowServiceDetailResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 查询该用户指定状态机下的详情数据。 /// </summary> /// <param name="req"><see cref="DescribeFlowServiceDetailRequest"/></param> /// <returns><see cref="DescribeFlowServiceDetailResponse"/></returns> public DescribeFlowServiceDetailResponse DescribeFlowServiceDetailSync(DescribeFlowServiceDetailRequest req) { JsonResponseModel<DescribeFlowServiceDetailResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeFlowServiceDetail"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeFlowServiceDetailResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 查询指定用户下所有状态机,以列表形式返回 /// </summary> /// <param name="req"><see cref="DescribeFlowServicesRequest"/></param> /// <returns><see cref="DescribeFlowServicesResponse"/></returns> public async Task<DescribeFlowServicesResponse> DescribeFlowServices(DescribeFlowServicesRequest req) { JsonResponseModel<DescribeFlowServicesResponse> rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeFlowServices"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeFlowServicesResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 查询指定用户下所有状态机,以列表形式返回 /// </summary> /// <param name="req"><see cref="DescribeFlowServicesRequest"/></param> /// <returns><see cref="DescribeFlowServicesResponse"/></returns> public DescribeFlowServicesResponse DescribeFlowServicesSync(DescribeFlowServicesRequest req) { JsonResponseModel<DescribeFlowServicesResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeFlowServices"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeFlowServicesResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 该接口用于修改状态机 /// </summary> /// <param name="req"><see cref="ModifyFlowServiceRequest"/></param> /// <returns><see cref="ModifyFlowServiceResponse"/></returns> public async Task<ModifyFlowServiceResponse> ModifyFlowService(ModifyFlowServiceRequest req) { JsonResponseModel<ModifyFlowServiceResponse> rsp = null; try { var strResp = await this.InternalRequest(req, "ModifyFlowService"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<ModifyFlowServiceResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 该接口用于修改状态机 /// </summary> /// <param name="req"><see cref="ModifyFlowServiceRequest"/></param> /// <returns><see cref="ModifyFlowServiceResponse"/></returns> public ModifyFlowServiceResponse ModifyFlowServiceSync(ModifyFlowServiceRequest req) { JsonResponseModel<ModifyFlowServiceResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "ModifyFlowService"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<ModifyFlowServiceResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 为指定的状态机启动一次执行 /// </summary> /// <param name="req"><see cref="StartExecutionRequest"/></param> /// <returns><see cref="StartExecutionResponse"/></returns> public async Task<StartExecutionResponse> StartExecution(StartExecutionRequest req) { JsonResponseModel<StartExecutionResponse> rsp = null; try { var strResp = await this.InternalRequest(req, "StartExecution"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<StartExecutionResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 为指定的状态机启动一次执行 /// </summary> /// <param name="req"><see cref="StartExecutionRequest"/></param> /// <returns><see cref="StartExecutionResponse"/></returns> public StartExecutionResponse StartExecutionSync(StartExecutionRequest req) { JsonResponseModel<StartExecutionResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "StartExecution"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<StartExecutionResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 终止某个状态机 /// </summary> /// <param name="req"><see cref="StopExecutionRequest"/></param> /// <returns><see cref="StopExecutionResponse"/></returns> public async Task<StopExecutionResponse> StopExecution(StopExecutionRequest req) { JsonResponseModel<StopExecutionResponse> rsp = null; try { var strResp = await this.InternalRequest(req, "StopExecution"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<StopExecutionResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// <summary> /// 终止某个状态机 /// </summary> /// <param name="req"><see cref="StopExecutionRequest"/></param> /// <returns><see cref="StopExecutionResponse"/></returns> public StopExecutionResponse StopExecutionSync(StopExecutionRequest req) { JsonResponseModel<StopExecutionResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "StopExecution"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<StopExecutionResponse>>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } } }
40.570743
124
0.591855
[ "Apache-2.0" ]
TencentCloud/tencentcloud-sdk-dotnet
TencentCloud/Asw/V20200722/AswClient.cs
17,458
C#
using System; namespace eIvy.WebService.Client { /// <summary> /// Describe the information of user account and mapping to an entity. /// </summary> public class AuthenticateResult : FunctionRequestResult { /// <summary> /// Constructor. /// </summary> public AuthenticateResult() { } /// <summary> /// Get or set the user account info. /// </summary> public UserInfo UserInfo { get; set; } /// <summary> /// Get or set the user mapping info. /// </summary> public UserMappingInfo UserMap { get; set; } } }
21.939394
74
0.483425
[ "MIT" ]
lishan1047/eIvy.WebService
eIvy.WebService.Client/AuthenticateResult.cs
726
C#
using System; using System.ComponentModel; using System.Runtime.CompilerServices; using System.Windows; namespace ProcessSimulateImportConditioner { public class Asteroid { public event PropertyChangedEventHandler PropertyChanged; // This method is called by the Set accessor of each property. // The CallerMemberName attribute that is applied to the optional propertyName // parameter causes the property name of the caller to be substituted as an argument. [System.Diagnostics.CodeAnalysis.SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "<Pending>")] private void NotifyPropertyChanged([CallerMemberName] String propertyName = "") { if (PropertyChanged != null) { PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } private readonly double rotationTo = Utils.RandomBool ? 360d : -360d; public double RotationTo { get { return rotationTo; } } private Duration oneRevolutionDurantion = new Duration(new TimeSpan(0, 0, 0, 0, Utils.RandomInt(2000, 10000))); public Duration OneRevolutionDurantion { get { return oneRevolutionDurantion; } } private Duration trajectoryDurantion = new Duration(new TimeSpan(0, 0, 0, 0, Utils.RandomInt(5000, 30000))); public Duration TrajectoryDurantion { get { return trajectoryDurantion; } } private Point trajectoryStartPoint = new Point(Utils.RandomDouble, Utils.RandomDouble); public Point TrajectoryStartPoint { get { if (Math.Min(trajectoryStartPoint.X, trajectoryStartPoint.Y) > 0) { if (trajectoryStartPoint.X < trajectoryStartPoint.Y) trajectoryStartPoint.X = 0; else trajectoryStartPoint.Y = 0; } return trajectoryStartPoint; } } private Point trajectoryEndPoint = new Point(Utils.RandomDouble, Utils.RandomDouble); public Point TrajectoryEndPoint { get { if (Math.Max(trajectoryEndPoint.X, trajectoryEndPoint.Y) < 1) { if (trajectoryEndPoint.X > trajectoryEndPoint.Y) trajectoryEndPoint.X = 1; else trajectoryEndPoint.Y = 1; } return trajectoryEndPoint; } } private readonly double trajectoryPassThroughPointRatio = Utils.RandomDouble; //0.5; public double TrajectoryPassThroughPointRatio { get { return trajectoryPassThroughPointRatio; } } private Point trajectoryPassThroughPoint = /*new Point(0.5, 0.5);*/ new Point(Utils.RandomDouble, Utils.RandomDouble); public Point TrajectoryPassThroughPoint { get { return trajectoryPassThroughPoint; } } private Nullable<Point> trajectoryControlPoint = null; public Nullable<Point> TrajectoryControlPoint { get { if (trajectoryControlPoint == null) { var p0 = new Vector(TrajectoryStartPoint.X, TrajectoryStartPoint.Y); var p2 = new Vector(TrajectoryEndPoint.X, TrajectoryEndPoint.Y); var pc = new Vector(TrajectoryPassThroughPoint.X, TrajectoryPassThroughPoint.Y); var t = trajectoryPassThroughPointRatio; var p1 = (pc - p0 * Math.Pow(t, 2) - p2 * Math.Pow(1 - t, 2)) / t; trajectoryControlPoint = new Point(p1.X, p1.Y); } return trajectoryControlPoint.Value; } } public Asteroid() { } } }
37.98
142
0.614271
[ "MIT" ]
MazvydasT/Area255
ProcessSimulateImportConditioner/Asteroid.cs
3,800
C#
using System; using System.Threading.Tasks; using Amusoft.PCR.Grpc.Common; using Amusoft.PCR.Integration.WindowsDesktop.Feature.VoiceCommands; using Grpc.Core; using NLog; namespace Amusoft.PCR.Integration.WindowsDesktop.Services { public class VoiceCommandServiceImplementation : VoiceCommandService.VoiceCommandServiceBase { private static readonly Logger Log = LogManager.GetLogger(nameof(VoiceCommandServiceImplementation)); public override Task<DefaultResponse> UpdateVoiceRecognition(UpdateVoiceRecognitionRequest request, ServerCallContext context) { try { SpeechManager.Instance.UpdateGrammar(request); return Task.FromResult(new DefaultResponse() {Success = true}); } catch (Exception e) { Log.Error(e, nameof(UpdateVoiceRecognition)); throw new RpcException(Status.DefaultCancelled, "Failed to update voice recognition"); } } public override Task<DefaultResponse> StartVoiceRecognition(DefaultRequest request, ServerCallContext context) { try { SpeechManager.Instance.StartVoiceRecognition(); return Task.FromResult(new DefaultResponse() { Success = true }); } catch (Exception e) { Log.Error(e, nameof(StartVoiceRecognition)); throw new RpcException(Status.DefaultCancelled, "Failed to start voice recognition"); } } public override Task<DefaultResponse> StopVoiceRecognition(DefaultRequest request, ServerCallContext context) { try { SpeechManager.Instance.StopVoiceRecognition(); return Task.FromResult(new DefaultResponse() { Success = true }); } catch (Exception e) { Log.Error(e, nameof(StopVoiceRecognition)); throw new RpcException(Status.DefaultCancelled, "Failed to stop voice recognition"); } } } }
29.694915
128
0.75742
[ "BSD-3-Clause" ]
taori/PCRemote2
src/Amusoft.PCR.Integration.WindowsDesktop/Services/VoiceCommandServiceImplementation.cs
1,754
C#
using System; using SadConsole; using Microsoft.Xna.Framework; using SadConsole.Input; using Console = SadConsole.Console; using Microsoft.Xna.Framework.Graphics; using SadConsole.StringParser; using SadConsole.Surfaces; namespace StarterProject { class Program { private static Windows.CharacterViewer _characterWindow; private static Container MainConsole; static void Main(string[] args) { //SadConsole.Settings.UnlimitedFPS = true; //SadConsole.Settings.UseHardwareFullScreen = true; // Setup the engine and creat the main window. SadConsole.Game.Create("Fonts/IBM.font", 80, 25); //SadConsole.Engine.Initialize("IBM.font", 80, 25, (g) => { g.GraphicsDeviceManager.HardwareModeSwitch = false; g.Window.AllowUserResizing = true; }); // Hook the start event so we can add consoles to the system. SadConsole.Game.OnInitialize = Init; // Hook the update event that happens each frame so we can trap keys and respond. SadConsole.Game.OnUpdate = Update; // Hook the "after render" even though we're not using it. SadConsole.Game.OnDraw = DrawFrame; // Start the game. SadConsole.Game.Instance.Run(); // // Code here will not run until the game has shut down. // SadConsole.Game.Instance.Dispose(); } private static void DrawFrame(GameTime time) { // Custom drawing. You don't usually have to do this. } private static void Update(GameTime time) { // Called each logic update. if (!_characterWindow.IsVisible) { // This block of code cycles through the consoles in the SadConsole.Engine.ConsoleRenderStack, showing only a single console // at a time. This code is provided to support the custom consoles demo. If you want to enable the demo, uncomment one of the lines // in the Initialize method above. if (SadConsole.Global.KeyboardState.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F1)) { MainConsole.MoveNextConsole(); } else if (SadConsole.Global.KeyboardState.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F2)) { _characterWindow.Show(true); } else if (SadConsole.Global.KeyboardState.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F3)) { } else if (SadConsole.Global.KeyboardState.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F5)) { SadConsole.Settings.ToggleFullScreen(); } } } private static void Init() { // Any setup if (Settings.UnlimitedFPS) SadConsole.Game.Instance.Components.Add(new SadConsole.Game.FPSCounterComponent(SadConsole.Game.Instance)); // Setup our custom theme. Theme.SetupThemes(); SadConsole.Game.Instance.Window.Title = "DemoProject DirectX"; // We'll instead use our demo consoles that show various features of SadConsole. MainConsole = new Container(); Global.CurrentScreen = MainConsole; // Initialize the windows _characterWindow = new Windows.CharacterViewer(); } } }
36.418367
162
0.596806
[ "MIT" ]
256colour/SadConsole
src/DemoProject/DesktopDX/Program.cs
3,571
C#
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ using System; using System.Collections.Generic; using System.Runtime.Serialization; using System.Threading; using System.Device.Location; namespace WP7CordovaClassLib.Cordova.Commands { /// <summary> /// This is a command stub, the browser provides the correct implementation. We use this to trigger the static analyzer that we require this permission /// </summary> public class GeoLocation { /* Unreachable code, by design -jm */ private void triggerGeoInclusion() { new GeoCoordinateWatcher(); } } }
31.857143
157
0.726457
[ "MIT" ]
davidjbeveridge/mobox
vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/GeoLocation.cs
1,117
C#
/* * Tencent is pleased to support the open source community by making InjectFix available. * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ using System.Collections.Generic; using System.IO; using Mono.Cecil; using Mono.Cecil.Cil; using System; using System.Linq; namespace IFix { public abstract class GenerateConfigure { public static GenerateConfigure Empty() { return new EmptyGenerateConfigure(); } //仅仅简单的从文件加载类名而已 public static GenerateConfigure FromFile(string filename) { DefaultGenerateConfigure generateConfigure = new DefaultGenerateConfigure(); using (BinaryReader reader = new BinaryReader(File.Open(filename, FileMode.Open))) { int configureNum = reader.ReadInt32(); for (int i = 0; i < configureNum; i++) { string configureName = reader.ReadString(); Dictionary<string, int> configure = new Dictionary<string, int>(); int cfgItemCount = reader.ReadInt32(); for (int j = 0; j < cfgItemCount; j++) { string typeName = reader.ReadString(); int flag = reader.ReadInt32(); configure[typeName] = flag; } generateConfigure.configures[configureName] = configure; } generateConfigure.blackListMethodInfo = readMatchInfo(reader); } return generateConfigure; } /// <summary> /// 如果一个方法打了指定的标签,返回其配置的标志位 /// </summary> /// <param name="tag">标签</param> /// <param name="method">要查询的方法</param> /// <param name="flag">输出参数,用户配置的标志位</param> /// <returns></returns> public abstract bool TryGetConfigure(string tag, MethodReference method, out int flag); /// <summary> /// 判断一个方法是否是新增方法 /// </summary> /// <param name="method">要查询的方法</param> /// <returns></returns> public abstract bool IsNewMethod(MethodReference method); public abstract bool IsNewClass(TypeReference type); public abstract bool isNewField(FieldReference field); public abstract void AddNewMethod(MethodReference method); public abstract void AddNewClass(TypeReference type); public abstract void AddNewField(FieldReference field); //参数类型信息 internal class ParameterMatchInfo { public bool IsOut; public string ParameterType; } //方法签名信息 internal class MethodMatchInfo { public string Name; public string ReturnType; public ParameterMatchInfo[] Parameters; } internal class FieldMatchInfo { public string Name; public string FieldType; } internal class PropertyMatchInfo { public string Name; public string PropertyType; } //判断一个方法是否能够在matchInfo里头能查询到 internal static bool isMatch(Dictionary<string, MethodMatchInfo[]> matchInfo, MethodReference method) { MethodMatchInfo[] mmis; if (matchInfo.TryGetValue(method.DeclaringType.FullName, out mmis)) { foreach (var mmi in mmis) { if (mmi.Name == method.Name && mmi.ReturnType == method.ReturnType.FullName && mmi.Parameters.Length == method.Parameters.Count) { bool paramMatch = true; for (int i = 0; i < mmi.Parameters.Length; i++) { var paramType = method.Parameters[i].ParameterType; if (paramType.IsRequiredModifier) { paramType = (paramType as RequiredModifierType).ElementType; } if (mmi.Parameters[i].IsOut != method.Parameters[i].IsOut || mmi.Parameters[i].ParameterType != paramType.FullName) { paramMatch = false; break; } } if (paramMatch) return true; } } } return false; } internal static bool isMatchForField(Dictionary<string, FieldMatchInfo[]> matchInfo, FieldReference field) { FieldMatchInfo[] mmis; if (matchInfo.TryGetValue(field.DeclaringType.FullName, out mmis)) { foreach (var mmi in mmis) { if (mmi.Name == field.Name && mmi.FieldType == field.FieldType.FullName) { return true; } } } return false; } internal static bool isMatchForProperty(Dictionary<string, PropertyMatchInfo[]> matchInfo, PropertyReference property) { PropertyMatchInfo[] mmis; if (matchInfo.TryGetValue(property.DeclaringType.FullName, out mmis)) { foreach (var mmi in mmis) { if (mmi.Name == property.Name && mmi.PropertyType == property.PropertyType.FullName) { return true; } } } return false; } internal static bool isMatchForClass(HashSet<string> matchInfo, TypeReference type) { if (matchInfo.Contains(type.ToString())) { return true; } return false; } //读取方法信息,主要是方法的签名信息,名字+参数类型+返回值类型 internal static Dictionary<string, MethodMatchInfo[]> readMatchInfo(BinaryReader reader) { Dictionary<string, MethodMatchInfo[]> matchInfo = new Dictionary<string, MethodMatchInfo[]>(); int typeCount = reader.ReadInt32(); for (int k = 0; k < typeCount; k++) { string typeName = reader.ReadString(); int methodCount = reader.ReadInt32(); MethodMatchInfo[] methodMatchInfos = new MethodMatchInfo[methodCount]; for (int i = 0; i < methodCount; i++) { MethodMatchInfo mmi = new MethodMatchInfo(); mmi.Name = reader.ReadString(); mmi.ReturnType = reader.ReadString(); int parameterCount = reader.ReadInt32(); mmi.Parameters = new ParameterMatchInfo[parameterCount]; for (int p = 0; p < parameterCount; p++) { mmi.Parameters[p] = new ParameterMatchInfo(); mmi.Parameters[p].IsOut = reader.ReadBoolean(); mmi.Parameters[p].ParameterType = reader.ReadString(); } methodMatchInfos[i] = mmi; } matchInfo[typeName] = methodMatchInfos; } return matchInfo; } internal static Dictionary<string, FieldMatchInfo[]> readFieldInfo(BinaryReader reader) { Dictionary<string, FieldMatchInfo[]> matchInfo = new Dictionary<string, FieldMatchInfo[]>(); int typeCount = reader.ReadInt32(); for (int k = 0; k < typeCount; k++) { string typeName = reader.ReadString(); int methodCount = reader.ReadInt32(); FieldMatchInfo[] fieldMatchInfos = new FieldMatchInfo[methodCount]; for (int i = 0; i < methodCount; i++) { FieldMatchInfo fmi = new FieldMatchInfo(); fmi.Name = reader.ReadString(); fmi.FieldType = reader.ReadString(); fieldMatchInfos[i] = fmi; } matchInfo[typeName] = fieldMatchInfos; } return matchInfo; } internal static Dictionary<string, PropertyMatchInfo[]> readPropertyInfo(BinaryReader reader) { Dictionary<string, PropertyMatchInfo[]> matchInfo = new Dictionary<string, PropertyMatchInfo[]>(); int typeCount = reader.ReadInt32(); for (int k = 0; k < typeCount; k++) { string typeName = reader.ReadString(); int methodCount = reader.ReadInt32(); PropertyMatchInfo[] propertyMatchInfos = new PropertyMatchInfo[methodCount]; for (int i = 0; i < methodCount; i++) { PropertyMatchInfo pmi = new PropertyMatchInfo(); pmi.Name = reader.ReadString(); pmi.PropertyType = reader.ReadString(); propertyMatchInfos[i] = pmi; } matchInfo[typeName] = propertyMatchInfos; } return matchInfo; } internal static HashSet<string> readMatchInfoForClass(BinaryReader reader) { HashSet<string> setMatchInfoForClass = new HashSet<string>(); int typeCount = reader.ReadInt32(); for (int k = 0; k < typeCount; k++) { string className = reader.ReadString(); setMatchInfoForClass.Add(className); } return setMatchInfoForClass; } } //内部测试专用 public class EmptyGenerateConfigure : GenerateConfigure { public override bool TryGetConfigure(string tag, MethodReference method, out int flag) { flag = 0; return true; } public override bool IsNewMethod(MethodReference method) { return false; } public override bool IsNewClass(TypeReference type) { return false; } public override bool isNewField(FieldReference field) { return false; } public override void AddNewMethod(MethodReference method) { } public override void AddNewClass(TypeReference type) { } public override void AddNewField(FieldReference field) { } } //注入配置使用 public class DefaultGenerateConfigure : GenerateConfigure { internal Dictionary<string, Dictionary<string, int>> configures = new Dictionary<string, Dictionary<string, int>>(); internal Dictionary<string, MethodMatchInfo[]> blackListMethodInfo = null; public override bool TryGetConfigure(string tag, MethodReference method, out int flag) { Dictionary<string, int> configure; flag = 0; if(tag == "IFix.IFixAttribute" && blackListMethodInfo != null) { if(isMatch(blackListMethodInfo, method)) { return false; } } return (configures.TryGetValue(tag, out configure) && configure.TryGetValue(method.DeclaringType.FullName, out flag)); } public override bool IsNewMethod(MethodReference method) { return false; } public override bool IsNewClass(TypeReference type) { return false; } public override bool isNewField(FieldReference field) { return false; } public override void AddNewMethod(MethodReference method) { } public override void AddNewClass(TypeReference type) { } public override void AddNewField(FieldReference field) { } } //patch配置使用 public class PatchGenerateConfigure : GenerateConfigure { public override bool TryGetConfigure(string tag, MethodReference method, out int flag) { flag = 0; if (tag == "IFix.InterpretAttribute") { return redirectMethods.Contains(method); } else if (tag == "IFix.IFixAttribute") { return switchMethods.Contains(method); } return false; } public override bool IsNewMethod(MethodReference method) { return newMethods.Contains(method); } public override bool IsNewClass(TypeReference type) { return newClasses.Contains(type); } public override bool isNewField(FieldReference field) { return newFields.Contains(field); } public override void AddNewMethod(MethodReference method) { newMethods.Add(method); } public override void AddNewClass(TypeReference type) { newClasses.Add(type); } public override void AddNewField(FieldReference field) { newFields.Add(field); } //暂时不支持redirect类型的方法 HashSet<MethodReference> redirectMethods = new HashSet<MethodReference>(); HashSet<MethodReference> switchMethods = new HashSet<MethodReference>(); HashSet<MethodReference> newMethods = new HashSet<MethodReference>(); HashSet<TypeReference> newClasses = new HashSet<TypeReference>(); HashSet<FieldReference> newFields = new HashSet<FieldReference>(); MethodDefinition findMatchMethod(Dictionary<string, Dictionary<string, List<MethodDefinition>>> searchData, MethodDefinition method) { Dictionary<string, List<MethodDefinition>> methodsOfType; List<MethodDefinition> overloads; if (searchData.TryGetValue(method.DeclaringType.FullName, out methodsOfType) && methodsOfType.TryGetValue(method.Name, out overloads)) { foreach (var overload in overloads) { if (overload.IsTheSame(method)) { return overload; } } } return null; } private static bool isCompilerGenerated(FieldReference field) { var fd = field as FieldDefinition; return fd != null && fd.CustomAttributes.Any(ca => ca.AttributeType.FullName == "System.Runtime.CompilerServices.CompilerGeneratedAttribute"); } //读取配置信息(要patch的方法列表,新增方法列表) public PatchGenerateConfigure(AssemblyDefinition newAssembly, string cfgPath) { Dictionary<string, MethodMatchInfo[]> patchMethodInfo = null; Dictionary<string, MethodMatchInfo[]> newMethodInfo = null; Dictionary<string, FieldMatchInfo[]> newFieldsInfo = null; Dictionary<string, PropertyMatchInfo[]> newPropertiesInfo = null; HashSet<string> newClassInfo = null; using (BinaryReader reader = new BinaryReader(File.Open(cfgPath, FileMode.Open))) { patchMethodInfo = readMatchInfo(reader); newMethodInfo = readMatchInfo(reader); newFieldsInfo = readFieldInfo(reader); newPropertiesInfo = readPropertyInfo(reader); newClassInfo = readMatchInfoForClass(reader); } foreach (var method in (from type in newAssembly.GetAllType() from method in type.Methods select method )) { if (isMatch(patchMethodInfo, method)) { switchMethods.Add(method); } if (isMatch(newMethodInfo, method)) { AddNewMethod(method); } } foreach (var clas in newAssembly.GetAllType()) { if (isMatchForClass(newClassInfo, clas)) { AddNewClass(clas); } } foreach (var property in (from type in newAssembly.GetAllType() from property in type.Properties select property)) { if (isMatchForProperty(newPropertiesInfo, property)) { AddNewMethod(property.SetMethod); AddNewMethod(property.GetMethod); var defination = newAssembly.MainModule.GetType(property.DeclaringType.FullName); foreach (var field in ( from method in defination.Methods where method.IsSpecialName && method.Body != null && method.Body.Instructions != null from instruction in method.Body.Instructions where instruction.OpCode.Code == Mono.Cecil.Cil.Code.Ldsfld || instruction.OpCode.Code == Mono.Cecil.Cil.Code.Stsfld || instruction.OpCode.Code == Mono.Cecil.Cil.Code.Ldsflda || instruction.OpCode.Code == Mono.Cecil.Cil.Code.Ldfld || instruction.OpCode.Code == Mono.Cecil.Cil.Code.Stfld || instruction.OpCode.Code == Mono.Cecil.Cil.Code.Ldflda where isCompilerGenerated(instruction.Operand as Mono.Cecil.FieldReference) select (instruction.Operand as Mono.Cecil.FieldReference).Resolve()).Distinct()) { var backingField = property.DeclaringType.Fields.FirstOrDefault(f => f.FullName == field.FullName); if(backingField != null) { AddNewField(backingField); } } } } foreach (var field in (from type in newAssembly.GetAllType() from field in type.Fields select field )) { if (isMatchForField(newFieldsInfo, field)) { AddNewField(field); } } } } }
37.798039
175
0.521347
[ "MIT" ]
yangruihan/InjectFix
Source/VSProj/Src/Tools/GenerateConfigure.cs
19,641
C#
using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Lib.AspNetCore.ServerTiming.Http.Headers; using Lib.AspNetCore.ServerTiming.Http.Extensions; namespace Lib.AspNetCore.ServerTiming { /// <summary> /// Middleware providing support for Server Timing API. /// </summary> public class ServerTimingMiddleware { #region Fields private readonly RequestDelegate _next; private readonly string _timingAllowOriginHeaderValue; private static Task _completedTask = Task.FromResult<object>(null); #endregion #region Constructor /// <summary> /// Instantiates a new <see cref="ServerTimingMiddleware"/>. /// </summary> /// <param name="next">The next middleware in the pipeline.</param> public ServerTimingMiddleware(RequestDelegate next) : this(next, (TimingAllowOriginHeaderValue)null) { } /// <summary> /// Instantiates a new <see cref="ServerTimingMiddleware"/>. /// </summary> /// <param name="next">The next middleware in the pipeline.</param> /// <param name="timingAllowOrigins">The collection of origins that are allowed to see values from timing APIs.</param> public ServerTimingMiddleware(RequestDelegate next, ICollection<string> timingAllowOrigins) : this(next, new TimingAllowOriginHeaderValue(timingAllowOrigins)) { } /// <summary> /// Instantiates a new <see cref="ServerTimingMiddleware"/>. /// </summary> /// <param name="next">The next middleware in the pipeline.</param> /// <param name="timingAllowOrigin">The Timing-Allow-Origin header value.</param> public ServerTimingMiddleware(RequestDelegate next, TimingAllowOriginHeaderValue timingAllowOrigin) { _next = next ?? throw new ArgumentNullException(nameof(next)); _timingAllowOriginHeaderValue = timingAllowOrigin?.ToString(); } #endregion #region Methods /// <summary> /// Process an individual request. /// </summary> /// <param name="context">The context.</param> /// <param name="serverTiming">The instance of <see cref="IServerTiming"/> for current requet.</param> /// <returns>The task object representing the asynchronous operation.</returns> public Task Invoke(HttpContext context, IServerTiming serverTiming) { if (serverTiming == null) { throw new ArgumentNullException(nameof(serverTiming)); } if (_timingAllowOriginHeaderValue != null) { context.Response.SetResponseHeader(HeaderNames.TimingAllowOrigin, _timingAllowOriginHeaderValue); } HandleServerTiming(context, serverTiming); return _next(context); } private void HandleServerTiming(HttpContext context, IServerTiming serverTiming) { context.Response.OnStarting(() => { if (serverTiming.Metrics.Count > 0) { context.Response.SetServerTiming(new ServerTimingHeaderValue(serverTiming.Metrics)); } return _completedTask; }); } #endregion } }
37.655556
127
0.63116
[ "MIT" ]
KeithHenry/Lib.AspNetCore.ServerTiming
Lib.AspNetCore.ServerTiming/ServerTimingMiddleware.cs
3,391
C#
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using Aliyun.Acs.Core; using Aliyun.Acs.Core.Http; using Aliyun.Acs.Core.Transform; using Aliyun.Acs.Core.Utils; using Aliyun.Acs.Mts.Transform; using Aliyun.Acs.Mts.Transform.V20140618; using System.Collections.Generic; namespace Aliyun.Acs.Mts.Model.V20140618 { public class SearchMediaWorkflowRequest : RpcAcsRequest<SearchMediaWorkflowResponse> { public SearchMediaWorkflowRequest() : base("Mts", "2014-06-18", "SearchMediaWorkflow", "mts", "openAPI") { } private long? resourceOwnerId; private string resourceOwnerAccount; private string ownerAccount; private long? pageSize; private string action; private string stateList; private long? ownerId; private long? pageNumber; private string accessKeyId; public long? ResourceOwnerId { get { return resourceOwnerId; } set { resourceOwnerId = value; DictionaryUtil.Add(QueryParameters, "ResourceOwnerId", value.ToString()); } } public string ResourceOwnerAccount { get { return resourceOwnerAccount; } set { resourceOwnerAccount = value; DictionaryUtil.Add(QueryParameters, "ResourceOwnerAccount", value); } } public string OwnerAccount { get { return ownerAccount; } set { ownerAccount = value; DictionaryUtil.Add(QueryParameters, "OwnerAccount", value); } } public long? PageSize { get { return pageSize; } set { pageSize = value; DictionaryUtil.Add(QueryParameters, "PageSize", value.ToString()); } } public string Action { get { return action; } set { action = value; DictionaryUtil.Add(QueryParameters, "Action", value); } } public string StateList { get { return stateList; } set { stateList = value; DictionaryUtil.Add(QueryParameters, "StateList", value); } } public long? OwnerId { get { return ownerId; } set { ownerId = value; DictionaryUtil.Add(QueryParameters, "OwnerId", value.ToString()); } } public long? PageNumber { get { return pageNumber; } set { pageNumber = value; DictionaryUtil.Add(QueryParameters, "PageNumber", value.ToString()); } } public string AccessKeyId { get { return accessKeyId; } set { accessKeyId = value; DictionaryUtil.Add(QueryParameters, "AccessKeyId", value); } } public override SearchMediaWorkflowResponse GetResponse(Core.Transform.UnmarshallerContext unmarshallerContext) { return SearchMediaWorkflowResponseUnmarshaller.Unmarshall(unmarshallerContext); } } }
20.772727
119
0.647976
[ "Apache-2.0" ]
brightness007/unofficial-aliyun-openapi-net-sdk
aliyun-net-sdk-mts/Mts/Model/V20140618/SearchMediaWorkflowRequest.cs
3,656
C#
using System; using System.IO; namespace Plugin { internal partial class Script { /// <summary>Parses a script file syntactially.</summary> /// <param name="lines">The individual lines of the script file.</param> /// <param name="title">The title of the script file.</param> /// <returns>The no-name top-level element.</returns> private static Element ParseSyntax(string[] lines, string title) { Element element = new Element(null, null); for (int i = 0; i < lines.Length; i++) { string line = lines[i]; int semicolon = line.IndexOf(';'); if (semicolon >= 0) { line = line.Substring(0, semicolon).Trim(); } else { line = line.Trim(); } if (line.Length != 0) { if (line[0] == '[' && line[line.Length - 1] == ']') { if (line[1] == '/') { string name = line.Substring(2, line.Length - 3).Trim().ToLowerInvariant(); if (element.Parent == null) { throw new InvalidDataException("Closing tag [/" + name + "] does not have a matching opening tag at line " + (i + 1).ToString() + " in file " + title); } else if (element.Name != name) { throw new InvalidDataException("Closing tag [/" + name + "] does not match opening tag [" + element.Name + "] on line " + (i + 1).ToString() + " in file " + title); } element = element.Parent; } else if (line[line.Length - 2] == '/') { string name = line.Substring(1, line.Length - 3).Trim().ToLowerInvariant(); element.Elements.Add(new Element(element, name)); } else { string name = line.Substring(1, line.Length - 2).Trim().ToLowerInvariant(); Element newElement = new Element(element, name); element.Elements.Add(newElement); element = newElement; } } else { int equals = line.IndexOf('='); if (equals >= 0) { string key = line.Substring(0, equals).TrimEnd().ToLowerInvariant(); string value = line.Substring(equals + 1).TrimStart(); element.Parameters[key] = value; } else { throw new InvalidDataException("Syntax error on line " + (i + 1).ToString() + " in file " + title); } } } } if (element.Parent != null) { throw new InvalidDataException("Missing closing tag [/" + element.Parent.Name + "] in file " + title); } return element; } } }
39.644068
172
0.591706
[ "Apache-2.0" ]
joeyfoo/alstom-metropolis-for-openbve
alstom-metropolis-content/plugin/trainscript-train-plugin/SourceCode/Plugin/Script.Syntax.cs
2,341
C#
using System.Drawing; namespace LiveSplit.Options.SettingsFactories { public class StandardLayoutSettingsFactory : ILayoutSettingsFactory { public LayoutSettings Create() { return new LayoutSettings() { TextColor = Color.FromArgb(255,255,255), BackgroundColor = Color.FromArgb(0, 0, 0, 0), BackgroundColor2 = Color.FromArgb(0, 0, 0, 0), ThinSeparatorsColor = Color.FromArgb(9, 255, 255, 255), SeparatorsColor = Color.FromArgb(38, 255, 255, 255), PersonalBestColor = Color.FromArgb(22, 166, 255), AheadGainingTimeColor = Color.FromArgb(41, 204, 84), AheadLosingTimeColor = Color.FromArgb(112, 204, 137), BehindGainingTimeColor = Color.FromArgb(204, 120, 112), BehindLosingTimeColor = Color.FromArgb(204, 55, 41), BestSegmentColor = Color.FromArgb(216, 175, 31), NotRunningColor = Color.FromArgb(122,122,122), PausedColor = Color.FromArgb(122,122,122), ShadowsColor = Color.FromArgb(128, 0, 0, 0), TimerFont = new Font("Century Gothic", 43.75f, FontStyle.Bold, GraphicsUnit.Pixel), TimesFont = new Font("Segoe UI", 13, FontStyle.Bold, GraphicsUnit.Pixel), TextFont = new Font("Segoe UI", 13, FontStyle.Regular, GraphicsUnit.Pixel), ShowBestSegments = true, UseRainbowColor = false, AlwaysOnTop = true, AntiAliasing = true, DropShadows = true, BackgroundType = BackgroundType.SolidColor, BackgroundImage = null, ImageOpacity = 1f, ImageBlur = 0f, Opacity = 1 }; } } }
44.928571
99
0.553259
[ "MIT" ]
chloe747/LiveSplit
LiveSplit/LiveSplit.Core/Options/SettingsFactories/StandardLayoutSettingsFactory.cs
1,889
C#
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace JerryPlat.Utils.Helpers { public class SessionHelper { public static SessionHelper Instance = GetInstance<SessionHelper>("Instance"); public static SessionHelper Admin = GetInstance<SessionHelper>("Admin", "/Admin/Home/Index"); public static SessionHelper Mob = GetInstance<SessionHelper>("Mob", "/Mob/Owin/Login/Wechat"); public static SessionHelper MobReturnUrl = GetInstance<SessionHelper>("MobReturnUrl"); public static SessionHelper Owin = GetInstance<SessionHelper>("Owin"); public static SessionHelper ShareCode = GetInstance<SessionHelper>("ShareCode"); public static SessionHelper SMS = GetInstance<SessionHelper>("SMS"); public static SessionHelper User = GetInstance<SessionHelper>("User"); public static SessionHelper VerifyCode = GetInstance<SessionHelper>("VerifyCode"); public static Dictionary<string, SessionHelper> KeyValues = new Dictionary<string, SessionHelper>() { {"AdminUser", Admin }, {"Member", Mob } }; public string LoginUri { get; set; } public static T GetInstance<T>(string strSessionName, string strLoginUri = "") where T : SessionHelper, new() { T sessionHelper = new T(); sessionHelper._SessionName = "JerryPlat_SessionName_" + strSessionName; sessionHelper.LoginUri = strLoginUri; return sessionHelper; } #region Private Functions private static bool IsNullSession(string strKey) { return HttpContext.Current.Session[strKey] == null; } private static T GetSession<T>(string strKey) { if (IsNullSession(strKey)) { return default(T); } return (T)HttpContext.Current.Session[strKey]; } private static void SetSession(string strSessionKey, object objValue, int timeout = 0) { if (!KeyValues.Keys.Contains(strSessionKey)) { throw new Exception("Not Exist Session with Key = " + strSessionKey); } KeyValues[strSessionKey].SetSession(objValue, timeout); } #endregion Private Functions #region Default Session Name private string _SessionName { get; set; } public virtual string GetDefaultSessionName() { return _SessionName; } public bool IsNullSession() { string strDefaultSessionName = GetDefaultSessionName(); return HttpContext.Current.Session[strDefaultSessionName] == null; } public T GetSession<T>() { string strDefaultSessionName = GetDefaultSessionName(); return GetSession<T>(strDefaultSessionName); } public void SetSession(object objValue, int timeout = 0) { string strDefaultSessionName = GetDefaultSessionName(); HttpContext.Current.Session[strDefaultSessionName] = objValue; if (timeout > 0) { HttpContext.Current.Session.Timeout = timeout; } } public static void ClearSession() { HttpContext.Current.Session.Clear(); } public bool IsValid(string strCode) { return GetSession<string>().Equals(strCode, StringComparison.OrdinalIgnoreCase); } #endregion Default Session Name } }
33.296296
117
0.619021
[ "MIT" ]
JerryPCN/JerryPlat-Project-Template-WithApi
SRC/JerryPlat.Utils/Helpers/SessionHelper/SessionHelper.cs
3,598
C#
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.JSInterop { /// <summary> /// Abstract base class for an in-process JavaScript runtime. /// </summary> public abstract class JSInProcessRuntimeBase : JSRuntimeBase, IJSInProcessRuntime { /// <summary> /// Invokes the specified JavaScript function synchronously. /// </summary> /// <typeparam name="T">The JSON-serializable return type.</typeparam> /// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param> /// <param name="args">JSON-serializable arguments.</param> /// <returns>An instance of <typeparamref name="T"/> obtained by JSON-deserializing the return value.</returns> public T Invoke<T>(string identifier, params object[] args) { var resultJson = InvokeJS(identifier, Json.Serialize(args, ArgSerializerStrategy)); return Json.Deserialize<T>(resultJson, ArgSerializerStrategy); } /// <summary> /// Performs a synchronous function invocation. /// </summary> /// <param name="identifier">The identifier for the function to invoke.</param> /// <param name="argsJson">A JSON representation of the arguments.</param> /// <returns>A JSON representation of the result.</returns> protected abstract string InvokeJS(string identifier, string argsJson); } }
50.939394
216
0.674004
[ "Apache-2.0" ]
CBaud/Extensions
src/JSInterop/Microsoft.JSInterop/src/JSInProcessRuntimeBase.cs
1,681
C#
using System; using System.Runtime.Serialization; namespace fiskaltrust.ifPOS.v1.de { [DataContract] public class FinishTransactionResponse { [DataMember(Order = 1)] public long TransactionNumber { get; set; } [DataMember(Order = 2)] public DateTime StartTime { get; set; } [DataMember(Order = 3)] public DateTime EndTime { get; set; } [DataMember(Order = 4)] public string CertificateSerialNumber { get; set; } [DataMember(Order = 5)] public string ClientId { get; set; } [DataMember(Order = 6)] public string ProcessType { get; set; } [DataMember(Order = 7)] public string ProcessDataBase64 { get; set; } [DataMember(Order = 8)] public TseLogData LogData { get; set; } [DataMember(Order = 9)] public TseSignatureData SignatureData { get; set; } [DataMember(Order = 10)] public bool MoreExportDataAvailable { get; set; } } }
25.325
59
0.601185
[ "MIT" ]
FlorianStadlberger/middleware-interface-dotnet
src/fiskaltrust.ifPOS/v1/de/Models/FinishTransactionResponse.cs
1,015
C#
namespace Microsoft.Azure.Commands.Network { class RouteServerParameterSetNames { internal const string ByRouteServerSubscriptionId = "RouteServerSubscriptionIdParameterSet"; internal const string ByRouteServerResourceId = "RouteServerResourceIdParameterSet"; internal const string ByRouteServerInputObject = "RouteServerInputObjectParameterSet"; internal const string ByRouteServerName = "RouteServerNameParameterSet"; } }
43.545455
101
0.770355
[ "MIT" ]
Agazoth/azure-powershell
src/Network/Network/RouteServer/RouteServerParameterSetNames.cs
471
C#
// ------------------------------------------------------------------------------ // <auto-generated> // This code was generated by SpecFlow (http://www.specflow.org/). // SpecFlow Version:2.2.0.0 // SpecFlow Generator Version:2.0.0.0 // // 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 DissectPECOFFBinary.SpecFlow { using TechTalk.SpecFlow; [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "2.2.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] public partial class TextSectionFeature { private static TechTalk.SpecFlow.ITestRunner testRunner; #line 1 "TextSection.feature" #line hidden [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(null, 0); TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "TextSection", "\tIn order to dissect a PECOFF binary file\r\n\tAs an interested party\r\n\tI want to re" + "ad the .Text from the file\r\n\tAnd I want to see the component parts", ProgrammingLanguage.CSharp, ((string[])(null))); testRunner.OnFeatureStart(featureInfo); } [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] public static void FeatureTearDown() { testRunner.OnFeatureEnd(); testRunner = null; } [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] public virtual void TestInitialize() { if (((testRunner.FeatureContext != null) && (testRunner.FeatureContext.FeatureInfo.Title != "TextSection"))) { global::DissectPECOFFBinary.SpecFlow.TextSectionFeature.FeatureSetup(null); } } [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] public virtual void ScenarioTearDown() { testRunner.OnScenarioEnd(); } public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) { testRunner.OnScenarioStart(scenarioInfo); } public virtual void ScenarioCleanup() { testRunner.CollectScenarioErrors(); } public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries(string fileName, string numberOfEntries, string entryValues, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Read the Import Address Table from a file check the number of entries", exampleTags); #line 7 this.ScenarioSetup(scenarioInfo); #line 8 testRunner.Given(string.Format("a PECOFF binary file named {0}", fileName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line 9 testRunner.When("I read in the MSDOS20Section", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line 10 testRunner.And("I read in the COFFHeader", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 11 testRunner.And("I read in the COFFOptionalHeaderStandardFields", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 12 testRunner.And("I read in the OptionalHeaderDataDirectories", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 13 testRunner.And("I read the SectionTables", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 14 testRunner.And("I read the Import Address Table", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 15 testRunner.Then(string.Format("the number of entries should be {0}", numberOfEntries), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line 16 testRunner.And(string.Format("the values should be {0}", entryValues), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden this.ScenarioCleanup(); } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2390,0x0,0x48,0x50002,0x2070,0x2EC,0x1,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_CSC_2_0_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_CSC_2.0.exe", "0x8", "0x2390,0x0,0x48,0x50002,0x2070,0x2EC,0x1,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2390,0x0,0x48,0x50002,0x2070,0x2EC,0x1,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_CSC_3_5_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_CSC_3.5.exe", "0x8", "0x2390,0x0,0x48,0x50002,0x2070,0x2EC,0x1,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2390,0x0,0x48,0x50002,0x2070,0x2EC,0x1,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_CSC_4_0_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_CSC_4.0.exe", "0x8", "0x2390,0x0,0x48,0x50002,0x2070,0x2EC,0x1,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x278C,0x0,0x48,0x50002,0x2070,0x5B0,0x1,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_2_0_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_2.0.exe", "0x8", "0x278C,0x0,0x48,0x50002,0x2070,0x5B0,0x1,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2788,0x0,0x48,0x50002,0x2070,0x5AC,0x1,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_3_0_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_3.0.exe", "0x8", "0x2788,0x0,0x48,0x50002,0x2070,0x5AC,0x1,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2788,0x0,0x48,0x50002,0x2070,0x5AC,0x1,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_3_5_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_3.5.exe", "0x8", "0x2788,0x0,0x48,0x50002,0x2070,0x5AC,0x1,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2820,0x0,0x48,0x50002,0x2070,0x644,0x20003,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_4_5_1_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_4.5.1.exe", "0x8", "0x2820,0x0,0x48,0x50002,0x2070,0x644,0x20003,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2820,0x0,0x48,0x50002,0x2070,0x644,0x20003,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_4_5_2_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_4.5.2.exe", "0x8", "0x2820,0x0,0x48,0x50002,0x2070,0x644,0x20003,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2814,0x0,0x48,0x50002,0x2070,0x638,0x20003,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_4_5_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_4.5.exe", "0x8", "0x2814,0x0,0x48,0x50002,0x2070,0x638,0x20003,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2820,0x0,0x48,0x50002,0x2070,0x644,0x20003,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_4_6_1_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_4.6.1.exe", "0x8", "0x2820,0x0,0x48,0x50002,0x2070,0x644,0x20003,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x280C,0x0,0x48,0x50002,0x2070,0x630,0x20003,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_4_6_2_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_4.6.2.exe", "0x8", "0x280C,0x0,0x48,0x50002,0x2070,0x630,0x20003,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2814,0x0,0x48,0x50002,0x2070,0x638,0x20003,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_4_6_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_4.6.exe", "0x8", "0x2814,0x0,0x48,0x50002,0x2070,0x638,0x20003,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x280C,0x0,0x48,0x50002,0x2070,0x630,0x1,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_4_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_4.exe", "0x8", "0x280C,0x0,0x48,0x50002,0x2070,0x630,0x1,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x27DC,0x0,0x48,0x50002,0x20A4,0x5CC,0x1,0x6000001")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_VS_Core_1_0_Dll() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_VS_Core_1.0.dll", "0x8", "0x27DC,0x0,0x48,0x50002,0x20A4,0x5CC,0x1,0x6000001", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x24E0,0x0,0x48,0x50002,0x2070,0x440,0x3,0x6000002")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_Xamarin_2_0_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_Xamarin_2.0.exe", "0x8", "0x24E0,0x0,0x48,0x50002,0x2070,0x440,0x3,0x6000002", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2560,0x0,0x48,0x50002,0x2070,0x4C0,0x3,0x6000002")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_Xamarin_4_0_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_Xamarin_4.0.exe", "0x8", "0x2560,0x0,0x48,0x50002,0x2070,0x4C0,0x3,0x6000002", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2590,0x0,0x48,0x50002,0x2070,0x4E8,0x3,0x6000002")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_Xamarin_4_0Client_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_Xamarin_4.0Client.exe", "0x8", "0x2590,0x0,0x48,0x50002,0x2070,0x4E8,0x3,0x6000002", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2570,0x0,0x48,0x50002,0x2070,0x4C8,0x3,0x6000002")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_Xamarin_4_5_1_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_Xamarin_4.5.1.exe", "0x8", "0x2570,0x0,0x48,0x50002,0x2070,0x4C8,0x3,0x6000002", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2570,0x0,0x48,0x50002,0x2070,0x4C8,0x3,0x6000002")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_Xamarin_4_5_2_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_Xamarin_4.5.2.exe", "0x8", "0x2570,0x0,0x48,0x50002,0x2070,0x4C8,0x3,0x6000002", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2560,0x0,0x48,0x50002,0x2070,0x4C0,0x3,0x6000002")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_Xamarin_4_5_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_Xamarin_4.5.exe", "0x8", "0x2560,0x0,0x48,0x50002,0x2070,0x4C0,0x3,0x6000002", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2570,0x0,0x48,0x50002,0x2070,0x4C8,0x3,0x6000002")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_Xamarin_4_6_1_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_Xamarin_4.6.1.exe", "0x8", "0x2570,0x0,0x48,0x50002,0x2070,0x4C8,0x3,0x6000002", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Import Address Table from a file check the number of entries: HelloWorld" + "_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Number of Entries", "0x8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Values", "0x2560,0x0,0x48,0x50002,0x2070,0x4C0,0x3,0x6000002")] public virtual void ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries_HelloWorld_Xamarin_4_6_Exe() { this.ReadTheImportAddressTableFromAFileCheckTheNumberOfEntries("HelloWorld_Xamarin_4.6.exe", "0x8", "0x2560,0x0,0x48,0x50002,0x2070,0x4C0,0x3,0x6000002", ((string[])(null))); #line hidden } public virtual void ReadTheCLRHeaderFromAFileCheckValues(string fileName, string cb, string majorRuntimeVersion, string minorRuntimeVersion, string metadata, string flags, string entryPointTokenEntryPointRVA, string resources, string strongNameSignature, string codeManagerTable, string vTableFixups, string exportAddressTableJumps, string managedNativeHeader, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Read the CLR Header from a file check values", exampleTags); #line 43 this.ScenarioSetup(scenarioInfo); #line 44 testRunner.Given(string.Format("a PECOFF binary file named {0}", fileName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line 45 testRunner.When("I read in the MSDOS20Section", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line 46 testRunner.And("I read in the COFFHeader", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 47 testRunner.And("I read in the COFFOptionalHeaderStandardFields", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 48 testRunner.And("I read in the OptionalHeaderDataDirectories", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 49 testRunner.And("I read the SectionTables", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 50 testRunner.And("I read the CLR Header", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 51 testRunner.Then(string.Format("the Cb should be {0}", cb), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line 52 testRunner.And(string.Format("the Major Runtime Version should be {0}", majorRuntimeVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 53 testRunner.And(string.Format("the Minor Runtime Version should be {0}", minorRuntimeVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 54 testRunner.And(string.Format("the Metadata should be {0}", metadata), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 55 testRunner.And(string.Format("the Flags should be {0}", flags), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 56 testRunner.And(string.Format("the Entry Point Token/Entry Point RVA should be {0}", entryPointTokenEntryPointRVA), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 57 testRunner.And(string.Format("the Resources should be {0}", resources), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 58 testRunner.And(string.Format("the Strong Name Signature should be {0}", strongNameSignature), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 59 testRunner.And(string.Format("the Code Manager Table should be {0}", codeManagerTable), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 60 testRunner.And(string.Format("the VTable Fixups should be {0}", vTableFixups), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 61 testRunner.And(string.Format("the Export Address Table Jumps should be {0}", exportAddressTableJumps), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 62 testRunner.And(string.Format("the Managed Native Header should be {0}", managedNativeHeader), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden this.ScenarioCleanup(); } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x2EC00002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_CSC_2_0_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_CSC_2.0.exe", "0x48", "0x2", "0x5", "0x2EC00002070", "0x1", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x2EC00002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_CSC_3_5_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_CSC_3.5.exe", "0x48", "0x2", "0x5", "0x2EC00002070", "0x1", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x2EC00002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_CSC_4_0_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_CSC_4.0.exe", "0x48", "0x2", "0x5", "0x2EC00002070", "0x1", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x5B000002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_2_0_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_2.0.exe", "0x48", "0x2", "0x5", "0x5B000002070", "0x1", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x5AC00002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_3_0_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_3.0.exe", "0x48", "0x2", "0x5", "0x5AC00002070", "0x1", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x5AC00002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_3_5_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_3.5.exe", "0x48", "0x2", "0x5", "0x5AC00002070", "0x1", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x64400002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x20003")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_4_5_1_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_4.5.1.exe", "0x48", "0x2", "0x5", "0x64400002070", "0x20003", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x64400002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x20003")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_4_5_2_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_4.5.2.exe", "0x48", "0x2", "0x5", "0x64400002070", "0x20003", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x63800002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x20003")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_4_5_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_4.5.exe", "0x48", "0x2", "0x5", "0x63800002070", "0x20003", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x64400002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x20003")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_4_6_1_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_4.6.1.exe", "0x48", "0x2", "0x5", "0x64400002070", "0x20003", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x63000002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x20003")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_4_6_2_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_4.6.2.exe", "0x48", "0x2", "0x5", "0x63000002070", "0x20003", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x63800002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x20003")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_4_6_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_4.6.exe", "0x48", "0x2", "0x5", "0x63800002070", "0x20003", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x63000002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_4_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_4.exe", "0x48", "0x2", "0x5", "0x63000002070", "0x1", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x5CC000020A4")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000001")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_VS_Core_1_0_Dll() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_VS_Core_1.0.dll", "0x48", "0x2", "0x5", "0x5CC000020A4", "0x1", "0x6000001", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x44000002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x3")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000002")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_Xamarin_2_0_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_Xamarin_2.0.exe", "0x48", "0x2", "0x5", "0x44000002070", "0x3", "0x6000002", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x4C000002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x3")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000002")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_0_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.0.exe", "0x48", "0x2", "0x5", "0x4C000002070", "0x3", "0x6000002", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x4E800002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x3")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000002")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_0Client_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.0Client.exe", "0x48", "0x2", "0x5", "0x4E800002070", "0x3", "0x6000002", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x4C800002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x3")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000002")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_1_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.1.exe", "0x48", "0x2", "0x5", "0x4C800002070", "0x3", "0x6000002", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x4C800002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x3")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000002")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_2_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.2.exe", "0x48", "0x2", "0x5", "0x4C800002070", "0x3", "0x6000002", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x4C000002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x3")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000002")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.exe", "0x48", "0x2", "0x5", "0x4C000002070", "0x3", "0x6000002", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x4C800002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x3")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000002")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_6_1_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.6.1.exe", "0x48", "0x2", "0x5", "0x4C800002070", "0x3", "0x6000002", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CLR Header from a file check values: HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Cb", "0x48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Runtime Version", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Runtime Version", "0x5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Metadata", "0x4C000002070")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Flags", "0x3")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Entry Point Token/Entry Point RVA", "0x6000002")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Resources", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Strong Name Signature", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Code Manager Table", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:VTable Fixups", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Export Address Table Jumps", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Managed Native Header", "0x0")] public virtual void ReadTheCLRHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_6_Exe() { this.ReadTheCLRHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.6.exe", "0x48", "0x2", "0x5", "0x4C000002070", "0x3", "0x6000002", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } public virtual void ReadTheDebugDirectoryFromAFileCheckValues(string fileName, string characteristics, string timeDateStamp, string majorVersion, string minorVersion, string type, string sizeOfData, string addressOfRawData, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Read the Debug Directory from a file check values", exampleTags); #line 89 this.ScenarioSetup(scenarioInfo); #line 90 testRunner.Given(string.Format("a PECOFF binary file named {0}", fileName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line 91 testRunner.When("I read in the MSDOS20Section", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line 92 testRunner.And("I read in the COFFHeader", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 93 testRunner.And("I read in the COFFOptionalHeaderStandardFields", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 94 testRunner.And("I read in the OptionalHeaderDataDirectories", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 95 testRunner.And("I read the SectionTables", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 96 testRunner.And("I read the Debug Directory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 97 testRunner.Then(string.Format("the Debug Characteristics should be {0}", characteristics), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line 98 testRunner.And(string.Format("the Debug TimeDateStamp should be {0}", timeDateStamp), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 99 testRunner.And(string.Format("the Debug Major Version should be {0}", majorVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 100 testRunner.And(string.Format("the Debug Minor Version should be {0}", minorVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 101 testRunner.And(string.Format("the Debug Type should be {0}", type), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 102 testRunner.And(string.Format("the Debug SizeOfData should be {0}", sizeOfData), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 103 testRunner.And(string.Format("the Debug AddressOfRawData should be {0}", addressOfRawData), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden this.ScenarioCleanup(); } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_CSC_2_0_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_CSC_2.0.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_CSC_3_5_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_CSC_3.5.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_CSC_4_0_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_CSC_4.0.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586C5B43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x263C")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_2_0_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_2.0.exe", "0x0", "0x586C5B43", "0x0", "0x0", "0x2", "0x11C", "0x263C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586C5B43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x2638")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_3_0_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_3.0.exe", "0x0", "0x586C5B43", "0x0", "0x0", "0x2", "0x11C", "0x2638", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586C5B43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x2638")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_3_5_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_3.5.exe", "0x0", "0x586C5B43", "0x0", "0x0", "0x2", "0x11C", "0x2638", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586C5B43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x26D0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_4_5_1_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_4.5.1.exe", "0x0", "0x586C5B43", "0x0", "0x0", "0x2", "0x11C", "0x26D0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586C5B43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x26D0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_4_5_2_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_4.5.2.exe", "0x0", "0x586C5B43", "0x0", "0x0", "0x2", "0x11C", "0x26D0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586C5B43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x26C4")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_4_5_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_4.5.exe", "0x0", "0x586C5B43", "0x0", "0x0", "0x2", "0x11C", "0x26C4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586C5B43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x26D0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_4_6_1_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_4.6.1.exe", "0x0", "0x586C5B43", "0x0", "0x0", "0x2", "0x11C", "0x26D0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586C5B43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x26BC")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_4_6_2_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_4.6.2.exe", "0x0", "0x586C5B43", "0x0", "0x0", "0x2", "0x11C", "0x26BC", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586C5B43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x26C4")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_4_6_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_4.6.exe", "0x0", "0x586C5B43", "0x0", "0x0", "0x2", "0x11C", "0x26C4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586C5B43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x26BC")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_4_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_4.exe", "0x0", "0x586C5B43", "0x0", "0x0", "0x2", "0x11C", "0x26BC", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x586B021F")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x11C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x268C")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_VS_Core_1_0_Dll() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_VS_Core_1.0.dll", "0x0", "0x586B021F", "0x0", "0x0", "0x2", "0x11C", "0x268C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_Xamarin_2_0_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_Xamarin_2.0.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_Xamarin_4_0_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_Xamarin_4.0.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_Xamarin_4.0Client.e" + "xe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_Xamarin_4_0Client_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_Xamarin_4.0Client.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_Xamarin_4_5_1_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_Xamarin_4.5.1.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_Xamarin_4_5_2_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_Xamarin_4.5.2.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_Xamarin_4_5_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_Xamarin_4.5.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_Xamarin_4_6_1_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_Xamarin_4.6.1.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Debug Directory from a file check values: HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Characteristics", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:TimeDateStamp", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Major Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Minor Version", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Type", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:SizeOfData", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:AddressOfRawData", "0x0")] public virtual void ReadTheDebugDirectoryFromAFileCheckValues_HelloWorld_Xamarin_4_6_Exe() { this.ReadTheDebugDirectoryFromAFileCheckValues("HelloWorld_Xamarin_4.6.exe", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", ((string[])(null))); #line hidden } public virtual void ReadTheCodeViewHeaderFromAFileCheckValues(string fileName, string cvSignature, string signature, string age, string pdbFileName, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Read the CodeViewHeader from a file check values", exampleTags); #line 130 this.ScenarioSetup(scenarioInfo); #line 131 testRunner.Given(string.Format("a PECOFF binary file named {0}", fileName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line 132 testRunner.When("I read in the MSDOS20Section", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line 133 testRunner.And("I read in the COFFHeader", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 134 testRunner.And("I read in the COFFOptionalHeaderStandardFields", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 135 testRunner.And("I read in the OptionalHeaderDataDirectories", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 136 testRunner.And("I read the SectionTables", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 137 testRunner.And("I read the Debug Directory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 138 testRunner.And("I read the CodeView Header", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 139 testRunner.Then(string.Format("the CvSignature should be {0}", cvSignature), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line 140 testRunner.And(string.Format("the Signature should be {0}", signature), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 141 testRunner.And(string.Format("the Age should be {0}", age), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 142 testRunner.And(string.Format("the PdbFileName should be \'{0}\'", pdbFileName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden this.ScenarioCleanup(); } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_CSC_2_0_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_CSC_2.0.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_CSC_3_5_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_CSC_3.5.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_CSC_4_0_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_CSC_4.0.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "9d262c59-dbb1-4517-866a-e5a7f2babb32")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_VS_2.0\\obj\\Release\\HelloWorld_VS_2.0.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_2_0_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_2.0.exe", "RSDS", "9d262c59-dbb1-4517-866a-e5a7f2babb32", "1", "D:\\Source\\HelloWorld\\HelloWorld_VS_2.0\\obj\\Release\\HelloWorld_VS_2.0.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "875cbf0a-0cad-44f0-a131-9844c3a8be11")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_3.0\\obj\\Release\\HelloWorld_VS_3.0.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_3_0_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_3.0.exe", "RSDS", "875cbf0a-0cad-44f0-a131-9844c3a8be11", "1", "D:\\Source\\HelloWorld\\HelloWorld_3.0\\obj\\Release\\HelloWorld_VS_3.0.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "fea38570-ba5f-4ea1-8d2f-c1fea71fca9f")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_3.5\\obj\\Release\\HelloWorld_VS_3.5.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_3_5_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_3.5.exe", "RSDS", "fea38570-ba5f-4ea1-8d2f-c1fea71fca9f", "1", "D:\\Source\\HelloWorld\\HelloWorld_3.5\\obj\\Release\\HelloWorld_VS_3.5.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "3de14e5f-9600-447e-941b-347ee0736fb0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_4.5.1\\obj\\Release\\HelloWorld_VS_4.5.1.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_4_5_1_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_4.5.1.exe", "RSDS", "3de14e5f-9600-447e-941b-347ee0736fb0", "1", "D:\\Source\\HelloWorld\\HelloWorld_4.5.1\\obj\\Release\\HelloWorld_VS_4.5.1.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "873c0c33-52e9-4c04-a817-a0225f03579c")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_4.5.2\\obj\\Release\\HelloWorld_VS_4.5.2.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_4_5_2_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_4.5.2.exe", "RSDS", "873c0c33-52e9-4c04-a817-a0225f03579c", "1", "D:\\Source\\HelloWorld\\HelloWorld_4.5.2\\obj\\Release\\HelloWorld_VS_4.5.2.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "7be5edb3-7e51-4533-9f28-bf7b207ab22c")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_4.5\\obj\\Release\\HelloWorld_VS_4.5.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_4_5_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_4.5.exe", "RSDS", "7be5edb3-7e51-4533-9f28-bf7b207ab22c", "1", "D:\\Source\\HelloWorld\\HelloWorld_4.5\\obj\\Release\\HelloWorld_VS_4.5.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "a1e697d6-2db5-43ba-9e2f-ad8e30a09c13")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_4.6.1\\obj\\Release\\HelloWorld_VS_4.6.1.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_4_6_1_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_4.6.1.exe", "RSDS", "a1e697d6-2db5-43ba-9e2f-ad8e30a09c13", "1", "D:\\Source\\HelloWorld\\HelloWorld_4.6.1\\obj\\Release\\HelloWorld_VS_4.6.1.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "02173892-8a8a-43dd-aa4c-7b8cc1af10e0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_VS_4.6.2\\obj\\Release\\HelloWorld_VS_4.6.2.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_4_6_2_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_4.6.2.exe", "RSDS", "02173892-8a8a-43dd-aa4c-7b8cc1af10e0", "1", "D:\\Source\\HelloWorld\\HelloWorld_VS_4.6.2\\obj\\Release\\HelloWorld_VS_4.6.2.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "e24c3f67-f504-4ce8-94b2-204e4cdce7e8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_4.6\\obj\\Release\\HelloWorld_VS_4.6.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_4_6_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_4.6.exe", "RSDS", "e24c3f67-f504-4ce8-94b2-204e4cdce7e8", "1", "D:\\Source\\HelloWorld\\HelloWorld_4.6\\obj\\Release\\HelloWorld_VS_4.6.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "0590a9a9-7279-4c01-bcbd-64c648b238dd")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_4\\obj\\Release\\HelloWorld_VS_4.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_4_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_4.exe", "RSDS", "0590a9a9-7279-4c01-bcbd-64c648b238dd", "1", "D:\\Source\\HelloWorld\\HelloWorld_4\\obj\\Release\\HelloWorld_VS_4.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "RSDS")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "ae8dc3e2-b3d7-490a-a1b9-2bd7e3f9c53a")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "D:\\Source\\HelloWorld\\HelloWorld_VS_Core_1.0\\bin\\Release\\~.0\\HelloWorld_VS_Core_1." + "0.pdb")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_VS_Core_1_0_Dll() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_VS_Core_1.0.dll", "RSDS", "ae8dc3e2-b3d7-490a-a1b9-2bd7e3f9c53a", "1", "D:\\Source\\HelloWorld\\HelloWorld_VS_Core_1.0\\bin\\Release\\~.0\\HelloWorld_VS_Core_1." + "0.pdb", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_Xamarin_2_0_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_Xamarin_2.0.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_0_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.0.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_Xamarin_4.0Client.ex" + "e")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_0Client_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.0Client.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_1_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.1.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_2_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.2.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_6_1_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.6.1.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the CodeViewHeader from a file check values: HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:CvSignature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Signature", "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Age", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:PdbFileName", "")] public virtual void ReadTheCodeViewHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_6_Exe() { this.ReadTheCodeViewHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.6.exe", "", "", "0x0", "", ((string[])(null))); #line hidden } public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues(string fileName, string lSignature, string iMajorVer, string iMinorVer, string iExtraData, string iVersionString, string pVersion, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Read the General Metadata Header from a file check values", exampleTags); #line 170 this.ScenarioSetup(scenarioInfo); #line 171 testRunner.Given(string.Format("a PECOFF binary file named {0}", fileName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line 172 testRunner.When("I read in the MSDOS20Section", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line 173 testRunner.And("I read in the COFFHeader", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 174 testRunner.And("I read in the COFFOptionalHeaderStandardFields", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 175 testRunner.And("I read in the OptionalHeaderDataDirectories", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 176 testRunner.And("I read the SectionTables", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 177 testRunner.And("I read the CLR Header", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 178 testRunner.And("I read the General Metadata Header", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 179 testRunner.Then(string.Format("the lSignature should be {0}", lSignature), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line 180 testRunner.And(string.Format("the iMajorVer should be {0}", iMajorVer), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 181 testRunner.And(string.Format("the iMinorVer should be {0}", iMinorVer), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 182 testRunner.And(string.Format("the iExtraData should be {0}", iExtraData), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 183 testRunner.And(string.Format("the iVersionString should be {0}", iVersionString), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 184 testRunner.And(string.Format("the pVersion should be {0}", pVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden this.ScenarioCleanup(); } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_CSC_2.0.exe" + "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v2.0.50727")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_CSC_2_0_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_CSC_2.0.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v2.0.50727", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_CSC_3.5.exe" + "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v2.0.50727")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_CSC_3_5_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_CSC_3.5.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v2.0.50727", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_CSC_4.0.exe" + "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_CSC_4_0_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_CSC_4.0.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v2.0.50727")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_2_0_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_2.0.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v2.0.50727", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v2.0.50727")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_3_0_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_3.0.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v2.0.50727", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v2.0.50727")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_3_5_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_3.5.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v2.0.50727", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_4.5.1.ex" + "e")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_4_5_1_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_4.5.1.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_4.5.2.ex" + "e")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_4_5_2_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_4.5.2.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_4_5_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_4.5.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_4.6.1.ex" + "e")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_4_6_1_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_4.6.1.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_4.6.2.ex" + "e")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_4_6_2_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_4.6.2.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_4_6_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_4.6.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_4_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_4.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_VS_Core_1.0" + ".dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_VS_Core_1_0_Dll() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_VS_Core_1.0.dll", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_Xamarin_2.0" + ".exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v2.0.50727")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_Xamarin_2_0_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_Xamarin_2.0.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v2.0.50727", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_Xamarin_4.0" + ".exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_0_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.0.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_Xamarin_4.0" + "Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_0Client_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.0Client.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_Xamarin_4.5" + ".1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_1_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.1.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_Xamarin_4.5" + ".2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_2_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.2.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_Xamarin_4.5" + ".exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_Xamarin_4.6" + ".1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_6_1_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.6.1.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the General Metadata Header from a file check values: HelloWorld_Xamarin_4.6" + ".exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:lSignature", "BSJB")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMajorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iMinorVer", "0x1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iExtraData", "0X0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iVersionString", "0xC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:pVersion", "v4.0.30319")] public virtual void ReadTheGeneralMetadataHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_6_Exe() { this.ReadTheGeneralMetadataHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.6.exe", "BSJB", "0x1", "0x1", "0X0", "0xC", "v4.0.30319", ((string[])(null))); #line hidden } public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues(string fileName, string fFlags, string padding, string iStreams, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Read the Metadata Storage Header from a file check values", exampleTags); #line 211 this.ScenarioSetup(scenarioInfo); #line 212 testRunner.Given(string.Format("a PECOFF binary file named {0}", fileName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line 213 testRunner.When("I read in the MSDOS20Section", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line 214 testRunner.And("I read in the COFFHeader", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 215 testRunner.And("I read in the COFFOptionalHeaderStandardFields", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 216 testRunner.And("I read in the OptionalHeaderDataDirectories", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 217 testRunner.And("I read the SectionTables", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 218 testRunner.And("I read the CLR Header", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 219 testRunner.And("I read the General Metadata Header", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 220 testRunner.And("I read the Metadata Storage Header", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 221 testRunner.Then(string.Format("the fFlags should be {0}", fFlags), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line 222 testRunner.And(string.Format("the padding should be {0}", padding), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 223 testRunner.And(string.Format("the iStreams should be {0}", iStreams), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden this.ScenarioCleanup(); } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_CSC_2.0.exe" + "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_CSC_2_0_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_CSC_2.0.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_CSC_3.5.exe" + "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_CSC_3_5_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_CSC_3.5.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_CSC_4.0.exe" + "")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_CSC_4_0_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_CSC_4.0.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_2_0_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_2.0.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_3_0_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_3.0.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_3_5_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_3.5.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_4.5.1.ex" + "e")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_4_5_1_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_4.5.1.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_4.5.2.ex" + "e")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_4_5_2_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_4.5.2.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_4_5_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_4.5.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_4.6.1.ex" + "e")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_4_6_1_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_4.6.1.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_4.6.2.ex" + "e")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_4_6_2_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_4.6.2.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_4_6_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_4.6.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_4_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_4.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_VS_Core_1.0" + ".dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_VS_Core_1_0_Dll() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_VS_Core_1.0.dll", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_Xamarin_2.0" + ".exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_Xamarin_2_0_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_Xamarin_2.0.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_Xamarin_4.0" + ".exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_0_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.0.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_Xamarin_4.0" + "Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_0Client_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.0Client.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_Xamarin_4.5" + ".1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_1_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.1.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_Xamarin_4.5" + ".2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_2_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.2.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_Xamarin_4.5" + ".exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_5_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.5.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_Xamarin_4.6" + ".1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_6_1_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.6.1.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Storage Header from a file check values: HelloWorld_Xamarin_4.6" + ".exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:fFlags", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:padding", "0x0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iStreams", "0x5")] public virtual void ReadTheMetadataStorageHeaderFromAFileCheckValues_HelloWorld_Xamarin_4_6_Exe() { this.ReadTheMetadataStorageHeaderFromAFileCheckValues("HelloWorld_Xamarin_4.6.exe", "0x0", "0x0", "0x5", ((string[])(null))); #line hidden } public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues(string fileName, string rcName, string iOffset, string iSize, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Read the Metadata Stream Headers from a file check values", exampleTags); #line 250 this.ScenarioSetup(scenarioInfo); #line 251 testRunner.Given(string.Format("a PECOFF binary file named {0}", fileName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line 252 testRunner.When("I read in the MSDOS20Section", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line 253 testRunner.And("I read in the COFFHeader", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 254 testRunner.And("I read in the COFFOptionalHeaderStandardFields", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 255 testRunner.And("I read in the OptionalHeaderDataDirectories", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 256 testRunner.And("I read the SectionTables", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 257 testRunner.And("I read the CLR Header", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 258 testRunner.And("I read the General Metadata Header", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 259 testRunner.And("I read the Metadata Storage Header", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 260 testRunner.And("I read the Metadata Stream Headers", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 261 testRunner.Then(string.Format("if the rcName is {0}", rcName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line 262 testRunner.Then(string.Format("the iOffset should be {0}", iOffset), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line 263 testRunner.And(string.Format("the iSize should be {0}", iSize), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden this.ScenarioCleanup(); } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x104")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant0() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_2.0.exe", "#~", "0x6C", "0x104", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 1")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x104")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant1() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_3.5.exe", "#~", "0x6C", "0x104", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 2")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x104")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant2() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_4.0.exe", "#~", "0x6C", "0x104", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 3")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 3")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1D0")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant3() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_2.0.exe", "#~", "0x6C", "0x1D0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 4")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 4")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1D0")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant4() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_3.0.exe", "#~", "0x6C", "0x1D0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 5")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1D0")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant5() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_3.5.exe", "#~", "0x6C", "0x1D0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 6")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 6")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1E4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant6() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.1.exe", "#~", "0x6C", "0x1E4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 7")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 7")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1E4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant7() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.2.exe", "#~", "0x6C", "0x1E4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1E4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant8() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.exe", "#~", "0x6C", "0x1E4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 9")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 9")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1E4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant9() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.1.exe", "#~", "0x6C", "0x1E4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 10")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 10")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1E4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant10() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.2.exe", "#~", "0x6C", "0x1E4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 11")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 11")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1E4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant11() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.exe", "#~", "0x6C", "0x1E4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 12")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 12")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1E4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant12() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.exe", "#~", "0x6C", "0x1E4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 13")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 13")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1E0")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant13() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_Core_1.0.dll", "#~", "0x6C", "0x1E0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 14")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 14")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x170")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant14() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_2.0.exe", "#~", "0x6C", "0x170", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 15")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 15")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x184")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant15() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.0.exe", "#~", "0x6C", "0x184", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 16")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 16")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x184")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant16() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.0Client.exe", "#~", "0x6C", "0x184", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 17")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 17")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x184")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant17() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.1.exe", "#~", "0x6C", "0x184", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 18")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 18")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x184")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant18() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.2.exe", "#~", "0x6C", "0x184", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 19")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 19")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x184")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant19() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.exe", "#~", "0x6C", "0x184", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 20")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 20")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x184")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant20() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.6.1.exe", "#~", "0x6C", "0x184", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 21")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 21")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#~")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x6C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x184")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant21() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.6.exe", "#~", "0x6C", "0x184", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 22")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 22")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x170")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x100")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant22() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_2.0.exe", "#Strings", "0x170", "0x100", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 23")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 23")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x170")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x100")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant23() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_3.5.exe", "#Strings", "0x170", "0x100", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 24")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 24")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x170")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x100")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant24() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_4.0.exe", "#Strings", "0x170", "0x100", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 25")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 25")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x23C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x258")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant25() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_2.0.exe", "#Strings", "0x23C", "0x258", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 26")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 26")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x23C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x258")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant26() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_3.0.exe", "#Strings", "0x23C", "0x258", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 27")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 27")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x23C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x258")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant27() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_3.5.exe", "#Strings", "0x23C", "0x258", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 28")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 28")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x250")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x28C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant28() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.1.exe", "#Strings", "0x250", "0x28C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 29")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 29")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x250")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x28C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant29() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.2.exe", "#Strings", "0x250", "0x28C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 30")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 30")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x250")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x288")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant30() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.exe", "#Strings", "0x250", "0x288", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 31")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 31")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x250")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x28C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant31() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.1.exe", "#Strings", "0x250", "0x28C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 32")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 32")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x250")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x28C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant32() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.2.exe", "#Strings", "0x250", "0x28C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 33")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 33")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x250")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x288")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant33() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.exe", "#Strings", "0x250", "0x288", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 34")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 34")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x250")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x284")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant34() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.exe", "#Strings", "0x250", "0x284", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 35")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 35")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x24C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x264")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant35() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_Core_1.0.dll", "#Strings", "0x24C", "0x264", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 36")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 36")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x1DC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C0")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant36() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_2.0.exe", "#Strings", "0x1DC", "0x1C0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 37")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 37")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x1F0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1F4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant37() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.0.exe", "#Strings", "0x1F0", "0x1F4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 38")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 38")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x1F0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x208")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant38() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.0Client.exe", "#Strings", "0x1F0", "0x208", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 39")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 39")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x1F0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1F8")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant39() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.1.exe", "#Strings", "0x1F0", "0x1F8", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 40")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 40")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x1F0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1F8")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant40() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.2.exe", "#Strings", "0x1F0", "0x1F8", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 41")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 41")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x1F0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1F4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant41() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.exe", "#Strings", "0x1F0", "0x1F4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 42")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 42")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x1F0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1F8")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant42() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.6.1.exe", "#Strings", "0x1F0", "0x1F8", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 43")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Strings")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x1F0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1F4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant43() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.6.exe", "#Strings", "0x1F0", "0x1F4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 44")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 44")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x270")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant44() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_2.0.exe", "#US", "0x270", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 45")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 45")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x270")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant45() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_3.5.exe", "#US", "0x270", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 46")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 46")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x270")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant46() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_4.0.exe", "#US", "0x270", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 47")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 47")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x494")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant47() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_2.0.exe", "#US", "0x494", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 48")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x494")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant48() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_3.0.exe", "#US", "0x494", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 49")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 49")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x494")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant49() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_3.5.exe", "#US", "0x494", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 50")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 50")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4DC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant50() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.1.exe", "#US", "0x4DC", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 51")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 51")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4DC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant51() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.2.exe", "#US", "0x4DC", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 52")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 52")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4D8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant52() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.exe", "#US", "0x4D8", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 53")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 53")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4DC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant53() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.1.exe", "#US", "0x4DC", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 54")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 54")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4DC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant54() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.2.exe", "#US", "0x4DC", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 55")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 55")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4D8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant55() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.exe", "#US", "0x4D8", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 56")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 56")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4D4")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant56() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.exe", "#US", "0x4D4", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 57")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 57")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4B0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant57() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_Core_1.0.dll", "#US", "0x4B0", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 58")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 58")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x39C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant58() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_2.0.exe", "#US", "0x39C", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 59")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 59")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x3E4")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant59() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.0.exe", "#US", "0x3E4", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 60")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 60")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x3F8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant60() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.0Client.exe", "#US", "0x3F8", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 61")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 61")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x3E8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant61() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.1.exe", "#US", "0x3E8", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 62")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 62")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x3E8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant62() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.2.exe", "#US", "0x3E8", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 63")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 63")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x3E4")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant63() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.exe", "#US", "0x3E4", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 64")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 64")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x3E8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant64() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.6.1.exe", "#US", "0x3E8", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 65")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 65")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#US")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x3E4")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x1C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant65() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.6.exe", "#US", "0x3E4", "0x1C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 66")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 66")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x28C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant66() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_2.0.exe", "#GUID", "0x28C", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 67")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 67")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x28C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant67() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_3.5.exe", "#GUID", "0x28C", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 68")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 68")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x28C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant68() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_4.0.exe", "#GUID", "0x28C", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 69")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 69")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4B0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant69() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_2.0.exe", "#GUID", "0x4B0", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 70")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 70")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4B0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant70() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_3.0.exe", "#GUID", "0x4B0", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 71")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 71")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4B0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant71() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_3.5.exe", "#GUID", "0x4B0", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 72")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 72")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4F8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant72() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.1.exe", "#GUID", "0x4F8", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 73")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 73")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4F8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant73() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.2.exe", "#GUID", "0x4F8", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 74")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 74")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4F4")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant74() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.exe", "#GUID", "0x4F4", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 75")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 75")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4F8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant75() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.1.exe", "#GUID", "0x4F8", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 76")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 76")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4F8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant76() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.2.exe", "#GUID", "0x4F8", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 77")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 77")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4F4")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant77() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.exe", "#GUID", "0x4F4", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 78")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 78")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4F0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant78() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.exe", "#GUID", "0x4F0", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 79")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 79")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4CC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant79() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_Core_1.0.dll", "#GUID", "0x4CC", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 80")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 80")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x3B8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant80() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_2.0.exe", "#GUID", "0x3B8", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 81")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 81")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x400")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant81() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.0.exe", "#GUID", "0x400", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 82")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 82")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x414")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant82() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.0Client.exe", "#GUID", "0x414", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 83")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 83")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x404")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant83() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.1.exe", "#GUID", "0x404", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 84")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 84")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x404")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant84() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.2.exe", "#GUID", "0x404", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 85")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 85")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x400")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant85() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.exe", "#GUID", "0x400", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 86")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 86")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x404")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant86() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.6.1.exe", "#GUID", "0x404", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 87")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 87")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#GUID")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x400")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x10")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant87() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.6.exe", "#GUID", "0x400", "0x10", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 88")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 88")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x29C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x50")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant88() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_2.0.exe", "#Blob", "0x29C", "0x50", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 89")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 89")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x29C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x50")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant89() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_3.5.exe", "#Blob", "0x29C", "0x50", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 90")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 90")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_CSC_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x29C")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x50")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant90() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_CSC_4.0.exe", "#Blob", "0x29C", "0x50", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 91")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 91")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4C0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xF0")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant91() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_2.0.exe", "#Blob", "0x4C0", "0xF0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 92")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 92")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4C0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xEC")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant92() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_3.0.exe", "#Blob", "0x4C0", "0xEC", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 93")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 93")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_3.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4C0")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xEC")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant93() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_3.5.exe", "#Blob", "0x4C0", "0xEC", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 94")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 94")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x508")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x13C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant94() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.1.exe", "#Blob", "0x508", "0x13C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 95")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 95")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x508")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x13C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant95() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.2.exe", "#Blob", "0x508", "0x13C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 96")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 96")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x504")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x134")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant96() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.5.exe", "#Blob", "0x504", "0x134", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 97")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 97")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x508")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x13C")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant97() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.1.exe", "#Blob", "0x508", "0x13C", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 98")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 98")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x508")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x128")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant98() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.2.exe", "#Blob", "0x508", "0x128", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 99")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 99")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x504")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x134")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant99() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.6.exe", "#Blob", "0x504", "0x134", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 100")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 100")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_4.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x500")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x130")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant100() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_4.exe", "#Blob", "0x500", "0x130", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 101")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 101")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_VS_Core_1.0.dll")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x4DC")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xF0")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant101() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_VS_Core_1.0.dll", "#Blob", "0x4DC", "0xF0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 102")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 102")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_2.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x3C8")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0x78")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant102() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_2.0.exe", "#Blob", "0x3C8", "0x78", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 103")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 103")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x410")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xB0")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant103() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.0.exe", "#Blob", "0x410", "0xB0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 104")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 104")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.0Client.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x424")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xC4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant104() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.0Client.exe", "#Blob", "0x424", "0xC4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 105")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 105")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x414")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xB4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant105() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.1.exe", "#Blob", "0x414", "0xB4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 106")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 106")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.2.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x414")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xB4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant106() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.2.exe", "#Blob", "0x414", "0xB4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 107")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 107")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.5.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x410")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xB0")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant107() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.5.exe", "#Blob", "0x410", "0xB0", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 108")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 108")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.1.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x414")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xB4")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant108() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.6.1.exe", "#Blob", "0x414", "0xB4", ((string[])(null))); #line hidden } [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Read the Metadata Stream Headers from a file check values: Variant 109")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TextSection")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 109")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:File Name", "HelloWorld_Xamarin_4.6.exe")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:rcName", "#Blob")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iOffset", "0x410")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:iSize", "0xB0")] public virtual void ReadTheMetadataStreamHeadersFromAFileCheckValues_Variant109() { this.ReadTheMetadataStreamHeadersFromAFileCheckValues("HelloWorld_Xamarin_4.6.exe", "#Blob", "0x410", "0xB0", ((string[])(null))); #line hidden } } } #pragma warning restore #endregion
85.659791
390
0.752569
[ "MIT" ]
lsmithmier/DissectPECOFFBinary
DissectPECOFFBinary.SpecFlow/TextSection.feature.cs
353,006
C#
// SPDX-License-Identifier: MIT // ATTENTION: This file is automatically generated. Do not edit manually. #nullable enable namespace GISharp.Lib.GIRepository { /// <include file="ScopeType.xmldoc" path="declaration/member[@name='ScopeType']/*" /> public enum ScopeType { /// <include file="ScopeType.xmldoc" path="declaration/member[@name='ScopeType.Invalid']/*" /> Invalid = 0, /// <include file="ScopeType.xmldoc" path="declaration/member[@name='ScopeType.Call']/*" /> Call = 1, /// <include file="ScopeType.xmldoc" path="declaration/member[@name='ScopeType.Async']/*" /> Async = 2, /// <include file="ScopeType.xmldoc" path="declaration/member[@name='ScopeType.Notified']/*" /> Notified = 3 } }
43.166667
103
0.640927
[ "MIT" ]
dlech/gisharp
src/Lib/GIRepository-2.0/ScopeType.Generated.cs
777
C#
// // AssemblyInfo.cs // // Author: // Jim Borden <jim.borden@couchbase.com> // // Copyright (c) 2016 Couchbase, Inc 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. // using System.Runtime.CompilerServices; using System.Reflection; [assembly: AssemblyTitle ("Couchbase.Lite.Storage.ForestDB")] [assembly: AssemblyDescription("Plugin for using ForestDB with Couchbase Lite")] [assembly: AssemblyCompany("Couchbase, Inc")] [assembly: AssemblyCopyright ("2016")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)] //[assembly: AssemblyKeyFile("")] [assembly: InternalsVisibleTo("Couchbase.Lite.Net45.Tests")] [assembly: InternalsVisibleTo("Couchbase.Lite.Android.Tests")] [assembly: InternalsVisibleTo("CouchbaseLiteiOSTests")] [assembly: InternalsVisibleTo("Couchbase.Lite.Net35.Tests")] [assembly: InternalsVisibleTo("Couchbase.Lite.Unity.Tests")]
36.452381
81
0.7629
[ "Apache-2.0" ]
brettharrisonzya/couchbase-lite-net
src/StorageEngines/ForestDB/storage.forestdb.shared/src/AssemblyInfo.cs
1,533
C#
using FoxTunes.Interfaces; using ManagedBass; using System; using System.Collections.Generic; using System.Linq; namespace FoxTunes { public class BassStreamFactory : StandardComponent, IBassStreamFactory { public BassStreamFactory() { this.Advisors = new List<IBassStreamAdvisor>(); this.Providers = new List<IBassStreamProvider>(); } private List<IBassStreamAdvisor> Advisors { get; set; } private List<IBassStreamProvider> Providers { get; set; } IEnumerable<IBassStreamAdvisor> IBassStreamFactory.Advisors { get { return this.Advisors; } } IEnumerable<IBassStreamProvider> IBassStreamFactory.Providers { get { return this.Providers; } } public IBassOutput Output { get; private set; } public override void InitializeComponent(ICore core) { this.Output = core.Components.Output as IBassOutput; base.InitializeComponent(core); } public void Register(IBassStreamAdvisor advisor) { this.Advisors.Add(advisor); Logger.Write(this, LogLevel.Debug, "Registered bass stream advisor \"{0}\".", advisor.GetType().Name); } public void Register(IBassStreamProvider provider) { this.Providers.Add(provider); Logger.Write(this, LogLevel.Debug, "Registered bass stream provider \"{0}\".", provider.GetType().Name); } public IEnumerable<IBassStreamAdvice> GetAdvice(IBassStreamProvider provider, PlaylistItem playlistItem) { var advice = new List<IBassStreamAdvice>(); foreach (var advisor in this.Advisors) { advisor.Advise(provider, playlistItem, advice); } return advice.ToArray(); } public IEnumerable<IBassStreamProvider> GetProviders(PlaylistItem playlistItem) { return this.Providers.Where( provider => provider.CanCreateStream(playlistItem) ).ToArray(); } public IBassStream CreateBasicStream(PlaylistItem playlistItem, BassFlags flags) { flags |= BassFlags.Decode; Logger.Write(this, LogLevel.Debug, "Attempting to create stream for file \"{0}\".", playlistItem.FileName); var provider = this.GetProviders(playlistItem).FirstOrDefault(); if (provider == null) { Logger.Write(this, LogLevel.Warn, "No provider was found for file \"{0}\".", playlistItem.FileName); return BassStream.Empty; } Logger.Write(this, LogLevel.Debug, "Using bass stream provider \"{0}\".", provider.GetType().Name); var advice = this.GetAdvice(provider, playlistItem).ToArray(); var stream = provider.CreateBasicStream(playlistItem, advice, flags); if (stream.ChannelHandle != 0) { Logger.Write(this, LogLevel.Debug, "Created stream from file {0}: {1}", playlistItem.FileName, stream.ChannelHandle); return stream; } if (stream.Errors == Errors.Already && provider.Flags.HasFlag(BassStreamProviderFlags.Serial)) { Logger.Write(this, LogLevel.Debug, "Provider does not support multiple streams."); return stream; } Logger.Write(this, LogLevel.Debug, "Failed to create stream from file {0}: {1}", playlistItem.FileName, Enum.GetName(typeof(Errors), stream.Errors)); return stream; } public IBassStream CreateInteractiveStream(PlaylistItem playlistItem, bool immidiate, BassFlags flags) { flags |= BassFlags.Decode; Logger.Write(this, LogLevel.Debug, "Attempting to create stream for file \"{0}\".", playlistItem.FileName); var provider = this.GetProviders(playlistItem).FirstOrDefault(); if (provider == null) { Logger.Write(this, LogLevel.Warn, "No provider was found for file \"{0}\".", playlistItem.FileName); return BassStream.Empty; } Logger.Write(this, LogLevel.Debug, "Using bass stream provider \"{0}\".", provider.GetType().Name); var advice = this.GetAdvice(provider, playlistItem).ToArray(); var stream = provider.CreateInteractiveStream(playlistItem, advice, flags); if (stream.ChannelHandle != 0) { Logger.Write(this, LogLevel.Debug, "Created stream from file {0}: {1}", playlistItem.FileName, stream.ChannelHandle); return stream; } if (stream.Errors == Errors.Already && provider.Flags.HasFlag(BassStreamProviderFlags.Serial)) { if (immidiate) { Logger.Write(this, LogLevel.Debug, "Provider does not support multiple streams but immidiate playback was requested, releasing active streams."); if (this.ReleaseActiveStreams()) { Logger.Write(this, LogLevel.Debug, "Active streams were released, retrying."); stream = provider.CreateInteractiveStream(playlistItem, advice, flags); if (stream.ChannelHandle != 0) { Logger.Write(this, LogLevel.Debug, "Created stream from file {0}: {1}", playlistItem.FileName, stream.ChannelHandle); return stream; } } else { Logger.Write(this, LogLevel.Debug, "Failed to release active streams."); } } else { return stream; } } Logger.Write(this, LogLevel.Debug, "Failed to create stream from file {0}: {1}", playlistItem.FileName, Enum.GetName(typeof(Errors), stream.Errors)); return stream; } public bool HasActiveStream(string fileName) { return BassOutputStream.Active.Any(stream => string.Equals(stream.FileName, fileName, StringComparison.OrdinalIgnoreCase)); } public bool ReleaseActiveStreams() { foreach (var stream in BassOutputStream.Active) { try { stream.Dispose(); } catch { //Nothing can be done. } } return !BassOutputStream.Active.Any(); } } }
41.288235
166
0.547656
[ "MIT" ]
DJCALIEND/FoxTunes
FoxTunes.Output.Bass/BassStreamFactory.cs
7,021
C#
using System; namespace MultiplicationSign { class MultiplicationSign { static void Main() { double a = double.Parse(Console.ReadLine()); double b = double.Parse(Console.ReadLine()); double c = double.Parse(Console.ReadLine()); char result; if (a == 0 || b == 0 || c == 0) { result = '0'; } else if ((a < 0 && b < 0 && c < 0) || (a < 0 && b > 0 && c > 0) || (a > 0 && b < 0 && c > 0) || (a > 0 && b > 0 && c < 0)) { result = '-'; } else { result = '+'; } Console.WriteLine(result); } } }
25.586207
134
0.359838
[ "MIT" ]
IvayloDamyanov/CSharp-Fundamentals
05. Conditional-Statements/04. Multiplication Sign/MultiplicationSign.cs
744
C#
using Microsoft.AspNetCore.Components.Builder; using Microsoft.Extensions.DependencyInjection; namespace CodeGeneratedHtmlAttributes { public class Startup { public void ConfigureServices(IServiceCollection services) { } public void Configure(IComponentsApplicationBuilder app) { app.AddComponent<App>("app"); } } }
18.666667
60
0.782738
[ "MIT" ]
BlazorHub/blazor-university
src/Components/CodeGeneratedHtmlAttributes/Startup.cs
336
C#
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; using System.Collections.Generic; using System.Linq; namespace Microsoft.Identity.Client.Utils { internal static class ScopeHelper { public static bool ScopeContains(ISet<string> outerSet, IEnumerable<string> possibleContainedSet) { foreach (string key in possibleContainedSet) { if (!outerSet.Contains(key, StringComparer.OrdinalIgnoreCase)) { return false; } } return true; } internal static SortedSet<string> ConvertStringToLowercaseSortedSet(string singleString) { if (string.IsNullOrEmpty(singleString)) { return new SortedSet<string>(); } return new SortedSet<string>(singleString.ToLowerInvariant().Split(new[] { " " }, StringSplitOptions.None)); } internal static SortedSet<string> CreateSortedSetFromEnumerable(IEnumerable<string> input) { if (input == null || !input.Any()) { return new SortedSet<string>(); } return new SortedSet<string>(input); } } }
29.066667
120
0.581804
[ "MIT" ]
DaehyunLee/microsoft-authentication-library-for-dotnet
src/client/Microsoft.Identity.Client/Utils/ScopeHelper.cs
1,310
C#
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using NUnit.Framework; using System.Diagnostics; namespace Gt.SubProcess.UnitTests { [TestFixture] public static class Test_SubProcess { const string echoArgs = "Gt.SubProcess/echo-args.exe"; // echo-args [--error ERROR-TEXT] [--exit EXIT-CODE] [--wait SECONDS] [--pwd] [TEXT...] static string _(string str) { // translate LF to CRLF on Windows if (Environment.OSVersion.IsWindows()) return str.Replace("\n", "\r\n"); else return str; } [Test] public static void Test_SubProcess_calls() { // params versions SubProcess.Call(echoArgs, "1", "2", "3"); SubProcess.CheckCall(echoArgs, "4", "5"); SubProcess.CheckOutput(echoArgs, "A", "B", "C").With(_("A\nB\nC\n")); // IEnumerable<string> versions List<string> args = new List<string> { echoArgs, "10", "20", "30" }; SubProcess.Call(args); args = new List<string> { echoArgs, "40", "50" }; SubProcess.CheckCall(args); args = new List<string> { echoArgs, "ABBA", "BBQ", "CQ" }; SubProcess.CheckOutput(args).With(_("ABBA\nBBQ\nCQ\n")); SubProcess s = new SubProcess(echoArgs, "an arg", "another arg", "--error", "some error"); s.Wait(); Assert.AreEqual(_("an arg\nanother arg\n"), s.OutputString); Assert.AreEqual(_("some error\n"), s.ErrorString); args = new List<string> { echoArgs, "an arg", "another arg", "--error", "some error" }; s = new SubProcess(args); s.Check(); Assert.AreEqual(_("an arg\nanother arg\n"), s.OutputString); Assert.AreEqual(_("some error\n"), s.ErrorString); s = new SubProcess(echoArgs, "hello"); int rc = s.Wait(); Assert.AreEqual(0, rc); s = new SubProcess(echoArgs, "hello", "--exit", "3"); rc = s.Wait(); Assert.AreEqual(3, rc); // captured stderr on failure args = new List<string> { echoArgs, "hello", "--error", "FAILED", "--exit", "1" }; s = new SubProcess(args); SubProcess.Failed failed = Assert.Throws<SubProcess.Failed>(() => { s.Check(); }); Assert.AreEqual(_("FAILED\n"), failed.ErrorOutput); Assert.AreEqual(1, failed.ExitCode); Assert.IsTrue(failed.Message.Contains("FAILED")); // did not capture stderr on failyre args = new List<string> { echoArgs, "hello", "--error", "FAILED", "--exit", "1" }; s = new SubProcess(args) { Error = SubProcess.Through }; failed = Assert.Throws<SubProcess.Failed>(() => { s.Check(); }); Assert.AreEqual(1, failed.ExitCode); // Out tests s = new SubProcess(echoArgs, "helllo world") { Out = SubProcess.Swallow }; s.Wait(); s = new SubProcess(echoArgs, "helllo world") { Out = SubProcess.Through }; s.Wait(); string filename = Path.Combine(Path.GetTempPath(), "Test_SubProcess-" + Path.GetRandomFileName() + ".tmp"); FileStream fs = new FileStream(filename, FileMode.CreateNew); s = new SubProcess(echoArgs, "hello world", "--error", "something has", "--error", "failed") { Out = fs }; s.Wait(); fs.Close(); string fileContents = ReadFile(filename); Assert.AreEqual(_("hello world\n"), fileContents); File.Delete(filename); // Error tests s = new SubProcess(echoArgs, "hello world") { Error = SubProcess.Swallow }; s.Wait(); s = new SubProcess(echoArgs, "hello world") { Error = SubProcess.Through }; s.Wait(); s = new SubProcess(echoArgs, "hello world", "--error", "error message") { Error = SubProcess.ToOut }; s.Wait(); Assert.AreEqual(_("hello world\nerror message\n"), s.OutputString); s = new SubProcess(echoArgs, "hello world", "--error", "error message"); s.Wait(); Assert.AreEqual(_("hello world\n"), s.OutputString); Assert.AreEqual(_("error message\n"), s.ErrorString); filename = Path.Combine(Path.GetTempPath(), "Test_SubProcess-" + Path.GetRandomFileName() + ".tmp"); fs = new FileStream(filename, FileMode.CreateNew); s = new SubProcess(echoArgs, "hello world", "--error", "something has", "--error", "failed") { Error = fs }; s.Wait(); fs.Close(); fileContents = ReadFile(filename); Assert.AreEqual(_("something has\nfailed\n"), fileContents); File.Delete(filename); // redirect both to files filename = Path.Combine(Path.GetTempPath(), "Test_SubProcess-" + Path.GetRandomFileName() + ".tmp"); string filenameError = Path.Combine(Path.GetTempPath(), "Test_SubProcess-error-" + Path.GetRandomFileName() + ".tmp"); fs = new FileStream(filename, FileMode.CreateNew); FileStream fsError = new FileStream(filenameError, FileMode.CreateNew); s = new SubProcess(echoArgs, "hello world", "--error", "something has", "--error", "failed") { Out = fs, Error = fsError }; s.Wait(); fs.Close(); fsError.Close(); fileContents = ReadFile(filename); Assert.AreEqual(_("hello world\n"), fileContents); string fileContentsError = ReadFile(filenameError); Assert.AreEqual(_("something has\nfailed\n"), fileContentsError); File.Delete(filename); File.Delete(filenameError); } static string ReadFile(string filename) { using (FileStream fs = new FileStream(filename, FileMode.Open)) { StreamReader sr = new StreamReader(fs); StringBuilder buffer = new StringBuilder(); char[] block = new char[1024]; for (;;) { int chars = sr.ReadBlock(block, 0, block.Length); buffer.Append(block, 0, chars); if (chars < block.Length) break; } return buffer.ToString(); } } [Test] public static void Test_SubProcess_Commandline_Forming() { SubProcess.CheckOutput(echoArgs, "A", "B", "C").With(_("A\nB\nC\n")); SubProcess.CheckOutput(echoArgs, "A B", "C").With(_("A B\nC\n")); SubProcess.CheckOutput(echoArgs, "A\"B", "C").With(_("A\"B\nC\n")); SubProcess.CheckOutput(echoArgs, "A \\B", "C").With(_("A \\B\nC\n")); SubProcess.CheckOutput(echoArgs, "A \\\\B", "C").With(_("A \\\\B\nC\n")); SubProcess.CheckOutput(echoArgs, "A \\\\\"B", "C").With(_("A \\\\\"B\nC\n")); SubProcess.CheckOutput(echoArgs, "A \"B", "C").With(_("A \"B\nC\n")); SubProcess.CheckOutput(echoArgs, "A\\B", "C").With(_("A\\B\nC\n")); SubProcess.CheckOutput(echoArgs, "A\\\\B", "C").With(_("A\\\\B\nC\n")); SubProcess.CheckOutput(echoArgs, "A\\\\\"B", "C").With(_("A\\\\\"B\nC\n")); SubProcess.CheckOutput(echoArgs, "A\"B", "C").With(_("A\"B\nC\n")); SubProcess.CheckOutput(echoArgs, "").With(_("\n")); SubProcess.CheckOutput(echoArgs, "A\"B", "C").With(_("A\"B\nC\n")); SubProcess.CheckOutput(echoArgs, "A\\\"B", "C").With(_("A\\\"B\nC\n")); SubProcess.CheckOutput(echoArgs, "A\\\\\"B", "C").With(_("A\\\\\"B\nC\n")); SubProcess.CheckOutput(echoArgs, "A\\\\\\\"B", "C").With(_("A\\\\\\\"B\nC\n")); } [Test] public static void Test_SubProcess_IDisposable_alreadyExited() { SubProcess sp; using (sp = new SubProcess(echoArgs, "A", "B")) { sp.Start(); while (sp.IsAlive) Thread.Sleep(100); } Assert.IsTrue(sp.HasExited); } [Test] public static void Test_SubProcess_IDisposable_kills() { SubProcess sp; using (sp = new SubProcess(echoArgs, "--wait")) { sp.Start(); Assert.IsTrue(sp.IsAlive); } sp.Wait(); Assert.IsFalse(sp.IsAlive); } [Test] public static void Test_SubProcess_multiple_Waits() { SubProcess sp = new SubProcess(echoArgs, "A"); sp.Wait(); Assert.AreEqual(0, sp.Wait()); } [Test] public static void Test_SubProcess_directory() { string cwd = Directory.GetCurrentDirectory(); Directory.SetCurrentDirectory(".."); string parentDir = Directory.GetCurrentDirectory(); Directory.SetCurrentDirectory(cwd); Assert.AreEqual(cwd, Directory.GetCurrentDirectory()); SubProcess sp = new SubProcess(echoArgs, "--pwd") { Directory = parentDir }; sp.Wait(); Assert.AreEqual(sp.OutputString, _(parentDir + "\n")); } [Test] public static void Test_SubProcess_no_timeout() { SubProcess sp = new SubProcess(echoArgs, "a") { Timeout = 99999 }; sp.Wait(); } [Test] public static void Test_SubProcess_timeout() { using (SubProcess sp = new SubProcess(echoArgs, "--wait", "100") { Timeout = 0.1 }) { Assert.Throws<SubProcess.TimeoutException>(() => sp.Wait()); } } [Test] public static void Test_SubProcess_timeout_close() { // although echo-args closes stdout and stderr the read stdout and stderr // tasks do not complete before the timeout, as with non --close case using (SubProcess sp = new SubProcess(echoArgs, "--close", "--wait", "100") { Timeout = 0.1 }) { Assert.Throws<SubProcess.TimeoutException>(() => sp.Wait()); } } [Test] public static void Test_SubProcess_no_timeout_async() { SubProcess sp = new SubProcess(echoArgs, "a") { Timeout = 99999 }; Task<int> task = sp.WaitAsync(); task.Wait(); } [Test] public static void Test_SubProcess_timeout_async() { using (SubProcess sp = new SubProcess(echoArgs, "--wait", "100") { Timeout = 0.1 }) { try { sp.WaitAsync().Wait(); Assert.Fail("Did not throw on timeout"); } catch (AggregateException ae) { Assert.AreEqual(1, ae.InnerExceptions.Count); Assert.IsTrue(ae.InnerExceptions[0] is SubProcess.TimeoutException); } } } [Test] public static void Test_SubProcess_async() { SubProcess sp = new SubProcess(echoArgs, "--exit", "2"); Task<int> task = sp.WaitAsync(); task.Wait(); Assert.AreEqual(2, task.Result); } [Test] public static void Test_SubProcess_check_async() { SubProcess sp = new SubProcess(echoArgs, "--exit", "2"); Task task = sp.CheckAsync(); try { task.Wait(); Assert.Fail("Did not throw on timeout"); } catch (AggregateException ae) { Assert.AreEqual(1, ae.InnerExceptions.Count); Assert.IsTrue(ae.InnerExceptions[0] is SubProcess.Failed); } } [Test] public static void Test_SubProcess_async_output_redirect() { MemoryStream ms = new MemoryStream(); SubProcess sp = new SubProcess(echoArgs, "Hello", "--exit", "2") { Out = ms }; Task<int> task = sp.WaitAsync(); task.Wait(); Assert.AreEqual(2, task.Result); byte[] bytes = ms.GetBuffer(); ms = new MemoryStream(bytes); StreamReader tr = new StreamReader(ms); Assert.AreEqual("Hello", tr.ReadLine()); } [Test] public static void Test_SubProcess_invaid_input() { Assert.Throws<ArgumentException>(() => new SubProcess(echoArgs) { In = SubProcess.ToOut }); Assert.Throws<ArgumentException>(() => new SubProcess(echoArgs) { In = SubProcess.Capture }); new SubProcess(echoArgs) { In = SubProcess.Swallow }.Wait(); new SubProcess(echoArgs) { In = SubProcess.Through }.Wait(); new SubProcess(echoArgs) { In = SubProcess.Pipe }.Wait(); } [Test] public static void Test_SubProcess_invaid_out() { Assert.Throws<ArgumentException>(() => new SubProcess(echoArgs) { Out = SubProcess.ToOut }); new SubProcess(echoArgs) { Out = SubProcess.Pipe }.Wait(); new SubProcess(echoArgs) { Out = SubProcess.Capture }.Wait(); new SubProcess(echoArgs) { Out = SubProcess.Through }.Wait(); new SubProcess(echoArgs) { Out = SubProcess.Swallow }.Wait(); } [Test] public static void Test_SubProcess_invaid_error() { new SubProcess(echoArgs) { Error = SubProcess.ToOut }.Wait(); new SubProcess(echoArgs) { Error = SubProcess.Pipe }.Wait(); new SubProcess(echoArgs) { Error = SubProcess.Capture }.Wait(); new SubProcess(echoArgs) { Error = SubProcess.Through }.Wait(); new SubProcess(echoArgs) { Error = SubProcess.Swallow }.Wait(); } [Test] public static void Test_SubProcess_no_tasks() { // internally no Tasks for redirecting stdout and stderr SubProcess sp = new SubProcess(echoArgs, "hello") { Out = SubProcess.Through, Error = SubProcess.Through }; sp.Wait(); // timeout version sp = new SubProcess(echoArgs, "hello") { Out = SubProcess.Through, Error = SubProcess.Through, Timeout = 99999 }; sp.Wait(); // wait for a while in the task sp = new SubProcess(echoArgs, "hello", "--wait", "0.1") { Out = SubProcess.Through, Error = SubProcess.Through }; sp.Wait(); } class DeleteFile : IDisposable { // remember to delete the give file string Filename; public DeleteFile(string filename) { Filename = filename; } public void Dispose() { if (File.Exists(Filename)) { try { File.Delete(Filename); } catch { // ignore } } } } [Test] public static void Test_SubProcess_input_file() { string line = "a line of input"; string filename = Path.Combine(Path.GetTempPath(), "Test_SubProcess-" + Path.GetRandomFileName() + ".tmp"); Stream fs = new FileStream(filename, FileMode.CreateNew); StreamWriter sw = new StreamWriter(fs); for (int i = 0; i < 20; ++i) sw.WriteLine(line); sw.Close(); fs.Close(); fs = new FileStream(filename, FileMode.Open); byte[] buffer = new byte[17]; fs.Read(buffer, 0, 17); SubProcess sp = new SubProcess(echoArgs, "--input") { In = fs }; sp.Wait(); Assert.AreEqual(_(line.ToUpper() + "\n"), sp.OutputString); fs.Close(); File.Delete(filename); } [Test] public static void Test_SubProcess_input_memoryStream() { string line = "a line of input"; MemoryStream ms = new MemoryStream(); StreamWriter sw = new StreamWriter(ms) { AutoFlush = true }; sw.WriteLine(line); byte[] bytes = ms.GetBuffer(); long len = ms.Length; ms = new MemoryStream(bytes, 0, (int)len); SubProcess sp = new SubProcess(echoArgs, "--input") { In = ms }; sp.Wait(); Assert.AreEqual(_(line.ToUpper() + "\n"), sp.OutputString); } [Test] public static void Test_SubProcess_input_pipe_write() { string line = "some input"; SubProcess sp = new SubProcess(echoArgs, "--input") { In = SubProcess.Pipe }; sp.Start(); sp.Write(line + "\n"); sp.Wait(); Assert.AreEqual(_(line.ToUpper() + "\n"), sp.OutputString); } [Test] public static void Test_SubProcess_input_pipe_writeline() { string line = "some input"; SubProcess sp = new SubProcess(echoArgs, "--input") { In = SubProcess.Pipe }; sp.Start(); sp.WriteLine(line); sp.Wait(); Assert.AreEqual(_(line.ToUpper() + "\n"), sp.OutputString); } [Test] public static void Test_SubProcess_input_pipe_writeBinary() { string line = "some input"; MemoryStream ms = new MemoryStream(); StreamWriter sw = new StreamWriter(ms); sw.WriteLine(line); sw.Flush(); byte[] bytes = ms.GetBuffer(); SubProcess sp = new SubProcess(echoArgs, "--input") { In = SubProcess.Pipe }; sp.Start(); sp.Write(bytes, 0, (int)ms.Length); sp.Wait(); Assert.AreEqual(_(line.ToUpper() + "\n"), sp.OutputString); } [Test] public static void Test_process_input() { string dir = Directory.GetCurrentDirectory(); Process p = new Process(); p.StartInfo.FileName = echoArgs; p.StartInfo.UseShellExecute = false; p.StartInfo.Arguments = "--input --wait 0"; p.StartInfo.RedirectStandardInput = true; p.StartInfo.CreateNoWindow = true; p.Start(); p.StandardInput.WriteLine("test line"); p.WaitForExit(); // works: TEST LINE } [Test] public static void Test_process_inputBinary() { string line = "some input"; MemoryStream ms = new MemoryStream(); StreamWriter sw = new StreamWriter(ms); sw.WriteLine(line); sw.Flush(); byte[] bytes = ms.GetBuffer(); Process p = new Process(); p.StartInfo.FileName = echoArgs; p.StartInfo.UseShellExecute = false; p.StartInfo.Arguments = "--input --wait 0"; p.StartInfo.RedirectStandardInput = true; p.StartInfo.CreateNoWindow = true; p.Start(); p.StandardInput.BaseStream.Write(bytes, 0, (int)ms.Length); p.StandardInput.BaseStream.Flush(); p.WaitForExit(); // works: SOME INPUT } [Test] public static void Test_SubProcess_outputPipe_OutputReader() { using (SubProcess sp = new SubProcess(echoArgs, "--input", "--input", "--input") { Out = SubProcess.Pipe }) { // OutputReader sp.Start(); string line = "hello subprocess"; sp.WriteLine(line); Assert.AreEqual(line.ToUpper(), sp.OutputReader.ReadLine()); string line2 = "some more text"; sp.WriteLine(line2); Assert.AreEqual(line2.ToUpper(), sp.OutputReader.ReadLine()); } } [Test] public static void Test_SubProcess_outputPipe_OutputStream() { using (SubProcess sp = new SubProcess(echoArgs, "--input", "--input", "--input") { Out = SubProcess.Pipe }) { sp.Start(); // OutputStream string line = "talking to subprocess"; sp.WriteLine(line); MemoryStream ms = new MemoryStream(); StreamWriter sw = new StreamWriter(ms); sw.WriteLine(line.ToUpper()); sw.Flush(); byte[] bytesRaw = ms.GetBuffer(); byte[] bytes = new byte[ms.Length]; Array.Copy(bytesRaw, bytes, ms.Length); byte[] buffer = new byte[ms.Length]; sp.OutputStream.Read(buffer, 0, (int)ms.Length); ms = new MemoryStream(buffer); string str = new StreamReader(ms).ReadToEnd(); Assert.IsTrue(bytes.SequenceEqual(buffer)); string line2 = "more interaction"; sp.WriteLine(line2); ms = new MemoryStream(); sw = new StreamWriter(ms); sw.WriteLine(line2.ToUpper()); sw.Flush(); bytesRaw = ms.GetBuffer(); bytes = new byte[ms.Length]; Array.Copy(bytesRaw, bytes, ms.Length); buffer = new byte[ms.Length]; sp.OutputStream.Read(buffer, 0, (int)ms.Length); Assert.IsTrue(bytes.SequenceEqual(buffer)); } } [Test] public static void Test_SubProcess_errorPipe_ErrorReader() { string line = "a line"; string line2 = "another line"; using (SubProcess sp = new SubProcess(echoArgs, "--error", line, "--error", line2) { Error = SubProcess.Pipe }) { // OutputReader sp.Start(); Assert.AreEqual(line, sp.ErrorReader.ReadLine()); Assert.AreEqual(line2, sp.ErrorReader.ReadLine()); } } [Test] public static void Test_SubProcess_errorPipe_ErrorStream() { string line = "some text"; string line2 = "some more text"; using (SubProcess sp = new SubProcess(echoArgs, "--error", line, "--error", line2) { Error = SubProcess.Pipe }) { sp.Start(); // OutputStream MemoryStream ms = new MemoryStream(); StreamWriter sw = new StreamWriter(ms); sw.WriteLine(line); sw.Flush(); byte[] bytesRaw = ms.GetBuffer(); byte[] bytes = new byte[ms.Length]; Array.Copy(bytesRaw, bytes, ms.Length); byte[] buffer = new byte[ms.Length]; sp.ErrorStream.Read(buffer, 0, (int)ms.Length); Assert.IsTrue(bytes.SequenceEqual(buffer)); ms = new MemoryStream(); sw = new StreamWriter(ms); sw.WriteLine(line2); sw.Flush(); bytesRaw = ms.GetBuffer(); bytes = new byte[ms.Length]; Array.Copy(bytesRaw, bytes, ms.Length); buffer = new byte[ms.Length]; sp.ErrorStream.Read(buffer, 0, (int)ms.Length); Assert.IsTrue(bytes.SequenceEqual(buffer)); } } [Test] public static void Test_SubProcess_utf8() { // output string ourEncWebName = Console.OutputEncoding.WebName; string waterTrebbleClef = "水𝄞"; SubProcess sp = new SubProcess(echoArgs, "--utf8", waterTrebbleClef); sp.Wait(); Assert.AreEqual(_(waterTrebbleClef + "\n"), sp.OutputString); Encoding ourEnc = Console.OutputEncoding; Assert.AreEqual(ourEnc.WebName, ourEncWebName); // has not changed to UTF-8 Assert.AreNotEqual("utf-8", ourEnc.WebName); // error sp = new SubProcess(echoArgs, "--utf8", "--error", waterTrebbleClef); sp.Wait(); Assert.AreEqual(_(waterTrebbleClef + "\n"), sp.ErrorString); // input //sp = new SubProcess(echoArgs, "--utf8", "--input-code-units", "--wait", "9999") sp = new SubProcess(echoArgs, "--utf8", "--input"); sp.Start(); sp.WriteLine(waterTrebbleClef); sp.Wait(); Assert.AreEqual(_(waterTrebbleClef + "\n"), sp.OutputString); } [Test] public static void Test_SubProcess_environment() { string var = "MYVAR"; Assert.AreEqual(null, Environment.GetEnvironmentVariable(var)); string value = "VALUE"; SubProcess sp = new SubProcess(echoArgs, "--env", var) { Environment = { [var] = value } }; sp.Check(); Assert.AreEqual(_(value + "\n"), sp.OutputString); // unicode var = "MYVAR_水𝄞"; Assert.AreEqual(null, Environment.GetEnvironmentVariable(var)); value = "VALUE-水𝄞"; sp = new SubProcess(echoArgs, "--utf8", "--env", var) { Environment = { [var] = value } }; sp.Check(); Assert.AreEqual(_(value + "\n"), sp.OutputString); // existing variable var = "HOMEPATH"; Assert.AreNotEqual(null, Environment.GetEnvironmentVariable(var)); value = "VALUE-水𝄞"; sp = new SubProcess(echoArgs, "--utf8", "--env", var) { Environment = { [var] = value } }; sp.Check(); Assert.AreEqual(_(value + "\n"), sp.OutputString); } [Test] public static void Test_SubProcess_nonUtf8() { Process p = new Process { StartInfo = { FileName = echoArgs, UseShellExecute = false, RedirectStandardOutput = true, RedirectStandardInput = true, CreateNoWindow = true } }; p.Start(); Encoding enc = p.StandardOutput.CurrentEncoding; // Windows-1252 // but SubProcess is actually IBM-850 (capitalises ä to å (in windows-1252) which // is õ to Õ in IBM-850) enc = Encoding.GetEncoding(850); string line = "a line ä"; string line2 = "a line Ë"; SubProcess sp = new SubProcess(echoArgs, "--input", "--error", line2) { OutEncoding = enc, InEncoding = enc, ErrorEncoding = enc }; sp.Start(); sp.WriteLine(line); sp.Wait(); Assert.AreEqual(_(line.ToUpper() + "\n"), sp.OutputString); Assert.AreEqual(_(line2 + "\n"), sp.ErrorString); } [Test] public static void Test_UseShell() { var s = new SubProcess("ls") { In = SubProcess.Through, Out = SubProcess.Through, Error = SubProcess.Through, UseShell = true }; s.Wait(); Assert.Throws<LogicError>( () => new SubProcess("ls") { // In, Out and Errors redirected UseShell = true }.Wait()); Assert.Throws<LogicError>(() => new SubProcess("ls") { // In redirected Out = SubProcess.Through, Error = SubProcess.Through, UseShell = true }.Wait()); Assert.Throws<LogicError>(() => new SubProcess("ls") { // Out redirected In = SubProcess.Through, Error = SubProcess.Through, UseShell = true }.Wait()); Assert.Throws<LogicError>(() => new SubProcess("ls") { // Error redirected In = SubProcess.Through, Out = SubProcess.Through, UseShell = true }.Wait()); } } }
35.945727
131
0.471361
[ "MIT" ]
gene-l-thomas/GeneThomas.SubProcess
Gt.SubProcess.UnitTests/Test_SubProcess.cs
31,157
C#
using System.Threading.Tasks; using Abp.Authorization; using Abp.Runtime.Session; using Cogent.Configuration.Dto; namespace Cogent.Configuration { [AbpAuthorize] public class ConfigurationAppService : CogentAppServiceBase, IConfigurationAppService { public async Task ChangeUiTheme(ChangeUiThemeInput input) { await SettingManager.ChangeSettingForUserAsync(AbpSession.ToUserIdentifier(), AppSettingNames.UiTheme, input.Theme); } } }
28.647059
128
0.75154
[ "MIT" ]
MC-Tortuga/Cogent-Assignment
aspnet-core/src/Cogent.Application/Configuration/ConfigurationAppService.cs
489
C#
namespace GeneralAlgorithms.Algorithms.Polygons { using System; using System.Collections.Generic; using DataStructures.Common; /// <summary> /// Interface for computing when polygons overlap. /// </summary> /// <typeparam name="TShape">This generic type lets us improve performance by using IntAlias.</typeparam> public interface IPolygonOverlap<in TShape> { /// <summary> /// Checks if two polygons overlap. /// </summary> /// <param name="polygon1"></param> /// <param name="position1"></param> /// <param name="polygon2"></param> /// <param name="position2"></param> /// <returns></returns> bool DoOverlap(TShape polygon1, IntVector2 position1, TShape polygon2, IntVector2 position2); /// <summary> /// Computes the area of overlap of two given polygons. /// </summary> /// <param name="polygon1"></param> /// <param name="position1"></param> /// <param name="polygon2"></param> /// <param name="position2"></param> /// <returns></returns> int OverlapArea(TShape polygon1, IntVector2 position1, TShape polygon2, IntVector2 position2); /// <summary> /// Checks if two polygons touch /// </summary> /// <param name="polygon1"></param> /// <param name="position1"></param> /// <param name="polygon2"></param> /// <param name="position2"></param> /// <param name="minimumLength"></param> /// <returns></returns> bool DoTouch(TShape polygon1, IntVector2 position1, TShape polygon2, IntVector2 position2, int minimumLength = 1); /// <summary> /// Returns a list of point where a given moving polygon starts or ends overlapping a given fixed polygon. /// </summary> /// <remarks> /// True - starts overlapping (inclusive) /// False - ends overlapping (inclusive) /// /// The list must be normalized - containing the minimum number of points required. /// Default value of the list is false - empty list means no overlap. /// </remarks> /// <param name="movingPolygon">A polygon that will move along a given line.</param> /// <param name="fixedPolygon">A polygon that stays fixed.</param> /// <param name="line"></param> /// <returns></returns> IList<Tuple<IntVector2, bool>> OverlapAlongLine(TShape movingPolygon, TShape fixedPolygon, OrthogonalLine line); } }
37.65
116
0.678619
[ "MIT" ]
FrancisUsher/ProceduralLevelGenerator
GeneralAlgorithms/Algorithms/Polygons/IPolygonOverlap.cs
2,261
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 AutoCodeGen.Properties { 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", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resource { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resource() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AutoCodeGen.Properties.Resource", typeof(Resource).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// <summary> /// Looks up a localized string similar to The application has expired. Please Contact the software distributer for a new build.. /// </summary> internal static string ApplicationExpired { get { return ResourceManager.GetString("ApplicationExpired", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Jolly Roger&apos;s Autocode Generator. /// </summary> internal static string ApplicationName { get { return ResourceManager.GetString("ApplicationName", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Asp.net Edit Page. /// </summary> internal static string AspCreateEditPage { get { return ResourceManager.GetString("AspCreateEditPage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Asp.net List Page. /// </summary> internal static string AspCreateListPage { get { return ResourceManager.GetString("AspCreateListPage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Asp.net View Page. /// </summary> internal static string AspCreateViewPage { get { return ResourceManager.GetString("AspCreateViewPage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to GlobalConquestGames@gmail.com. /// </summary> internal static string AuthorEmailAddress { get { return ResourceManager.GetString("AuthorEmailAddress", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Connected To:. /// </summary> internal static string ConnectionMessage { get { return ResourceManager.GetString("ConnectionMessage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# base class object. /// </summary> internal static string CsharpCreateBaseClass { get { return ResourceManager.GetString("CsharpCreateBaseClass", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# Dal Object. /// </summary> internal static string CsharpDal { get { return ResourceManager.GetString("CsharpDal", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# Enumeration. /// </summary> internal static string CsharpEnum { get { return ResourceManager.GetString("CsharpEnum", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# Dal Extension Object. /// </summary> internal static string CsharpExtensionDal { get { return ResourceManager.GetString("CsharpExtensionDal", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# Object Interface. /// </summary> internal static string CsharpInterface { get { return ResourceManager.GetString("CsharpInterface", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# Orm Class. /// </summary> internal static string CsharpOrm { get { return ResourceManager.GetString("CsharpOrm", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# Orm Extension Class. /// </summary> internal static string CsharpOrmExtension { get { return ResourceManager.GetString("CsharpOrmExtension", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# Orm Poco Class. /// </summary> internal static string CsharpPoCo { get { return ResourceManager.GetString("CsharpPoCo", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Failed to establish a connection to database. Please check your connection information.. /// </summary> internal static string DbConnectionFailed { get { return ResourceManager.GetString("DbConnectionFailed", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Deselect All. /// </summary> internal static string DeselectAll { get { return ResourceManager.GetString("DeselectAll", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Asp - Generate Css Page. /// </summary> internal static string OptAspCreateCSSPage { get { return ResourceManager.GetString("OptAspCreateCSSPage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Asp - Generate Default Page. /// </summary> internal static string OptAspCreateDefaultPage { get { return ResourceManager.GetString("OptAspCreateDefaultPage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Asp - Generate Master Page. /// </summary> internal static string OptAspCreateMasterPage { get { return ResourceManager.GetString("OptAspCreateMasterPage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Asp - Create Asp page(s) as user control (NYI). /// </summary> internal static string OptAspCreatePageAsConrol { get { return ResourceManager.GetString("OptAspCreatePageAsConrol", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Asp - Generate Web.Config. /// </summary> internal static string OptAspCreateWebConfig { get { return ResourceManager.GetString("OptAspCreateWebConfig", resourceCulture); } } /// <summary> /// Looks up a localized string similar to C# - Convert nullable Db fields to non-nullable. /// </summary> internal static string OptCsharpConvertNullableFields { get { return ResourceManager.GetString("OptCsharpConvertNullableFields", resourceCulture); } } /// <summary> /// Looks up a localized string similar to C# - Include a &apos;Base Class&apos; refrence in objects. /// </summary> internal static string OptCsharpIncludeBaseClassRefrence { get { return ResourceManager.GetString("OptCsharpIncludeBaseClassRefrence", resourceCulture); } } /// <summary> /// Looks up a localized string similar to C# - Include &apos;IsDirty&apos; flag in objects. /// </summary> internal static string OptCsharpIncludeIsDirtyFlag { get { return ResourceManager.GetString("OptCsharpIncludeIsDirtyFlag", resourceCulture); } } /// <summary> /// Looks up a localized string similar to C# - Include SQL class decoration. /// </summary> internal static string OptCsharpIncludeSqlClassDecoration { get { return ResourceManager.GetString("OptCsharpIncludeSqlClassDecoration", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Misc - Remove any existing scripts in folder. /// </summary> internal static string OptMiscRemoveExistingScripts { get { return ResourceManager.GetString("OptMiscRemoveExistingScripts", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sql - Generate sp_TableDetails procedure. /// </summary> internal static string OptSQLCreateHelperSp { get { return ResourceManager.GetString("OptSQLCreateHelperSp", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sql - Generate permissions for db stored procedures. /// </summary> internal static string OptSQLCreateSqlSpPerms { get { return ResourceManager.GetString("OptSQLCreateSqlSpPerms", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sql - Script each Sql object in seperate file. /// </summary> internal static string OptSQLSeperateFiles { get { return ResourceManager.GetString("OptSQLSeperateFiles", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Xml - Generate xml with attributes instead of elements. /// </summary> internal static string OptXmlFormat { get { return ResourceManager.GetString("OptXmlFormat", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Xml - Include Db name as Xml namespace. /// </summary> internal static string OptXmlIncludeNs { get { return ResourceManager.GetString("OptXmlIncludeNs", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Select All. /// </summary> internal static string SelectAll { get { return ResourceManager.GetString("SelectAll", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Please choose the field that will represent the enum key field. This field should probably be a string.. /// </summary> internal static string SelectEnumNameField { get { return ResourceManager.GetString("SelectEnumNameField", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Please choose the field that will represent the enum value field. This field must be an integer.. /// </summary> internal static string SelectEnumValueField { get { return ResourceManager.GetString("SelectEnumValueField", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Please choose one or more fields you wish to include in searches of the {0} table.. /// </summary> internal static string SelectSearchField { get { return ResourceManager.GetString("SelectSearchField", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Please choose one or more fields you wish to use to select values from the {0} table.. /// </summary> internal static string SelectSelectField { get { return ResourceManager.GetString("SelectSelectField", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Please choose one or more fields you wish to sort {0} table queries by.. /// </summary> internal static string SelectSortField { get { return ResourceManager.GetString("SelectSortField", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sql 2000. /// </summary> internal static string Sql2K { get { return ResourceManager.GetString("Sql2K", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sql 2012. /// </summary> internal static string Sql2K12 { get { return ResourceManager.GetString("Sql2K12", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sql 2005. /// </summary> internal static string Sql2K5 { get { return ResourceManager.GetString("Sql2K5", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sql 2008. /// </summary> internal static string Sql2K8 { get { return ResourceManager.GetString("Sql2K8", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Sql 1997. /// </summary> internal static string Sql97 { get { return ResourceManager.GetString("Sql97", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Delete All Rows. /// </summary> internal static string SqlDelAll { get { return ResourceManager.GetString("SqlDelAll", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Delete Many Rows (By List). /// </summary> internal static string SqlDelMany { get { return ResourceManager.GetString("SqlDelMany", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Delete Single Row (By List). /// </summary> internal static string SqlDelSingle { get { return ResourceManager.GetString("SqlDelSingle", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Insert Single Row. /// </summary> internal static string SqlIns { get { return ResourceManager.GetString("SqlIns", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Search (Paginated). /// </summary> internal static string SqlSearchPaged { get { return ResourceManager.GetString("SqlSearchPaged", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Select All Rows. /// </summary> internal static string SqlSelAll { get { return ResourceManager.GetString("SqlSelAll", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Select Many Rows (By List). /// </summary> internal static string SqlSelMany { get { return ResourceManager.GetString("SqlSelMany", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Select Many Rows (By Criteria). /// </summary> internal static string SqlSelManyByX { get { return ResourceManager.GetString("SqlSelManyByX", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Select Single Row (By List). /// </summary> internal static string SqlSelSingle { get { return ResourceManager.GetString("SqlSelSingle", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Update Single Row. /// </summary> internal static string SqlUpd { get { return ResourceManager.GetString("SqlUpd", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Update/Insert Single Row. /// </summary> internal static string SqlUpdIns { get { return ResourceManager.GetString("SqlUpdIns", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# WebService 2.0 Controller . /// </summary> internal static string WebServiceController { get { return ResourceManager.GetString("WebServiceController", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# WebService Base Controller. /// </summary> internal static string WebServiceControllerBase { get { return ResourceManager.GetString("WebServiceControllerBase", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# WebService Paging Object. /// </summary> internal static string WebServicePagingObject { get { return ResourceManager.GetString("WebServicePagingObject", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# WebService Response Object. /// </summary> internal static string WebServiceResponseObject { get { return ResourceManager.GetString("WebServiceResponseObject", resourceCulture); } } /// <summary> /// Looks up a localized string similar to http://www.GlobalConquest.net. /// </summary> internal static string WebsiteUrl { get { return ResourceManager.GetString("WebsiteUrl", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Winform edit designer. /// </summary> internal static string WinformsEditDesigner { get { return ResourceManager.GetString("WinformsEditDesigner", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Winform edit page. /// </summary> internal static string WinformsEditPage { get { return ResourceManager.GetString("WinformsEditPage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Winform main designer (NYI). /// </summary> internal static string WinformsMainDesigner { get { return ResourceManager.GetString("WinformsMainDesigner", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Winform main page (NYI). /// </summary> internal static string WinformsMainPage { get { return ResourceManager.GetString("WinformsMainPage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Winform view designer (NYI). /// </summary> internal static string WinformsViewDesigner { get { return ResourceManager.GetString("WinformsViewDesigner", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create Winform view page (NYI). /// </summary> internal static string WinformsViewPage { get { return ResourceManager.GetString("WinformsViewPage", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Export Table Data to Xml File. /// </summary> internal static string XmlExportData { get { return ResourceManager.GetString("XmlExportData", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Create C# Xml import class . /// </summary> internal static string XmlImportObject { get { return ResourceManager.GetString("XmlImportObject", resourceCulture); } } } }
36.526237
175
0.548249
[ "MIT" ]
feeleen/AutoCodeGenerator
AutoCodeGen/Properties/Resource.Designer.cs
24,365
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.Ebs { public static class GetSnapshot { /// <summary> /// Use this data source to get information about an EBS Snapshot for use when provisioning EBS Volumes /// /// {{% examples %}} /// ## Example Usage /// {{% example %}} /// /// ```csharp /// using Pulumi; /// using Aws = Pulumi.Aws; /// /// class MyStack : Stack /// { /// public MyStack() /// { /// var ebsVolume = Output.Create(Aws.Ebs.GetSnapshot.InvokeAsync(new Aws.Ebs.GetSnapshotArgs /// { /// Filters = /// { /// new Aws.Ebs.Inputs.GetSnapshotFilterArgs /// { /// Name = "volume-size", /// Values = /// { /// "40", /// }, /// }, /// new Aws.Ebs.Inputs.GetSnapshotFilterArgs /// { /// Name = "tag:Name", /// Values = /// { /// "Example", /// }, /// }, /// }, /// MostRecent = true, /// Owners = /// { /// "self", /// }, /// })); /// } /// /// } /// ``` /// {{% /example %}} /// {{% /examples %}} /// </summary> public static Task<GetSnapshotResult> InvokeAsync(GetSnapshotArgs? args = null, InvokeOptions? options = null) => Pulumi.Deployment.Instance.InvokeAsync<GetSnapshotResult>("aws:ebs/getSnapshot:getSnapshot", args ?? new GetSnapshotArgs(), options.WithVersion()); } public sealed class GetSnapshotArgs : Pulumi.InvokeArgs { [Input("filters")] private List<Inputs.GetSnapshotFilterArgs>? _filters; /// <summary> /// One or more name/value pairs to filter off of. There are /// several valid keys, for a full reference, check out /// [describe-snapshots in the AWS CLI reference][1]. /// </summary> public List<Inputs.GetSnapshotFilterArgs> Filters { get => _filters ?? (_filters = new List<Inputs.GetSnapshotFilterArgs>()); set => _filters = value; } /// <summary> /// If more than one result is returned, use the most recent snapshot. /// </summary> [Input("mostRecent")] public bool? MostRecent { get; set; } [Input("owners")] private List<string>? _owners; /// <summary> /// Returns the snapshots owned by the specified owner id. Multiple owners can be specified. /// </summary> public List<string> Owners { get => _owners ?? (_owners = new List<string>()); set => _owners = value; } [Input("restorableByUserIds")] private List<string>? _restorableByUserIds; /// <summary> /// One or more AWS accounts IDs that can create volumes from the snapshot. /// </summary> public List<string> RestorableByUserIds { get => _restorableByUserIds ?? (_restorableByUserIds = new List<string>()); set => _restorableByUserIds = value; } [Input("snapshotIds")] private List<string>? _snapshotIds; /// <summary> /// Returns information on a specific snapshot_id. /// </summary> public List<string> SnapshotIds { get => _snapshotIds ?? (_snapshotIds = new List<string>()); set => _snapshotIds = value; } [Input("tags")] private Dictionary<string, string>? _tags; /// <summary> /// A map of tags for the resource. /// </summary> public Dictionary<string, string> Tags { get => _tags ?? (_tags = new Dictionary<string, string>()); set => _tags = value; } public GetSnapshotArgs() { } } [OutputType] public sealed class GetSnapshotResult { /// <summary> /// The data encryption key identifier for the snapshot. /// </summary> public readonly string DataEncryptionKeyId; /// <summary> /// A description for the snapshot /// </summary> public readonly string Description; /// <summary> /// Whether the snapshot is encrypted. /// </summary> public readonly bool Encrypted; public readonly ImmutableArray<Outputs.GetSnapshotFilterResult> Filters; /// <summary> /// The provider-assigned unique ID for this managed resource. /// </summary> public readonly string Id; /// <summary> /// The ARN for the KMS encryption key. /// </summary> public readonly string KmsKeyId; public readonly bool? MostRecent; /// <summary> /// Value from an Amazon-maintained list (`amazon`, `aws-marketplace`, `microsoft`) of snapshot owners. /// </summary> public readonly string OwnerAlias; /// <summary> /// The AWS account ID of the EBS snapshot owner. /// </summary> public readonly string OwnerId; public readonly ImmutableArray<string> Owners; public readonly ImmutableArray<string> RestorableByUserIds; /// <summary> /// The snapshot ID (e.g. snap-59fcb34e). /// </summary> public readonly string SnapshotId; public readonly ImmutableArray<string> SnapshotIds; /// <summary> /// The snapshot state. /// </summary> public readonly string State; /// <summary> /// A map of tags for the resource. /// </summary> public readonly ImmutableDictionary<string, string> Tags; /// <summary> /// The volume ID (e.g. vol-59fcb34e). /// </summary> public readonly string VolumeId; /// <summary> /// The size of the drive in GiBs. /// </summary> public readonly int VolumeSize; [OutputConstructor] private GetSnapshotResult( string dataEncryptionKeyId, string description, bool encrypted, ImmutableArray<Outputs.GetSnapshotFilterResult> filters, string id, string kmsKeyId, bool? mostRecent, string ownerAlias, string ownerId, ImmutableArray<string> owners, ImmutableArray<string> restorableByUserIds, string snapshotId, ImmutableArray<string> snapshotIds, string state, ImmutableDictionary<string, string> tags, string volumeId, int volumeSize) { DataEncryptionKeyId = dataEncryptionKeyId; Description = description; Encrypted = encrypted; Filters = filters; Id = id; KmsKeyId = kmsKeyId; MostRecent = mostRecent; OwnerAlias = ownerAlias; OwnerId = ownerId; Owners = owners; RestorableByUserIds = restorableByUserIds; SnapshotId = snapshotId; SnapshotIds = snapshotIds; State = state; Tags = tags; VolumeId = volumeId; VolumeSize = volumeSize; } } }
31.595331
162
0.507143
[ "ECL-2.0", "Apache-2.0" ]
JakeGinnivan/pulumi-aws
sdk/dotnet/Ebs/GetSnapshot.cs
8,120
C#
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace YT.CMS.Webs { public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, namespaces :new string[] { "YT.CMS.Webs.Controllers" } ); } } }
26.56
100
0.567771
[ "MIT" ]
mylinx/YT.CMS.Web
YT.CMS.Webs/App_Start/RouteConfig.cs
666
C#
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated from a template. // // Manual changes to this file may cause unexpected behavior in your application. // Manual changes to this file will be overwritten if the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace Ejemplos { using System; using System.Collections.Generic; public partial class ContactType { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public ContactType() { this.BusinessEntityContact = new HashSet<BusinessEntityContact>(); } public int ContactTypeID { get; set; } public string Name { get; set; } public System.DateTime ModifiedDate { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection<BusinessEntityContact> BusinessEntityContact { get; set; } } }
38.322581
128
0.598485
[ "MIT" ]
ExpertSamples/Beca.Net
Auxiliar/ContactType.cs
1,188
C#
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. //----------------------------------------------------------------------- // </copyright> // <summary>Parses a project from raw XML into strongly typed objects</summary> //----------------------------------------------------------------------- using Microsoft.Build.Shared; using System; using System.Xml; using System.Collections.Generic; using System.Globalization; using System.IO; using Microsoft.Build.Framework; #if (!STANDALONEBUILD) using Microsoft.Internal.Performance; #if MSBUILDENABLEVSPROFILING using Microsoft.VisualStudio.Profiler; #endif #endif using Expander = Microsoft.Build.Evaluation.Expander<Microsoft.Build.Evaluation.ProjectProperty, Microsoft.Build.Evaluation.ProjectItem>; using ProjectXmlUtilities = Microsoft.Build.Internal.ProjectXmlUtilities; using ReservedPropertyNames = Microsoft.Build.Internal.ReservedPropertyNames; namespace Microsoft.Build.Construction { /// <summary> /// Parses a project from raw XML into strongly typed objects /// </summary> internal class ProjectParser { /// <summary> /// Maximum nesting level of Choose elements. No reasonable project needs more than this /// </summary> internal const int MaximumChooseNesting = 50; /// <summary> /// Valid attribute list when only Condition and Label are valid /// </summary> private readonly static string[] s_validAttributesOnlyConditionAndLabel = new string[] { XMakeAttributes.condition, XMakeAttributes.label }; /// <summary> /// Valid attribute list for item /// </summary> private readonly static string[] s_knownAttributesOnItem = new string[] { XMakeAttributes.condition, XMakeAttributes.label, XMakeAttributes.include, XMakeAttributes.exclude, XMakeAttributes.remove, XMakeAttributes.keepMetadata, XMakeAttributes.removeMetadata, XMakeAttributes.keepDuplicates, XMakeAttributes.update }; /// <summary> /// Valid attributes on import element /// </summary> private readonly static string[] s_validAttributesOnImport = new string[] { XMakeAttributes.condition, XMakeAttributes.label, XMakeAttributes.project, XMakeAttributes.sdk, XMakeAttributes.sdkVersion, XMakeAttributes.sdkMinimumVersion }; /// <summary> /// Valid attributes on usingtask element /// </summary> private readonly static string[] s_validAttributesOnUsingTask = new string[] { XMakeAttributes.condition, XMakeAttributes.label, XMakeAttributes.taskName, XMakeAttributes.assemblyFile, XMakeAttributes.assemblyName, XMakeAttributes.taskFactory, XMakeAttributes.architecture, XMakeAttributes.runtime, XMakeAttributes.requiredPlatform, XMakeAttributes.requiredRuntime }; /// <summary> /// Valid attributes on target element /// </summary> private readonly static string[] s_validAttributesOnTarget = new string[] { XMakeAttributes.condition, XMakeAttributes.label, XMakeAttributes.name, XMakeAttributes.inputs, XMakeAttributes.outputs, XMakeAttributes.keepDuplicateOutputs, XMakeAttributes.dependsOnTargets, XMakeAttributes.beforeTargets, XMakeAttributes.afterTargets, XMakeAttributes.returns }; /// <summary> /// Valid attributes on on error element /// </summary> private readonly static string[] s_validAttributesOnOnError = new string[] { XMakeAttributes.condition, XMakeAttributes.label, XMakeAttributes.executeTargets }; /// <summary> /// Valid attributes on output element /// </summary> private readonly static string[] s_validAttributesOnOutput = new string[] { XMakeAttributes.condition, XMakeAttributes.label, XMakeAttributes.taskParameter, XMakeAttributes.itemName, XMakeAttributes.propertyName }; /// <summary> /// Valid attributes on UsingTaskParameter element /// </summary> private readonly static string[] s_validAttributesOnUsingTaskParameter = new string[] { XMakeAttributes.parameterType, XMakeAttributes.output, XMakeAttributes.required }; /// <summary> /// Valid attributes on UsingTaskTask element /// </summary> private readonly static string[] s_validAttributesOnUsingTaskBody = new string[] { XMakeAttributes.evaluate }; /// <summary> /// The ProjectRootElement to parse into /// </summary> private ProjectRootElement _project; /// <summary> /// The document to parse from /// </summary> private XmlDocumentWithLocation _document; /// <summary> /// Whether a ProjectExtensions node has been encountered already. /// It's not supposed to appear more than once. /// </summary> private bool _seenProjectExtensions; /// <summary> /// Private constructor to give static semantics /// </summary> private ProjectParser(XmlDocumentWithLocation document, ProjectRootElement project) { ErrorUtilities.VerifyThrowInternalNull(project, "project"); ErrorUtilities.VerifyThrowInternalNull(document, "document"); _document = document; _project = project; } /// <summary> /// Parses the document into the provided ProjectRootElement. /// Throws InvalidProjectFileExceptions for syntax errors. /// </summary> /// <remarks> /// The code markers here used to be around the Project class constructor in the old code. /// In the new code, that's not very interesting; we are repurposing to wrap parsing the XML. /// </remarks> internal static void Parse(XmlDocumentWithLocation document, ProjectRootElement projectRootElement) { #if MSBUILDENABLEVSPROFILING try { string projectFile = String.IsNullOrEmpty(projectRootElement.ProjectFileLocation.File) ? "(null)" : projectRootElement.ProjectFileLocation.File; string projectParseBegin = String.Format(CultureInfo.CurrentCulture, "Parse Project {0} - Begin", projectFile); DataCollection.CommentMarkProfile(8808, projectParseBegin); #endif #if (!STANDALONEBUILD) using (new CodeMarkerStartEnd(CodeMarkerEvent.perfMSBuildProjectConstructBegin, CodeMarkerEvent.perfMSBuildProjectConstructEnd)) #endif { ProjectParser parser = new ProjectParser(document, projectRootElement); parser.Parse(); } #if MSBUILDENABLEVSPROFILING } finally { string projectFile = String.IsNullOrEmpty(projectRootElement.ProjectFileLocation.File) ? "(null)" : projectRootElement.ProjectFileLocation.File; string projectParseEnd = String.Format(CultureInfo.CurrentCulture, "Parse Project {0} - End", projectFile); DataCollection.CommentMarkProfile(8809, projectParseEnd); } #endif } /// <summary> /// Parses the project into the ProjectRootElement /// </summary> private void Parse() { // XML guarantees exactly one root element XmlElementWithLocation element = null; foreach (XmlNode childNode in _document.ChildNodes) { if (childNode.NodeType == XmlNodeType.Element) { element = (XmlElementWithLocation)childNode; break; } } ProjectErrorUtilities.VerifyThrowInvalidProject(element != null, ElementLocation.Create(_document.FullPath), "NoRootProjectElement", XMakeElements.project); ProjectErrorUtilities.VerifyThrowInvalidProject(element.Name != XMakeElements.visualStudioProject, element.Location, "ProjectUpgradeNeeded", _project.FullPath); ProjectErrorUtilities.VerifyThrowInvalidProject(element.LocalName == XMakeElements.project, element.Location, "UnrecognizedElement", element.Name); // If a namespace was specified it must be the default MSBuild namespace. if (!ProjectXmlUtilities.VerifyValidProjectNamespace(element)) { ProjectErrorUtilities.ThrowInvalidProject(element.Location, "ProjectMustBeInMSBuildXmlNamespace", XMakeAttributes.defaultXmlNamespace); } else { _project.XmlNamespace = element.NamespaceURI; } ParseProjectElement(element); } /// <summary> /// Parse a ProjectRootElement from an element /// </summary> private void ParseProjectElement(XmlElementWithLocation element) { // Historically, we allow any attribute on the Project element // The element wasn't available to the ProjectRootElement constructor, // so we have to set it now _project.SetProjectRootElementFromParser(element, _project); ParseProjectRootElementChildren(element); } /// <summary> /// Parse the child of a ProjectRootElement /// </summary> private void ParseProjectRootElementChildren(XmlElementWithLocation element) { foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectElement child = null; switch (childElement.Name) { case XMakeElements.propertyGroup: child = ParseProjectPropertyGroupElement(childElement, _project); break; case XMakeElements.itemGroup: child = ParseProjectItemGroupElement(childElement, _project); break; case XMakeElements.importGroup: child = ParseProjectImportGroupElement(childElement, _project); break; case XMakeElements.import: child = ParseProjectImportElement(childElement, _project); break; case XMakeElements.usingTask: child = ParseProjectUsingTaskElement(childElement); break; case XMakeElements.target: child = ParseProjectTargetElement(childElement); break; case XMakeElements.itemDefinitionGroup: child = ParseProjectItemDefinitionGroupElement(childElement); break; case XMakeElements.choose: child = ParseProjectChooseElement(childElement, _project, 0 /* nesting depth */); break; case XMakeElements.projectExtensions: child = ParseProjectExtensionsElement(childElement); break; case XMakeElements.sdk: child = ParseProjectSdkElement(childElement); break; // Obsolete case XMakeElements.error: case XMakeElements.warning: case XMakeElements.message: ProjectErrorUtilities.ThrowInvalidProject(childElement.Location, "ErrorWarningMessageNotSupported", childElement.Name); break; default: ProjectXmlUtilities.ThrowProjectInvalidChildElement(childElement.Name, childElement.ParentNode.Name, childElement.Location); break; } _project.AppendParentedChildNoChecks(child); } } /// <summary> /// Parse a ProjectPropertyGroupElement from the element /// </summary> private ProjectPropertyGroupElement ParseProjectPropertyGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnlyConditionAndLabel); ProjectPropertyGroupElement propertyGroup = new ProjectPropertyGroupElement(element, parent, _project); foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectPropertyElement property = ParseProjectPropertyElement(childElement, propertyGroup); propertyGroup.AppendParentedChildNoChecks(property); } return propertyGroup; } /// <summary> /// Parse a ProjectPropertyElement from the element /// </summary> private ProjectPropertyElement ParseProjectPropertyElement(XmlElementWithLocation element, ProjectPropertyGroupElement parent) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnlyConditionAndLabel); XmlUtilities.VerifyThrowProjectValidElementName(element); ProjectErrorUtilities.VerifyThrowInvalidProject(XMakeElements.IllegalItemPropertyNames[element.Name] == null && !ReservedPropertyNames.IsReservedProperty(element.Name), element.Location, "CannotModifyReservedProperty", element.Name); // All children inside a property are ignored, since they are only part of its value return new ProjectPropertyElement(element, parent, _project); } /// <summary> /// Parse a ProjectItemGroupElement /// </summary> private ProjectItemGroupElement ParseProjectItemGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnlyConditionAndLabel); ProjectItemGroupElement itemGroup = new ProjectItemGroupElement(element, parent, _project); foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectItemElement item = ParseProjectItemElement(childElement, itemGroup); itemGroup.AppendParentedChildNoChecks(item); } return itemGroup; } /// <summary> /// Parse a ProjectItemElement /// </summary> private ProjectItemElement ParseProjectItemElement(XmlElementWithLocation element, ProjectItemGroupElement parent) { bool belowTarget = parent.Parent is ProjectTargetElement; string itemType = element.Name; string include = element.GetAttribute(XMakeAttributes.include); string exclude = element.GetAttribute(XMakeAttributes.exclude); string remove = element.GetAttribute(XMakeAttributes.remove); string update = element.GetAttribute(XMakeAttributes.update); var exclusiveItemOperation = ""; int exclusiveAttributeCount = 0; if (element.HasAttribute(XMakeAttributes.include)) { exclusiveAttributeCount++; exclusiveItemOperation = XMakeAttributes.include; } if (element.HasAttribute(XMakeAttributes.remove)) { exclusiveAttributeCount++; exclusiveItemOperation = XMakeAttributes.remove; } if (element.HasAttribute(XMakeAttributes.update)) { exclusiveAttributeCount++; exclusiveItemOperation = XMakeAttributes.update; } // At most one of the include, remove, or update attributes may be specified if (exclusiveAttributeCount > 1) { XmlAttributeWithLocation errorAttribute = remove.Length > 0 ? (XmlAttributeWithLocation)element.Attributes[XMakeAttributes.remove] : (XmlAttributeWithLocation)element.Attributes[XMakeAttributes.update]; ProjectErrorUtilities.ThrowInvalidProject(errorAttribute.Location, "InvalidAttributeExclusive"); } // Include, remove, or update must be present unless inside a target ProjectErrorUtilities.VerifyThrowInvalidProject(exclusiveAttributeCount == 1 || belowTarget, element.Location, "IncludeRemoveOrUpdate", exclusiveItemOperation, itemType); // Exclude must be missing, unless Include exists ProjectXmlUtilities.VerifyThrowProjectInvalidAttribute(exclude.Length == 0 || include.Length > 0, (XmlAttributeWithLocation)element.Attributes[XMakeAttributes.exclude]); // If we have an Include attribute at all, it must have non-zero length ProjectErrorUtilities.VerifyThrowInvalidProject(include.Length > 0 || element.Attributes[XMakeAttributes.include] == null, element.Location, "MissingRequiredAttribute", XMakeAttributes.include, itemType); // If we have a Remove attribute at all, it must have non-zero length ProjectErrorUtilities.VerifyThrowInvalidProject(remove.Length > 0 || element.Attributes[XMakeAttributes.remove] == null, element.Location, "MissingRequiredAttribute", XMakeAttributes.remove, itemType); // If we have an Update attribute at all, it must have non-zero length ProjectErrorUtilities.VerifyThrowInvalidProject(update.Length > 0 || element.Attributes[XMakeAttributes.update] == null, element.Location, "MissingRequiredAttribute", XMakeAttributes.update, itemType); XmlUtilities.VerifyThrowProjectValidElementName(element); ProjectErrorUtilities.VerifyThrowInvalidProject(XMakeElements.IllegalItemPropertyNames[itemType] == null, element.Location, "CannotModifyReservedItem", itemType); ProjectItemElement item = new ProjectItemElement(element, parent, _project); foreach (XmlAttributeWithLocation attribute in element.Attributes) { bool isKnownAttribute; bool isValidMetadataNameInAttribute; CheckMetadataAsAttributeName(attribute.Name, out isKnownAttribute, out isValidMetadataNameInAttribute); if (!isKnownAttribute && !isValidMetadataNameInAttribute) { ProjectXmlUtilities.ThrowProjectInvalidAttribute(attribute); } else if (isValidMetadataNameInAttribute) { ProjectMetadataElement metadatum = _project.CreateMetadataElement(attribute.Name, attribute.Value); metadatum.ExpressedAsAttribute = true; metadatum.Parent = item; item.AppendParentedChildNoChecks(metadatum); } } foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectMetadataElement metadatum = ParseProjectMetadataElement(childElement, item); item.AppendParentedChildNoChecks(metadatum); } return item; } internal static void CheckMetadataAsAttributeName(string name, out bool isReservedAttributeName, out bool isValidMetadataNameInAttribute) { if (!XmlUtilities.IsValidElementName(name)) { isReservedAttributeName = false; isValidMetadataNameInAttribute = false; return; } for (int i = 0; i < s_knownAttributesOnItem.Length; i++) { // Case insensitive comparison so that mis-capitalizing an attribute like Include or Exclude results in an easy to understand // error instead of unexpected behavior if (name == s_knownAttributesOnItem[i]) { isReservedAttributeName = true; isValidMetadataNameInAttribute = false; return; } else if (name.Equals(s_knownAttributesOnItem[i], StringComparison.OrdinalIgnoreCase)) { isReservedAttributeName = false; isValidMetadataNameInAttribute = false; return; } } // Reserve attributes starting with underscores in case we need to add more built-in attributes later if (name[0] == '_') { isReservedAttributeName = false; isValidMetadataNameInAttribute = false; return; } if (FileUtilities.ItemSpecModifiers.IsItemSpecModifier(name) || XMakeElements.IllegalItemPropertyNames[name] != null) { isReservedAttributeName = false; isValidMetadataNameInAttribute = false; return; } isReservedAttributeName = false; isValidMetadataNameInAttribute = true; } /// <summary> /// Parse a ProjectMetadataElement /// </summary> private ProjectMetadataElement ParseProjectMetadataElement(XmlElementWithLocation element, ProjectElementContainer parent) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnlyConditionAndLabel); XmlUtilities.VerifyThrowProjectValidElementName(element); ProjectErrorUtilities.VerifyThrowInvalidProject(!(parent is ProjectItemElement) || ((ProjectItemElement)parent).Remove.Length == 0, element.Location, "ChildElementsBelowRemoveNotAllowed", element.Name); ProjectErrorUtilities.VerifyThrowInvalidProject(!FileUtilities.ItemSpecModifiers.IsItemSpecModifier(element.Name), element.Location, "ItemSpecModifierCannotBeCustomMetadata", element.Name); ProjectErrorUtilities.VerifyThrowInvalidProject(XMakeElements.IllegalItemPropertyNames[element.Name] == null, element.Location, "CannotModifyReservedItemMetadata", element.Name); ProjectMetadataElement metadatum = new ProjectMetadataElement(element, parent, _project); // If the parent is an item definition, we don't allow expressions like @(foo) in the value, as no items exist at that point if (parent is ProjectItemDefinitionElement) { bool containsItemVector = Expander.ExpressionContainsItemVector(metadatum.Value); ProjectErrorUtilities.VerifyThrowInvalidProject(!containsItemVector, element.Location, "MetadataDefinitionCannotContainItemVectorExpression", metadatum.Value, metadatum.Name); } return metadatum; } /// <summary> /// Parse a ProjectImportGroupElement /// </summary> /// <param name="element">The XML element to parse</param> /// <param name="parent">The parent <see cref="ProjectRootElement"/>.</param> /// <returns>A ProjectImportGroupElement derived from the XML element passed in</returns> private ProjectImportGroupElement ParseProjectImportGroupElement(XmlElementWithLocation element, ProjectRootElement parent) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnlyConditionAndLabel); ProjectImportGroupElement importGroup = new ProjectImportGroupElement(element, parent, _project); foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectErrorUtilities.VerifyThrowInvalidProject ( childElement.Name == XMakeElements.import, childElement.Location, "UnrecognizedChildElement", childElement.Name, element.Name ); ProjectImportElement item = ParseProjectImportElement(childElement, importGroup); importGroup.AppendParentedChildNoChecks(item); } return importGroup; } /// <summary> /// Parse a ProjectImportElement that is contained in an ImportGroup /// </summary> private ProjectImportElement ParseProjectImportElement(XmlElementWithLocation element, ProjectElementContainer parent) { ProjectErrorUtilities.VerifyThrowInvalidProject ( parent is ProjectRootElement || parent is ProjectImportGroupElement, element.Location, "UnrecognizedParentElement", parent, element ); ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnImport); ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element, XMakeAttributes.project); ProjectXmlUtilities.VerifyThrowProjectNoChildElements(element); SdkReference sdk = null; if (element.HasAttribute(XMakeAttributes.sdk)) { sdk = new SdkReference( ProjectXmlUtilities.GetAttributeValue(element, XMakeAttributes.sdk, nullIfNotExists: true), ProjectXmlUtilities.GetAttributeValue(element, XMakeAttributes.sdkVersion, nullIfNotExists: true), ProjectXmlUtilities.GetAttributeValue(element, XMakeAttributes.sdkMinimumVersion, nullIfNotExists: true)); } return new ProjectImportElement(element, parent, _project, sdk); } /// <summary> /// Parse a UsingTaskParameterGroupElement from the element /// </summary> private UsingTaskParameterGroupElement ParseUsingTaskParameterGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) { // There should be no attributes ProjectXmlUtilities.VerifyThrowProjectNoAttributes(element); UsingTaskParameterGroupElement parameterGroup = new UsingTaskParameterGroupElement(element, parent, _project); HashSet<String> listOfChildElementNames = new HashSet<string>(); foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { // The parameter already exists this means there is a duplicate child item. Throw an exception. if (listOfChildElementNames.Contains(childElement.Name)) { ProjectXmlUtilities.ThrowProjectInvalidChildElementDueToDuplicate(childElement); } else { ProjectUsingTaskParameterElement parameter = ParseUsingTaskParameterElement(childElement, parameterGroup); parameterGroup.AppendParentedChildNoChecks(parameter); // Add the name of the child element to the hashset so we can check for a duplicate child element listOfChildElementNames.Add(childElement.Name); } } return parameterGroup; } /// <summary> /// Parse a UsingTaskBodyElement from the element /// </summary> private ProjectUsingTaskBodyElement ParseUsingTaskBodyElement(XmlElementWithLocation element, ProjectUsingTaskElement parent) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnUsingTaskBody); XmlUtilities.VerifyThrowProjectValidElementName(element); return new ProjectUsingTaskBodyElement(element, parent, _project); } /// <summary> /// Parse a UsingTaskParameterElement from the element /// </summary> private ProjectUsingTaskParameterElement ParseUsingTaskParameterElement(XmlElementWithLocation element, UsingTaskParameterGroupElement parent) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnUsingTaskParameter); XmlUtilities.VerifyThrowProjectValidElementName(element); return new ProjectUsingTaskParameterElement(element, parent, _project); } /// <summary> /// Parse a ProjectUsingTaskElement /// </summary> private ProjectUsingTaskElement ParseProjectUsingTaskElement(XmlElementWithLocation element) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnUsingTask); ProjectErrorUtilities.VerifyThrowInvalidProject(element.GetAttribute(XMakeAttributes.taskName).Length > 0, element.Location, "ProjectTaskNameEmpty"); string assemblyName = element.GetAttribute(XMakeAttributes.assemblyName); string assemblyFile = element.GetAttribute(XMakeAttributes.assemblyFile); ProjectErrorUtilities.VerifyThrowInvalidProject ( ((assemblyName.Length > 0) ^ (assemblyFile.Length > 0)), element.Location, "UsingTaskAssemblySpecification", XMakeElements.usingTask, XMakeAttributes.assemblyName, XMakeAttributes.assemblyFile ); ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element, XMakeAttributes.assemblyName); ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element, XMakeAttributes.assemblyFile); ProjectUsingTaskElement usingTask = new ProjectUsingTaskElement(element, _project, _project); bool foundTaskElement = false; bool foundParameterGroup = false; foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectElement child = null; string childElementName = childElement.Name; switch (childElementName) { case XMakeElements.usingTaskParameterGroup: if (foundParameterGroup) { ProjectXmlUtilities.ThrowProjectInvalidChildElementDueToDuplicate(childElement); } child = ParseUsingTaskParameterGroupElement(childElement, usingTask); foundParameterGroup = true; break; case XMakeElements.usingTaskBody: if (foundTaskElement) { ProjectXmlUtilities.ThrowProjectInvalidChildElementDueToDuplicate(childElement); } child = ParseUsingTaskBodyElement(childElement, usingTask); foundTaskElement = true; break; default: ProjectXmlUtilities.ThrowProjectInvalidChildElement(childElement.Name, element.Name, element.Location); break; } usingTask.AppendParentedChildNoChecks(child); } return usingTask; } /// <summary> /// Parse a ProjectTargetElement /// </summary> private ProjectTargetElement ParseProjectTargetElement(XmlElementWithLocation element) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnTarget); ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element, XMakeAttributes.name); string targetName = ProjectXmlUtilities.GetAttributeValue(element, XMakeAttributes.name); // Orcas compat: all target names are automatically unescaped targetName = EscapingUtilities.UnescapeAll(targetName); int indexOfSpecialCharacter = targetName.IndexOfAny(XMakeElements.illegalTargetNameCharacters); if (indexOfSpecialCharacter >= 0) { ProjectErrorUtilities.ThrowInvalidProject(element.GetAttributeLocation(XMakeAttributes.name), "NameInvalid", targetName, targetName[indexOfSpecialCharacter]); } ProjectTargetElement target = new ProjectTargetElement(element, _project, _project); ProjectOnErrorElement onError = null; foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectElement child = null; switch (childElement.Name) { case XMakeElements.propertyGroup: if (onError != null) { ProjectErrorUtilities.ThrowInvalidProject(onError.Location, "NodeMustBeLastUnderElement", XMakeElements.onError, XMakeElements.target, childElement.Name); } child = ParseProjectPropertyGroupElement(childElement, target); break; case XMakeElements.itemGroup: if (onError != null) { ProjectErrorUtilities.ThrowInvalidProject(onError.Location, "NodeMustBeLastUnderElement", XMakeElements.onError, XMakeElements.target, childElement.Name); } child = ParseProjectItemGroupElement(childElement, target); break; case XMakeElements.onError: onError = ParseProjectOnErrorElement(childElement, target); child = onError; break; case XMakeElements.itemDefinitionGroup: ProjectErrorUtilities.ThrowInvalidProject(childElement.Location, "ItemDefinitionGroupNotLegalInsideTarget", childElement.Name); break; default: if (onError != null) { ProjectErrorUtilities.ThrowInvalidProject(onError.Location, "NodeMustBeLastUnderElement", XMakeElements.onError, XMakeElements.target, childElement.Name); } child = ParseProjectTaskElement(childElement, target); break; } target.AppendParentedChildNoChecks(child); } return target; } /// <summary> /// Parse a ProjectTaskElement /// </summary> private ProjectTaskElement ParseProjectTaskElement(XmlElementWithLocation element, ProjectTargetElement parent) { foreach (XmlAttributeWithLocation attribute in element.Attributes) { ProjectErrorUtilities.VerifyThrowInvalidProject ( !XMakeAttributes.IsBadlyCasedSpecialTaskAttribute(attribute.Name), attribute.Location, "BadlyCasedSpecialTaskAttribute", attribute.Name, element.Name, element.Name ); } ProjectTaskElement task = new ProjectTaskElement(element, parent, _project); foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectErrorUtilities.VerifyThrowInvalidProject(childElement.Name == XMakeElements.output, childElement.Location, "UnrecognizedChildElement", childElement.Name, task.Name); ProjectOutputElement output = ParseProjectOutputElement(childElement, task); task.AppendParentedChildNoChecks(output); } return task; } /// <summary> /// Parse a ProjectOutputElement /// </summary> private ProjectOutputElement ParseProjectOutputElement(XmlElementWithLocation element, ProjectTaskElement parent) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnOutput); ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element, XMakeAttributes.taskParameter); ProjectXmlUtilities.VerifyThrowProjectNoChildElements(element); string taskParameter = element.GetAttribute(XMakeAttributes.taskParameter); string itemName = element.GetAttribute(XMakeAttributes.itemName); string propertyName = element.GetAttribute(XMakeAttributes.propertyName); ProjectErrorUtilities.VerifyThrowInvalidProject ( (itemName.Length > 0 || propertyName.Length > 0) && (itemName.Length == 0 || propertyName.Length == 0), element.Location, "InvalidTaskOutputSpecification", parent.Name ); ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element, XMakeAttributes.itemName); ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element, XMakeAttributes.propertyName); ProjectErrorUtilities.VerifyThrowInvalidProject(!ReservedPropertyNames.IsReservedProperty(propertyName), element.Location, "CannotModifyReservedProperty", propertyName); return new ProjectOutputElement(element, parent, _project); } /// <summary> /// Parse a ProjectOnErrorElement /// </summary> private ProjectOnErrorElement ParseProjectOnErrorElement(XmlElementWithLocation element, ProjectTargetElement parent) { // Previous OM accidentally didn't verify ExecuteTargets on parse, // but we do, as it makes no sense ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnOnError); ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element, XMakeAttributes.executeTargets); ProjectXmlUtilities.VerifyThrowProjectNoChildElements(element); return new ProjectOnErrorElement(element, parent, _project); } /// <summary> /// Parse a ProjectItemDefinitionGroupElement /// </summary> private ProjectItemDefinitionGroupElement ParseProjectItemDefinitionGroupElement(XmlElementWithLocation element) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnlyConditionAndLabel); ProjectItemDefinitionGroupElement itemDefinitionGroup = new ProjectItemDefinitionGroupElement(element, _project, _project); foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectItemDefinitionElement itemDefinition = ParseProjectItemDefinitionXml(childElement, itemDefinitionGroup); itemDefinitionGroup.AppendParentedChildNoChecks(itemDefinition); } return itemDefinitionGroup; } /// <summary> /// Pasre a ProjectItemDefinitionElement /// </summary> private ProjectItemDefinitionElement ParseProjectItemDefinitionXml(XmlElementWithLocation element, ProjectItemDefinitionGroupElement parent) { ProjectXmlUtilities.VerifyThrowProjectAttributes(element, s_validAttributesOnlyConditionAndLabel); // Orcas inadvertently did not check for reserved item types (like "Choose") in item definitions, // as we do for item types in item groups. So we do not have a check here. // Although we could perhaps add one, as such item definitions couldn't be used // since no items can have the reserved itemType. ProjectItemDefinitionElement itemDefinition = new ProjectItemDefinitionElement(element, parent, _project); foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectMetadataElement metadatum = ParseProjectMetadataElement(childElement, itemDefinition); itemDefinition.AppendParentedChildNoChecks(metadatum); } return itemDefinition; } /// <summary> /// Parse a ProjectChooseElement /// </summary> private ProjectChooseElement ParseProjectChooseElement(XmlElementWithLocation element, ProjectElementContainer parent, int nestingDepth) { ProjectXmlUtilities.VerifyThrowProjectNoAttributes(element); ProjectChooseElement choose = new ProjectChooseElement(element, parent, _project); nestingDepth++; ProjectErrorUtilities.VerifyThrowInvalidProject(nestingDepth <= MaximumChooseNesting, element.Location, "ChooseOverflow", MaximumChooseNesting); bool foundWhen = false; bool foundOtherwise = false; foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectElement child = null; switch (childElement.Name) { case XMakeElements.when: ProjectErrorUtilities.VerifyThrowInvalidProject(!foundOtherwise, childElement.Location, "WhenNotAllowedAfterOtherwise"); child = ParseProjectWhenElement(childElement, choose, nestingDepth); foundWhen = true; break; case XMakeElements.otherwise: ProjectErrorUtilities.VerifyThrowInvalidProject(!foundOtherwise, childElement.Location, "MultipleOtherwise"); foundOtherwise = true; child = ParseProjectOtherwiseElement(childElement, choose, nestingDepth); break; default: ProjectXmlUtilities.ThrowProjectInvalidChildElement(childElement.Name, element.Name, element.Location); break; } choose.AppendParentedChildNoChecks(child); } nestingDepth--; ProjectErrorUtilities.VerifyThrowInvalidProject(foundWhen, element.Location, "ChooseMustContainWhen"); return choose; } /// <summary> /// Parse a ProjectWhenElement /// </summary> private ProjectWhenElement ParseProjectWhenElement(XmlElementWithLocation element, ProjectChooseElement parent, int nestingDepth) { ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element, XMakeAttributes.condition); ProjectWhenElement when = new ProjectWhenElement(element, parent, _project); ParseWhenOtherwiseChildren(element, when, nestingDepth); return when; } /// <summary> /// Parse a ProjectOtherwiseElement /// </summary> private ProjectOtherwiseElement ParseProjectOtherwiseElement(XmlElementWithLocation element, ProjectChooseElement parent, int nestingDepth) { ProjectXmlUtilities.VerifyThrowProjectNoAttributes(element); ProjectOtherwiseElement otherwise = new ProjectOtherwiseElement(element, parent, _project); ParseWhenOtherwiseChildren(element, otherwise, nestingDepth); return otherwise; } /// <summary> /// Parse the children of a When or Otherwise /// </summary> private void ParseWhenOtherwiseChildren(XmlElementWithLocation element, ProjectElementContainer parent, int nestingDepth) { foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) { ProjectElement child = null; switch (childElement.Name) { case XMakeElements.propertyGroup: child = ParseProjectPropertyGroupElement(childElement, parent); break; case XMakeElements.itemGroup: child = ParseProjectItemGroupElement(childElement, parent); break; case XMakeElements.choose: child = ParseProjectChooseElement(childElement, parent, nestingDepth); break; default: ProjectXmlUtilities.ThrowProjectInvalidChildElement(childElement.Name, element.Name, element.Location); break; } parent.AppendParentedChildNoChecks(child); } } /// <summary> /// Parse a ProjectExtensionsElement /// </summary> private ProjectExtensionsElement ParseProjectExtensionsElement(XmlElementWithLocation element) { // ProjectExtensions are only found in the main project file - in fact, the code used to ignore them in imported // files. We don't. ProjectXmlUtilities.VerifyThrowProjectNoAttributes(element); ProjectErrorUtilities.VerifyThrowInvalidProject(!_seenProjectExtensions, element.Location, "DuplicateProjectExtensions"); _seenProjectExtensions = true; // All children inside ProjectExtensions are ignored, since they are only part of its value return new ProjectExtensionsElement(element, _project, _project); } /// <summary> /// Parse a ProjectExtensionsElement /// </summary> private ProjectSdkElement ParseProjectSdkElement(XmlElementWithLocation element) { if (string.IsNullOrEmpty(element.GetAttribute(XMakeAttributes.sdkName))) { ProjectErrorUtilities.ThrowInvalidProject(element.Location, "InvalidSdkElementName", element.Name); } return new ProjectSdkElement(element, _project, _project); } } }
47.349076
375
0.647209
[ "MIT" ]
AlexanderAsiford/-
src/Build/Evaluation/ProjectParser.cs
46,120
C#
using ProtoBuf; using System; using System.Collections.Generic; using System.Text; namespace MagicalLifeAPI.Mod { /// <summary> /// Holds some information about the mod. /// </summary> [ProtoContract] public class ModInformation { /// <summary> /// A unique ID for the mod. This must not conflict with any other mod's. /// It is recommend to generate a random id (GUID) once (hard code it) and use that. /// </summary> public string ModID { get; private set; } /// <summary> /// The name of the mod that will be displayed to players. /// </summary> public string DisplayName { get; private set; } /// <summary> /// The name of the author that will be displayed to players. /// </summary> public string AuthorName { get; private set; } /// <summary> /// The description of the mod which will be shown to players. /// </summary> public string Description { get; private set; } /// <summary> /// The version of the mod. /// </summary> public ProtoVersion Version { get; private set; } /// <param name="modID">A unique ID for the mod. This must not conflict with any other mod's. It is recommend to generate a random id (GUID) once (hard code it) and use that. </param> /// <param name="displayName">The name of the mod that will be displayed to players.</param> /// <param name="authorName">The name of the author that will be displayed to players.</param> /// <param name="description">The description of the mod which will be shown to players.</param> /// <param name="version">The version of the mod. </param> public ModInformation(string modID, string displayName, string authorName, string description, ProtoVersion version) { this.ModID = modID; this.DisplayName = displayName; this.AuthorName = authorName; this.Description = description; this.Version = version; } protected ModInformation() { //Protobuf-net constructor } } }
36.213115
191
0.598914
[ "MIT" ]
ockenyberg/MagicalLife
MagicalLifeAPIStandard/Mod/ModInformation.cs
2,211
C#
namespace HuaweiMobileServices.Game { using HuaweiMobileServices.Base; // Wrapper for com.huawei.hms.jos.games.playerstats.GamePlayerStatisticsClient public interface IGamePlayerStatisticsClient { ITask<GamePlayerStatistics> GetGamePlayerStatistics(bool paramBoolean); } }
27.545455
82
0.775578
[ "MIT" ]
EvilMindDevs/hms-sdk-unity
hms-sdk-unity/HuaweiMobileServices/Game/IGamePlayerStatisticsClient.cs
305
C#
namespace LeetCode.Naive.Problems; /// <summary> /// Problem: https://leetcode.com/problems/complex-number-multiplication/ /// Submission: https://leetcode.com/submissions/detail/234938784/ /// </summary> internal class P0537 { public class Solution { public string ComplexNumberMultiply(string a, string b) { var n1 = GetCoeff(a); var n2 = GetCoeff(b); var real = n1.Item1 * n2.Item1 - n1.Item2 * n2.Item2; var img = n1.Item1 * n2.Item2 + n1.Item2 * n2.Item1; return $"{real}+{img}i"; } private (int, int) GetCoeff(string s) { var rp = s.Split(new[] { '+' }); return (int.Parse(rp[0]), int.Parse(rp[1].TrimEnd(new[] { 'i' }))); } } }
25.689655
77
0.577181
[ "MIT" ]
viacheslave/algo
leetcode/c#/Problems/P0537.cs
745
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 email-2010-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.SimpleEmail.Model { /// <summary> /// Container for the parameters to the GetCustomVerificationEmailTemplate operation. /// Returns the custom email verification template for the template name you specify. /// /// /// <para> /// For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html">Using /// Custom Verification Email Templates</a> in the <i>Amazon SES Developer Guide</i>. /// </para> /// /// <para> /// You can execute this operation no more than once per second. /// </para> /// </summary> public partial class GetCustomVerificationEmailTemplateRequest : AmazonSimpleEmailServiceRequest { private string _templateName; /// <summary> /// Gets and sets the property TemplateName. /// <para> /// The name of the custom verification email template that you want to retrieve. /// </para> /// </summary> public string TemplateName { get { return this._templateName; } set { this._templateName = value; } } // Check to see if TemplateName property is set internal bool IsSetTemplateName() { return this._templateName != null; } } }
33.597015
177
0.66948
[ "Apache-2.0" ]
HaiNguyenMediaStep/aws-sdk-net
sdk/src/Services/SimpleEmail/Generated/Model/GetCustomVerificationEmailTemplateRequest.cs
2,251
C#
using Lumina; using Lumina.Data; using Lumina.Excel; using Lumina.Text; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConceptMatrix.Sheets { [Sheet("Stain", columnHash: 0xa2420e68)] public class Stain : ExcelRow { public uint Color; public byte Shade; public SeString Name; public override void PopulateData(RowParser parser, GameData gameData, Language language) { base.PopulateData(parser, gameData, language); Color = parser.ReadColumn<uint>(0); Shade = parser.ReadColumn<byte>(1); Name = parser.ReadColumn<SeString>(3); } } }
24.2
97
0.658402
[ "MIT" ]
Bluefissure/CMTool
ConceptMatrix/Sheets/Stain.cs
728
C#
using System.Linq; using PalindromeExtensions; public static partial class StringExt { private static int InvalidIndex = -1; public static bool IsPalindrome(this string input) { var letterCount = input.Count(x => x.IsLetter()); if (letterCount == 0 || letterCount == 1) return true; var leftIndex = 0; var rightIndex = input.Count() - 1; while (leftIndex <= rightIndex) { while (leftIndex < input.Count() && !input[leftIndex].IsLetter()) { leftIndex++; } while (rightIndex > InvalidIndex && !input[rightIndex].IsLetter()) { rightIndex--; } if (leftIndex != input.Count() && rightIndex != InvalidIndex) { if (input[rightIndex].ToLower() != input[leftIndex].ToLower()) { return false; } } leftIndex++; rightIndex--; } return true; } }
28.351351
78
0.494757
[ "MIT" ]
tvvister/PalindromeProblem
PalindromeExtensions/StringExt.cs
1,051
C#
// // Copyright (c) 2022 karamem0 // // This software is released under the MIT License. // // https://github.com/karamem0/sp-client-core/blob/main/LICENSE // using Karamem0.SharePoint.PowerShell.Models.V1; using Karamem0.SharePoint.PowerShell.Tests.Runtime; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Karamem0.SharePoint.PowerShell.Tests { [TestClass()] [TestCategory("Unpublish-KshFile")] public class UnpublishFileCommandTests { [TestMethod()] public void UnpublishFile() { using var context = new PSCmdletContext(); var result1 = context.Runspace.InvokeCommand( "Connect-KshSite", new Dictionary<string, object>() { { "Url", context.AppSettings["AuthorityUrl"] + context.AppSettings["Site1Url"] }, { "Credential", PSCredentialFactory.CreateCredential( context.AppSettings["LoginUserName"], context.AppSettings["LoginPassword"]) } } ); var result2 = context.Runspace.InvokeCommand<Folder>( "Get-KshFolder", new Dictionary<string, object>() { { "FolderUrl", context.AppSettings["Folder1Url"] } } ); var result3 = context.Runspace.InvokeCommand<File>( "Add-KshFile", new Dictionary<string, object>() { { "Folder", result2.ElementAt(0) }, { "Content", Encoding.UTF8.GetBytes("TestFile0") }, { "FileName", "TestFile0.txt" } } ); var result4 = context.Runspace.InvokeCommand( "Publish-KshFile", new Dictionary<string, object>() { { "Identity", result3.ElementAt(0) } } ); var result5 = context.Runspace.InvokeCommand<File>( "Unpublish-KshFile", new Dictionary<string, object>() { { "Identity", result3.ElementAt(0) }, { "Comment", "Test Comment 0" }, { "PassThru", true } } ); var result6 = context.Runspace.InvokeCommand( "Remove-KshFile", new Dictionary<string, object>() { { "Identity", result3.ElementAt(0) } } ); var actual = result5.ElementAt(0); } } }
33.458824
102
0.48488
[ "MIT" ]
karamem0/SPClientCore
source/Karamem0.SPClientCore.Tests/UnpublishFileCommandTests.cs
2,844
C#
using Freezr.Entities; using Microsoft.EntityFrameworkCore; namespace Freezr.Model { public class FreezrContext : DbContext { public FreezrContext(DbContextOptions<FreezrContext> options) : base(options) { } public DbSet<Fridge> Fridges { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); var fridge = new Fridge { FridgeId = 1, Name = "Kitchen" }; modelBuilder.Entity<Fridge>().HasData(fridge); modelBuilder.Entity<Fridge>().Property(f => f.FridgeId).ValueGeneratedOnAdd(); } } }
26.8
90
0.638806
[ "MIT" ]
huserben/Freezr
Freezr.Backend/Freezr.Model/FreezrContext.cs
672
C#
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Threading.Tasks; using Grpc.Core; using Grpc.Core.Interceptors; using GrpcJsonTranscoder.Grpc; using GrpcJsonTranscoder.Internal.Grpc; using GrpcJsonTranscoder.Internal.Http; using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using Ocelot.LoadBalancer.LoadBalancers; using Ocelot.Logging; using Ocelot.Middleware; using Ocelot.Responses; namespace GrpcJsonTranscoder { public static class DownStreamContextExtensions { public static async Task HandleGrpcRequestAsync(this DownstreamContext context, Func<Task> next, IEnumerable<Interceptor> interceptors = null, SslCredentials secureCredentials = null) { // ignore if the request is not a gRPC content type if (!context.HttpContext.Request.Headers.Any(h => h.Key.ToLowerInvariant() == "content-type" && h.Value == "application/grpc")) { await next.Invoke(); } else { var methodPath = context.DownstreamReRoute.DownstreamPathTemplate.Value; var grpcAssemblyResolver = context.HttpContext.RequestServices.GetService<GrpcAssemblyResolver>(); var methodDescriptor = grpcAssemblyResolver.FindMethodDescriptor(methodPath.Split('/').Last().ToUpperInvariant()); if (methodDescriptor == null) { await next.Invoke(); } else { var logger = context.HttpContext.RequestServices.GetService<IOcelotLoggerFactory>().CreateLogger<GrpcAssemblyResolver>(); var upstreamHeaders = new Dictionary<string, string> { { "x-grpc-route-data", JsonConvert.SerializeObject(context.TemplatePlaceholderNameAndValues.Select(x => new {x.Name, x.Value})) }, { "x-grpc-body-data", await context.DownstreamRequest.Content.ReadAsStringAsync() } }; logger.LogInformation($"Upstream request method is {context.HttpContext.Request.Method}"); logger.LogInformation($"Upstream header data for x-grpc-route-data is {upstreamHeaders["x-grpc-route-data"]}"); logger.LogInformation($"Upstream header data for x-grpc-body-data is {upstreamHeaders["x-grpc-body-data"]}"); var requestObject = context.HttpContext.ParseRequestData(upstreamHeaders); var requestJsonData = JsonConvert.SerializeObject(requestObject); logger.LogInformation($"Request object data is {requestJsonData}"); var loadBalancerFactory = context.HttpContext.RequestServices.GetService<ILoadBalancerFactory>(); var loadBalancerResponse = await loadBalancerFactory.Get(context.DownstreamReRoute, context.Configuration.ServiceProviderConfiguration); var serviceHostPort = await loadBalancerResponse.Data.Lease(context); var downstreamHost = $"{serviceHostPort.Data.DownstreamHost}:{serviceHostPort.Data.DownstreamPort}"; logger.LogInformation($"Downstream IP Address is {downstreamHost}"); var channel = new Channel(downstreamHost, secureCredentials ?? ChannelCredentials.Insecure); MethodDescriptorCaller client = null; if (interceptors != null && interceptors.Count() > 0) { CallInvoker callInvoker = null; foreach (var inteceptor in interceptors) { callInvoker = channel.Intercept(inteceptor); } client = new MethodDescriptorCaller(callInvoker); } else { client = new MethodDescriptorCaller(channel); } var concreteObject = JsonConvert.DeserializeObject(requestJsonData, methodDescriptor.InputType.ClrType); var result = await client.InvokeAsync(methodDescriptor, context.HttpContext.GetRequestHeaders(), concreteObject); logger.LogDebug($"gRPC response called with {JsonConvert.SerializeObject(result)}"); var jsonSerializer = new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }; var response = new OkResponse<GrpcHttpContent>(new GrpcHttpContent(JsonConvert.SerializeObject(result, jsonSerializer))); var httpResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = response.Data }; context.HttpContext.Response.ContentType = "application/json"; context.DownstreamResponse = new DownstreamResponse(httpResponseMessage); } } } } }
50.582524
191
0.616699
[ "MIT" ]
HardikKSavaliya/coolstore-microservices
src/building-blocks/GrpcJsonTranscoder/DownStreamContextExtensions.cs
5,210
C#
// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------ // CS1591 - Missing XML comment for publicly visible type or member 'Type_or_Member' is disabled in this file because it does not ship anymore. #pragma warning disable 1591 namespace System.Fabric.Testability.Client { using System; using System.Collections.Generic; using System.Fabric.Description; using System.Fabric; using System.Fabric.Chaos.DataStructures; using System.Fabric.Health; using System.Fabric.ImageStore; using System.Fabric.Query; using System.Fabric.Result; using System.Fabric.Testability.Client.Structures; using System.Fabric.Testability.Scenario; using System.Numerics; using System.Threading; using System.Threading.Tasks; using Repair; public interface IFabricClient { string Name { get; } OperationResult<UpgradeDomainStatus[]> GetChangedUpgradeDomains(ApplicationUpgradeProgress previousApplicationUpgradeProgress, ApplicationUpgradeProgress currentApplicationUpgradeProgress); OperationResult<UpgradeDomainStatus[]> GetChangedUpgradeDomains(FabricUpgradeProgress previousFabricUpgradeProgress, FabricUpgradeProgress currentFabricUpgradeProgress); //// //// Application Management Client APIs //// Task<OperationResult> CreateApplicationAsync(ApplicationDescription applicationDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UpdateApplicationAsync(ApplicationUpdateDescription updateDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> DeleteApplicationAsync(DeleteApplicationDescription deleteApplicationDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<string>> GetApplicationManifestAsync(string applicationTypeName, string applicationTypeVersion, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ApplicationUpgradeProgress>> GetApplicationUpgradeProgressAsync(Uri name, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> MoveNextApplicationUpgradeDomainAsync(ApplicationUpgradeProgress currentProgress, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> ProvisionApplicationAsync(string buildPath, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> ProvisionApplicationAsync(ProvisionApplicationTypeDescriptionBase description, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> PutApplicationResourceAsync(string deploymentName, string descriptionJson, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> DeleteApplicationResourceAsync(string deploymentName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ApplicationResourceList>> GetApplicationResourceListAsync(string name, string continuationToken, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ServiceResourceList>> GetServiceResourceListAsync(string applicationname, string servicename, string continuationToken, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ReplicaResourceList>> GetReplicaResourceListAsync(string applicationname, string servicename, string replicaName, string continuationToken, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UnprovisionApplicationAsync(string applicationTypeName, string applicationTypeVersion, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UnprovisionApplicationAsync(UnprovisionApplicationTypeDescription description, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UpgradeApplicationAsync(ApplicationUpgradeDescription description, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UpdateApplicationUpgradeAsync(ApplicationUpgradeUpdateDescription description, TimeSpan timeout, CancellationToken cancellationToken); //// //// Cluster Management Client APIs //// Task<OperationResult> ActivateNodeAsync(string nodeName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> DeactivateNodeAsync(string nodeName, NodeDeactivationIntent deactivationIntent, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<string>> GetClusterManifestAsync(TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<string>> GetClusterManifestAsync(ClusterManifestQueryDescription description, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<string>> GetClusterVersionAsync(TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<FabricOrchestrationUpgradeProgress>> GetFabricConfigUpgradeProgressAsync(TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<string>> GetFabricConfigurationAsync(string apiVersion, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<string>> GetUpgradeOrchestrationServiceStateAsync(TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<FabricUpgradeOrchestrationServiceState>> SetUpgradeOrchestrationServiceStateAsync(string state, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<FabricUpgradeProgress>> GetFabricUpgradeProgressAsync(TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> MoveNextFabricUpgradeDomainAsync(FabricUpgradeProgress currentProgress, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> ProvisionFabricAsync(string codePackagePath, string clusterManifestFilePath, TimeSpan timeout, CancellationToken cancellationToken); //// TODO, API, Missing RecoverPartitionAsync Task<OperationResult> RecoverPartitionsAsync(TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RecoverServicePartitionsAsync(Uri serviceName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RecoverSystemPartitionsAsync(TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RemoveNodeStateAsync(string nodeName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UnprovisionFabricAsync(string codeVersion, string configVersion, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UpgradeFabricAsync(FabricUpgradeDescription description, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UpgradeFabricStandaloneAsync(ConfigurationUpgradeDescription description, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UpdateFabricUpgradeAsync(FabricUpgradeUpdateDescription updateDescription, TimeSpan timeout, CancellationToken cancellationToken); //// //// Health Client APIs //// Task<OperationResult<ApplicationHealth>> GetApplicationHealthAsync(ApplicationHealthQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ClusterHealth>> GetClusterHealthAsync(ClusterHealthQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ClusterHealthChunk>> GetClusterHealthChunkAsync(ClusterHealthChunkQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<NodeHealth>> GetNodeHealthAsync(NodeHealthQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<PartitionHealth>> GetPartitionHealthAsync(PartitionHealthQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ReplicaHealth>> GetReplicaHealthAsync(ReplicaHealthQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ServiceHealth>> GetServiceHealthAsync(ServiceHealthQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<DeployedServicePackageHealth>> GetDeployedServicePackageHealthAsync(DeployedServicePackageHealthQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<DeployedApplicationHealth>> GetDeployedApplicationHealthAsync(DeployedApplicationHealthQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); OperationResult ReportHealth(HealthReport healthReport, HealthReportSendOptions sendOptions); //// //// Image Store Client APIs //// Task<OperationResult<ImageStoreContentResult>> ListImageStoreContentAsync(string remoteLocation, string imageStoreConnectionString, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ImageStorePagedContentResult>> ListImageStorePagedContentAsync(ImageStoreListDescription listDescription, string imageStoreConnectionString, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> DeleteImageStoreContentAsync(string remoteLocation, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> CopyImageStoreContentAsync(WinFabricCopyImageStoreContentDescription description, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UploadChunkAsync(string remoteLocation, string sessionId, UInt64 startPosition, UInt64 endPosition, string filePath, UInt64 fileSize, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> DeleteUploadSessionAsync(Guid sessionId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<UploadSession>> ListUploadSessionAsync(Guid SessionId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> CommitUploadSessionAsync(Guid SessionId, TimeSpan tiemout, CancellationToken cancellationToken); //// //// Repair Management Client APIs //// Task<OperationResult<Int64>> CreateRepairTaskAsync(WinFabricRepairTask repairTask, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<Int64>> CancelRepairTaskAsync(string repairTaskId, Int64 version, bool requestAbort, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<Int64>> ForceApproveRepairTaskAsync(string repairTaskId, Int64 version, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> DeleteRepairTaskAsync(string repairTaskId, Int64 version, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<Int64>> UpdateRepairExecutionStateAsync(WinFabricRepairTask repairTask, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<WinFabricRepairTask[]>> GetRepairTaskListAsync(string taskIdFilter, WinFabricRepairTaskStateFilter stateFilter, string executorFilter, TimeSpan timeout, CancellationToken cancellationToken); //// //// Property Management Client APIs //// Task<OperationResult> CreateNameAsync(Uri name, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> DeleteNameAsync(Uri name, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> DeletePropertyAsync(Uri name, string propertyName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<WinFabricPropertyEnumerationResult>> EnumeratePropertiesAsync(Uri name, WinFabricPropertyEnumerationResult previousResult, bool includeValue, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<WinFabricNameEnumerationResult>> EnumerateSubNamesAsync(Uri name, WinFabricNameEnumerationResult previousResult, bool recursive, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<NamedProperty>> GetPropertyAsync(Uri name, string propertyName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<NamedPropertyMetadata>> GetPropertyMetadataAsync(Uri name, string propertyName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<bool>> NameExistsAsync(Uri name, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> PutCustomPropertyOperationAsync(Uri name, PutCustomPropertyOperation putCustomPropertyOperation, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> PutPropertyAsync(Uri name, string propertyName, object data, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<WinFabricPropertyBatchResult>> SubmitPropertyBatchAsync(Uri name, ICollection<PropertyBatchOperation> operations, TimeSpan timeout, CancellationToken cancellationToken); //// //// Query Client APIs //// Task<OperationResult<Application>> GetApplicationAsync(Uri applicationName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<NodeLoadInformation>> GetNodeLoadAsync(string nodeName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ClusterLoadInformation>> GetClusterLoadAsync(TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ReplicaLoadInformation>> GetReplicaLoadAsync(Guid partitionId, long replicaId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<PartitionLoadInformation>> GetPartitionLoadAsync(Guid partitionId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ApplicationLoadInformation>> GetApplicationLoadAsync(string applicationName, TimeSpan timeout, CancellationToken cancellationToken); //// TODO, API, Missing GetApplicationServiceTypeListAsync Task<OperationResult<ApplicationType[]>> GetApplicationTypeListAsync(string applicationTypeNameFilter, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ApplicationTypePagedList>> GetApplicationTypePagedListAsync(PagedApplicationTypeQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); // This overload exists only to test the PowerShell specific parameters which do not exist elsewhere. Task<OperationResult<ApplicationTypePagedList>> GetApplicationTypePagedListAsync(PagedApplicationTypeQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken, bool getPagedResults = false); Task<OperationResult<DeployedApplication[]>> GetDeployedApplicationListAsync(string nodeName, Uri applicationNameFilter, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<DeployedApplicationPagedList>> GetDeployedApplicationPagedListAsync( PagedDeployedApplicationQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<DeployedCodePackage[]>> GetDeployedCodePackageListAsync(string nodeName, Uri applicationName, string serviceManifestNameFilter, string codePackageNameFilter, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<DeployedServiceReplica[]>> GetDeployedReplicaListAsync(string nodeName, Uri applicationName, string serviceManifestNameFilter, Guid? partitionIdFilter, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<DeployedServicePackage[]>> GetDeployedServicePackageListAsync(string nodeName, Uri applicationName, string serviceManifestNameFilter, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<DeployedServiceType[]>> GetDeployedServiceTypeListAsync(string nodeName, Uri applicationName, string serviceManifestNameFilter, string serviceTypeNameFilter, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<NodeList>> GetNodeListAsync(NodeQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ServicePartitionList>> GetPartitionListAsync(Uri serviceName, string continuationToken, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ServiceReplicaList>> GetReplicaListAsync(Guid partitionId, long replicaIdOrInstanceIdFilter, string continuationToken, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ServiceList>> GetServicePagedListAsync(ServiceQueryDescription serviceQueryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ServiceType[]>> GetServiceTypeListAsync(string applicationTypeName, string applicationTypeVersion, string serviceTypeNameFilter, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ServiceNameResult>> GetServiceNameAsync(Guid partitionId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ApplicationNameResult>> GetApplicationNameAsync(Uri serviceName, TimeSpan timeout, CancellationToken cancellationToken); //// //// ServiceGroup Management Client APIs //// Task<OperationResult> CreateServiceGroupAsync(ServiceGroupDescription winFabricServiceGroupDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> DeleteServiceGroupAsync(Uri name, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UpdateServiceGroupAsync(ServiceKind serviceKind, Uri serviceGroupName, int targetReplicaSetSize, TimeSpan replicaRestartWaitDuration, TimeSpan quorumLossWaitDuration, int instanceCount, TimeSpan timeout, CancellationToken cancellationToken); // TODO, API, Missing GetServiceGroupDescriptionAsync //// //// Service Management Client APIs //// Task<OperationResult> CreateServiceAsync(ServiceDescription winFabricServiceDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> CreateServiceFromTemplateAsync( Uri applicationName, Uri serviceName, string serviceDnsName, string serviceTypeName, ServicePackageActivationMode servicePackageActivationMode, byte[] initializationData, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> DeleteServiceAsync(DeleteServiceDescription deleteServiceDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ServiceDescription>> GetServiceDescriptionAsync(Uri name, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<string>> GetServiceManifestAsync(string applicationTypeName, string applicationTypeVersion, string serviceManifestName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<TestServicePartitionInfo[]>> ResolveServiceAsync(Uri name, object partitionKey, TestServicePartitionInfo previousResult, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UpdateServiceAsync(Uri name, ServiceUpdateDescription description, TimeSpan timeout, CancellationToken cancellationToken); //// //// Infrastructure Apis //// Task<OperationResult<string>> InvokeInfrastructureCommandAsync(Uri serviceName, string command, TimeSpan timeout, CancellationToken cancellationToken); //// //// PowerShell Specific APIs //// Task<OperationResult<string>> InvokeEncryptSecretAsync(string certificateThumbprint, string certificateStoreLocation, string text, CancellationToken cancellationToken); Task<OperationResult> NewNodeConfigurationAsync(string clusterManifestPath, string computerName, string userName, string password, CancellationToken cancellationToken); Task<OperationResult> UpdateNodeConfigurationAsync(string clusterManifestPath, string computerName, string userName, string password, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RemoveNodeConfigurationAsync(string clusterManifestPath, string computerName, string userName, string password, CancellationToken cancellationToken); Task<OperationResult<bool>> TestClusterConnectionAsync(CancellationToken cancellationToken); Task<OperationResult<bool>> TestClusterManifestAsync(string clusterManifestPath, CancellationToken cancellationToken); Task<OperationResult<bool>> TestApplicationPackageAsync(string applicationPackagePath, string imageStoreConnectionString, CancellationToken cancellationToken); Task<OperationResult> CopyApplicationPackageAndShowProgressAsync(string applicationPackagePath, string imageStoreConnectionString, string applicationPackagePathInImageStore, bool compress, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> CopyApplicationPackageAsync(string applicationPackagePath, string imageStoreConnectionString, string applicationPackagePathInImageStore, bool compress, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> CopyClusterPackageAsync(string codePackagePath, string clusterManifestPath, string imageStoreConnectionString, string codePackagePathInImageStore, string clusterManifestPathInImageStore, CancellationToken cancellationToken); Task<OperationResult> CopyClusterPackageAsync(string codePackagePath, string clusterManifestPath, string imageStoreConnectionString, string codePackagePathInImageStore, string clusterManifestPathInImageStore, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> CopyWindowsFabricServicePackageToNodeAsync(string serviceManifestName, string applicationTypeName, string applicationTypeVersion, string nodeName, PackageSharingPolicyDescription[] policies, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> StartRepairTaskAsync(string nodeName, SystemNodeRepairAction nodeAction, string[] nodeNames, string customAction, NodeImpactLevel nodeImpact, string taskId, string description, TimeSpan timeout, CancellationToken cancellationToken); //// //// REST Specific APIs //// Task<OperationResult<Application>> GetApplicationByIdRestAsync(string applicationId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<Node>> GetNodeAsync(string nodeName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ServicePartitionList>> GetPartitionListRestAsync(string applicationName, string serviceName, string continuationToken, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ServiceReplicaList>> GetReplicaListRestAsync(Uri applicationName, Uri serviceName, Guid partitionId, string continuationToken, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<Service>> GetServiceByIdRestAsync(string applicationId, string serviceId, TimeSpan timeout, CancellationToken cancellationToken); //// //// BRS commands //// Task<OperationResult> CreateBackupPolicyAsync(string policyJson); Task<OperationResult> EnableBackupProtectionAsync(string policyNameJson, string fabricUri, TimeSpan timeout); //// //// TODO, API, Remove or Rename? //// Task<OperationResult<Partition>> GetServicePartitionAsync(Uri serviceName, Guid partitionId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<Replica>> GetServicePartitionReplicaAsync(Guid partitionId, long id, bool isStateful, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ApplicationType>> GetApplicationTypeAsync(string applicationTypeName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ApplicationList>> GetApplicationPagedListAsync(ApplicationQueryDescription applicationQueryDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> AddUnreliableTransportBehaviorAsync(string nodeName, string name, System.Fabric.Testability.UnreliableTransportBehavior behavior, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RemoveUnreliableTransportBehaviorAsync(string nodeName, string name, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> AddUnreliableLeaseBehaviorAsync(string nodeName, string behaviorString, string alias, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RemoveUnreliableLeaseBehaviorAsync(string nodeName, string alias, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RemoveApplicationPackageAsync(string applicationPackagePathInImageStore, string imageStoreConnectionString, TimeSpan timeout, CancellationToken cancellationToken); event EventHandler<WinFabricServiceResolutionChangeEventArgs> ServiceResolutionChanged; OperationResult<long> RegisterServicePartitionResolutionChangeHandler(Uri name, object partitionKey); OperationResult UnregisterServicePartitionResolutionChangeHandler(long callbackId); Task<OperationResult> StartNodeNativeAsync(string nodeName, BigInteger instanceId, string ipAddressOrFQDN, int clusterConnectionPort, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RegisterServiceNotificationFilterAsync(ServiceNotificationFilterDescription filterDescription, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> UnregisterServiceNotificationFilterAsync(long filterId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> StopNodeNativeAsync(string nodeName, BigInteger instanceId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RestartNodeNativeAsync(string nodeName, BigInteger instanceId, bool createFabricDump, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<RestartNodeResult>> RestartNodeAsync(ReplicaSelector replicaSelector, bool createFabricDump, CompletionMode completionMode, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<RestartNodeResult>> RestartNodeAsync(string nodeName, BigInteger instanceId, bool createFabricDump, CompletionMode completionMode, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RestartDeployedCodePackageNativeAsync(string nodeName, Uri applicationName, string serviceManifestName, string servicePackageActivationId, string codePackageName, long instanceId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RestartReplicaInternalAsync(string nodeName, Guid partitionId, long replicaOrInstanceId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> RemoveReplicaInternalAsync(string nodeName, Guid partitionId, long replicaOrInstanceId, bool forceRemove, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> StartPartitionDataLossAsync(Guid operationId, PartitionSelector partitionSelector, DataLossMode dataLossMode, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<PartitionDataLossProgress>> GetPartitionDataLossProgressAsync(Guid operationId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> StartPartitionQuorumLossAsync(Guid operationId, PartitionSelector partitionSelector, QuorumLossMode quorumlossMode, TimeSpan quorumlossDuration, TimeSpan operationTimeout, CancellationToken cancellationToken); Task<OperationResult<PartitionQuorumLossProgress>> GetPartitionQuorumLossProgressAsync(Guid operationId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> StartPartitionRestartAsync(Guid operationId, PartitionSelector partitionSelector, RestartPartitionMode restartPartitionMode, TimeSpan operationTimeout, CancellationToken cancellationToken); Task<OperationResult<PartitionRestartProgress>> GetPartitionRestartProgressAsync(Guid operationId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> CancelTestCommandAsync(Guid operationId, bool force, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<TestCommandStatusList>> GetTestCommandStatusListAsync(TestCommandStateFilter stateFilter, TestCommandTypeFilter typeFilter, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> StartChaosAsync( ChaosParameters chaosTestScenarioParameters, TimeSpan operationTimeout, CancellationToken cancellationToken); Task<OperationResult<ChaosDescription>> GetChaosAsync( TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ChaosScheduleDescription>> GetChaosScheduleAsync( TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> SetChaosScheduleAsync( string scheduleJson, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ChaosEventsSegment>> GetChaosEventsAsync( DateTime startTime, DateTime endTime, string continuationToken, long maxResults, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<ChaosReport>> GetChaosReportAsync( DateTime startTime, DateTime endTime, string continuationToken, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> StopChaosAsync( TimeSpan operationTimeout, CancellationToken cancellationToken); Task<OperationResult> StartNodeTransitionAsync( NodeTransitionDescription description, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<NodeTransitionProgress>> GetNodeTransitionProgressAsync( Guid operationId, string nodeName, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> StartPartitionDataLossRestAsync( Guid operationId, Uri serviceName, Guid partitionId, DataLossMode dataLossMode, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<PartitionDataLossProgress>> GetPartitionDataLossProgressRestAsync( Guid operationId, Uri serviceName, Guid partitionId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> StartPartitionQuorumLossRestAsync( Guid operationId, Uri serviceName, Guid partitionId, QuorumLossMode quorumlossMode, TimeSpan quorumlossDuration, TimeSpan operationTimeout, CancellationToken cancellationToken); Task<OperationResult<PartitionQuorumLossProgress>> GetPartitionQuorumLossProgressRestAsync( Guid operationId, Uri serviceName, Guid partitionId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult> StartPartitionRestartRestAsync( Guid operationId, Uri serviceName, Guid partitionId, RestartPartitionMode restartPartitionMode, TimeSpan operationTimeout, CancellationToken cancellationToken); Task<OperationResult<PartitionRestartProgress>> GetPartitionRestartProgressRestAsync( Guid operationId, Uri serviceName, Guid partitionId, TimeSpan timeout, CancellationToken cancellationToken); Task<OperationResult<List<string>>> GetEventsStorePartitionEventsRestAsync( Guid partitionId, DateTime startTimeUtc, DateTime endTimeUtc, IList<string> eventsTypesFilter, bool excludeAnalysisEvent, bool skipCorrelationLookup); } } #pragma warning restore 1591
64
276
0.798704
[ "MIT" ]
AndreyTretyak/service-fabric
src/prod/src/managed/Api/src/System/Fabric/Testability/Client/IFabricClient.cs
33,344
C#
using BookStore.API.Data; using BookStore.API.DependencyInjection; using BookStore.API.Mappings; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Identity; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.IdentityModel.Tokens; using NLog.Extensions.Logging; using System; using System.IO; using System.Reflection; using System.Text; namespace BookStore.API { public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddDbContext<ApplicationDbContext>(options => options.UseSqlServer( Configuration.GetConnectionString("DefaultConnection"))); services.AddDatabaseDeveloperPageExceptionFilter(); services.AddDefaultIdentity<IdentityUser>() .AddRoles<IdentityRole>() .AddEntityFrameworkStores<ApplicationDbContext>(); services.AddControllers(); services.AddSwaggerGen(o => { o.SwaggerDoc("v1", new Microsoft.OpenApi.Models.OpenApiInfo { Title = "Book API", Version = "v1", Contact = new Microsoft.OpenApi.Models.OpenApiContact { Email = "gilthayllor@outlook.com", Name = "Gilthayllor Sousa", Url = new Uri("https://www.linkedin.com/in/gilthayllor-brandao") } }); var xFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"; var xPath = Path.Combine(AppContext.BaseDirectory, xFile); o.IncludeXmlComments(xPath); }); services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer(x => { x.TokenValidationParameters = new TokenValidationParameters { ValidateIssuer = true, ValidateAudience = true, ValidateLifetime = true, ValidateIssuerSigningKey = true, ValidIssuer = Configuration["JWT:Issuer"], ValidAudience = Configuration["JWT:Issuer"], IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(Configuration["JWT:Key"])) }; }); services.AddLogging(log => { log.ClearProviders(); log.AddNLog(Configuration); }); services.AddCors(o => { o.AddPolicy("BookStorePolicy", builder => builder.AllowAnyOrigin() .AllowAnyMethod() .AllowAnyHeader()); }); services.AddAutoMapper(typeof(Maps)); services.ConfigureRepositoryDependencyInjection(); services.ConfigureServiceDependencyInjection(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, UserManager<IdentityUser> userManager, RoleManager<IdentityRole> roleManager) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseMigrationsEndPoint(); } else { app.UseExceptionHandler("/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseCors("BookStorePolicy"); SeedData.Seed(userManager, roleManager).Wait(); app.UseRouting(); app.UseSwagger(); app.UseSwaggerUI(x => x.SwaggerEndpoint("/swagger/v1/swagger.json", "Book API")); app.UseAuthentication(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); } } }
34.417266
143
0.571697
[ "MIT" ]
Gilthayllor/BlazorStudies
BookStore/BookStore.API/Startup.cs
4,784
C#
using System; using System.Numerics; using System.Runtime.CompilerServices; using System.Threading; using Titan.Core; using Titan.Core.Memory; using Titan.Graphics; using Titan.Graphics.Loaders.Fonts; using Titan.UI.Text; namespace Titan.UI.Rendering { internal struct TextBatchSprite { public Vector2 Position; public Handle<TextBlock> Handle; public Handle<Font> Font; public ushort Count; public Color Color; } internal class TextBatch : IDisposable { private readonly TextManager _textManager; private readonly FontManager _fontManager; private readonly MemoryChunk<TextBatchSprite> _textBatches; private int _count; public TextBatch(uint maxTextBlocks, TextManager textManager, FontManager fontManager) { _textManager = textManager; _fontManager = fontManager; _textBatches = MemoryUtils.AllocateBlock<TextBatchSprite>(maxTextBlocks); } [MethodImpl(MethodImplOptions.AggressiveInlining|MethodImplOptions.AggressiveOptimization)] public unsafe int Add(in Vector2 position, in Handle<TextBlock> handle, in Handle<Font> font, ushort count, in Color color) { var index = NextIndex(); var text = _textBatches.GetPointer(index); text->Handle = handle; text->Font = font; text->Count = count; text->Position = position; text->Color = color; return index; } [MethodImpl(MethodImplOptions.AggressiveInlining)] private int NextIndex() => Interlocked.Increment(ref _count) - 1; [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] public unsafe void Render(int index, ref UIVertex* vertex, ref uint vertexIndex, ref uint indexCount) { var batch = _textBatches.GetPointer(index); ref readonly var text = ref _textManager.Access(batch->Handle); ref readonly var visibleCharacters = ref text.VisibleCharacters; ref readonly var font = ref _fontManager.Access(batch->Font); for (var i = 0; i < batch->Count; ++i) { var character = visibleCharacters.GetPointer(i); ref readonly var glyph = ref font.Get(character->Value); var bottomLeft = character->BottomLeft + batch->Position; var topRight = character->TopRight + batch->Position; vertex->Position = bottomLeft; vertex->Texture = new Vector2(glyph.TopLeft.X, glyph.BottomRight.Y); vertex->Color = batch->Color; vertex++; vertex->Position = new Vector2(bottomLeft.X, topRight.Y); vertex->Texture = glyph.TopLeft; vertex->Color = batch->Color; vertex++; vertex->Position = topRight; vertex->Texture = new Vector2(glyph.BottomRight.X, glyph.TopLeft.Y); vertex->Color = batch->Color; vertex++; vertex->Position = new Vector2(topRight.X, bottomLeft.Y); vertex->Texture = glyph.BottomRight; vertex->Color = batch->Color; vertex++; } vertexIndex += (uint)(4 * batch->Count); indexCount += (uint)(6 * batch->Count); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Clear() => _count = 0; public void Dispose() { _textBatches.Free(); } } }
34.537736
131
0.60366
[ "MIT" ]
Golle/Titan
src/Titan.UI/Rendering/TextBatch.cs
3,661
C#
#region Usings using System; using System.Collections.Generic; using System.IO; using System.IO.Abstractions; using System.Linq; using System.Threading.Tasks; using FSOManagement.Annotations; using ModInstallation.Implementations.DataClasses; using ModInstallation.Interfaces.Mods; using Splat; #endregion namespace ModInstallation.Implementations.Mods { public class PostInstallActions : IPostInstallActions, IEnableLogger { private readonly IEnumerable<ActionData> _actionData; private readonly IFileSystem _fileSystem; public PostInstallActions([NotNull] IFileSystem fileSystem, [NotNull] IEnumerable<ActionData> actionData) { _fileSystem = fileSystem; _actionData = actionData; } #region IPostInstallActions Members public Task ExecuteActionsAsync(string installFolder) { return Task.Run(() => ExecuteActions(installFolder)); } #endregion private void ApplyFileOperations([NotNull] IEnumerable<string> files, [NotNull] Action<string> op) { foreach (var file in files) { try { op(file); } catch (Exception e) { this.Log().WarnException("Error while executing post installation actions!", e); } } } public void ExecuteActions([NotNull] string installFolder) { foreach (var actionData in _actionData) { if (actionData.type == ActionType.Mkdir) { if (actionData.paths != null) { foreach (var path in actionData.paths) { _fileSystem.Directory.CreateDirectory(_fileSystem.Path.Combine(installFolder, path)); } } continue; } var paths = GetPaths(actionData, installFolder); var destPath = _fileSystem.Path.Combine(installFolder, actionData.dest ?? ""); switch (actionData.type) { case ActionType.Delete: ApplyFileOperations(paths, path => { if (_fileSystem.Directory.Exists(path)) { _fileSystem.Directory.Delete(path, true); } else { _fileSystem.File.Delete(path); } }); break; case ActionType.Move: ApplyFileOperations(paths, path => { var destFileName = _fileSystem.Path.Combine(destPath, _fileSystem.Path.GetFileName(path)); if (_fileSystem.Directory.Exists(path)) { _fileSystem.Directory.Move(path, destFileName); } else { if (_fileSystem.File.Exists(destFileName)) { _fileSystem.File.Delete(destFileName); } _fileSystem.File.Move(path, destFileName); } }); break; case ActionType.Copy: ApplyFileOperations(paths, path => { var destFileName = _fileSystem.Path.Combine(destPath, _fileSystem.Path.GetFileName(path)); if (_fileSystem.Directory.Exists(path)) { DirectoryCopy(path, destFileName, true); } else { _fileSystem.File.Copy(path, destFileName, true); } }); break; } } } private static void DirectoryCopy([NotNull] string sourceDirName, [NotNull] string destDirName, bool copySubDirs) { var dir = new DirectoryInfo(sourceDirName); var dirs = dir.GetDirectories(); // If the source directory does not exist, throw an exception. if (!dir.Exists) { throw new DirectoryNotFoundException("Source directory does not exist or could not be found: " + sourceDirName); } // If the destination directory does not exist, create it. if (!Directory.Exists(destDirName)) { Directory.CreateDirectory(destDirName); } // Get the file contents of the directory to copy. var files = dir.GetFiles(); foreach (var file in files) { // Create the path to the new copy of the file. var temppath = Path.Combine(destDirName, file.Name); // Copy the file. file.CopyTo(temppath, false); } // If copySubDirs is true, copy the subdirectories. if (copySubDirs) { foreach (var subdir in dirs) { // Create the subdirectory. var temppath = Path.Combine(destDirName, subdir.Name); // Copy the subdirectories. DirectoryCopy(subdir.FullName, temppath, true); } } } [NotNull] public IEnumerable<string> GetPaths([NotNull] ActionData actionData, [NotNull] string installFolder) { if (actionData.paths == null) { yield break; } foreach (var path in actionData.paths.Select(CorrectPath)) { string[] entries; try { entries = _fileSystem.Directory.GetDirectories(installFolder, path, SearchOption.TopDirectoryOnly); } catch (DirectoryNotFoundException) { // This path does not exist continue; } foreach (var entry in entries) { yield return entry; } entries = _fileSystem.Directory.GetFiles(installFolder, path, SearchOption.TopDirectoryOnly); foreach (var entry in entries) { yield return entry; } } } [NotNull] private string CorrectPath([NotNull] string path) { return path.Replace(_fileSystem.Path.AltDirectorySeparatorChar, _fileSystem.Path.DirectorySeparatorChar); } } }
35.287736
128
0.451811
[ "MIT" ]
asarium/FSOLauncher
Libraries/ModInstallation/Implementations/Mods/PostInstallActions.cs
7,483
C#
// Copyright (c) 2017 Jan Pluskal // //Licensed under the Apache License, Version 2.0 (the "License"); //you may not use this file except in compliance with the License. //You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // //Unless required by applicable law or agreed to in writing, software //distributed under the License is distributed on an "AS IS" BASIS, //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //See the License for the specific language governing permissions and //limitations under the License. using Netfox.AppIdent.Features.Bases; using Netfox.Core.Enums; using Netfox.Framework.Models; namespace Netfox.AppIdent.Features { public class MinInterArrivalTimeDownFlow : MinInterArrivalTimeBase { public MinInterArrivalTimeDownFlow() { } public MinInterArrivalTimeDownFlow(L7Conversation l7Conversation) : base(l7Conversation, DaRFlowDirection.down) { } public MinInterArrivalTimeDownFlow(double featureValue) : base(featureValue) { } } }
39.37037
123
0.761054
[ "Apache-2.0" ]
mvondracek/NetfoxDetective
Framework/ApplicationRecognizers/AppIdent/Features/MinInterArrivalTimeDownFlow.cs
1,065
C#
using System.IO; using Common; using FluentAssertions; using MD2Viewer; using Xunit; namespace Tests { public class MD2FileTests { [Fact] public void SimpleMD2Load() { Stream stream = null; try { stream = File.OpenRead("infantry.md2"); var md2 = new MD2File(stream, DirectHeapMemoryAllocator.Instance); md2.SkinWidth.Should().Be(276); md2.SkinHeight.Should().Be(194); md2.Skins.Length.Should().Be(2); md2.Skins.Data[0].GetPath().Should().Be("models/monsters/infantry/skin.pcx"); md2.Skins.Data[1].GetPath().Should().Be("models/monsters/infantry/pain.pcx"); md2.VertexCount.Should().Be(240); md2.Triangles.Length.Should().Be(460); md2.FrameCount.Should().Be(214); foreach (var frame in md2.Frames) frame.GetName().Should().NotBeEmpty(); } finally { stream?.Dispose(); } } } }
23.27027
81
0.664344
[ "MIT" ]
RaZeR-RBI/q2-veldrid-viewer
Tests/MD2FileTests.cs
861
C#
using System.Collections.Generic; namespace DataKit.Modelling { /// <summary> /// A model of a data structure. /// </summary> public interface IDataModel : IModelNode { IReadOnlyList<IModelField> Fields { get; } IModelField this[string fieldName] { get; } bool TryGetField(string fieldName, out IModelField field); } public interface IDataModel<TField> : IDataModel where TField : IModelField { new IReadOnlyList<TField> Fields { get; } new TField this[string fieldName] { get; } bool TryGetField(string fieldName, out TField field); } /// <summary> /// A model of a data structure. /// </summary> /// <typeparam name="TField"></typeparam> public interface IDataModel<TModel, TField> : IDataModel<TField> where TModel : IDataModel<TModel, TField> where TField : IModelField<TModel, TField> { new IReadOnlyList<TField> Fields { get; } new TField this[string fieldName] { get; } new bool TryGetField(string fieldName, out TField field); } }
24.52381
66
0.681553
[ "MIT" ]
DevJohnC/DataKit
DataKit.Modelling/IDataModel.cs
1,032
C#
using Amazon.DynamoDBv2; using WBPA.Amazon.Attributes; namespace WBPA.Amazon.DynamoDb.Indexes { /// <summary> /// Represents a partition key of a table or index. This class cannot be inherited. /// </summary> /// <seealso cref="Key" /> public sealed class PartitionKey : Key { /// <summary> /// Initializes a new instance of the <see cref="PartitionKey"/> class. /// </summary> /// <param name="keyName">The name of the key of a table or index.</param> /// <param name="keyType">The data type of the key of a table or index.</param> public PartitionKey(string keyName, AttributeType keyType = AttributeType.String) : base(keyName, keyType) { } internal override KeyType Role => KeyType.HASH; } }
34.695652
114
0.629073
[ "MIT" ]
wbpa/amazon-dynamodb
src/WBPA.Amazon.DynamoDb/Indexes/PartitionKey.cs
800
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; using Xunit; namespace JitTest_s_addsub_signed_cs { public class Test { private static void testNumbers(long a, long b) { long c = 0; try { c = checked(a + b); } catch (OverflowException) { bool negative = false; ulong au, bu; if (a < 0) { negative = !negative; au = checked((ulong)(-a)); } else { au = checked((ulong)a); } if (b < 0) { negative = !negative; bu = checked((ulong)(-b)); } else { bu = checked((ulong)b); } ulong AH = au >> 32; ulong AL = au & 0xffffffff; ulong BH = bu >> 32; ulong BL = bu & 0xffffffff; ulong L = checked(BL + AL); ulong H = checked(AH + BH); if (H < 0x100000000) { if (L >= 0x100000000) { checked { H++; L -= 0x100000000; if (L >= 0x100000000) throw new Exception(); } } if (checked(L <= 0xffffffffffffffff - (H << 32))) throw new Exception(); } return; } if (checked(c - b != a || c - a != b)) throw new Exception(); } [Fact] public static int TestEntryPoint() { try { testNumbers(unchecked((long)0x0000000000000009), unchecked((long)0x00000000000000b8)); testNumbers(unchecked((long)0x0000000000000009), unchecked((long)0x00000000000000f9)); testNumbers(unchecked((long)0x000000000000006e), unchecked((long)0x0000000000000093)); testNumbers(unchecked((long)0x000000000000001e), unchecked((long)0x0000000000000086)); testNumbers(unchecked((long)0x00000000000000cc), unchecked((long)0x000000000000583f)); testNumbers(unchecked((long)0x00000000000000c9), unchecked((long)0x000000000000a94c)); testNumbers(unchecked((long)0x0000000000000054), unchecked((long)0x0000000000002d06)); testNumbers(unchecked((long)0x0000000000000030), unchecked((long)0x0000000000009921)); testNumbers(unchecked((long)0x000000000000001d), unchecked((long)0x0000000000450842)); testNumbers(unchecked((long)0x000000000000002a), unchecked((long)0x0000000000999f6c)); testNumbers(unchecked((long)0x00000000000000c5), unchecked((long)0x000000000090faa7)); testNumbers(unchecked((long)0x0000000000000050), unchecked((long)0x000000000069de08)); testNumbers(unchecked((long)0x000000000000009a), unchecked((long)0x000000000cd715be)); testNumbers(unchecked((long)0x0000000000000039), unchecked((long)0x0000000016a61eb5)); testNumbers(unchecked((long)0x00000000000000e0), unchecked((long)0x0000000095575fef)); testNumbers(unchecked((long)0x0000000000000093), unchecked((long)0x00000000209e58c5)); testNumbers(unchecked((long)0x000000000000003b), unchecked((long)0x0000000c3c34b48c)); testNumbers(unchecked((long)0x00000000000000c2), unchecked((long)0x0000006a671c470f)); testNumbers(unchecked((long)0x000000000000004b), unchecked((long)0x000000f538cede2b)); testNumbers(unchecked((long)0x0000000000000099), unchecked((long)0x0000005ba885d43b)); testNumbers(unchecked((long)0x0000000000000068), unchecked((long)0x00009f692f98ac45)); testNumbers(unchecked((long)0x00000000000000d9), unchecked((long)0x00008d5eaa7f0a8e)); testNumbers(unchecked((long)0x00000000000000ac), unchecked((long)0x0000ba1316512e4c)); testNumbers(unchecked((long)0x000000000000001c), unchecked((long)0x00008c4fbf2f14aa)); testNumbers(unchecked((long)0x00000000000000c0), unchecked((long)0x0069a9eb9a9bc822)); testNumbers(unchecked((long)0x0000000000000074), unchecked((long)0x003f8f5a893de200)); testNumbers(unchecked((long)0x0000000000000027), unchecked((long)0x000650eb1747a5bc)); testNumbers(unchecked((long)0x00000000000000d9), unchecked((long)0x00d3d50809c70fda)); testNumbers(unchecked((long)0x00000000000000c0), unchecked((long)0xac6556a4ca94513e)); testNumbers(unchecked((long)0x0000000000000020), unchecked((long)0xa697fcbfd6d232d1)); testNumbers(unchecked((long)0x000000000000009c), unchecked((long)0xc4421a4f5147b9b8)); testNumbers(unchecked((long)0x000000000000009e), unchecked((long)0xc5ef494112a7b33f)); testNumbers(unchecked((long)0x000000000000f7fa), unchecked((long)0x00000000000000af)); testNumbers(unchecked((long)0x000000000000ad17), unchecked((long)0x00000000000000e8)); testNumbers(unchecked((long)0x000000000000c9c4), unchecked((long)0x0000000000000045)); testNumbers(unchecked((long)0x000000000000a704), unchecked((long)0x0000000000000012)); testNumbers(unchecked((long)0x000000000000c55b), unchecked((long)0x000000000000a33a)); testNumbers(unchecked((long)0x000000000000ab88), unchecked((long)0x0000000000009a3c)); testNumbers(unchecked((long)0x000000000000a539), unchecked((long)0x000000000000cf3a)); testNumbers(unchecked((long)0x0000000000005890), unchecked((long)0x000000000000eec8)); testNumbers(unchecked((long)0x000000000000e9e2), unchecked((long)0x0000000000fe7c46)); testNumbers(unchecked((long)0x0000000000007303), unchecked((long)0x0000000000419f2a)); testNumbers(unchecked((long)0x000000000000e105), unchecked((long)0x000000000013f913)); testNumbers(unchecked((long)0x0000000000008191), unchecked((long)0x0000000000fa2458)); testNumbers(unchecked((long)0x00000000000006d9), unchecked((long)0x0000000091cf14f7)); testNumbers(unchecked((long)0x000000000000bdb1), unchecked((long)0x0000000086c2a97c)); testNumbers(unchecked((long)0x000000000000e905), unchecked((long)0x0000000064f702f4)); testNumbers(unchecked((long)0x0000000000002fdc), unchecked((long)0x00000000f059caf6)); testNumbers(unchecked((long)0x000000000000f8fd), unchecked((long)0x00000013f0265b1e)); testNumbers(unchecked((long)0x000000000000e8b8), unchecked((long)0x0000000aa69a6308)); testNumbers(unchecked((long)0x0000000000003d00), unchecked((long)0x000000fbcb67879b)); testNumbers(unchecked((long)0x000000000000aa46), unchecked((long)0x00000085c3d371d5)); testNumbers(unchecked((long)0x0000000000005f60), unchecked((long)0x000008cde4a63203)); testNumbers(unchecked((long)0x00000000000092b5), unchecked((long)0x00007ca86ba2f30e)); testNumbers(unchecked((long)0x00000000000093c6), unchecked((long)0x0000a2d73fc4eac0)); testNumbers(unchecked((long)0x0000000000004156), unchecked((long)0x000006dbd08f2fda)); testNumbers(unchecked((long)0x0000000000004597), unchecked((long)0x006cfb0ba5962826)); testNumbers(unchecked((long)0x0000000000006bac), unchecked((long)0x001e79315071480f)); testNumbers(unchecked((long)0x0000000000002c3a), unchecked((long)0x0092f12cbd82df69)); testNumbers(unchecked((long)0x0000000000009859), unchecked((long)0x00b0f0cd9dc019f2)); testNumbers(unchecked((long)0x000000000000b37f), unchecked((long)0x4966447d15850076)); testNumbers(unchecked((long)0x0000000000005e34), unchecked((long)0x7c1869c9ed2cad38)); testNumbers(unchecked((long)0x0000000000005c54), unchecked((long)0x7cee70ee82837a08)); testNumbers(unchecked((long)0x000000000000967f), unchecked((long)0x4eb98adf4b8b0d32)); testNumbers(unchecked((long)0x0000000000fd2919), unchecked((long)0x000000000000005d)); testNumbers(unchecked((long)0x0000000000abd5b1), unchecked((long)0x0000000000000098)); testNumbers(unchecked((long)0x0000000000ab1887), unchecked((long)0x00000000000000ef)); testNumbers(unchecked((long)0x000000000096034a), unchecked((long)0x000000000000002f)); testNumbers(unchecked((long)0x0000000000d5bb94), unchecked((long)0x00000000000057d2)); testNumbers(unchecked((long)0x0000000000d7b2cb), unchecked((long)0x00000000000080f5)); testNumbers(unchecked((long)0x00000000004ccc6d), unchecked((long)0x000000000000087c)); testNumbers(unchecked((long)0x0000000000ec0c50), unchecked((long)0x000000000000bdff)); testNumbers(unchecked((long)0x00000000008a6865), unchecked((long)0x000000000076c014)); testNumbers(unchecked((long)0x0000000000ac38dd), unchecked((long)0x0000000000f12b09)); testNumbers(unchecked((long)0x0000000000615e2a), unchecked((long)0x0000000000e7cbf8)); testNumbers(unchecked((long)0x00000000000e214f), unchecked((long)0x00000000005b8e2f)); testNumbers(unchecked((long)0x00000000003bd7c6), unchecked((long)0x00000000c1db4e46)); testNumbers(unchecked((long)0x0000000000ae208d), unchecked((long)0x0000000001c9aa7a)); testNumbers(unchecked((long)0x00000000008a9cef), unchecked((long)0x0000000003930b07)); testNumbers(unchecked((long)0x000000000036b866), unchecked((long)0x00000000d64b7bef)); testNumbers(unchecked((long)0x0000000000d337cd), unchecked((long)0x000000a2b45fb7de)); testNumbers(unchecked((long)0x0000000000024471), unchecked((long)0x0000005c5de3da89)); testNumbers(unchecked((long)0x0000000000012b15), unchecked((long)0x0000007cd40030fe)); testNumbers(unchecked((long)0x0000000000d38af2), unchecked((long)0x0000005905921572)); testNumbers(unchecked((long)0x0000000000aca0d7), unchecked((long)0x0000c632301abeb8)); testNumbers(unchecked((long)0x00000000004eadc2), unchecked((long)0x00006a1ebf37403c)); testNumbers(unchecked((long)0x00000000005d909c), unchecked((long)0x00004021bfa15862)); testNumbers(unchecked((long)0x0000000000710e08), unchecked((long)0x0000e9a1a030b230)); testNumbers(unchecked((long)0x0000000000478b9b), unchecked((long)0x00804add8afc31d9)); testNumbers(unchecked((long)0x00000000005754ed), unchecked((long)0x00af85e7ebb1ce33)); testNumbers(unchecked((long)0x00000000003ab44e), unchecked((long)0x00f41b9f70360f78)); testNumbers(unchecked((long)0x00000000007aa129), unchecked((long)0x00eb6e4eddf7eb87)); testNumbers(unchecked((long)0x00000000003b036f), unchecked((long)0x333874e4330fbfa4)); testNumbers(unchecked((long)0x0000000000a33186), unchecked((long)0xec8607412503fc4c)); testNumbers(unchecked((long)0x00000000009af471), unchecked((long)0xe7ad0935fdbff151)); testNumbers(unchecked((long)0x0000000000c04e8c), unchecked((long)0x58ee406ab936ac24)); testNumbers(unchecked((long)0x0000000054fdd28b), unchecked((long)0x0000000000000034)); testNumbers(unchecked((long)0x0000000033736b36), unchecked((long)0x00000000000000fd)); testNumbers(unchecked((long)0x0000000069cfe4b7), unchecked((long)0x0000000000000026)); testNumbers(unchecked((long)0x00000000fd078d36), unchecked((long)0x00000000000000dc)); testNumbers(unchecked((long)0x0000000075cc3f36), unchecked((long)0x0000000000001617)); testNumbers(unchecked((long)0x00000000075d660e), unchecked((long)0x0000000000008511)); testNumbers(unchecked((long)0x0000000052acb037), unchecked((long)0x00000000000043cb)); testNumbers(unchecked((long)0x00000000a0db7bf5), unchecked((long)0x0000000000002c98)); testNumbers(unchecked((long)0x0000000083d4be11), unchecked((long)0x0000000000ba37c9)); testNumbers(unchecked((long)0x0000000083d04f94), unchecked((long)0x00000000003ddbd0)); testNumbers(unchecked((long)0x000000005ed41f6a), unchecked((long)0x0000000000eaf1d5)); testNumbers(unchecked((long)0x000000000e364a9a), unchecked((long)0x000000000085880c)); testNumbers(unchecked((long)0x0000000012657ecb), unchecked((long)0x00000000a88b8a68)); testNumbers(unchecked((long)0x000000009897a4ac), unchecked((long)0x0000000076707981)); testNumbers(unchecked((long)0x00000000469cd1cf), unchecked((long)0x00000000cf40f67a)); testNumbers(unchecked((long)0x00000000ee7444c8), unchecked((long)0x00000000d1b0d7de)); testNumbers(unchecked((long)0x00000000fbb6f547), unchecked((long)0x000000c1ef3c4d9b)); testNumbers(unchecked((long)0x000000000e20dd53), unchecked((long)0x000000b05833c7cf)); testNumbers(unchecked((long)0x00000000e5733fb8), unchecked((long)0x0000008eae18a855)); testNumbers(unchecked((long)0x000000005db1c271), unchecked((long)0x000000c4a2f7c27d)); testNumbers(unchecked((long)0x0000000007add22a), unchecked((long)0x00000ed9fd23dc3e)); testNumbers(unchecked((long)0x000000002239d1d5), unchecked((long)0x0000a1ae07a62635)); testNumbers(unchecked((long)0x00000000410d4d58), unchecked((long)0x0000c05c5205bed2)); testNumbers(unchecked((long)0x000000004c3c435e), unchecked((long)0x00001e30c1bf628a)); testNumbers(unchecked((long)0x00000000096f44d5), unchecked((long)0x005488c521a6072b)); testNumbers(unchecked((long)0x0000000017f28913), unchecked((long)0x00796ff3891c44ff)); testNumbers(unchecked((long)0x0000000065be69cf), unchecked((long)0x00dd5c6f9b3f3119)); testNumbers(unchecked((long)0x000000002200f221), unchecked((long)0x00ab6c98c90cfe9d)); testNumbers(unchecked((long)0x00000000d48bee1a), unchecked((long)0x64b76d7491a58799)); testNumbers(unchecked((long)0x000000006cb93100), unchecked((long)0xa515fe27402dad45)); testNumbers(unchecked((long)0x00000000bed95abe), unchecked((long)0xc9924098acc74be9)); testNumbers(unchecked((long)0x0000000092781a2e), unchecked((long)0x67ada9ef3f9e39b7)); testNumbers(unchecked((long)0x000000e3aafcdae2), unchecked((long)0x000000000000009c)); testNumbers(unchecked((long)0x000000d8dad80c34), unchecked((long)0x0000000000000099)); testNumbers(unchecked((long)0x000000addcd074d6), unchecked((long)0x00000000000000ea)); testNumbers(unchecked((long)0x00000096735bc25a), unchecked((long)0x00000000000000ba)); testNumbers(unchecked((long)0x000000f492ef7446), unchecked((long)0x00000000000039b1)); testNumbers(unchecked((long)0x000000bc86816119), unchecked((long)0x0000000000001520)); testNumbers(unchecked((long)0x00000060a36818e7), unchecked((long)0x000000000000c5a8)); testNumbers(unchecked((long)0x000000317121d508), unchecked((long)0x000000000000ac3d)); testNumbers(unchecked((long)0x0000004abfdaf232), unchecked((long)0x00000000005cea57)); testNumbers(unchecked((long)0x000000acc458f392), unchecked((long)0x0000000000a9c3e3)); testNumbers(unchecked((long)0x0000001020993532), unchecked((long)0x0000000000df6042)); testNumbers(unchecked((long)0x000000ad25b80abb), unchecked((long)0x0000000000cec15b)); testNumbers(unchecked((long)0x0000002305d2c443), unchecked((long)0x000000002a26131c)); testNumbers(unchecked((long)0x00000007c42e2ce0), unchecked((long)0x000000009768024f)); testNumbers(unchecked((long)0x00000076f674816c), unchecked((long)0x000000008d33c7b4)); testNumbers(unchecked((long)0x000000bf567b23bc), unchecked((long)0x00000000ef264890)); testNumbers(unchecked((long)0x000000e3283681a0), unchecked((long)0x0000002e66850719)); testNumbers(unchecked((long)0x000000011fe13754), unchecked((long)0x00000066fad0b407)); testNumbers(unchecked((long)0x00000052f259009f), unchecked((long)0x000000a2886ef414)); testNumbers(unchecked((long)0x000000a9ebb540fc), unchecked((long)0x0000009d27ba694f)); testNumbers(unchecked((long)0x00000083af60d7eb), unchecked((long)0x0000b6f2a0f51f4c)); testNumbers(unchecked((long)0x000000f2ec42d13a), unchecked((long)0x000046855f279407)); testNumbers(unchecked((long)0x00000094e71cb562), unchecked((long)0x00002d9566618e56)); testNumbers(unchecked((long)0x000000c0ee690ddc), unchecked((long)0x000054295c8ca584)); testNumbers(unchecked((long)0x0000002683cd5206), unchecked((long)0x00a5a2d269bcd188)); testNumbers(unchecked((long)0x0000002e77038305), unchecked((long)0x00c727f0f3787e22)); testNumbers(unchecked((long)0x0000008323b9d026), unchecked((long)0x00fed29f8575c120)); testNumbers(unchecked((long)0x0000007b3231f0fc), unchecked((long)0x0091080854b27d3e)); testNumbers(unchecked((long)0x00000084522a7708), unchecked((long)0x91ba8f22fccd6222)); testNumbers(unchecked((long)0x000000afb1b50d90), unchecked((long)0x3261a532b65c7838)); testNumbers(unchecked((long)0x0000002c65e838c6), unchecked((long)0x5b858452c9bf6f39)); testNumbers(unchecked((long)0x000000219e837734), unchecked((long)0x97873bed5bb0a44b)); testNumbers(unchecked((long)0x00009f133e2f116f), unchecked((long)0x0000000000000073)); testNumbers(unchecked((long)0x0000887577574766), unchecked((long)0x0000000000000048)); testNumbers(unchecked((long)0x0000ba4c778d4aa8), unchecked((long)0x000000000000003a)); testNumbers(unchecked((long)0x00002683df421474), unchecked((long)0x0000000000000056)); testNumbers(unchecked((long)0x00006ff76294c275), unchecked((long)0x00000000000089f7)); testNumbers(unchecked((long)0x0000fdf053abefa2), unchecked((long)0x000000000000eb65)); testNumbers(unchecked((long)0x0000ea4b254b24eb), unchecked((long)0x000000000000ba27)); testNumbers(unchecked((long)0x000009f7ce21b811), unchecked((long)0x000000000000e8f6)); testNumbers(unchecked((long)0x00009cc645fa08a1), unchecked((long)0x0000000000a29ea3)); testNumbers(unchecked((long)0x0000726f9a9f816e), unchecked((long)0x000000000070dce1)); testNumbers(unchecked((long)0x0000a4be34825ef6), unchecked((long)0x0000000000bb2be7)); testNumbers(unchecked((long)0x000057ff147cb7c1), unchecked((long)0x0000000000e255af)); testNumbers(unchecked((long)0x0000ab9d6f546dd4), unchecked((long)0x000000007e2772a5)); testNumbers(unchecked((long)0x0000b148e3446e89), unchecked((long)0x0000000051ed3c28)); testNumbers(unchecked((long)0x00001e3abfe9725e), unchecked((long)0x00000000d4dec3f4)); testNumbers(unchecked((long)0x0000f61bcaba115e), unchecked((long)0x00000000fade149f)); testNumbers(unchecked((long)0x0000ae642b9a6626), unchecked((long)0x000000d8de0e0b9a)); testNumbers(unchecked((long)0x00009d015a13c8ae), unchecked((long)0x000000afc8827997)); testNumbers(unchecked((long)0x0000ecc72cc2df89), unchecked((long)0x00000070d47ec7c4)); testNumbers(unchecked((long)0x0000fdbf05894fd2), unchecked((long)0x00000012aec393bd)); testNumbers(unchecked((long)0x0000cd7675a70874), unchecked((long)0x0000d7d696a62cbc)); testNumbers(unchecked((long)0x0000fad44a89216d), unchecked((long)0x0000cb8cfc8ada4c)); testNumbers(unchecked((long)0x0000f41eb5363551), unchecked((long)0x00009c040aa7775e)); testNumbers(unchecked((long)0x00003c02d93e01f6), unchecked((long)0x0000f1f4e68a14f8)); testNumbers(unchecked((long)0x0000e0d99954b598), unchecked((long)0x00b2a2de4e453485)); testNumbers(unchecked((long)0x0000a6081be866d9), unchecked((long)0x00f2a12e845e4f2e)); testNumbers(unchecked((long)0x0000ae56a5680dfd), unchecked((long)0x00c96cd7c15d5bec)); testNumbers(unchecked((long)0x0000360363e37938), unchecked((long)0x00d4ed572e1937e0)); testNumbers(unchecked((long)0x00001f052aebf185), unchecked((long)0x3584e582d1c6db1a)); testNumbers(unchecked((long)0x00003fac9c7b3d1b), unchecked((long)0xa4b120f080d69113)); testNumbers(unchecked((long)0x00005330d51c3217), unchecked((long)0xc16dd32ffd822c0e)); testNumbers(unchecked((long)0x0000cd0694ff5ab0), unchecked((long)0x29673fe67245fbfc)); testNumbers(unchecked((long)0x0098265e5a308523), unchecked((long)0x000000000000007d)); testNumbers(unchecked((long)0x00560863350df217), unchecked((long)0x00000000000000c8)); testNumbers(unchecked((long)0x00798ce804d829a1), unchecked((long)0x00000000000000b1)); testNumbers(unchecked((long)0x007994c0051256fd), unchecked((long)0x000000000000005c)); testNumbers(unchecked((long)0x00ff1a2838e69f42), unchecked((long)0x0000000000003c16)); testNumbers(unchecked((long)0x009e7e95ac5de2c7), unchecked((long)0x000000000000ed49)); testNumbers(unchecked((long)0x00fd6867eabba5c0), unchecked((long)0x000000000000c689)); testNumbers(unchecked((long)0x009d1632daf20de0), unchecked((long)0x000000000000b74f)); testNumbers(unchecked((long)0x00ee29d8f76d4e9c), unchecked((long)0x00000000008020d4)); testNumbers(unchecked((long)0x0089e03ecf8daa0a), unchecked((long)0x00000000003e7587)); testNumbers(unchecked((long)0x00115763be4beb44), unchecked((long)0x000000000088f762)); testNumbers(unchecked((long)0x00815cfc87c427d0), unchecked((long)0x00000000009eec06)); testNumbers(unchecked((long)0x001d9c3c9ded0c1a), unchecked((long)0x00000000b9f6d331)); testNumbers(unchecked((long)0x00932225412f1222), unchecked((long)0x00000000130ff743)); testNumbers(unchecked((long)0x00fe82151e2e0bf3), unchecked((long)0x00000000781cd6f9)); testNumbers(unchecked((long)0x002222abb5061b12), unchecked((long)0x000000000491f1df)); testNumbers(unchecked((long)0x0012ce0cf0452748), unchecked((long)0x000000a8566274aa)); testNumbers(unchecked((long)0x00e570484e9937e1), unchecked((long)0x000000ac81f171be)); testNumbers(unchecked((long)0x00eb371f7f8f514e), unchecked((long)0x000000df0248189c)); testNumbers(unchecked((long)0x003777a7cc43dfd7), unchecked((long)0x0000003a7b8eaf40)); testNumbers(unchecked((long)0x00e181db76238786), unchecked((long)0x00004126e572a568)); testNumbers(unchecked((long)0x00ac1df87977e122), unchecked((long)0x0000e1e8cfde6678)); testNumbers(unchecked((long)0x001c858763a2c23b), unchecked((long)0x000004ef61f3964f)); testNumbers(unchecked((long)0x00bd786bbb71ce46), unchecked((long)0x00002cda097a464f)); testNumbers(unchecked((long)0x00a7a6de21a46360), unchecked((long)0x00007afda16f98c3)); testNumbers(unchecked((long)0x006fed70a6ccfdf2), unchecked((long)0x009771441e8e00e8)); testNumbers(unchecked((long)0x005ad2782dcd5e60), unchecked((long)0x000d170d518385f6)); testNumbers(unchecked((long)0x001fd67b153bc9b9), unchecked((long)0x007b3366dff66c6c)); testNumbers(unchecked((long)0x00bf00203beb73f4), unchecked((long)0x693495fefab1c77e)); testNumbers(unchecked((long)0x002faac1b1b068f8), unchecked((long)0x1cb11cc5c3aaff86)); testNumbers(unchecked((long)0x00bb63cfbffe7648), unchecked((long)0x84f5b0c583f9e77b)); testNumbers(unchecked((long)0x00615db89673241c), unchecked((long)0x8de5f125247eba0f)); testNumbers(unchecked((long)0x9be183a6b293dffe), unchecked((long)0x0000000000000072)); testNumbers(unchecked((long)0xa3df9b76d8a51b19), unchecked((long)0x00000000000000c4)); testNumbers(unchecked((long)0xb4cc300f0ea7566d), unchecked((long)0x000000000000007e)); testNumbers(unchecked((long)0xfdac12a8e23e16e7), unchecked((long)0x0000000000000015)); testNumbers(unchecked((long)0xc0805405aadc0f47), unchecked((long)0x00000000000019d4)); testNumbers(unchecked((long)0x843a391f8d9f8972), unchecked((long)0x000000000000317a)); testNumbers(unchecked((long)0x5a0d124c427ed453), unchecked((long)0x00000000000034fe)); testNumbers(unchecked((long)0x8631150f34008f1b), unchecked((long)0x0000000000002ecd)); testNumbers(unchecked((long)0x3ff4c18715ad3a76), unchecked((long)0x000000000072d22a)); testNumbers(unchecked((long)0x3ef93e5a649422bd), unchecked((long)0x0000000000db5c60)); testNumbers(unchecked((long)0x6bdd1056ae58fe0e), unchecked((long)0x0000000000805c75)); testNumbers(unchecked((long)0xeff1fa30f3ad9ded), unchecked((long)0x00000000000c83ca)); testNumbers(unchecked((long)0xbbc143ac147e56a9), unchecked((long)0x00000000161179b7)); testNumbers(unchecked((long)0x0829dde88caa2e45), unchecked((long)0x000000001443ab62)); testNumbers(unchecked((long)0x97ac43ff797a4514), unchecked((long)0x0000000033eef42b)); testNumbers(unchecked((long)0x703e9cdf96a148aa), unchecked((long)0x000000008e08f3d8)); testNumbers(unchecked((long)0x75cbb739b54e2ad6), unchecked((long)0x0000007a8b12628c)); testNumbers(unchecked((long)0x91e42fafe97d638f), unchecked((long)0x0000000fbe867c51)); testNumbers(unchecked((long)0x9159d77deec116c1), unchecked((long)0x00000096c0c774fc)); testNumbers(unchecked((long)0xb59dbb4c15761d88), unchecked((long)0x0000004a033a73e7)); testNumbers(unchecked((long)0xab668e9783af9617), unchecked((long)0x00005aa18404076c)); testNumbers(unchecked((long)0x54c68e5b5c4127df), unchecked((long)0x0000f2934fd8dd1f)); testNumbers(unchecked((long)0xf490d3936184c9f9), unchecked((long)0x00004007477e2110)); testNumbers(unchecked((long)0x349e577c9d5c44e2), unchecked((long)0x0000bdb2235af963)); testNumbers(unchecked((long)0x58f3ac26cdafde28), unchecked((long)0x0017d4f4ade9ec35)); testNumbers(unchecked((long)0xa4a263c316d21f4c), unchecked((long)0x00a7ec1e6fda834b)); testNumbers(unchecked((long)0x6ab14771c448666f), unchecked((long)0x005b0f49593c3a27)); testNumbers(unchecked((long)0x15f392c3602aa4f7), unchecked((long)0x0018af171045f88e)); testNumbers(unchecked((long)0xf17de69c0063f62c), unchecked((long)0xee2a164c2c3a46f8)); testNumbers(unchecked((long)0xf34b743eeff8e5c6), unchecked((long)0x4f4067f1a0e404ad)); testNumbers(unchecked((long)0xee0296f678756647), unchecked((long)0xf1bbfdc6f0280d36)); testNumbers(unchecked((long)0x65c33db0c952b829), unchecked((long)0xa7ab9c39dcffbcf3)); Console.WriteLine("All tests passed."); return 100; } catch (DivideByZeroException) { return 1; } } } }
84
102
0.678816
[ "MIT" ]
Ali-YousefiTelori/runtime
src/tests/JIT/Methodical/int64/signed/s_addsub.cs
28,644
C#
using System; using System.Collections.Generic; using System.Linq; namespace ERPCore.Enterprise.Models.Projects.Enums { public enum ProjectStatus { Active = 0, Close = 2, Pending = 1, Void = 100 } }
16.266667
50
0.618852
[ "MIT" ]
next-scale/ERPCore
Enterprise/Models/Projects/Enums/ProjectStatus.cs
244
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 rds-data-2018-08-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.RDSDataService.Model; using Amazon.RDSDataService.Model.Internal.MarshallTransformations; using Amazon.RDSDataService.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.RDSDataService { /// <summary> /// Implementation for accessing RDSDataService /// /// Amazon RDS Data Service /// <para> /// Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless /// DB cluster. To run these statements, you work with the Data Service API. /// /// /// <para> /// For more information about the Data Service API, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using /// the Data API for Aurora Serverless</a> in the <i>Amazon Aurora User Guide</i>. /// </para> /// <note> /// <para> /// If you have questions or comments related to the Data API, send email to <a href="mailto:Rds-data-api-feedback@amazon.com">Rds-data-api-feedback@amazon.com</a>. /// </para> /// </note> /// </para> /// </summary> public partial class AmazonRDSDataServiceClient : AmazonServiceClient, IAmazonRDSDataService { private static IServiceMetadata serviceMetadata = new AmazonRDSDataServiceMetadata(); #region Constructors /// <summary> /// Constructs AmazonRDSDataServiceClient 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 AmazonRDSDataServiceClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonRDSDataServiceConfig()) { } /// <summary> /// Constructs AmazonRDSDataServiceClient 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 AmazonRDSDataServiceClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonRDSDataServiceConfig{RegionEndpoint = region}) { } /// <summary> /// Constructs AmazonRDSDataServiceClient 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 AmazonRDSDataServiceClient Configuration Object</param> public AmazonRDSDataServiceClient(AmazonRDSDataServiceConfig config) : base(FallbackCredentialsFactory.GetCredentials(), config) { } /// <summary> /// Constructs AmazonRDSDataServiceClient with AWS Credentials /// </summary> /// <param name="credentials">AWS Credentials</param> public AmazonRDSDataServiceClient(AWSCredentials credentials) : this(credentials, new AmazonRDSDataServiceConfig()) { } /// <summary> /// Constructs AmazonRDSDataServiceClient with AWS Credentials /// </summary> /// <param name="credentials">AWS Credentials</param> /// <param name="region">The region to connect.</param> public AmazonRDSDataServiceClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonRDSDataServiceConfig{RegionEndpoint = region}) { } /// <summary> /// Constructs AmazonRDSDataServiceClient with AWS Credentials and an /// AmazonRDSDataServiceClient Configuration object. /// </summary> /// <param name="credentials">AWS Credentials</param> /// <param name="clientConfig">The AmazonRDSDataServiceClient Configuration Object</param> public AmazonRDSDataServiceClient(AWSCredentials credentials, AmazonRDSDataServiceConfig clientConfig) : base(credentials, clientConfig) { } /// <summary> /// Constructs AmazonRDSDataServiceClient 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 AmazonRDSDataServiceClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonRDSDataServiceConfig()) { } /// <summary> /// Constructs AmazonRDSDataServiceClient 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 AmazonRDSDataServiceClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonRDSDataServiceConfig() {RegionEndpoint=region}) { } /// <summary> /// Constructs AmazonRDSDataServiceClient with AWS Access Key ID, AWS Secret Key and an /// AmazonRDSDataServiceClient Configuration object. /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="clientConfig">The AmazonRDSDataServiceClient Configuration Object</param> public AmazonRDSDataServiceClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonRDSDataServiceConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// <summary> /// Constructs AmazonRDSDataServiceClient 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 AmazonRDSDataServiceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonRDSDataServiceConfig()) { } /// <summary> /// Constructs AmazonRDSDataServiceClient 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 AmazonRDSDataServiceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonRDSDataServiceConfig{RegionEndpoint = region}) { } /// <summary> /// Constructs AmazonRDSDataServiceClient with AWS Access Key ID, AWS Secret Key and an /// AmazonRDSDataServiceClient 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 AmazonRDSDataServiceClient Configuration Object</param> public AmazonRDSDataServiceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonRDSDataServiceConfig 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 BatchExecuteStatement /// <summary> /// Runs a batch SQL statement over an array of data. /// /// /// <para> /// You can run bulk update and insert operations for multiple records using a DML statement /// with different parameter sets. Bulk operations can provide a significant performance /// improvement over individual insert and update operations. /// </para> /// <important> /// <para> /// If a call isn't part of a transaction because it doesn't include the <code>transactionID</code> /// parameter, changes that result from the call are committed automatically. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the BatchExecuteStatement service method.</param> /// /// <returns>The response from the BatchExecuteStatement service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.StatementTimeoutException"> /// The execution of the SQL statement timed out. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/BatchExecuteStatement">REST API Reference for BatchExecuteStatement Operation</seealso> public virtual BatchExecuteStatementResponse BatchExecuteStatement(BatchExecuteStatementRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = BatchExecuteStatementRequestMarshaller.Instance; options.ResponseUnmarshaller = BatchExecuteStatementResponseUnmarshaller.Instance; return Invoke<BatchExecuteStatementResponse>(request, options); } /// <summary> /// Runs a batch SQL statement over an array of data. /// /// /// <para> /// You can run bulk update and insert operations for multiple records using a DML statement /// with different parameter sets. Bulk operations can provide a significant performance /// improvement over individual insert and update operations. /// </para> /// <important> /// <para> /// If a call isn't part of a transaction because it doesn't include the <code>transactionID</code> /// parameter, changes that result from the call are committed automatically. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the BatchExecuteStatement 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 BatchExecuteStatement service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.StatementTimeoutException"> /// The execution of the SQL statement timed out. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/BatchExecuteStatement">REST API Reference for BatchExecuteStatement Operation</seealso> public virtual Task<BatchExecuteStatementResponse> BatchExecuteStatementAsync(BatchExecuteStatementRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = BatchExecuteStatementRequestMarshaller.Instance; options.ResponseUnmarshaller = BatchExecuteStatementResponseUnmarshaller.Instance; return InvokeAsync<BatchExecuteStatementResponse>(request, options, cancellationToken); } #endregion #region BeginTransaction /// <summary> /// Starts a SQL transaction. /// /// <pre><code> &lt;important&gt; &lt;p&gt;A transaction can run for a maximum of 24 /// hours. A transaction is terminated and rolled back automatically after 24 hours.&lt;/p&gt; /// &lt;p&gt;A transaction times out if no calls use its transaction ID in three minutes. /// If a transaction times out before it's committed, it's rolled back automatically.&lt;/p&gt; /// &lt;p&gt;DDL statements inside a transaction cause an implicit commit. We recommend /// that you run each DDL statement in a separate &lt;code&gt;ExecuteStatement&lt;/code&gt; /// call with &lt;code&gt;continueAfterTimeout&lt;/code&gt; enabled.&lt;/p&gt; &lt;/important&gt; /// </code></pre> /// </summary> /// <param name="request">Container for the necessary parameters to execute the BeginTransaction service method.</param> /// /// <returns>The response from the BeginTransaction service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.StatementTimeoutException"> /// The execution of the SQL statement timed out. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/BeginTransaction">REST API Reference for BeginTransaction Operation</seealso> public virtual BeginTransactionResponse BeginTransaction(BeginTransactionRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = BeginTransactionRequestMarshaller.Instance; options.ResponseUnmarshaller = BeginTransactionResponseUnmarshaller.Instance; return Invoke<BeginTransactionResponse>(request, options); } /// <summary> /// Starts a SQL transaction. /// /// <pre><code> &lt;important&gt; &lt;p&gt;A transaction can run for a maximum of 24 /// hours. A transaction is terminated and rolled back automatically after 24 hours.&lt;/p&gt; /// &lt;p&gt;A transaction times out if no calls use its transaction ID in three minutes. /// If a transaction times out before it's committed, it's rolled back automatically.&lt;/p&gt; /// &lt;p&gt;DDL statements inside a transaction cause an implicit commit. We recommend /// that you run each DDL statement in a separate &lt;code&gt;ExecuteStatement&lt;/code&gt; /// call with &lt;code&gt;continueAfterTimeout&lt;/code&gt; enabled.&lt;/p&gt; &lt;/important&gt; /// </code></pre> /// </summary> /// <param name="request">Container for the necessary parameters to execute the BeginTransaction 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 BeginTransaction service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.StatementTimeoutException"> /// The execution of the SQL statement timed out. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/BeginTransaction">REST API Reference for BeginTransaction Operation</seealso> public virtual Task<BeginTransactionResponse> BeginTransactionAsync(BeginTransactionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = BeginTransactionRequestMarshaller.Instance; options.ResponseUnmarshaller = BeginTransactionResponseUnmarshaller.Instance; return InvokeAsync<BeginTransactionResponse>(request, options, cancellationToken); } #endregion #region CommitTransaction /// <summary> /// Ends a SQL transaction started with the <code>BeginTransaction</code> operation and /// commits the changes. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CommitTransaction service method.</param> /// /// <returns>The response from the CommitTransaction service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.NotFoundException"> /// The <code>resourceArn</code>, <code>secretArn</code>, or <code>transactionId</code> /// value can't be found. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.StatementTimeoutException"> /// The execution of the SQL statement timed out. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/CommitTransaction">REST API Reference for CommitTransaction Operation</seealso> public virtual CommitTransactionResponse CommitTransaction(CommitTransactionRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CommitTransactionRequestMarshaller.Instance; options.ResponseUnmarshaller = CommitTransactionResponseUnmarshaller.Instance; return Invoke<CommitTransactionResponse>(request, options); } /// <summary> /// Ends a SQL transaction started with the <code>BeginTransaction</code> operation and /// commits the changes. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CommitTransaction 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 CommitTransaction service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.NotFoundException"> /// The <code>resourceArn</code>, <code>secretArn</code>, or <code>transactionId</code> /// value can't be found. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.StatementTimeoutException"> /// The execution of the SQL statement timed out. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/CommitTransaction">REST API Reference for CommitTransaction Operation</seealso> public virtual Task<CommitTransactionResponse> CommitTransactionAsync(CommitTransactionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CommitTransactionRequestMarshaller.Instance; options.ResponseUnmarshaller = CommitTransactionResponseUnmarshaller.Instance; return InvokeAsync<CommitTransactionResponse>(request, options, cancellationToken); } #endregion #region ExecuteSql /// <summary> /// Runs one or more SQL statements. /// /// <important> /// <para> /// This operation is deprecated. Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> /// operation. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ExecuteSql service method.</param> /// /// <returns>The response from the ExecuteSql service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSql">REST API Reference for ExecuteSql Operation</seealso> [Obsolete("ExecuteSql has been deprecated. Please use ExecuteStatement or BatchExecuteStatement instead.")] public virtual ExecuteSqlResponse ExecuteSql(ExecuteSqlRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ExecuteSqlRequestMarshaller.Instance; options.ResponseUnmarshaller = ExecuteSqlResponseUnmarshaller.Instance; return Invoke<ExecuteSqlResponse>(request, options); } /// <summary> /// Runs one or more SQL statements. /// /// <important> /// <para> /// This operation is deprecated. Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> /// operation. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ExecuteSql 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 ExecuteSql service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSql">REST API Reference for ExecuteSql Operation</seealso> [Obsolete("ExecuteSql has been deprecated. Please use ExecuteStatement or BatchExecuteStatement instead.")] public virtual Task<ExecuteSqlResponse> ExecuteSqlAsync(ExecuteSqlRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ExecuteSqlRequestMarshaller.Instance; options.ResponseUnmarshaller = ExecuteSqlResponseUnmarshaller.Instance; return InvokeAsync<ExecuteSqlResponse>(request, options, cancellationToken); } #endregion #region ExecuteStatement /// <summary> /// Runs a SQL statement against a database. /// /// <important> /// <para> /// If a call isn't part of a transaction because it doesn't include the <code>transactionID</code> /// parameter, changes that result from the call are committed automatically. /// </para> /// </important> /// <para> /// The response size limit is 1 MB. If the call returns more than 1 MB of response data, /// the call is terminated. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ExecuteStatement service method.</param> /// /// <returns>The response from the ExecuteStatement service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.StatementTimeoutException"> /// The execution of the SQL statement timed out. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteStatement">REST API Reference for ExecuteStatement Operation</seealso> public virtual ExecuteStatementResponse ExecuteStatement(ExecuteStatementRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ExecuteStatementRequestMarshaller.Instance; options.ResponseUnmarshaller = ExecuteStatementResponseUnmarshaller.Instance; return Invoke<ExecuteStatementResponse>(request, options); } /// <summary> /// Runs a SQL statement against a database. /// /// <important> /// <para> /// If a call isn't part of a transaction because it doesn't include the <code>transactionID</code> /// parameter, changes that result from the call are committed automatically. /// </para> /// </important> /// <para> /// The response size limit is 1 MB. If the call returns more than 1 MB of response data, /// the call is terminated. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ExecuteStatement 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 ExecuteStatement service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.StatementTimeoutException"> /// The execution of the SQL statement timed out. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteStatement">REST API Reference for ExecuteStatement Operation</seealso> public virtual Task<ExecuteStatementResponse> ExecuteStatementAsync(ExecuteStatementRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ExecuteStatementRequestMarshaller.Instance; options.ResponseUnmarshaller = ExecuteStatementResponseUnmarshaller.Instance; return InvokeAsync<ExecuteStatementResponse>(request, options, cancellationToken); } #endregion #region RollbackTransaction /// <summary> /// Performs a rollback of a transaction. Rolling back a transaction cancels its changes. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RollbackTransaction service method.</param> /// /// <returns>The response from the RollbackTransaction service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.NotFoundException"> /// The <code>resourceArn</code>, <code>secretArn</code>, or <code>transactionId</code> /// value can't be found. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.StatementTimeoutException"> /// The execution of the SQL statement timed out. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/RollbackTransaction">REST API Reference for RollbackTransaction Operation</seealso> public virtual RollbackTransactionResponse RollbackTransaction(RollbackTransactionRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = RollbackTransactionRequestMarshaller.Instance; options.ResponseUnmarshaller = RollbackTransactionResponseUnmarshaller.Instance; return Invoke<RollbackTransactionResponse>(request, options); } /// <summary> /// Performs a rollback of a transaction. Rolling back a transaction cancels its changes. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RollbackTransaction 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 RollbackTransaction service method, as returned by RDSDataService.</returns> /// <exception cref="Amazon.RDSDataService.Model.BadRequestException"> /// There is an error in the call or in a SQL statement. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ForbiddenException"> /// There are insufficient privileges to make the call. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.InternalServerErrorException"> /// An internal error occurred. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.NotFoundException"> /// The <code>resourceArn</code>, <code>secretArn</code>, or <code>transactionId</code> /// value can't be found. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.ServiceUnavailableErrorException"> /// The service specified by the <code>resourceArn</code> parameter is not available. /// </exception> /// <exception cref="Amazon.RDSDataService.Model.StatementTimeoutException"> /// The execution of the SQL statement timed out. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/RollbackTransaction">REST API Reference for RollbackTransaction Operation</seealso> public virtual Task<RollbackTransactionResponse> RollbackTransactionAsync(RollbackTransactionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = RollbackTransactionRequestMarshaller.Instance; options.ResponseUnmarshaller = RollbackTransactionResponseUnmarshaller.Instance; return InvokeAsync<RollbackTransactionResponse>(request, options, cancellationToken); } #endregion } }
52.320463
207
0.644085
[ "Apache-2.0" ]
philasmar/aws-sdk-net
sdk/src/Services/RDSDataService/Generated/_bcl45/AmazonRDSDataServiceClient.cs
40,653
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Mid2BMS { /// <summary> /// 要素数固定の巡回キュー /// maskとか使わずに素朴な実装でも別に良い気がしてきた /// </summary> class FixedCircularQueue<T> { double[] buf; public int Count { get; private set; } int index; //int mask; //int capacity; public FixedCircularQueue(int count) { // (-3) & 0xF // => 13 // (-3) % 16 // => -3 if (count <= 0) throw new Exception("invalid count @ FixedCircularQueue"); this.Count = count; index = 0; //capacity = (count & (count - 1)); //if (capacity == 0) capacity = count; //int mask = capacity - 1; //buf = new double[capacity]; buf = new double[count]; } public double this[int i] { get { //return buf[(i + index) & mask]; return buf[(i + index) % Count]; } set { //buf[(i + index) & mask] = value; buf[(i + index) % Count] = value; } } public double PushOnTop(double val) { // index 0 1 2 3 4 // value 4 5 6 7 8 // // >> Push(9) // // index 0 1 2 3 4 // value 9 4 5 6 7 index = (index + Count - 1) % Count; return buf[index] = val; } } }
22.957143
86
0.405725
[ "MIT" ]
clkbng/Mid2BMS
Mid2BMS/SignalProcessing/FixedCircularQueue.cs
1,677
C#
using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; using OpenTracing.Contrib.NetCore.Internal; using OpenTracing.Noop; using OpenTracing.Util; namespace OpenTracing.Contrib.NetCore.Logging { internal class OpenTracingLogger : ILogger { private const string OriginalFormatPropertyName = "{OriginalFormat}"; private readonly string _categoryName; private readonly IGlobalTracerAccessor _globalTracerAccessor; public OpenTracingLogger(IGlobalTracerAccessor globalTracerAccessor, string categoryName) { _globalTracerAccessor = globalTracerAccessor; _categoryName = categoryName; } public IDisposable BeginScope<TState>(TState state) { return NoopDisposable.Instance; } public bool IsEnabled(LogLevel logLevel) { // Filtering should be done via the general Logging filtering feature. ITracer tracer = _globalTracerAccessor.GetGlobalTracer(); return !( (tracer is NoopTracer) || (tracer is GlobalTracer && !GlobalTracer.IsRegistered())); } public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) { if (formatter == null) { // This throws an Exception e.g. in Microsoft's DebugLogger but we don't want the app to crash if the logger has an issue. return; } ITracer tracer = _globalTracerAccessor.GetGlobalTracer(); ISpan span = tracer.ActiveSpan; if (span == null) { // Creating a new span for a log message seems brutal so we ignore messages if we can't attach it to an active span. return; } if (!IsEnabled(logLevel)) { return; } var fields = new Dictionary<string, object> { { "component", _categoryName }, { "level", logLevel.ToString() } }; try { if (eventId.Id != 0) { fields["eventId"] = eventId.Id; } try { // This throws if the argument count (message format vs. actual args) doesn't match. // e.g. LogInformation("Foo {Arg1} {Arg2}", arg1); // We want to preserve as much as possible from the original log message so we just continue without this information. string message = formatter(state, exception); fields[LogFields.Message] = message; } catch (Exception) { /* no-op */ } if (exception != null) { fields[LogFields.ErrorKind] = exception.GetType().FullName; fields[LogFields.ErrorObject] = exception; } bool eventAdded = false; var structure = state as IEnumerable<KeyValuePair<string, object>>; if (structure != null) { try { // The enumerator throws if the argument count (message format vs. actual args) doesn't match. // We want to preserve as much as possible from the original log message so we just ignore // this error and take as many properties as possible. foreach (var property in structure) { if (string.Equals(property.Key, OriginalFormatPropertyName, StringComparison.Ordinal) && property.Value is string messageTemplateString) { fields[LogFields.Event] = messageTemplateString; eventAdded = true; } else { fields[property.Key] = property.Value; } } } catch (IndexOutOfRangeException) { /* no-op */ } } if (!eventAdded) { fields[LogFields.Event] = "log"; } } catch (Exception logException) { fields["opentracing.contrib.netcore.error"] = logException.ToString(); } span.Log(fields); } private class NoopDisposable : IDisposable { public static NoopDisposable Instance = new NoopDisposable(); public void Dispose() { } } } }
35.25
145
0.492908
[ "Apache-2.0" ]
Aaronontheweb/csharp-netcore
src/OpenTracing.Contrib.NetCore/Logging/OpenTracingLogger.cs
5,078
C#
// c:\program files (x86)\windows kits\10\include\10.0.22000.0\um\ddraw.h(331,9) using System; using System.Runtime.InteropServices; namespace DirectN { [StructLayout(LayoutKind.Sequential)] public partial struct _DDSCAPS { public uint dwCaps; } }
22
82
0.671329
[ "MIT" ]
Steph55/DirectN
DirectN/DirectN/Generated/_DDSCAPS.cs
288
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class SlimeController : MonoBehaviour { public Rigidbody2D rb; public SpriteRenderer sr; public PolygonCollider2D pc; public Animator animator; public Transform target; public float range = 5; public float speed = 1; public int maxHP = 50; private int currentHP; private bool isFacingRight = false; public GameObject attackPoint; public float attackRange = 0.5f; public float attackTimer; public Rigidbody2D goldCoin; public float distance; // Start is called before the first frame update void Start() { target = GameObject.FindGameObjectWithTag("Player").GetComponent<Transform>(); animator = GetComponent<Animator>(); rb = GetComponent<Rigidbody2D>(); sr = GetComponent<SpriteRenderer>(); pc = GetComponent<PolygonCollider2D>(); currentHP = maxHP; attackPoint.SetActive(false); } // Update is called once per frame void Update() { attackTimer += Time.deltaTime; distance = Vector2.Distance(target.position, transform.position); if (distance < range) { animator.SetBool("Walk", true); if (isFacingRight && target.position.x < transform.position.x) { FlipSlime(); } else if (!isFacingRight && target.position.x > transform.position.x) { FlipSlime(); } ChaseTarget(); } animator.SetBool("Walk", false); if (distance < attackRange && attackTimer > 1.25) { StartCoroutine(AttackCollision()); attackTimer = 0.0f; } if (currentHP <= 0) { Die(); } } IEnumerator AttackCollision() { animator.SetTrigger("Attack"); yield return new WaitForSeconds(0.7f); attackPoint.SetActive(true); yield return new WaitForSeconds(0.3f); attackPoint.SetActive(false); } void ChaseTarget() { transform.position = Vector2.MoveTowards(transform.position, target.position, speed * Time.deltaTime); } void Die() { DropGold(); this.enabled = false; pc.enabled = false; } void DropGold() { int rand = Random.Range(1, 6); Vector2 randDirection; int randSpeed; for (int i = 0; i < rand; ++i) { randSpeed = Random.Range(100, 200); randDirection = Random.insideUnitCircle.normalized; Rigidbody2D coin = Instantiate(goldCoin, transform.position, transform.rotation); coin.AddRelativeForce(randDirection * 200); } } IEnumerator DamageAnimation() { var originalScale = transform.localScale; transform.localScale = new Vector2(0.5f * originalScale.x, originalScale.y); sr.color = Color.red; yield return new WaitForSeconds(0.1f); sr.color = Color.white; yield return new WaitForSeconds(0.1f); sr.color = Color.red; yield return new WaitForSeconds(0.4f); if (currentHP > 0) { sr.color = Color.white; transform.localScale = originalScale; } } void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.name == "AttackPoint") { TakeDamage(25); } } void TakeDamage(int damage) { currentHP -= damage; // knockback if (target.position.x < transform.position.x) { rb.velocity = new Vector2(5 * speed, rb.velocity.y); } else { rb.velocity = new Vector2(-5 * speed, rb.velocity.y); } // flash red and squish StartCoroutine(DamageAnimation()); } void FlipSlime() { isFacingRight = !isFacingRight; Vector3 scaler = transform.localScale; scaler.x *= -1; transform.localScale = scaler; } }
25.795031
110
0.577655
[ "MIT" ]
EverPlainsGroup/EverPlains
Assets/Scripts/SlimeController.cs
4,153
C#
/* ======================================================================== * Copyright (c) 2005-2019 The OPC Foundation, Inc. All rights reserved. * * OPC Reciprocal Community License ("RCL") Version 1.00 * * Unless explicitly acquired and licensed from Licensor under another * license, the contents of this file are subject to the Reciprocal * Community License ("RCL") Version 1.00, or subsequent versions * as allowed by the RCL, and You may not copy or use this file in either * source code or executable form, except in compliance with the terms and * conditions of the RCL. * * All software distributed under the RCL is provided strictly on an * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCL for specific * language governing rights and limitations under the RCL. * * The complete license agreement can be found here: * http://opcfoundation.org/License/RCL/1.00/ * ======================================================================*/ using System; using System.Collections.Generic; using System.Text; namespace Opc.Ua { /// <summary> /// This is an interface to a channel which supports /// </summary> public interface ITransportChannel : IDisposable { /// <summary> /// A masking indicating which features are implemented. /// </summary> TransportChannelFeatures SupportedFeatures { get; } /// <summary> /// Gets the description for the endpoint used by the channel. /// </summary> EndpointDescription EndpointDescription { get; } /// <summary> /// Gets the configuration for the channel. /// </summary> EndpointConfiguration EndpointConfiguration { get; } /// <summary> /// Gets the context used when serializing messages exchanged via the channel. /// </summary> ServiceMessageContext MessageContext { get; } /// <summary> /// Gets or sets the default timeout for requests send via the channel. /// </summary> int OperationTimeout { get; set; } /// <summary> /// Initializes a secure channel with the endpoint identified by the URL. /// </summary> /// <param name="url">The URL for the endpoint.</param> /// <param name="settings">The settings to use when creating the channel.</param> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> void Initialize( Uri url, TransportChannelSettings settings); /// <summary> /// Opens a secure channel with the endpoint identified by the URL. /// </summary> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> void Open(); /// <summary> /// Begins an asynchronous operation to open a secure channel with the endpoint identified by the URL. /// </summary> /// <param name="callback">The callback to call when the operation completes.</param> /// <param name="callbackData">The callback data to return with the callback.</param> /// <returns>The result which must be passed to the EndOpen method.</returns> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> /// <seealso cref="Open"/> IAsyncResult BeginOpen( AsyncCallback callback, object callbackData); /// <summary> /// Completes an asynchronous operation to open a secure channel. /// </summary> /// <param name="result">The result returned from the BeginOpen call.</param> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> /// <seealso cref="Open" /> void EndOpen(IAsyncResult result); /// <summary> /// Closes any existing secure channel and opens a new one. /// </summary> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> /// <remarks> /// Calling this method will cause outstanding requests over the current secure channel to fail. /// </remarks> void Reconnect(); /// <summary> /// Begins an asynchronous operation to close the existing secure channel and open a new one. /// </summary> /// <param name="callback">The callback to call when the operation completes.</param> /// <param name="callbackData">The callback data to return with the callback.</param> /// <returns>The result which must be passed to the EndReconnect method.</returns> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> /// <seealso cref="Reconnect" /> IAsyncResult BeginReconnect(AsyncCallback callback, object callbackData); /// <summary> /// Completes an asynchronous operation to close the existing secure channel and open a new one. /// </summary> /// <param name="result">The result returned from the BeginReconnect call.</param> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> /// <seealso cref="Reconnect" /> void EndReconnect(IAsyncResult result); /// <summary> /// Closes the secure channel. /// </summary> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> void Close(); /// <summary> /// Begins an asynchronous operation to close the secure channel. /// </summary> /// <param name="callback">The callback to call when the operation completes.</param> /// <param name="callbackData">The callback data to return with the callback.</param> /// <returns>The result which must be passed to the EndClose method.</returns> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> /// <seealso cref="Close" /> IAsyncResult BeginClose(AsyncCallback callback, object callbackData); /// <summary> /// Completes an asynchronous operation to close the secure channel. /// </summary> /// <param name="result">The result returned from the BeginClose call.</param> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> /// <seealso cref="Close" /> void EndClose(IAsyncResult result); /// <summary> /// Sends a request over the secure channel. /// </summary> /// <param name="request">The request to send.</param> /// <returns>The response returned by the server.</returns> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> IServiceResponse SendRequest(IServiceRequest request); /// <summary> /// Begins an asynchronous operation to send a request over the secure channel. /// </summary> /// <param name="request">The request to send.</param> /// <param name="callback">The callback to call when the operation completes.</param> /// <param name="callbackData">The callback data to return with the callback.</param> /// <returns>The result which must be passed to the EndSendRequest method.</returns> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> /// <seealso cref="SendRequest" /> IAsyncResult BeginSendRequest(IServiceRequest request, AsyncCallback callback, object callbackData); /// <summary> /// Completes an asynchronous operation to send a request over the secure channel. /// </summary> /// <param name="result">The result returned from the BeginSendRequest call.</param> /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception> /// <seealso cref="SendRequest" /> IServiceResponse EndSendRequest(IAsyncResult result); } /// <summary> /// The masks for the optional features which may not be supported by every transport channel. /// </summary> [Flags] public enum TransportChannelFeatures { /// <summary> /// The channel does not support any optional features. /// </summary> None = 0x0000, /// <summary> /// The channel supports Open. /// </summary> Open = 0x0001, /// <summary> /// The channel supports asynchronous Open. /// </summary> BeginOpen = 0x0002, /// <summary> /// The channel supports Reconnect. /// </summary> Reconnect = 0x0004, /// <summary> /// The channel supports asynchronous Reconnect. /// </summary> BeginReconnect = 0x0008, /// <summary> /// The channel supports asynchronous Close. /// </summary> BeginClose = 0x0010, /// <summary> /// The channel supports asynchronous SendRequest. /// </summary> BeginSendRequest = 0x0020 } }
44.75576
111
0.616145
[ "MIT" ]
AlinMoldovean/UA-ModelCompiler
Core/Stack/Transport/ITransportChannel.cs
9,712
C#
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.ServiceModel; using System.Text; using System.Threading.Tasks; using WCFServiceCL; namespace WCFHost { class HostProgram { static void Main(string[] args) { using (ServiceHost host = new ServiceHost(typeof(ServiceMethodClass))) { string address = "http://" + Dns.GetHostName() + ":8081/Service"; host.AddServiceEndpoint(typeof(IServe), new BasicHttpBinding(), address); host.Open(); Console.WriteLine("Press enter to stop."); Console.ReadLine(); host.Close(); } } } }
25.4
89
0.562992
[ "MIT" ]
Y2PM/1DayProjectW14
ProjectW14/WCFHost/HostProgram.cs
764
C#
using System; using Avalonia; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Logging.Serilog; using Avalonia.ReactiveUI; namespace SvgXml.Diagnostics { class Program { // Initialization code. Don't use any Avalonia, third-party APIs or any // SynchronizationContext-reliant code before AppMain is called: things aren't initialized // yet and stuff might break. [STAThread] public static void Main(string[] args) => BuildAvaloniaApp() .StartWithClassicDesktopLifetime(args); // Avalonia configuration, don't remove; also used by visual designer. public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure<App>() .UsePlatformDetect() .LogToDebug() .UseReactiveUI(); } }
32.076923
98
0.659472
[ "MIT" ]
punker76/Svg.Skia
src/SvgXml.Diagnostics/Program.cs
836
C#
using System.Collections.Generic; namespace System.Threading.Tasks { [Bridge.Convention(Member = Bridge.ConventionMember.Field | Bridge.ConventionMember.Method, Notation = Bridge.Notation.CamelCase)] [Bridge.External] [Bridge.IgnoreGeneric] [Bridge.Name("System.Threading.Tasks.TaskCompletionSource")] [Bridge.Reflectable] public class TaskCompletionSource<TResult> { public extern TaskCompletionSource(); [Bridge.Convention(Bridge.Notation.CamelCase)] public extern Task<TResult> Task { get; } public extern void SetCanceled(); public extern void SetException(IEnumerable<Exception> exceptions); public extern void SetException(Exception exception); public extern void SetResult(TResult result); public extern bool TrySetCanceled(); public extern bool TrySetException(IEnumerable<Exception> exceptions); public extern bool TrySetException(Exception exception); public extern bool TrySetResult(TResult result); } }
29.777778
134
0.704291
[ "Apache-2.0" ]
cinjguy/Bridge
Bridge/System/Threading/Tasks/TaskCompletionSource.cs
1,072
C#
using System; using System.Collections; using System.Linq; using Lyn.Protocol.Bolt9; using Xunit; namespace Lyn.Protocol.Tests.Bolt9 { public class LynImplementedBoltFeaturesTests { private LynImplementedBoltFeatures _sut; public LynImplementedBoltFeaturesTests() { _sut = new LynImplementedBoltFeatures(new ParseFeatureFlags()); } [Fact] public void ReturnsAllFeaturesAsByteArray() { var featuresArray = _sut.GetSupportedFeatures(); Assert.Equal(new byte[] {8}, featuresArray); } [Fact] public void GlobalFeaturesReturnsFirst13Bits() { var bytes = _sut.GetSupportedFeatures() .Take(2) .ToArray(); if (bytes.Length > 1) { bytes[1] &= (byte) (bytes[1] & (~(1 << 6))); bytes[1] &= (byte) (bytes[1] & (~(1 << 7))); } var globalFeatures = _sut.GetSupportedGlobalFeatures(); Assert.Equal(bytes, globalFeatures); } [Fact] public void ValidateRemoteFeatureAreCompatibleReturnsTrueWhenFeaturesAreTheSame() { var localFeaturesBytes = _sut.GetSupportedFeatures(); var localGlobalFeaturesBytes = _sut.GetSupportedGlobalFeatures(); var result = _sut.ValidateRemoteFeatureAreCompatible(localFeaturesBytes, localGlobalFeaturesBytes); Assert.True(result); } [Fact] public void ValidateRemoteFeatureAreCompatibleReturnsFalseWhenRemoteIsShorterAndAnyOfThemMissingRequired() { var localFeaturesBytes = _sut.GetSupportedFeatures(); var testRemote = new byte[localFeaturesBytes.Length]; var arr = new BitArray(localFeaturesBytes); var local = new BitArray(localFeaturesBytes); for (var i = 0; i < arr.Length; i += 2) { arr.SetAll(false); arr[i] = !arr[i] ^ local[i]; //make it different to the local bits if required and true arr.CopyTo(testRemote, 0); var result = _sut.ValidateRemoteFeatureAreCompatible(testRemote, new byte[0]); Assert.False(result); } } [Fact] public void ValidateRemoteFeatureAreCompatibleReturnsFalseWhenRemoteIsLongerAndAnyOfThemMissingRequired() { var testRemote = new byte[byte.MaxValue]; var arr = new BitArray(testRemote); var local = new BitArray(_sut.GetSupportedFeatures()); for (var i = 0; i < arr.Length; i += 2) { if (i < local.Length) { arr[i] = local[i]; continue; } arr[i] = !arr[i]; //set bit to true for the test arr.CopyTo(testRemote, 0); var result = _sut.ValidateRemoteFeatureAreCompatible(testRemote, new byte[0]); Assert.False(result); arr[i] = !arr[i]; //clear bit for next iteration } } } }
30.769231
114
0.5575
[ "MIT" ]
elgressy/lyn
src/Lyn.Protocol.Tests/Bolt9/LynImplementedBoltFeaturesTests.cs
3,200
C#
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using BuildXL.Cache.ContentStore.Interfaces.Utils; namespace BuildXL.Cache.ContentStore.Hashing { /// <summary> /// A node in the deduplication Merkle graph. /// </summary> [DebuggerDisplay("Type = {Type} ChildCount = {ChildNodes?.Count} Hash = {HashString}")] public readonly struct DedupNode : IEquatable<DedupNode> { /// <summary> /// Type of the node in the graph /// </summary> public enum NodeType : byte { /// <summary> /// A node that represents a chunk of content and has no children. /// </summary> ChunkLeaf = 0, /// <summary> /// A node that references other nodes as children. /// </summary> InnerNode = 1, } /// <summary> /// Length of the hashes /// </summary> private const int HashLength = 32; /// <summary> /// The maxmium number of children allowed in a single node. /// </summary> /// <remarks>Limited to put a cap on the amount of work the server must do for a single request.</remarks> public const int MaxDirectChildrenPerNode = 512; private static readonly IContentHasher NodeHasher = DedupChunkHashInfo.Instance.CreateContentHasher(); /// <summary> /// The type of this node. /// </summary> public readonly NodeType Type; /// <summary> /// The number of bytes that this node recursively references. /// </summary> /// <remarks> /// Equal to the sum of the size of all the chunks that recursively references. Chunks that are references multiple times are counted multiple times. /// </remarks> public readonly ulong TransitiveContentBytes; /// <summary> /// Hash of this node. /// </summary> public readonly byte[] Hash; /// <summary> /// Entries for the direct children of this node. /// </summary> public readonly IReadOnlyList<DedupNode> ChildNodes; /// <summary> /// If known, the height of the node in the tree. /// </summary> /// <remarks> /// This will have a value when building the tree from the bottom up. /// Height: The maximum distance of any node from the root. If a tree has only one node (the root), the height is zero. /// https://xlinux.nist.gov/dads/HTML/height.html /// </remarks> public readonly uint? Height; /// <summary> /// Gets the hexadecimal string of the hash of this node. /// </summary> public string HashString => this.Hash.ToHex(); /// <summary> /// Deserializes a node from the provided bytestream. /// </summary> public static DedupNode Deserialize(byte[] serialized) { using (var ms = new MemoryStream(serialized, writable: false)) { return Deserialize(ms); } } /// <summary> /// Deserializes a node from the provided bytestream. /// </summary> public static DedupNode Deserialize(ArraySegment<byte> serialized) { using (var ms = new MemoryStream(serialized.Array, serialized.Offset, serialized.Count, writable: false)) { return Deserialize(ms); } } /// <summary> /// Deserializes a node from the provided bytestream. /// </summary> public static DedupNode Deserialize(Stream serialized) { using (var br = new BinaryReader(serialized)) { return Deserialize(br); } } private static void AssertChunkSize(ulong chunkSize) { if (chunkSize > ((1 << (3 * 8)) - 1)) { throw new ArgumentOutOfRangeException( nameof(chunkSize), chunkSize, "A node cannot refer to a chunk of size greater than (2^24 - 1)."); } } private static void AssertNodeSize(ulong nodeSize) { if (nodeSize > (((ulong)1 << (7 * 8)) - 1)) { throw new ArgumentOutOfRangeException( nameof(nodeSize), nodeSize, "A node cannot refer to a node of size greater than (2^56 - 1)."); } } private static void AssertDirectChildrenCount(int childrenCount) { if (childrenCount < 1) { throw new ArgumentOutOfRangeException( nameof(childrenCount), childrenCount, "A node must have at least one child."); } if (childrenCount > MaxDirectChildrenPerNode) { throw new ArgumentOutOfRangeException( nameof(childrenCount), childrenCount, $"A node cannot directly refer to more than {MaxDirectChildrenPerNode} children."); } } /// <summary> /// Deserializes a node from the provided reader. /// </summary> private static DedupNode Deserialize(BinaryReader br) { ushort version = br.ReadUInt16(); if (version != 0) { throw new ArgumentException($"Unknown node version:{version}"); } int childCount = br.ReadUInt16() + 1; AssertDirectChildrenCount(childCount); var childNodes = new List<DedupNode>(childCount); for (int i = 0; i < childCount; i++) { ulong size = 0; NodeType type = (NodeType)br.ReadByte(); uint? height; switch (type) { case NodeType.ChunkLeaf: size = ReadTruncatedUlongLittleEndian(br, 3); height = 0; break; case NodeType.InnerNode: size = ReadTruncatedUlongLittleEndian(br, 7); height = null; break; default: throw new ArgumentException($"Unknown node type: {size}"); } byte[] hash = br.ReadBytes(HashLength); childNodes.Add(new DedupNode(type, size, hash, height)); } return new DedupNode(childNodes); } private static ulong ReadTruncatedUlongLittleEndian(BinaryReader br, int bytes) { ulong value = 0; for (int i = 0; i < bytes; i++) { int bitShift = 8 * i; ulong b = br.ReadByte(); b <<= bitShift; value |= b; } return value; } private static void WriteTruncatedUlongLittleEndian(BinaryWriter bw, ulong value, int bytes) { for (int i = 0; i < bytes; i++) { int bitShift = 8 * i; bw.Write((byte)((value >> bitShift) & 0xFF)); } } /// <summary> /// Initializes a new instance of the <see cref="DedupNode"/> struct from raw components. /// </summary> public DedupNode(NodeType type, ulong size, byte[] hash, uint? height) { ChildNodes = null; Hash = hash; TransitiveContentBytes = size; Type = type; Height = height; Validate(); } /// <summary> /// Initializes a new instance of the <see cref="DedupNode"/> struct from the given chunk. /// </summary> public DedupNode(ChunkInfo chunk) : this(NodeType.ChunkLeaf, chunk.Size, chunk.Hash, 0) { } /// <summary> /// Initializes a new instance of the <see cref="DedupNode"/> struct from the given child nodes. /// </summary> public DedupNode(IEnumerable<DedupNode> childNodes) { ChildNodes = childNodes.ToList(); AssertDirectChildrenCount(ChildNodes.Count); TransitiveContentBytes = 0; Hash = null; Type = NodeType.InnerNode; Height = 0; foreach (var childNode in ChildNodes) { TransitiveContentBytes += childNode.TransitiveContentBytes; if (Height.HasValue) { if (childNode.Height.HasValue) { Height = Math.Max(Height.Value, childNode.Height.Value + 1); } else { Height = null; } } } using (var hasher = NodeHasher.CreateToken()) { Hash = hasher.Hasher.ComputeHash(Serialize()); } Validate(); } private void Validate() { if (Hash.Length != HashLength) { throw new ArgumentException("Node hashes must be 32 bytes."); } switch (Type) { case NodeType.ChunkLeaf: AssertChunkSize(TransitiveContentBytes); break; case NodeType.InnerNode: AssertNodeSize(TransitiveContentBytes); break; default: throw new ArgumentException($"Unknown node type: {Type}"); } } /// <summary> /// Canonically serializes this node to a byte array. /// </summary> public byte[] Serialize() { using (var ms = new MemoryStream()) { using (var bw = new BinaryWriter(ms, Encoding.UTF8, leaveOpen: true)) { SerializeNode(bw); } return ms.ToArray(); } } /// <summary> /// Canonically serializes this node to the give writer. /// </summary> private void SerializeNode(BinaryWriter writer) { if (Type != NodeType.InnerNode) { throw new InvalidOperationException(); } writer.Write((ushort)0); // magic/version number writer.Write((ushort)(ChildNodes.Count - 1)); // 1-512 nodes -> 0-511 foreach (DedupNode childNode in ChildNodes) { childNode.SerializeAsEntry(writer); } } private void SerializeAsEntry(BinaryWriter bw) { bw.Write((byte)Type); switch (Type) { case NodeType.ChunkLeaf: WriteTruncatedUlongLittleEndian(bw, TransitiveContentBytes, 3); break; case NodeType.InnerNode: WriteTruncatedUlongLittleEndian(bw, TransitiveContentBytes, 7); break; default: throw new ArgumentException($"Unknown node type: {Type}"); } bw.Write(Hash); } /// <summary> /// Traverses the node tree in a pre-order traversal. /// </summary> public void VisitPreorder(Func<DedupNode, bool> visitFunc) { if (!visitFunc(this)) { return; } if (Type == NodeType.InnerNode) { if (ChildNodes == null) { throw new ArgumentException("Node does not contain in-memory references to the child nodes."); } foreach (DedupNode nodeEntry in ChildNodes) { nodeEntry.VisitPreorder(visitFunc); } } } /// <summary> /// Enumerates all nodes where Type=ChunkLeaf in their original order. /// </summary> public IEnumerable<DedupNode> EnumerateChunkLeafsInOrder() { if (Type == NodeType.ChunkLeaf) { yield return this; } else { foreach (DedupNode node in EnumerateInnerNodesDepthFirst()) { foreach (DedupNode chunk in node.ChildNodes.Where(n => n.Type == NodeType.ChunkLeaf)) { yield return chunk; } } } } /// <summary> /// Enumerates all nodes where Type=InnerNode in a depth-first order. /// </summary> public IEnumerable<DedupNode> EnumerateInnerNodesDepthFirst() { if (Type == NodeType.InnerNode) { if (ChildNodes == null) { throw new ArgumentException("Node does not contain in-memory references to the child nodes."); } foreach (DedupNode node in ChildNodes.Where(n => n.Type == NodeType.InnerNode)) { foreach (DedupNode child in node.EnumerateInnerNodesDepthFirst()) { yield return child; } } } yield return this; } /// <inheritdoc/> public bool Equals(DedupNode other) { return ByteArrayComparer.ArraysEqual(Hash, other.Hash); } /// <inheritdoc/> public override bool Equals(object obj) { if (!(obj is DedupNode)) { return false; } return Equals((DedupNode)obj); } /// <inheritdoc/> public override int GetHashCode() { return ByteArrayComparer.Instance.GetHashCode(Hash); } /// <inheritxml/> public static bool operator ==(DedupNode left, DedupNode right) { return left.Equals(right); } /// <inheritxml/> public static bool operator !=(DedupNode left, DedupNode right) { return !(left == right); } } }
33.133188
158
0.480198
[ "MIT" ]
AzureMentor/BuildXL
Public/Src/Cache/ContentStore/Hashing/DedupNode.cs
15,175
C#
using System; using System.Configuration; using Stardust.Interstellar.Rest.Extensions; using Stardust.Particles; namespace Stardust.Interstellar.Rest.Annotations.UserAgent { public class ConfiguredClienUserAgentName : Attribute, IHeaderInspector { /// <summary>Initializes a new instance of the <see cref="T:System.Attribute" /> class.</summary> public ConfiguredClienUserAgentName(string preFix) : this() { this.PreFix = preFix; } /// <summary>Initializes a new instance of the <see cref="T:System.Attribute" /> class.</summary> public ConfiguredClienUserAgentName(string preFix, string postFix) : this() { this.PreFix = preFix; this.PostFix = postFix; } /// <summary>Initializes a new instance of the <see cref="T:System.Attribute" /> class.</summary> public ConfiguredClienUserAgentName() { if (string.IsNullOrWhiteSpace(configuredValue)) configuredValue = ConfigurationManagerHelper.GetValueOnKey("stardust.clientUserAgentName"); } private string preFix; internal static string configuredValue; private string postFix; public string PreFix { get { return preFix; } set { preFix = value; } } public string PostFix { get { return postFix; } set { postFix = value; } } IHeaderHandler[] IHeaderInspector.GetHandlers(IServiceProvider serviceLocator) { return new IHeaderHandler[] { new FixedClientUserAgentAttribute(string.Format("{0}{1}{2}", PreFix, configuredValue, PostFix)) }; } } }
28.30303
151
0.579229
[ "Apache-2.0" ]
JonasSyrstad/Stardust.Rest
Stardust.Interstellar.Rest.Annotations/UserAgent/ConfiguredClienUserAgentName.cs
1,868
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Security.Cryptography.Asn1; using System.Security.Cryptography.Asn1.Pkcs12; using System.Security.Cryptography.Asn1.Pkcs7; using System.Security.Cryptography.X509Certificates; using Internal.Cryptography; namespace System.Security.Cryptography.Pkcs { public sealed class Pkcs12SafeContents { private ReadOnlyMemory<byte> _encrypted; private List<Pkcs12SafeBag>? _bags; public Pkcs12ConfidentialityMode ConfidentialityMode { get; private set; } public bool IsReadOnly { get; } public Pkcs12SafeContents() { ConfidentialityMode = Pkcs12ConfidentialityMode.None; } internal Pkcs12SafeContents(ReadOnlyMemory<byte> serialized) { IsReadOnly = true; ConfidentialityMode = Pkcs12ConfidentialityMode.None; _bags = ReadBags(serialized); } internal Pkcs12SafeContents(ContentInfoAsn contentInfoAsn) { IsReadOnly = true; switch (contentInfoAsn.ContentType) { case Oids.Pkcs7Encrypted: ConfidentialityMode = Pkcs12ConfidentialityMode.Password; _encrypted = contentInfoAsn.Content; break; case Oids.Pkcs7Enveloped: ConfidentialityMode = Pkcs12ConfidentialityMode.PublicKey; _encrypted = contentInfoAsn.Content; break; case Oids.Pkcs7Data: ConfidentialityMode = Pkcs12ConfidentialityMode.None; _bags = ReadBags(PkcsHelpers.DecodeOctetStringAsMemory(contentInfoAsn.Content)); break; default: throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); } } public void AddSafeBag(Pkcs12SafeBag safeBag) { if (safeBag == null) throw new ArgumentNullException(nameof(safeBag)); if (IsReadOnly) throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); if (_bags == null) { _bags = new List<Pkcs12SafeBag>(); } _bags.Add(safeBag); } public Pkcs12CertBag AddCertificate(X509Certificate2 certificate) { if (certificate == null) throw new ArgumentNullException(nameof(certificate)); if (IsReadOnly) throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); Pkcs12CertBag bag = new Pkcs12CertBag(certificate); AddSafeBag(bag); return bag; } public Pkcs12KeyBag AddKeyUnencrypted(AsymmetricAlgorithm key) { if (key == null) throw new ArgumentNullException(nameof(key)); if (IsReadOnly) throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); byte[] pkcs8PrivateKey = key.ExportPkcs8PrivateKey(); Pkcs12KeyBag bag = new Pkcs12KeyBag(pkcs8PrivateKey, skipCopy: true); AddSafeBag(bag); return bag; } public Pkcs12SafeContentsBag AddNestedContents(Pkcs12SafeContents safeContents) { if (safeContents == null) throw new ArgumentNullException(nameof(safeContents)); if (safeContents.ConfidentialityMode != Pkcs12ConfidentialityMode.None) throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents)); if (IsReadOnly) throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); Pkcs12SafeContentsBag bag = Pkcs12SafeContentsBag.Create(safeContents); AddSafeBag(bag); return bag; } public Pkcs12ShroudedKeyBag AddShroudedKey( AsymmetricAlgorithm key, byte[]? passwordBytes, PbeParameters pbeParameters) { return AddShroudedKey( key, // Allows null new ReadOnlySpan<byte>(passwordBytes), pbeParameters); } public Pkcs12ShroudedKeyBag AddShroudedKey( AsymmetricAlgorithm key, ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) { if (key == null) throw new ArgumentNullException(nameof(key)); if (IsReadOnly) throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); byte[] encryptedPkcs8 = key.ExportEncryptedPkcs8PrivateKey(passwordBytes, pbeParameters); Pkcs12ShroudedKeyBag bag = new Pkcs12ShroudedKeyBag(encryptedPkcs8, skipCopy: true); AddSafeBag(bag); return bag; } public Pkcs12ShroudedKeyBag AddShroudedKey( AsymmetricAlgorithm key, string? password, PbeParameters pbeParameters) { return AddShroudedKey( key, // This extension method invoke allows null. password.AsSpan(), pbeParameters); } public Pkcs12ShroudedKeyBag AddShroudedKey( AsymmetricAlgorithm key, ReadOnlySpan<char> password, PbeParameters pbeParameters) { if (key == null) throw new ArgumentNullException(nameof(key)); if (IsReadOnly) throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); byte[] encryptedPkcs8 = key.ExportEncryptedPkcs8PrivateKey(password, pbeParameters); Pkcs12ShroudedKeyBag bag = new Pkcs12ShroudedKeyBag(encryptedPkcs8, skipCopy: true); AddSafeBag(bag); return bag; } public Pkcs12SecretBag AddSecret(Oid secretType, ReadOnlyMemory<byte> secretValue) { if (secretType == null) throw new ArgumentNullException(nameof(secretType)); // Read to ensure that there is precisely one legally encoded value. AsnReader reader = new AsnReader(secretValue, AsnEncodingRules.BER); reader.ReadEncodedValue(); reader.ThrowIfNotEmpty(); Pkcs12SecretBag bag = new Pkcs12SecretBag(secretType, secretValue); AddSafeBag(bag); return bag; } public void Decrypt(byte[]? passwordBytes) { // Null is permitted Decrypt(new ReadOnlySpan<byte>(passwordBytes)); } public void Decrypt(ReadOnlySpan<byte> passwordBytes) { Decrypt(ReadOnlySpan<char>.Empty, passwordBytes); } public void Decrypt(string? password) { // The string.AsSpan extension method allows null. Decrypt(password.AsSpan()); } public void Decrypt(ReadOnlySpan<char> password) { Decrypt(password, ReadOnlySpan<byte>.Empty); } private void Decrypt(ReadOnlySpan<char> password, ReadOnlySpan<byte> passwordBytes) { if (ConfidentialityMode != Pkcs12ConfidentialityMode.Password) { throw new InvalidOperationException( SR.Format( SR.Cryptography_Pkcs12_WrongModeForDecrypt, Pkcs12ConfidentialityMode.Password, ConfidentialityMode)); } EncryptedDataAsn encryptedData = EncryptedDataAsn.Decode(_encrypted, AsnEncodingRules.BER); // https://tools.ietf.org/html/rfc5652#section-8 if (encryptedData.Version != 0 && encryptedData.Version != 2) { throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); } // Since the contents are supposed to be the BER-encoding of an instance of // SafeContents (https://tools.ietf.org/html/rfc7292#section-4.1) that implies the // content type is simply "data", and that content is present. if (encryptedData.EncryptedContentInfo.ContentType != Oids.Pkcs7Data) { throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); } if (!encryptedData.EncryptedContentInfo.EncryptedContent.HasValue) { throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); } List<Pkcs12SafeBag> bags; int encryptedValueLength = encryptedData.EncryptedContentInfo.EncryptedContent.Value.Length; // Don't use the array pool because the parsed bags are going to have ReadOnlyMemory projections // over this data. byte[] destination = new byte[encryptedValueLength]; int written = PasswordBasedEncryption.Decrypt( encryptedData.EncryptedContentInfo.ContentEncryptionAlgorithm, password, passwordBytes, encryptedData.EncryptedContentInfo.EncryptedContent.Value.Span, destination); try { bags = ReadBags(destination.AsMemory(0, written)); } catch { CryptographicOperations.ZeroMemory(destination.AsSpan(0, written)); throw; } _encrypted = ReadOnlyMemory<byte>.Empty; _bags = bags; ConfidentialityMode = Pkcs12ConfidentialityMode.None; } public IEnumerable<Pkcs12SafeBag> GetBags() { if (ConfidentialityMode != Pkcs12ConfidentialityMode.None) { throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsEncrypted); } if (_bags == null) { return Enumerable.Empty<Pkcs12SafeBag>(); } return _bags.AsReadOnly(); } private static List<Pkcs12SafeBag> ReadBags(ReadOnlyMemory<byte> serialized) { List<SafeBagAsn> serializedBags = new List<SafeBagAsn>(); AsnValueReader reader = new AsnValueReader(serialized.Span, AsnEncodingRules.BER); AsnValueReader sequenceReader = reader.ReadSequence(); reader.ThrowIfNotEmpty(); while (sequenceReader.HasData) { SafeBagAsn.Decode(ref sequenceReader, serialized, out SafeBagAsn serializedBag); serializedBags.Add(serializedBag); } if (serializedBags.Count == 0) { return new List<Pkcs12SafeBag>(0); } List<Pkcs12SafeBag> bags = new List<Pkcs12SafeBag>(serializedBags.Count); for (int i = 0; i < serializedBags.Count; i++) { ReadOnlyMemory<byte> bagValue = serializedBags[i].BagValue; Pkcs12SafeBag? bag = null; try { switch (serializedBags[i].BagId) { case Oids.Pkcs12KeyBag: bag = new Pkcs12KeyBag(bagValue); break; case Oids.Pkcs12ShroudedKeyBag: bag = new Pkcs12ShroudedKeyBag(bagValue); break; case Oids.Pkcs12CertBag: bag = Pkcs12CertBag.DecodeValue(bagValue); break; case Oids.Pkcs12CrlBag: // Known, but no first-class support currently. break; case Oids.Pkcs12SecretBag: bag = Pkcs12SecretBag.DecodeValue(bagValue); break; case Oids.Pkcs12SafeContentsBag: bag = Pkcs12SafeContentsBag.Decode(bagValue); break; } } catch (CryptographicException) { } if (bag == null) { bag = new Pkcs12SafeBag.UnknownBag(serializedBags[i].BagId, bagValue); } bag.Attributes = SignerInfo.MakeAttributeCollection(serializedBags[i].BagAttributes); bags.Add(bag); } return bags; } internal byte[] Encrypt( ReadOnlySpan<char> password, ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) { Debug.Assert(pbeParameters != null); Debug.Assert(pbeParameters.IterationCount >= 1); AsnWriter? writer = null; using (AsnWriter contentsWriter = Encode()) { ReadOnlySpan<byte> contentsSpan = contentsWriter.EncodeAsSpan(); PasswordBasedEncryption.InitiateEncryption( pbeParameters, out SymmetricAlgorithm cipher, out string hmacOid, out string encryptionAlgorithmOid, out bool isPkcs12); int cipherBlockBytes = cipher.BlockSize / 8; byte[] encryptedRent = CryptoPool.Rent(contentsSpan.Length + cipherBlockBytes); Span<byte> encryptedSpan = Span<byte>.Empty; Span<byte> iv = stackalloc byte[cipherBlockBytes]; Span<byte> salt = stackalloc byte[16]; RandomNumberGenerator.Fill(salt); try { int written = PasswordBasedEncryption.Encrypt( password, passwordBytes, cipher, isPkcs12, contentsSpan, pbeParameters, salt, encryptedRent, iv); encryptedSpan = encryptedRent.AsSpan(0, written); writer = new AsnWriter(AsnEncodingRules.DER); // EncryptedData writer.PushSequence(); // version // Since we're not writing unprotected attributes, version=0 writer.WriteInteger(0); // encryptedContentInfo { writer.PushSequence(); writer.WriteObjectIdentifier(Oids.Pkcs7Data); PasswordBasedEncryption.WritePbeAlgorithmIdentifier( writer, isPkcs12, encryptionAlgorithmOid, salt, pbeParameters.IterationCount, hmacOid, iv); writer.WriteOctetString( new Asn1Tag(TagClass.ContextSpecific, 0), encryptedSpan); writer.PopSequence(); } writer.PopSequence(); return writer.Encode(); } finally { CryptographicOperations.ZeroMemory(encryptedSpan); CryptoPool.Return(encryptedRent, clearSize: 0); writer?.Dispose(); } } } internal AsnWriter Encode() { AsnWriter writer; if (ConfidentialityMode == Pkcs12ConfidentialityMode.Password || ConfidentialityMode == Pkcs12ConfidentialityMode.PublicKey) { writer = new AsnWriter(AsnEncodingRules.BER); writer.WriteEncodedValue(_encrypted.Span); return writer; } Debug.Assert(ConfidentialityMode == Pkcs12ConfidentialityMode.None); writer = new AsnWriter(AsnEncodingRules.BER); try { writer.PushSequence(); if (_bags != null) { foreach (Pkcs12SafeBag safeBag in _bags) { safeBag.EncodeTo(writer); } } writer.PopSequence(); return writer; } catch { writer.Dispose(); throw; } } internal ContentInfoAsn EncodeToContentInfo() { using (AsnWriter contentsWriter = Encode()) { if (ConfidentialityMode == Pkcs12ConfidentialityMode.None) { using (AsnWriter valueWriter = new AsnWriter(AsnEncodingRules.DER)) { valueWriter.WriteOctetString(contentsWriter.EncodeAsSpan()); return new ContentInfoAsn { ContentType = Oids.Pkcs7Data, Content = valueWriter.Encode(), }; } } if (ConfidentialityMode == Pkcs12ConfidentialityMode.Password) { return new ContentInfoAsn { ContentType = Oids.Pkcs7Encrypted, Content = contentsWriter.Encode(), }; } if (ConfidentialityMode == Pkcs12ConfidentialityMode.PublicKey) { return new ContentInfoAsn { ContentType = Oids.Pkcs7Enveloped, Content = contentsWriter.Encode(), }; } Debug.Fail($"No handler for {ConfidentialityMode}"); throw new CryptographicException(); } } } }
36.28655
125
0.5379
[ "MIT" ]
1shekhar/runtime
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12SafeContents.cs
18,615
C#
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.34014 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace NewApiBrowser.Properties { /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if ((resourceMan == null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NewApiBrowser.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } } }
38.652778
179
0.603665
[ "MIT" ]
Wagnerp/onedrive-explorer-win
OneDriveApiExplorer/Properties/Resources.Designer.cs
2,785
C#
using System; namespace _03._Calculations { class Program { static void Main() { string action = Console.ReadLine(); int firstNumber = int.Parse(Console.ReadLine()); int secondNumber = int.Parse(Console.ReadLine()); if (action == "add") Add(firstNumber, secondNumber); if (action == "subtract") Subtract(firstNumber, secondNumber); if (action == "multiply") Multiply(firstNumber, secondNumber); if (action == "divide") Divide(firstNumber, secondNumber); } static void Add(int a, int b) { Console.WriteLine(a + b); } static void Subtract(int a, int b) { Console.WriteLine(a - b); } static void Multiply(int a, int b) { Console.WriteLine(a * b); } static void Divide(int a, int b) { Console.WriteLine(a / b); } } }
21.916667
61
0.481939
[ "MIT" ]
1TaNaTa1/Programming-Fundamentals
04. Methods/Lab/03. Calculations/Program.cs
1,054
C#
using System; using System.Collections.Generic; using System.IO; using System.Windows.Forms; using System.Xml.Serialization; namespace ARKBreedingStats.testCases { public partial class ExtractionTestControl : UserControl { private ExtractionTestCases cases = new ExtractionTestCases(); private readonly List<TestCaseControl> extractionTestControls = new List<TestCaseControl>(); public event TestCaseControl.CopyTestToExtractorEventHandler CopyToExtractor; public event TestCaseControl.CopyTestToTesterEventHandler CopyToTester; public ExtractionTestControl() { InitializeComponent(); } public void LoadExtractionTestCases(string fileName) { if (!string.IsNullOrWhiteSpace(fileName)) { XmlSerializer reader = new XmlSerializer(typeof(ExtractionTestCases)); if (!File.Exists(fileName)) { MessageBox.Show("Save file with name \"" + fileName + "\" does not exist!", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } using (System.IO.FileStream file = System.IO.File.OpenRead(fileName)) { try { cases = (ExtractionTestCases)reader.Deserialize(file); Properties.Settings.Default.LastSaveFileTestCases = fileName; } catch (Exception e) { MessageBox.Show("File Couldn't be opened, we thought you should know.\nErrormessage:\n\n" + e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { file.Close(); } } ShowTestCases(); UpdateFileLabel(); } } private void SaveExtractionTestCasesToFile(string fileName) { if (string.IsNullOrWhiteSpace(fileName)) { SaveExtractionTestCasesAs(); return; } XmlSerializer writer = new XmlSerializer(typeof(ExtractionTestCases)); try { System.IO.FileStream file = System.IO.File.Create(fileName); writer.Serialize(file, cases); file.Close(); Properties.Settings.Default.LastSaveFileTestCases = fileName; UpdateFileLabel(); } catch (Exception e) { MessageBox.Show("Error during serialization of testcase-data.\nErrormessage:\n\n" + e.Message, "Serialization-Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } private void SaveExtractionTestCasesAs() { using (SaveFileDialog dlg = new SaveFileDialog()) { dlg.Filter = "ASB Extraction Testcases (*.json)|*.json"; if (dlg.ShowDialog() == DialogResult.OK) { Properties.Settings.Default.LastSaveFileTestCases = dlg.FileName; SaveTestFile(); } } } /// <summary> /// Display all loaded testcases in controls. /// </summary> private void ShowTestCases() { SuspendLayout(); ClearAll(); foreach (ExtractionTestCase c in cases.testCases) { TestCaseControl tcc = new TestCaseControl(c); tcc.CopyToExtractor += CopyToExtractor; tcc.CopyToTester += CopyToTester; tcc.RemoveTestCase += Tcc_RemoveTestCase; extractionTestControls.Add(tcc); flowLayoutPanelTestCases.Controls.Add(tcc); flowLayoutPanelTestCases.SetFlowBreak(tcc, true); } ResumeLayout(); } private void Tcc_RemoveTestCase(TestCaseControl tcc) { cases.testCases.Remove(tcc.testCase); tcc.Dispose(); extractionTestControls.Remove(tcc); ShowTestCases(); } private void ClearAll(bool clearCases = false) { foreach (var e in extractionTestControls) e.Dispose(); extractionTestControls.Clear(); if (cases == null) cases = new ExtractionTestCases(); if (clearCases) cases.testCases.Clear(); } /// <summary> /// Adds the testcase to the collection. /// </summary> /// <param name="etc"></param> public void AddTestCase(ExtractionTestCase etc) { cases.testCases.Insert(0, etc); ShowTestCases(); } private void newTestfileToolStripMenuItem_Click(object sender, EventArgs e) { ClearAll(true); Properties.Settings.Default.LastSaveFileTestCases = string.Empty; ShowTestCases(); UpdateFileLabel(); } private void loadTestfileToolStripMenuItem_Click(object sender, EventArgs e) { string initialPath = Application.StartupPath; if (!string.IsNullOrEmpty(Properties.Settings.Default.LastSaveFileTestCases)) initialPath = Path.GetDirectoryName(Properties.Settings.Default.LastSaveFileTestCases); using (OpenFileDialog dlg = new OpenFileDialog()) { dlg.Filter = "ASB Extraction Testcases (*.json)|*.json"; dlg.InitialDirectory = initialPath; if (dlg.ShowDialog() == DialogResult.OK) { LoadExtractionTestCases(dlg.FileName); } } } private void btSaveTestFile_Click(object sender, EventArgs e) { SaveTestFile(); } private void saveTestfileToolStripMenuItem_Click(object sender, EventArgs e) { SaveTestFile(); } private void SaveTestFile() { SaveExtractionTestCasesToFile(Properties.Settings.Default.LastSaveFileTestCases); } private void saveTestfileAsToolStripMenuItem_Click(object sender, EventArgs e) { SaveExtractionTestCasesAs(); } private void UpdateFileLabel() { lbTestFile.Text = Properties.Settings.Default.LastSaveFileTestCases; } private void btRunAllTests_Click(object sender, EventArgs e) { foreach (var t in extractionTestControls) t.ClearTestResult(); Invalidate(); foreach (var t in extractionTestControls) t.runTest(); } } }
34.485
180
0.550964
[ "MIT" ]
EmkioA/ARKStatsExtractor
ARKBreedingStats/testCases/ExtractionTestControl.cs
6,899
C#
using System; using System.IO; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Configuration; using System.Resources; using System.Threading; using System.Globalization; namespace Mediachase.Ibn.WebTrial { /// <summary> /// Summary description for WebForm1. /// </summary> public partial class defaultpage : System.Web.UI.Page { protected ResourceManager LocRM = new ResourceManager("Mediachase.Ibn.WebTrial.App_GlobalResources.Resources.Resources", typeof(defaultpage).Assembly); protected const string sHeaderFileName = "trial_header"; private string ResellerGuid { get { //unknown Reseller GUID (see web.config) string retval = String.Empty;//Settings.UnknownResellerGuid; if (Request["Reseller"] != null && Request["Reseller"] != String.Empty) { try { retval = new Guid(Request["Reseller"]).ToString(); } catch (FormatException) { } } //DV 2008-05-07 if (retval == string.Empty) { switch (Thread.CurrentThread.CurrentUICulture.Name) { case "ru-RU": { retval = new Guid(Settings.RuResellerGuid).ToString(); break; } case "en-US": { retval = new Guid(Settings.EnResellerGuid).ToString(); break; } default: { retval = new Guid(Settings.UnknownResellerGuid).ToString(); break; } } } return retval; } } private string CancelLink { get { return Server.UrlDecode(Request["Back"]); } } private string locale { get { return Request["locale"]; } } #region Page_Load() protected void Page_Load(object sender, System.EventArgs e) { btnCreate.Visible = true; spanLanguage.Visible = true; string asppath = Settings.AspPath; lblDomain.Text = "." + TrialHelper.GetParentDomain(); if (asppath != null) imgHeader.ImageUrl = asppath + "images/SignupHeader.aspx"; lbRepeat.Visible = false; if (!IsPostBack) { if (locale != null && locale != String.Empty) { Thread.CurrentThread.CurrentCulture = new CultureInfo(locale); Thread.CurrentThread.CurrentUICulture = new CultureInfo(locale); } else SetUserLocale(); if (CancelLink == null || CancelLink == String.Empty) btnCancel.Visible = false; BindDefaultValues(); tr4.Visible = false; } else if (ddLanguage.SelectedItem != null) { Thread.CurrentThread.CurrentCulture = new CultureInfo(ddLanguage.SelectedItem.Value); Thread.CurrentThread.CurrentUICulture = new CultureInfo(ddLanguage.SelectedItem.Value); } cbConfirm.Attributes.Add("onclick", "EnableButtons(this);"); btnCreate.Value = LocRM.GetString("strCreateMyPortal"); btnCreate.Disabled = !cbConfirm.Checked; btnCreate.Attributes.Add("onclick", "CreateTrial();"); btnCancel.Attributes.Add("onclick", "DisableButtons(this);"); lbCreate.Attributes.Add("onclick", "DisableButtons(this);"); lbRepeat.Attributes.Add("onclick", "DisableButtons(this);"); cbConfirm.Text = LocRM.GetString("IAgree"); lblTerms.Text = "<a href='javascript:OpenTerms()'>" + LocRM.GetString("IAgree2") + "</a>"; cbSendMe.Text = LocRM.GetString("strSendMe"); cbCallMe.Text = LocRM.GetString("strCallMe"); } #endregion #region BindDefaultValues() private void BindDefaultValues() { string BrowserLocale = Thread.CurrentThread.CurrentCulture.Name; Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture; ListItem li = ddLanguage.Items.FindByValue(BrowserLocale); if (li != null) li.Selected = true; else { ListItem li1 = ddLanguage.Items.FindByValue("en-US"); if (li1 != null) li1.Selected = true; } ddTimeZone.DataValueField = "TimeZoneId"; ddTimeZone.DataTextField = "DisplayName"; DataView dv = TrialHelper.GetTimeZones(BrowserLocale).DefaultView; dv.Sort = "Bias DESC, DisplayName"; ddTimeZone.DataSource = dv; ddTimeZone.DataBind(); btnCancel.Value = LocRM.GetString("Cancel"); lbRepeat.Text = LocRM.GetString("Repeat"); ListItem liItem = null; switch (BrowserLocale.ToLower()) { case "ru-ru": if (ddCountry.SelectedIndex > -1) ddCountry.Items[ddCountry.SelectedIndex].Selected = false; liItem = ddCountry.Items.FindByValue("46"); if (liItem != null) liItem.Selected = true; if (ddTimeZone.SelectedIndex > -1) ddTimeZone.Items[ddTimeZone.SelectedIndex].Selected = false; liItem = ddTimeZone.Items.FindByValue("54"); if (liItem != null) liItem.Selected = true; break; default: if (ddCountry.SelectedIndex > -1) ddCountry.Items[ddCountry.SelectedIndex].Selected = false; liItem = ddCountry.Items.FindByValue("57"); if (liItem != null) liItem.Selected = true; if (ddTimeZone.SelectedIndex > -1) ddTimeZone.Items[ddTimeZone.SelectedIndex].Selected = false; liItem = ddTimeZone.Items.FindByValue("19"); if (liItem != null) liItem.Selected = true; break; } } #endregion protected void Button2_ServerClick(object sender, System.EventArgs e) { btnCreate.Visible = true; lbRepeat.Visible = false; tr1.Visible = true; tr2.Visible = true; tr3.Visible = true; tr4.Visible = false; } protected void btnCancel_ServerClick(object sender, System.EventArgs e) { Response.Redirect(CancelLink); } protected void ddLanguage_change(object sender, System.EventArgs e) { BindDefaultValues(); } #region SetUserLocale() public void SetUserLocale() { HttpRequest Request = HttpContext.Current.Request; if (Request.UserLanguages == null) return; string Lang = Request.UserLanguages[0]; if (Lang != null) { if (Lang.Length < 3) Lang = Lang + "-" + Lang.ToUpper(); try { System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(Lang); System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(Lang); } catch { } } } #endregion #region lbCreate_Click protected void lbCreate_Click(object sender, EventArgs e) { //Page.Validate(); if (!Page.IsValid || !cbConfirm.Checked) return; localhost.TrialResult tr = localhost.TrialResult.Failed; string message = String.Empty; string assist = LocRM.GetString("Assist"); int requestId; string requestGuid; try { tr = TrialHelper.Request( tbPortalName.Text , tbDomain.Text , tbFirstName.Text , tbLatName.Text , tbEmail.Text , tbPhone.Text , ddCountry.Items[ddCountry.SelectedIndex].Text , tbLogin.Text , tbPassword.Text , ResellerGuid , Thread.CurrentThread.CurrentUICulture.Name , int.Parse(ddTimeZone.SelectedValue) , CManage.GetReferrer(Request) , out requestId , out requestGuid /* , cbSendMe.Checked , cbCallMe.Checked */ ); switch (tr) { case localhost.TrialResult.AlreadyActivated: lblStep4Header.Text = LocRM.GetString("TrialRejected"); lblStep4SubHeader.Text = LocRM.GetString("TrialRejectedReasons"); message = LocRM.GetString("TrialActivated"); lblStep4Text.Text = LocRM.GetString("TrialActivated") + assist; btnCreate.Visible = false; spanLanguage.Visible = false; break; case localhost.TrialResult.DomainExists: lblStep4Header.Text = LocRM.GetString("TrialRejected"); lblStep4SubHeader.Text = LocRM.GetString("TrialRejectedReasons"); message = LocRM.GetString("DomainExists"); lblStep4Text.Text = LocRM.GetString("DomainExists") + assist; lbRepeat.Visible = true; btnCreate.Visible = false; spanLanguage.Visible = false; break; case localhost.TrialResult.Failed: lblStep4Header.Text = LocRM.GetString("TrialRejected"); lblStep4SubHeader.Text = LocRM.GetString("TrialRejectedReasons"); message = LocRM.GetString("UnknownReason"); lblStep4Text.Text = LocRM.GetString("UnknownReason") + assist; break; case localhost.TrialResult.InvalidRequest: lblStep4Header.Text = LocRM.GetString("TrialRejected"); lblStep4SubHeader.Text = LocRM.GetString("TrialRejectedReasons"); message = LocRM.GetString("InvalidRequest"); lblStep4Text.Text = LocRM.GetString("InvalidRequest") + assist; break; case localhost.TrialResult.RequestPending: lblStep4Header.Text = LocRM.GetString("RequestPending"); lblStep4SubHeader.Text = LocRM.GetString("OneStep"); message = String.Format("Request Pending.", tbDomain.Text); lblStep4Text.Text = String.Format("Request Pending.", tbDomain.Text); break; case localhost.TrialResult.Success: lblStep4Header.Text = LocRM.GetString("Created"); lblStep4SubHeader.Text = LocRM.GetString("OneStep"); message = String.Format(LocRM.GetString("Congratulations"), tbDomain.Text, lblDomain.Text); lblStep4Text.Text = String.Format(LocRM.GetString("Congratulations"), tbDomain.Text, lblDomain.Text); btnCreate.Visible = false; spanLanguage.Visible = false; break; case localhost.TrialResult.UserRegistered: lblStep4Header.Text = LocRM.GetString("TrialRejected"); lblStep4SubHeader.Text = LocRM.GetString("TrialRejectedReasons"); message = LocRM.GetString("UserRegistered"); lblStep4Text.Text = LocRM.GetString("UserRegistered") + assist; lbRepeat.Visible = true; btnCreate.Visible = false; spanLanguage.Visible = false; break; case localhost.TrialResult.WaitingForActivation: Response.Redirect(String.Format("activate.aspx?rid={0}&guid={1}&locale={2}", requestId, requestGuid, Thread.CurrentThread.CurrentUICulture.Name), true); return; default: break; } } catch (Exception ex) { lblStep4Header.Text = LocRM.GetString("Failed"); lblStep4SubHeader.Text = LocRM.GetString("TrialRejectedReasons"); lblStep4Text.Text = ex.Message + @"<br>" + assist; message = ex.Message; cbConfirm.Checked = false; lbRepeat.Visible = true; btnCreate.Visible = false; } finally { try { string conStr = Settings.ConnectionString; if (conStr != null && conStr.Length > 0) //Save request in local database. CManage.CreateRequest( tbPortalName.Text , "1 - 20" , "" , tbDomain.Text , tbFirstName.Text , tbLatName.Text , tbEmail.Text , ddCountry.Items[ddCountry.SelectedIndex].Text , tbPhone.Text , ddTimeZone.Items[ddTimeZone.SelectedIndex].Text , tbLogin.Text , tbPassword.Text , new Guid(ResellerGuid) , (int)tr , message ); } catch { #if DEBUG //throw; #endif } } tr1.Visible = false; tr2.Visible = false; tr3.Visible = false; tr4.Visible = true; } #endregion private void Page_PreRender(object sender, EventArgs e) { Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), "<script language=javascript>setTimeout(\"FocusElement('" + tbFirstName.ClientID + "')\", 0);</script>"); } } }
29.122137
158
0.67121
[ "MIT" ]
InstantBusinessNetwork/IBN
Source/Server/WebTrial/default.aspx.cs
11,445
C#
namespace EnvironmentAssessment.Common.VimApi { public class InvalidGuestLogin : GuestOperationsFault { } }
15.857143
54
0.810811
[ "MIT" ]
octansIt/environmentassessment
EnvironmentAssessment.Wizard/Common/VimApi/I/InvalidGuestLogin.cs
111
C#
using databaseORM.data; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using databaseORM; using Newtonsoft.Json.Linq; using System.Text.RegularExpressions; using Model; using DAL; using System.Data.SqlClient; using System.Data; namespace MsgBoardWebApp { public class backController : ApiController { // GET api/<controller>[TypeFilter(type)] [HttpPost] public List<databaseORM.data.ErrorLog> GetErrorLogs() { #region 從資料庫取出ErrorLog紀錄 using (databaseEF context = new databaseEF()) { List<databaseORM.data.ErrorLog> cc = context.ErrorLogs.ToList(); return cc; } #endregion } [HttpPost] public info Getinfo([FromBody] string data) { JObject myjsonData = JObject.Parse(data); string date = myjsonData["date"].ToString(); string date2 = myjsonData["date2"].ToString(); DateTime dateTime1 = Convert.ToDateTime(date); DateTime dateTime2 = Convert.ToDateTime(date2); Regex regexdate = new Regex(@"^((19|20)?[0-9]{2}[- /.](0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01]))*$"); info info = new info(); if (dateTime2 < dateTime1) { info.msg = "日期資料大小錯誤"; return info; } long days = (dateTime2 - dateTime1).Days + 1; if (!regexdate.IsMatch(date)) { info.msg = "資料格式錯誤"; return info; } if (!regexdate.IsMatch(date2)) { info.msg = "資料格式錯誤"; return info; } try { //string ARP = "SELECT sum(RegisteredPeople) as AllRegisteredPeople FROM Info WHERE CreateDate BETWEEN @timeOne AND @timeTwo"; //SqlParameter[] ARPsqls = new SqlParameter[] //{ //new SqlParameter("@timeOne",date), //new SqlParameter("@timeTwo",date2) //}; //info.AllRegisteredPeople = Convert.ToInt32(sqlhelper.executeScalarsql(ARP, ARPsqls, false)); //DateTime sd = Convert.ToDateTime("2010/05/07"); //4: DateTime ed = Convert.ToDateTime("2010/05/10").AddDays(1); //5: TESTDBEntities _db = new TESTDBEntities(); //6: var showToView = _db.TrackStatistic.Where( //7: m => m.ClickDate >= sd && m.ClickDate <= ed); //8: return View(showToView); long AllRegistered = 0; using (databaseEF context = new databaseEF()) { AllRegistered = context.Accountings.Where(x => x.CreateDate >= dateTime1 && x.CreateDate <= dateTime2 &&x.Level== "Member").Count(); } string APO = "SELECT sum(PeopleOnline) as AllPeopleOnline FROM Info WHERE CreateDate BETWEEN @timeOne AND @timeTwo"; SqlParameter[] APOsqls = new SqlParameter[] { new SqlParameter("@timeOne",date), new SqlParameter("@timeTwo",date2) }; info.AllPeopleOnline = Convert.ToInt32(sqlhelper.executeScalarsql(APO, APOsqls, false)); long a = info.AllPeopleOnline; info.AllRegisteredPeople = AllRegistered; info.avgPeopleOnline = Math.Round((decimal)a / days,3); info.avgRegisteredPeople = Math.Round((decimal)AllRegistered / days,3); info.msg = "獲取資料成功"; return info; } catch (Exception) { info.msg = "沒有資料"; return info; } } [HttpPost] public List<databaseORM.data.Swear> GetSwear() { #region 從資料庫取出ErrorLog紀錄 using (databaseEF context = new databaseEF()) { List<databaseORM.data.Swear> cc = context.Swears.ToList(); return cc; } #endregion } [HttpPost] public List<databaseORM.data.Accounting> GetEditMember() { #region 從資料庫取出EditAccounting紀錄 using (databaseEF context = new databaseEF()) { List<databaseORM.data.Accounting> cc = context.Accountings.Where(x => x.Level == "Member").ToList(); foreach (var acc in cc) { acc.Password = SystemAuth.PasswordAESCryptography.Decrypt(acc.Password); } return cc; } #endregion } [HttpPost] public List<EditArticles> GetEditArticles() { //#region 從資料庫取出Articles //using (databaseEF context = new databaseEF()) //{ //var cc = from message in context.Messages // join account in context.Accountings on message.UserID equals account.UserID into ps // from account in ps.DefaultIfEmpty() // join posting in context.Postings on message.PostID equals posting.PostID into pse // from posting in pse.DefaultIfEmpty() // orderby message.CreateDate descending // select new EditArticles // { // Name = account.Name, // CreateDate = message.CreateDate, // Account = account.Account, // UserID = message.UserID, // Title = posting.Title, // Body = message.Body, // ID = message.ID, // }; string sql = "select DISTINCT Message.CreateDate, Name,Account,Posting.UserID,Title,Message.Body,Message.ID FROM Message JOIN Accounting ON Accounting.UserID = Message.UserID join Posting on Posting.PostID = Message.PostID"; SqlDataReader sqlDataReader = sqlhelper.executeReadesql(sql); List<EditArticles> EditArticlesList = new List<EditArticles>(); while (sqlDataReader.Read()) { EditArticles editArticles = new EditArticles(); editArticles.Name = sqlDataReader["Name"].ToString(); editArticles.CreateDate = Convert.ToDateTime(sqlDataReader["CreateDate"]); editArticles.Account = sqlDataReader["Account"].ToString(); editArticles.UserID = Guid.Parse(sqlDataReader["UserID"].ToString()); editArticles.Title = sqlDataReader["Title"].ToString(); editArticles.Body = sqlDataReader["Body"].ToString(); editArticles.ID = Convert.ToInt32(sqlDataReader["ID"]); EditArticlesList.Add(editArticles); } return EditArticlesList; //} //#endregion } [HttpPost] public List<Model.GetIndexmy> GetIndex() { //List<databaseORM.data.Posting> cc = context.Postings.OrderByDescending(x => x.CreateDate).ToList(); string sql = "SELECT Posting.CreateDate,Title,Body,ismaincontent,Posting.ID FROM Posting left JOIN Accounting ON Accounting.UserID = Posting.UserID where Accounting.Level != 'Admin'"; SqlDataReader sqlDataReader = sqlhelper.executeReadesql(sql); List<GetIndexmy> getIndexmies = new List<GetIndexmy>(); while (sqlDataReader.Read()) { GetIndexmy getIndexmy = new GetIndexmy(); getIndexmy.CreateDate = Convert.ToDateTime(sqlDataReader["CreateDate"]); getIndexmy.Title = sqlDataReader["Title"].ToString(); getIndexmy.Body = sqlDataReader["Body"].ToString(); getIndexmy.ismaincontent = Convert.ToBoolean(sqlDataReader["ismaincontent"]); getIndexmy.ID = sqlDataReader["ID"].ToString(); getIndexmies.Add(getIndexmy); } return getIndexmies; } [HttpPost] public List<databaseORM.data.Posting> Getbord([FromBody] string data) { JObject myjsonData = JObject.Parse(data); string mydataID = myjsonData["dataID"].ToString(); #region 從資料庫取出EditAccounting紀錄 using (databaseEF context = new databaseEF()) { Guid guiduserID = Guid.Parse(mydataID); List<databaseORM.data.Posting> cc = context.Postings.Where(x => x.UserID == guiduserID).ToList(); return cc; } #endregion } [HttpPost] public Model.ApiResult DelErrorLogs([FromBody] string dataID) { #region 從資料庫刪除ErrorLog紀錄透過dataID using (databaseEF context = new databaseEF()) { Model.ApiResult apiResult = new Model.ApiResult(); try { ErrorLog log = new ErrorLog() { ID = Convert.ToInt32(dataID) }; context.ErrorLogs.Attach(log); context.ErrorLogs.Remove(log); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "刪除成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult DelIndex([FromBody] string dataID) { #region 從資料庫刪除ErrorLog紀錄透過dataID using (databaseEF context = new databaseEF()) { try { //刪除多餘資料 int dataint = Convert.ToInt32(dataID); String PostID = context.Postings.Where(x => x.ID == dataint).Select(x => x.PostID).FirstOrDefault().ToString(); string sqlmessage = "DELETE FROM message WHERE PostID= convert(uniqueidentifier,@PostID);"; SqlParameter[] sqlParametersmessage = new SqlParameter[] { new SqlParameter("@PostID",PostID) }; sqlhelper.executeNonQuerysql(sqlmessage, sqlParametersmessage, false); //刪除多餘資料 } catch (Exception e) { Console.WriteLine(e); } Model.ApiResult apiResult = new Model.ApiResult(); try { Posting posting = new Posting() { ID = Convert.ToInt32(dataID) }; context.Postings.Attach(posting); context.Postings.Remove(posting); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "刪除成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult DelSwear([FromBody] string dataID) { #region 從資料庫刪除ErrorLog紀錄透過dataID using (databaseEF context = new databaseEF()) { Model.ApiResult apiResult = new Model.ApiResult(); try { Swear swear = new Swear() { ID = Convert.ToInt32(dataID) }; context.Swears.Attach(swear); context.Swears.Remove(swear); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "刪除成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult DelPosting([FromBody] string dataID) { #region 從資料庫刪除Posting紀錄透過dataID using (databaseEF context = new databaseEF()) { Model.ApiResult apiResult = new Model.ApiResult(); try { Posting posting = new Posting() { ID = Convert.ToInt32(dataID) }; context.Postings.Attach(posting); context.Postings.Remove(posting); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "刪除成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除失敗"; return apiResult; } } #endregion } public Model.ApiResult DelMessage([FromBody] string dataID) { #region 從資料庫刪除Posting紀錄透過dataID using (databaseEF context = new databaseEF()) { Model.ApiResult apiResult = new Model.ApiResult(); try { Message message = new Message() { ID = Convert.ToInt32(dataID) }; context.Messages.Attach(message); context.Messages.Remove(message); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "刪除成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除失敗"; return apiResult; } } #endregion } public Model.ApiResult DelEditMessage([FromBody] string dataID) { #region 從資料庫刪除Posting紀錄透過dataID using (databaseEF context = new databaseEF()) { Model.ApiResult apiResult = new Model.ApiResult(); try { int id = Convert.ToInt32(dataID); string today = DateTime.Now.ToString("yyyy-MM-dd"); string timeNow = DateTime.Now.ToShortTimeString().ToString(); Message message = context.Messages.Where(x => x.ID == id).FirstOrDefault(); message.Body = "已被管理者刪除於日期:" + today + "時間" + timeNow + "刪除"; context.SaveChanges(); apiResult.state = 200; apiResult.msg = "刪除內文成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除內文成功失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult DelMember([FromBody] string dataID) { #region 從資料庫刪除ErrorLog紀錄透過dataID using (databaseEF context = new databaseEF()) { Model.ApiResult apiResult = new Model.ApiResult(); try { //刪除多餘資料 int dataint = Convert.ToInt32(dataID); String userID = context.Accountings.Where(x => x.ID == dataint).Select(x => x.UserID).FirstOrDefault().ToString(); string sqlmessage = "DELETE FROM message WHERE UserID= convert(uniqueidentifier,@UserID);"; SqlParameter[] sqlParametersmessage = new SqlParameter[] { new SqlParameter("@UserID",userID) }; sqlhelper.executeNonQuerysql(sqlmessage, sqlParametersmessage, false); string sqlposting = "DELETE FROM posting WHERE UserID= convert(uniqueidentifier,@UserID);"; SqlParameter[] sqlParametersposting = new SqlParameter[] { new SqlParameter("@UserID",userID) }; sqlhelper.executeNonQuerysql(sqlposting, sqlParametersposting, false); //刪除多餘資料 Accounting log = new Accounting() { ID = Convert.ToInt32(dataID) }; context.Accountings.Attach(log); context.Accountings.Remove(log); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "刪除成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult CancelBucket([FromBody] string dataID) { //int id = Convert.ToInt32(dataID); //Accounting accounting = context.Accountings.Where(x => x.ID == id).FirstOrDefault(); //accounting.Name = name; //accounting.Account = account; //accounting.Password = password; //accounting.Email = email; //accounting.BirthDay = Convert.ToDateTime(date); //context.SaveChanges(); //apiResult.state = 200; //apiResult.msg = "更新成功"; //return apiResult; #region 從資料庫刪除ErrorLog紀錄透過dataID using (databaseEF context = new databaseEF()) { Model.ApiResult apiResult = new Model.ApiResult(); try { int id = Convert.ToInt32(dataID); Accounting accounting = context.Accountings.Where(x => x.ID == id).FirstOrDefault(); accounting.Bucket = null; context.SaveChanges(); apiResult.state = 200; apiResult.msg = "取消成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "取消失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult editMember([FromBody] string data) { JObject myjsonData = JObject.Parse(data); string name = myjsonData["name"].ToString(); string account = myjsonData["account"].ToString(); string password = myjsonData["password"].ToString(); string email = myjsonData["email"].ToString(); string date = myjsonData["date"].ToString(); string dataID = myjsonData["dataID"].ToString(); Model.ApiResult apiResult = new Model.ApiResult(); Regex rgxemail = new Regex(@"^([a-zA-Z0-9_\-?\.?]){3,}@([a-zA-Z]){3,}\.([a-zA-Z]){2,5}$"); Regex rgxeaccount = new Regex(@"^[\w\S]+$"); Regex replace = new Regex(@"^\S+$"); Regex regxpassworld = new Regex(@"^\w{6,15}$"); Regex regexdate = new Regex(@"^((19|20)?[0-9]{2}[- /.](0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01]))*$"); Regex regexdata = new Regex(@"^\d{4}-\d{2}-\d{2}$"); var dddate = regexdata.IsMatch(date); if (!regexdata.IsMatch(date)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } var cc = rgxemail.IsMatch(email); if (!rgxemail.IsMatch(email)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } var tt = rgxeaccount.IsMatch(account); if (!rgxeaccount.IsMatch(account)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } var ba = replace.IsMatch(name); if (!replace.IsMatch(name)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } var gg = regexdate.IsMatch(date); if (!regexdate.IsMatch(date)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } if (!regxpassworld.IsMatch(password)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } if (!regexdate.IsMatch(date)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } //if (rgxemail.IsMatch(email) & rgxeaccount.IsMatch(account) &replace.IsMatch(name)&regexdate.IsMatch(date)&regxpassworld.IsMatch(password)) //{ // apiResult.state = 404; // apiResult.msg = "資料格式錯誤"; // return apiResult; //} //檢查帳號是否重複 try { using (databaseEF context = new databaseEF()) { var query = context.Accountings.Where(x => x.Account == account); var ddd = query.Count(); if (query.Count() > 0) { apiResult.state = 404; apiResult.msg = "更新失敗,已存在帳號"; return apiResult; } } } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "更新失敗"; return apiResult; } //檢查帳號是否重複 #region 從資料庫紀錄透過dataID using (databaseEF context = new databaseEF()) { try { int id = Convert.ToInt32(dataID); Accounting accounting = context.Accountings.Where(x => x.ID == id).FirstOrDefault(); accounting.Name = name; accounting.Account = account; accounting.Password = SystemAuth.PasswordAESCryptography.Encrypt(password); accounting.Email = email; accounting.BirthDay = Convert.ToDateTime(date); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "更新成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult editPosting([FromBody] string data) { JObject myjsonData = JObject.Parse(data); string Title = myjsonData["Title"].ToString(); string Textarea = myjsonData["Textarea"].ToString(); string dataID = myjsonData["dataID"].ToString(); Model.ApiResult apiResult = new Model.ApiResult(); Regex replace = new Regex(@"^\S+$"); if (!replace.IsMatch(Title)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } #region 從資料庫紀錄透過dataID using (databaseEF context = new databaseEF()) { try { int id = Convert.ToInt32(dataID); Posting posting = context.Postings.Where(x => x.ID == id).FirstOrDefault(); posting.Title = Title; posting.Body = Textarea; context.SaveChanges(); apiResult.state = 200; apiResult.msg = "更新成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult setIndex([FromBody] string dataID) { Model.ApiResult apiResult = new Model.ApiResult(); string sql = "update Posting set ismaincontent=1 where ID =@id"; SqlParameter[] sqlParameters = new SqlParameter[] { new SqlParameter("@id", dataID) }; try { int i = sqlhelper.executeNonQuerysql(sql, sqlParameters, false); apiResult.state = 200; apiResult.msg = "設定成功"; return apiResult; } catch (Exception) { apiResult.state = 404; apiResult.msg = "設定失敗"; return apiResult; } } [HttpPost] public Model.ApiResult CancelIndex([FromBody] string dataID) { Model.ApiResult apiResult = new Model.ApiResult(); string sql = "update Posting set ismaincontent=0 where ID =@id"; SqlParameter[] sqlParameters = new SqlParameter[] { new SqlParameter("@id", dataID) }; try { int i = sqlhelper.executeNonQuerysql(sql, sqlParameters, false); apiResult.state = 200; apiResult.msg = "設定成功"; return apiResult; } catch (Exception) { apiResult.state = 404; apiResult.msg = "設定失敗"; return apiResult; } } [HttpPost] public Model.ApiResult editBucket([FromBody] string data) { JObject myjsonData = JObject.Parse(data); string MybucketDate = myjsonData["MybucketDate"].ToString(); string dataID = myjsonData["dataID"].ToString(); Model.ApiResult apiResult = new Model.ApiResult(); Regex regexdata = new Regex(@"^\d{4}-\d{2}-\d{2}$"); if (!regexdata.IsMatch(MybucketDate)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } #region 從資料庫紀錄透過dataID using (databaseEF context = new databaseEF()) { try { int id = Convert.ToInt32(dataID); Accounting accounting = context.Accountings.Where(x => x.ID == id).FirstOrDefault(); accounting.Bucket = Convert.ToDateTime(MybucketDate); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "更新成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult editmydata([FromBody] string data) { JObject myjsonData = JObject.Parse(data); string name = myjsonData["name"].ToString(); string account = myjsonData["account"].ToString(); string password = myjsonData["password"].ToString(); string email = myjsonData["email"].ToString(); string date = myjsonData["date"].ToString(); string dataID = myjsonData["dataID"].ToString(); Model.ApiResult apiResult = new Model.ApiResult(); Regex rgxemail = new Regex(@"^([a-zA-Z0-9_\-?\.?]){3,}@([a-zA-Z]){3,}\.([a-zA-Z]){2,5}$"); Regex rgxeaccount = new Regex(@"^[\w\S]+$"); Regex replace = new Regex(@"^\S+$"); Regex regxpassworld = new Regex(@"^\w{6,15}$"); Regex regexdate = new Regex(@"^((19|20)?[0-9]{2}[- /.](0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01]))*$"); Regex regexdata = new Regex(@"^\d{4}-\d{2}-\d{2}$"); if (!regxpassworld.IsMatch(password)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } if (!regexdata.IsMatch(date)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } if (!rgxemail.IsMatch(email)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } if (!rgxeaccount.IsMatch(account)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } if (!replace.IsMatch(name)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } if (!regexdate.IsMatch(date)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } if (!regexdate.IsMatch(date)) { apiResult.state = 404; apiResult.msg = "資料格式錯誤"; return apiResult; } //if (rgxemail.IsMatch(email) & rgxeaccount.IsMatch(account) &replace.IsMatch(name)&regexdate.IsMatch(date)&regxpassworld.IsMatch(password)) //{ // apiResult.state = 404; // apiResult.msg = "資料格式錯誤"; // return apiResult; //} //檢查帳號是否重複 try { using (databaseEF context = new databaseEF()) { var query = context.Accountings.Where(x => x.Account == account); var ddd = query.Count(); if (query.Count() > 0) { apiResult.state = 404; apiResult.msg = "更新失敗,已存在帳號"; return apiResult; } var emailquery = context.Accountings.Where(x => x.Email == email); var eee = emailquery.Count(); if (emailquery.Count() > 0) { apiResult.state = 404; apiResult.msg = "更新失敗,已存在E-mail"; return apiResult; } } } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "更新失敗"; return apiResult; } //檢查帳號是否重複 #region 從資料庫紀錄透過dataID using (databaseEF context = new databaseEF()) { try { // string id = dataID; Guid id = Guid.Parse(dataID); Accounting accounting = context.Accountings.Where(x => x.UserID == id).FirstOrDefault(); accounting.Name = name; accounting.Account = account; accounting.Password = SystemAuth.PasswordAESCryptography.Encrypt(password); accounting.Email = email; accounting.BirthDay = Convert.ToDateTime(date); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "更新成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "更新失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult addBoard([FromBody] string data) { JObject myjsonData = JObject.Parse(data); string Title = myjsonData["Title"].ToString(); string Textarea = myjsonData["Textarea"].ToString(); string userID = myjsonData["dataID"].ToString(); Model.ApiResult apiResult = new Model.ApiResult(); Regex replace = new Regex(@"^\S+$"); if (!replace.IsMatch(Title)) { apiResult.state = 404; apiResult.msg = "標題資料格式錯誤"; return apiResult; } #region 從資料庫紀錄透過dataID using (databaseEF context = new databaseEF()) { try { Guid guidUserId = Guid.Parse(userID); Posting posting = new Posting(); posting.Title = Title; posting.Body = Textarea; posting.UserID = guidUserId; context.Postings.Add(posting); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "更新成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "刪除失敗"; return apiResult; } } #endregion } [HttpPost] public Model.ApiResult addswearing([FromBody] string data) { JObject myjsonData = JObject.Parse(data); string addData = myjsonData["addData"].ToString(); Model.ApiResult apiResult = new Model.ApiResult(); Regex replace = new Regex(@"^\S+$"); if (!replace.IsMatch(addData)) { apiResult.state = 404; apiResult.msg = "輸入框為空無法增加資料"; return apiResult; } #region 從資料庫紀錄透過dataID using (databaseEF context = new databaseEF()) { try { Swear swear = new Swear(); swear.Body = addData; context.Swears.Add(swear); context.SaveChanges(); apiResult.state = 200; apiResult.msg = "增加成功"; return apiResult; } catch (Exception e) { Console.WriteLine(e); apiResult.state = 404; apiResult.msg = "增加失敗"; return apiResult; } } #endregion } // GET api/<controller>/5 [HttpGet] public string Get(int id) { return "value"; } // POST api/<controller> public void Post([FromBody] string value) { } // PUT api/<controller>/5 public void Put(int id, [FromBody] string value) { } // DELETE api/<controller>/5 public void Delete(int id) { } } }
31.995686
241
0.460804
[ "MIT" ]
dearme61002/MsgBoard
MsgBoardSystem/MsgBoardWebApp/Controller/backController.cs
38,213
C#