lang
stringclasses
10 values
seed
stringlengths
5
2.12k
csharp
public void Designer_GroupBox_FileStructure_Setup(DesignerActionItemCollection items, IComponent component) { var controlAutoSize = component as IGroupBox_FileStructure_Interface; if (controlAutoSize == null) return; items.Add(new DesignerActionHeaderItem("Structure"...
csharp
await tool.Prepare(); } } }
csharp
* * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR...
csharp
{ list = new List<StoragePoint>(); hashmap[hash] = list; } list.Add(point); }
csharp
_area.Add(new Area { areaID = "2634", area = "丘北县", father = "384" }); _area.Add(new Area { areaID = "2635", area = "个旧市", father = "385" }); _area.Add(new Area { areaID = "2636", area = "开远市", father = "385" }); ...
csharp
// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. // </auto-generated> namespace Microsoft.Azure.Management.ContainerRegistry.Models { using Newtonsoft.Json; using System.Collections; using System.Collections....
csharp
namespace 聊天室_服务器端_TCP { class Program { //存放客户端 static List<Client> clientList = new List<Client>(); static int clientID = 0; //广播消息
csharp
{ base.OnAttachedToVisualTree(e); LogicalChildrenOnCollectionChanged(null, null!); } private void LogicalChildrenOnCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e) { foreach (var child in LogicalChildren) { ...
csharp
using System.Text; using System.Threading.Tasks; namespace RapidXamlToolkit.VisualStudioIntegration { public interface ISpanAbstraction { int Start { get; } int Length { get; } }
csharp
End Function End Class"; await VBVerify.VerifyAnalyzerAsync(test); } [Fact] public async Task MethodChecksVsThreadingOnly_WithCType_VB() { var test = VBPreamble + @" Class Test Async Function CheckAndDispose(o) As Task
csharp
namespace Com.QueoFlow.Peanuts.Net.Web.Models.Menu { /// <summary> /// Bildet einen Separator in einem Menü ab. /// </summary> public class SeparatorMenuItemViewModel : MenuItemViewModel { private readonly bool _isEnabled; /// <summary> /// Erzeugt einen neuen Menu-Separator, d...
csharp
static StackObject* MultMatrix_19(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntep...
csharp
} set { bestoPuntos = value; } } private string bestoName; public string BestoName { get {
csharp
/// Provides Extension Method(s) for <see cref="ObservableList{T}" /> instances. /// </summary> public static class ObservableListExtensions { /// <summary> /// Forwards the <paramref name="source" /> changes to the <paramref name="target" />. /// </summary> //...
csharp
}; fileServerOptions.StaticFileOptions.ContentTypeProvider = new CustomContentTypeProvider(); app.UseFileServer(fileServerOptions); app.UseAutofacMiddleware(_container); app.UseAutofacWebApi(config); app.UseWebApi(con...
csharp
iLGenerator2.Emit(OpCodes.Ldnull); } Label label2 = iLGenerator2.DefineLabel(); iLGenerator2.Emit(OpCodes.Br_S, label2); iLGenerator2.MarkLabel(label); iLGenerator2.Emit(OpCodes.Ldloc_0); iLGenerator2.Emit(OpCodes.Ldarg_0); iLGenerator2.Emit(OpCodes.Ldfld, returnTypesField); iLGenerator2.Emi...
csharp
{ this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdateForm)); this.label1 = new System.Windows.Forms.Label(); this.label2 = new Syste...
csharp
public partial class ContentTypeInfo { public string OriginalPicture { get; set; } public string BPicture { get; set; } public string MPicture { get; set; }
csharp
} else { Value = ParseUnQuotedPropertyName(firstChar); } Token = JsonToken.PropertyName; } private void ReadNonStringValue(char firstChar) { switch (firstChar) {
csharp
using System.Collections.Generic; // ReSharper disable once InconsistentNaming namespace AppGet.Github.Releases { public class GithubRelease { public string tag_name { get; set; } public List<GithubReleaseAsset> Assets { get; set; } } public class GithubReleaseAsset { publ...
csharp
{ cmd = new MySql.Data.MySqlClient.MySqlCommand("SELECT * from useraccountview where userID=" + Connection.SessionUserID, Connection.Conn); dr = cmd.ExecuteReader(); while (dr.Read())
csharp
using VueJSDotnet51.Models; namespace VueJSDotnet51.Controllers { [Route("api/[controller]")] [ApiController] public class BookController : AsyncRESTControllerBase<Book> {
csharp
namespace GodSeekerPlus.Modules.BossChallenge; [Category(nameof(BossChallenge))] internal sealed class HalveDamage : Module { private protected override void Load() => ModHooks.AfterTakeDamageHook += MakeDamageHalved; private protected override void Unload() => ModHooks.AfterTakeDamageHook -= MakeDamageHalved; ...
csharp
namespace syscall { public static partial class windows_package { public partial struct PROCESS_MEMORY_COUNTERS { public uint CB; public uint PageFaultCount; public System.UIntPtr PeakWorkingSetSize; public System.UIntPtr WorkingSetSize; ...
csharp
} public virtual void OnObjectIsNotCentralized() { IsCentralized = false; } public int CompareTo(object obj) { if (obj is DynamicScrollObject<T> scrollObject) return CurrentIndex.CompareTo(scrollObject.CurrentIndex); ...
csharp
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents;
csharp
{ var localization = _localizer["HELLO_WORLD"]; return Content(localization); } public IActionResult HelloPerson(string person) { if (person == null) return BadRequest(); var localization = _localizer["HELLO_PERSON", perso...
csharp
<gh_stars>1-10 using Web.Api.Core.DTO.UseCaseResponses; using Web.Api.Core.Interfaces; using Web.Api.Models.Response; using Web.Api.Core.DTO; using System.Linq; using AutoMapper; namespace Web.Api.Presenters.Grpc { public class ChangePasswordPresenter : PresenterBase<UseCaseResponseMessage> { public Web...
csharp
internal delegate void LifetimeDisposer(); /// Since sometimes we want to start lifetime while other /// lifetime expanding (e.g. register callback in constructor and /// this callback invoked synchronously for starting nested lifetime) /// there is the solution for delayed lifetime starting in cas...
csharp
} public abstract class ViewModelBase<TCriteria> : ViewModelBase { public void Init(string parameter) { if (!string.IsNullOrEmpty(parameter)) { var deserialized = Mvx.Resolve<IMvxJsonConverter>().DeserializeObject<TCriteria>(parameter); this.RealInit(deserialized); } else { this....
csharp
public Validator() { RuleFor(x => x.Title).NotEmpty(); } }
csharp
using System.Globalization; using System.IO; using System.Threading; namespace Microsoft.ML.Benchmarks { class Program { /// <summary>
csharp
// Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace MailCheck.AggregateReport.Common.Aggregators { using System; /// <summary> /...
csharp
// // // // // // // //
csharp
Write(initialLabel); #line default #line hidden WriteLiteral("</a>\r\n"); } }
csharp
using System; namespace Utility.IO.Compression.Lzma.RangeCoder { class RangeDecoder { public const uint kTopValue = (1 << 24); public uint Range; public uint Code; private IBasicInputByteStream _stream; public void Init(IBasicInputByteStream stream)
csharp
catch (Exception e) { throw new Exception(ExceptionLogger.GenerateLoggerTextForOnlineHelperCall("VM SKU Version", e.Message)); }
csharp
using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.OleDb; using System.Net.Mail; using System.Configuration; namespace iMgmt { public partial class frmRecoveryPassword : Form { String cs = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="+ConfigurationManager.AppSettings...
csharp
public CommentViewModel(CommentEntity model, UserModel user) { Number = new ReactiveProperty<int>(model.Number); ID = new ReactiveProperty<string>(model.ID); Text = new ReactiveProperty<string>(model.Text); Name = user.ToReactivePropertyAsSynchronized(x =...
csharp
{ sync.Sync("Updaters", _updaterFamilies, SyncFlag.ReadOnly); } #endregion #region IInfoNode void IInfoNode.WriteInfo(INodeWriter writer) { foreach (var item in _updaterFamilies.OfType<IInfoNode>()) { item.WriteInfo(wri...
csharp
[CanEditMultipleObjects] public class PathMagicTorusEditor : PathMagicMeshEditor { /// <summary> /// Allow to configure specific torus attributes in the inspector. /// </summary> public override void GenerateInspectorGUI () { EditorGUILayout.BeginHorizontal (); EditorGUILayout.PropertyField (serializ...
csharp
///Indicates if a customer account and associated data is locked. If true, the user account is locked due to multiple failed authentication attempts. The user cannot login until the account is unlocked. /// public bool IsLocked { get; set; } /// ///The full last name of a customer or contact name. //...
csharp
{ using System.Net.Http; using System.Text; using System.Threading.Tasks; using Carter.ModelBinding;
csharp
public bool Equals(TValue x, TValue y) { return _equalsFunction(x,y); }
csharp
/// Represents an Env file as an <see cref="IConfigurationSource"/>. /// </summary> /// <examples> /// key1=value1 /// # comment /// </examples> public class EnvConfigurationSource : FileConfigurationSource { /// <summary> /// Builds the <see cref="EnvConfigurationProvide...
csharp
MySqlDataReader dr = cmd.ExecuteReader(); // Read the data and add it to the container above while (dr.Read()) todos.Add(new TodoModel(Convert.ToInt32(dr["id"]), dr["description"].ToString(), Convert.ToInt32(dr["completed"]))); ...
csharp
/// </summary> /// <param name="request">Rpc request</param> /// <param name="path">Rpc path that applies to the current request</param> /// <param name="routeContext">The context of the current rpc request</param> /// <returns>An Rpc response for the request</returns> Task<RpcResponse> InvokeRequestAsync(R...
csharp
Destroy(GameObject.Find("SpatialMapping")); Destroy(GameObject.Find("SpatialProcessing")); SceneManager.UnloadSceneAsync(SceneManager.GetSceneAt(1)); GameObject.Find("MenuPrefab").transform.GetChild(0).gameObject.SetActive(true); } public void ChangeSce...
csharp
/// <summary> /// Loads a ProductTypeColl collection from the database. /// </summary> /// <returns>A list of <see cref="ProductTypeItemDto"/>.</returns> List<ProductTypeItemDto> Fetch(); } }
csharp
@using DAO_WebPortal @using DAO_WebPortal.Models @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper *, PagedList.Core.Mvc
csharp
return; } foreach (var clip in category.Clips) { if (clip.ReferencedClip.IsValid() && clip.ReferencedClip.Asset == null && !clip.ReferencedClip.IsDone)
csharp
} public static TaskView Current = new TaskView(); public IDockControl DockControl { get; set; } public string Header => Properties.Resources.TaskView_Title; public ImageSource Icon => null;
csharp
this.text = text; this.encoding = encoding; } public static Func<Stream, Task> Create(string text, Encoding encoding) { return stream => { var textBody = new TextBody(text, encoding); return textBody.Start(stream); ...
csharp
using CQRS.Validation; using Serilog; // Credits to <NAME> for this implementation // https://stackoverflow.com/questions/52593426/registering-open-generic-decorators-through-a-single-binding-rule namespace CQRS.Commands.Validators { public class ValidatingCommandHandlerDecorator<TCommand> : ICommandHandler<TComm...
csharp
public void AddToken(JwtToken token) { JwtToken = token; } public JwtToken JwtToken { get; private set; } public void AddEmail(string email) { Email = email; }
csharp
public GameObject image1; public GameObject image2; public GameObject image3; public void Use () { ++nowCount; if(nowCount == 1) { //image3.GetComponent<UnityEngine.UI.Image>().color. image3.SetActive(false); }
csharp
} public static ConfigurationSourceConfig NewConfig(String name) { return NewConfigBuilder().SetName(name).Build(); } public static ConfigurationSourceConfig.IBuilder NewConfigBuilder() { return new DefaultConfigurationSourceConfig.Builder(); ...
csharp
namespace Awem.Reactive.TaskBars { public enum TaskBarPosition { Unknown = -1, Left, Top, Right, Bottom, } }
csharp
using System.Collections.Generic; using System.Linq; using System.Web; namespace Sunny.Services.Domain { public class PushModel { public string Message { get; set; }
csharp
public ExportAllFormatDialog(string title, Type t, string filters) { InitializeComponent(); Icon = Properties.Resources.Icon; Text = title; label1.Text = $"Output format for {t.Name}:"; string[] source = filters.Split('|'); for (int...
csharp
using Cirrus.Import.Masterdata.Common; namespace Cirrus.Import.Masterdata.External.Swapi { class SwapiOptions : ExternalProviderOptions { } }
csharp
} } public override void Draw3D(Camera3D camera, GameObjectTag DrawTag) { ColorEffectHolder.SetFromObject(this); ColorEffectHolder.SetFromCamera(camera); foreach (EffectPass pass in ColorEffectHolder.MyEffect.CurrentTechnique.Passes) ...
csharp
using System.Reflection; using System.Threading.Tasks; using CouchbaseLabs.MVVM.ViewModels; namespace CouchbaseLabs.MVVM.Services { public interface INavigationService { void AutoRegister(Assembly asm); void Register(Type viewModelType, Type viewType); Task PopAsync(); Task Push...
csharp
using System.Collections.Generic; namespace MediaBrowser.Plugins.GoogleDrive.Configuration { public interface IConfigurationRetriever {
csharp
#if NETSTANDARD1_3 using DataException = System.InvalidOperationException; #endif namespace Dapper.NodaTime { // TODO: Test public class NullableLocalDateTimeHandler : SqlMapper.TypeHandler<LocalDateTime?> { private NullableLocalDateTimeHandler() {} public static readonly Nullable...
csharp
} else if(view.Contains(StandardDataFormats.WebLink )) { text = (await view.GetWebLinkAsync()).ToString(); } Intent shareIntent = new Intent(); shareIntent.SetAction(Intent.Act...
csharp
SortedDictionary<string, decimal> salesReport = new SortedDictionary<string, decimal>(); for (int i = 0; i < salesList.Count; i++) { if (!salesReport.ContainsKey(salesList[i].Town))
csharp
KBEngine.Event.fireOut("onOtherAvatarEnterWorld", this); } } public override void onMoveSpeedChanged(float oldValue) { base.onMoveSpeedChanged(oldValue); KBEngine.Event.fireOut("onMoveSpeedChanged",this); } public virtual void updatePlayer(float x,float y, float...
csharp
using Castle.MicroKernel.Registration; using Castle.MicroKernel.SubSystems.Configuration; using Castle.Windsor; namespace RedisCacheLib.Infrastructure.Windsor { // ReSharper disable once UnusedMember.Global public class MvcInstaller : IWindsorInstaller { public void Install(IWindsorContainer contai...
csharp
namespace EcommerceMVC.Data.Models { public class Size { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int SizeId { get; set; } public string Name { get; set; } } }
csharp
<head> <title>404 Not Found</title> </head> <body> <div> <h2>404 - Not Found</h2> <hr /> @Html.DisplayForModel(Model.Message) <hr /> @Html.ActionLink("Send Error Email", "SendErrorEmail") </div> </body> </html>
csharp
namespace parserDataTest { public class DataContainer { public string name; public string desc; public int disable; // 0 or 1 public int latency; public ulong power; public int residency; public ulong usage; public ulong time; } }
csharp
using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("InlineIL.Tests")]
csharp
public partial class AuthenticationSettings : System.Web.UI.UserControl, IEditHostSettingControl { /// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Sys...
csharp
/// </summary> [SymConnectProperty] [JsonProperty] public decimal LastDirectDepAmount { get; set; } [SymConnectProperty] [JsonProperty] public string CertificateNumber { get; set; } [SymConnectProperty] [JsonProperty]
csharp
namespace Recaster.Endpoint { public interface IReceiver { Task StartAsync(CancellationToken ct);
csharp
using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;
csharp
using System; namespace VoxSupport { public class VoxImportException : Exception { public VoxImportException(string message) : base(message) { } } }
csharp
namespace HelloWorldWithMiddleware { public class Startup { public void ConfigureServices(IServiceCollection services) { } public void Configure(IApplicationBuilder app) { app.UseMiddleware(typeof(TerminalMiddleware)); } } public class Termin...
csharp
case GlobalConfiguration.ReminderServiceProviderType.MockTable: builder.ConfigureServices(services => { services.AddSingleton<IReminderTable, MockReminderTable>(); services.AddOptions<MockReminderTableOptions>()
csharp
{ Id = db.LeadAttorney.Id.Value, IsStub = true }; }))
csharp
public ulong ReadUnsignedLongLittleEndian() { const int size = sizeof(ulong); Span<byte> t = stackalloc byte[size]; ReadExact(t); return Endianness.DontFlipEndianness ? BinaryPrimitives.ReadUInt64LittleEndian(t) : BinaryPrimitives.ReadUInt64B...
csharp
{ get { return data; } set {
csharp
var buf = Encoding.ASCII.GetBytes("Hello"); Assert.AreEqual(5, buf.Length); var buf16 = Encoding.Unicode.GetBytes("\u00abX"); Assert.AreEqual(4, buf16.Length); var buf16be = Encoding.BigEndianUnicode.GetBytes("\u00abX"); Assert.AreEqual(4, buf16be.Length); var buf32 = Encoding.UTF32.GetBytes(...
csharp
public string Name { get; set; } [BsonElement("nickname")] public string Nickname { get; set; } [BsonElement("email")] public string Email { get; set; } [BsonElement("password")] public string Password { get; set; }
csharp
/// The name of the requested custom dimension, where 130 refers the number/index of the custom dimension. /// </summary> [Description("The name of the requested custom dimension, where 130 refers the number/index of the custom dimension.")] public class Dimension130: Dimension { /// <summary> /// Instantiat...
csharp
{ public interface IFileManagerService : INLPAnalyseFileReader, INLPAnalyseFileWriter { bool IsFile(string pathToFile); bool IsDirectory(string pathToFile); void CreateDirectoryIfNotExists(string fullFileName); } }
csharp
</div> <div div class="col-md-offset-2 col-md-2"> <img src='@Url.Content("~/Content/Images/PCSW.png")' alt="PCSW logo" class="pcswLogoRight" /> </div> </div> @RenderBody() </div> <!-- Scripts -->
csharp
// <autogenerated> // This code was generated by a tool. // Mono Runtime Version: 4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </autogenerated> // ---------------------------------------------------------------------------...
csharp
{ public int contactDamage = 1; void Start() { } void Update() { } private void OnTriggerStay2D(Collider2D collision) //called as long as the box touch each other
csharp
Mage, Cleric, Beast, Elemental, Troll, Demon, Creep, Undead, Elf, Boss, Dragon, Dwarf }
csharp
{ public class AuthRefreshRequestModel { [JsonProperty("accessToken")] public string AccessToken { get; set; } [JsonProperty("clientToken")] public string ClientToken { get; set; } [JsonProperty("requestUser")] public bool RequestUser { get; set; } [JsonProperty("selectedProfi...
csharp
public string m_LocalZoneDaylightName = string.Empty ; public string m_DateTimeNow = string.Empty ; public bool m_IsDateTimeNowDaylightSavingTime = false ; public string m_DateTimeNowUniversalTime = string.Empty ;
csharp
namespace CodingMilitia.Grpc.Server.Internal { internal class GrpcHost<TService> where TService : class, IGrpcService { private readonly GrpcCore.Server _server; public GrpcHost(GrpcCore.Server server) { _server = server; } public Task StartAsync() ...
csharp
this.specularBrightness, this.specularPower); } } public Material BlueMaterial { get {
csharp
{ System.Diagnostics.Debug.WriteLine("opening DeviceBatchScanWindow"); }).ContinueWith(async r => { SingleDeviceScanVM sdsvm = await SingleDeviceScanVM.ManualSweepCreateAsync(); ManualSweepWindow window = new ManualSweepWindow(sdsvm); ...
csharp
public class TechnologyScopesConverter : JsonEnumConverter<TechnologyScopes> { private static readonly Dictionary<TechnologyScopes, string> s_pairs = new Dictionary<TechnologyScopes, string> { [TechnologyScopes.Environment] = "ENVIRONMENT", [TechnologyScopes.Host] = "HOST" };
csharp
// Variables defined int amount1 = 8; int amount2 = 5; int intTotal = 0; decimal amount3 = 8.687m; decimal amount4 = 2.748m; decimal decimalTotal = 0;
csharp
catch (DllNotFoundException) { return false; } } internal static void EnsureLoaded() { if (!IsLoaded) { throw new FFmpegException("The FFmpeg libraries are not loaded. Please call FFmpegLoader.Load() bef...
csharp
{ public class DefineAClassPerson { public static void Main(string[] args) { Type personType = typeof(Person); FieldInfo[] fields = personType.GetFields(BindingFlags.Public | BindingFlags.Instance); Console.WriteLine(fields.Length); }