lang
stringclasses
10 values
seed
stringlengths
5
2.12k
csharp
using Allocator.DAL.Extensions; using Allocator.DAL.Models; namespace Allocator.DAL.Service { /// <summary>
csharp
public interface IContextStrategy { Task<TOut> HandleAsync<TIn, TOut>(string strategyName, TIn input, CancellationToken cancellationToken); } }
csharp
public virtual Guid Id { get; set; } [Required] public virtual string Name { get; set; } } }
csharp
private readonly CalendarPanel _owner; public int TotalItemsCount => Host?.Count ?? 0; public CalendarViewGeneratorHost? Host { get; set; } public int StartOfContainerVisualSection() { return Math.Max(0, _owner.FirstVisibleIndex); }
csharp
<gh_stars>0 /* The types of door. */ public enum DoorType { Open, /* No Door */ Black /* Locked */ } /* The types of room. */ public enum RoomType { Normal, /* Normal/Generic Room */ OrbOfLight, Entrance, /* Entrance Room */
csharp
.SetValue<NSDictionary>(toWriteDict); } static NSDictionary contactToDict() { var allItemsDict = new NSMutableDictionary(); foreach (ContactClass item in AppData.offlineContactList) { NSMutableDictionary eachItemDict = new...
csharp
this.picboxPicture.TabStop = false; // // lblText // this.lblText.AutoSize = true; this.lblText.Location = new System.Drawing.Point(12, 495); this.lblText.Name = "lblText"; this.lblText.Size = new System.Drawing.Size(35, 1...
csharp
readonly Type _serviceType; public Type ServiceType { get { return _serviceType; } } public ProvidesServiceAttribute(LifestyleType type, Type serviceType)
csharp
return response; }, cancellationToken); } else { return base.SendAsync(request, cancellationToken).ContinueWith(t => { var resp = t....
csharp
public IReadOnlyList<ScalarSymbol> Types { get; } public IReadOnlyList<string> Examples { get; }
csharp
namespace ErsatzTV.Application.MediaCollections; public record GetAllMultiCollections : IRequest<List<MultiCollectionViewModel>>;
csharp
private void OnSizeChangedCommand(SizeChangedEventArgs obj) { ControlHeight = obj.NewSize.Height; ControlWidth = obj.NewSize.Width; string strLanguage = "PuzzleTimer.Languages." + SettingsViewModel.Languages[settings.Language]; ResourceManager LocRM = new Resource...
csharp
<th>CPI</th> <th>CGPA</th> <th>Backlog</th> <th>is student detained</th> <th></th> </tr> </thead>
csharp
{ private EmployeeScheduleSinglePageViewModel ViewModel { get { return DataContext as EmployeeScheduleSinglePageViewModel; } } public EmployeesScheduleSinglePage() { InitializeComponent(); }
csharp
public RedisQueueOptionsBuilder<T> RetryDelay(TimeSpan retryDelay) { Target.RetryDelay = retryDelay; return this; } public RedisQueueOptionsBuilder<T> RetryMultipliers(int[] retryMultipliers) { Target.RetryMultipliers = retryMultipliers; return th...
csharp
public class SectionMapping : EntityTypeConfiguration<Section> { public SectionMapping() { HasKey(x => x.Id); Property(x => x.Id).IsRequired(); Property(x => x.Name).IsRequired().HasMaxLength(450); Property(x => x.Description).IsOptional();
csharp
} protected override void RestTestCase() { } public override void runThisTest()
csharp
class Program { public readonly static TraceSource Trace = new TraceSource("SmtpProxy"); /// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { Console.WriteLine("SmtpProxy"); ...
csharp
} } if (x >= valueX) { if (State) { UpdateUI(); } } } ...
csharp
available = true; gameObject.transform.localScale = new Vector3(0.35f,0.35f,0.35f); spriteRenderer.sprite = availableSprite; } public void HoverOverAvailable(){ if (available){ gameObject.transform.localScale = new Vector3(0.4f,0.4f,0.4f); } } public v...
csharp
public IEnumerable<ModelClientValidationRule> GetClientValidationRules(ModelMetadata metadata, ControllerContext context) { return new List<ModelClientValidationRule> { new ModelClientValidationRule { ValidationType = "email", Error...
csharp
//secretStairs.TileStates.Set(new DestState(11, new SegLoc(0, 8)));//To Igneous Tunnel 9F sealedDetour.TileTreasures.SpecificSpawns.Add(secretStairs); layout.GenSteps.Add(PR_EXITS_DETOUR, sealedDetour); } ...
csharp
partial class CdrDecoder { protected void CheckElement(D900CdrElement element, ElementsStatTable tablePresent, ElementsStatTable tableNone) { if (element.Path.Equals(element.Name) || (element.Name.Length == 0)) { if (tableNone.ContainsKey(element.Path)) ...
csharp
} static bool WriteLine(SerialPort p, string s) { bool ret = true; if (!p.IsOpen)
csharp
using System; namespace DeviantartApi.Objects { public class FavedUser { [JsonProperty("user")] public User User { get; set; } [JsonProperty("time")] [JsonConverter(typeof(Converters.UnixDateTimeConverter))] public DateTime Time { get; set; } } }
csharp
return content; } return content.Truncate(i, suffix); }
csharp
BodyParams = body; Securities.Add(AccelByte.Sdk.Core.Operation.SECURITY_BEARER); } public override string Path => "/iam/v3/public/namespaces/{namespace}/users/me/headless/code/verify"; public override HttpMethod Meth...
csharp
using System.Text; namespace Microsoft.DwayneNeed.Win32.Gdi32 { public enum BKMODE : int { TRANSPARENT = 1,
csharp
namespace A6k.Messaging.Benchmarks { public class CopyHandler : IMessageHandler<byte[], byte[]> { private readonly IMessageProducer<byte[], byte[]> producer; public CopyHandler(IMessageProducer<byte[], byte[]> producer) { this.producer = producer ?? throw new ArgumentNullEx...
csharp
// Licensed under the MIT License. See LICENSE in the project root for license information. using UnityEditor; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Editor { public class MixedRealityStylesUtility { public static readonly GUIStyle BoldFoldoutStyle = new GUIStyle(Editor...
csharp
[JsonProperty("live_mode")] public bool IsLiveMode { get; set; } [JsonProperty("created_at")] public DateTime CreatedAt { get; set; } [JsonProperty("type")] public string PaymentType { get; set; }
csharp
using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection; using System.Text; namespace Centaurus { public static class DescriptionAttributeReader { public static string GetDescription<T>(T value)
csharp
Namespace = project.Namespace }; return newProject; } public IProject GetProject(ProjectRef project) { throw new System.NotImplementedException(); }
csharp
namespace Trasalum.Models { public class Department { [Key] public int Id { get; set; } [Required] public string Name { get; set; } //DepartmentId is a foreign key in the Staff table, this collection is for lazy loading of the Staff public virtual ICollection<S...
csharp
item.ValutaDatum = DateTime.Now; item.FilePath = @"..\..\DMSTest\test.txt"; item.Benutzer = "Christian"; item.Bezeichnung = "Test Quittungen"; item.Erfassungsdatum = DateTime.Now; item.IsRemoveFileEnabled = false; item.SelectedTypItem =...
csharp
* Author URI: www.juto.dk * Company: JutoGames * Company URI: www.juto.dk * Copyright 2015 **/ using UnityEngine; public interface IEnemyState { void Execute(); void Enter(Enemy enemy); void Exit();
csharp
Gender = "Masculino", }, new Person { Id = 2, FirstName = "Francisca", LastName = "Machado", Address = "Famalicão", Gender = "Feminino", ...
csharp
{ public NewbieStepFakeMatchFiveFirSelUpWayEnd() { this._stepType = ENewbieStepType.FakeMatchFive_FirSelUpWayEnd; } public override void OnLeave() { }
csharp
public OutputAsset() { } public OutputAsset(BinaryAsset asset) { Handle = new InstanceHandle(asset.Instance.Handle);
csharp
for (int i = 0; i < order.Count; i++) { var question = questions.FirstOrDefault(q => q.QuestionId == order[i]); if (question != null) question.Order = i; } _context.Question.UpdateRange(questions); await _co...
csharp
/// <param name="serviceSession">Actual service session instance</param> public ServiceModuleLookupService(IUnityContainer unityContainer, IServiceSession serviceSession) { this.serviceSession = serviceSession; this.unityContainer = unityContainer; } ...
csharp
#region data _Graph = myGraph; _AttributeDefinitions = new Dictionary<string, Tuple<string, string, string, string>>(); _Vertices = new Dictionary<string, IVertex>(); _Edges = new Dictionary<string, IEdge>(); #endregion //TODO: read ...
csharp
using System; namespace Sitko.Core.IdProvider { public class IdGenerationException : Exception { } }
csharp
using Cash.Domain.Services.Impl; namespace Cash.Domain.Configuration { public class DomainModule : Module
csharp
namespace CityManager.Building { public sealed class CommonBuildingData { public int MaxBuildingId; } }
csharp
{ var func = new SimpleFunction("Like", new[] {searchText}); return new SimpleExpression(field, func, SimpleExpressionType.Function); } #endregion #region NOT LIKE /// <summary> /// Function to determine if a database field is not 'like' a s...
csharp
} public static string BreakUpCamelCase(string fieldName) { var patterns = new[] { "([a-z])([A-Z])",
csharp
foreach (KeyValuePair<RowDefinition, int> rowDefinitionPair in rowDefinitions) { GridSplitter gridSplitter = new GridSplitter(); gridSplitter.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; gridSplitter.VerticalAlignment = System....
csharp
if (count % 2 != 0) return Tuple.Create(firstOffset, offset); firstOffset = offset; secondOffset = FindNextInLine(searchText, offset, ch); if (secondOffset < 0) return Tuple.Create(-1, -1); } ...
csharp
using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Infusion.Desktop { internal static class PathUtilities { private static string explicitRootPath; private static Lazy<string> binPath = new Lazy<string>(GetBinPath); private static string GetB...
csharp
using System.Text; using System.Threading.Tasks; using XsDupFinder.Lib.Common; namespace XsDupFinderCmd { class ConfigurationCmd : Configuration { [Option('c', "ConfgFile", SetName = "Config File", HelpText = "Configuration file", Required = true)] public string ConfgFile { get; set; } } }
csharp
if (!object.ReferenceEquals(null, _activeTaskTime)) { ended = _activeTaskTime.EndSession(); OnPropertyChanged(nameof(CanStartTask)); OnPropertyChanged(nameof(CanStopTask)); OnPropertyChanged(nameof(CanCreateTask)); O...
csharp
using System.Collections.Generic; using System.Linq; using System.Web; namespace SharedServices.Web.Attributes { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = false)] public class AuthenticatedAttribute:Attribute { private bool authenticated; ...
csharp
case 12: { str = "C" + str; break; }
csharp
using Microsoft.EntityFrameworkCore; namespace PartsUnlimited.Models { public class PartsUnlimitedContext : IdentityDbContext<ApplicationUser>, IPartsUnlimitedContext { public PartsUnlimitedContext(DbContextOptions dbContextOptions) : base(dbContextOptions) { }
csharp
{ } public IdElementLocator(string name = null, string id = null, String contextKey = null, ElementMatcher<HtmlElement> matcher = null) : base(name, contextKey) { this.Id = id; this.Matcher = matcher; }
csharp
// SPDX-License-Identifier: MIT // Copyright (C) 2018-present iced project and contributors namespace Generator.Enums.Decoder { [Enum("OpSize")] enum OpSize : byte { Size16, Size32, Size64, } }
csharp
{ [AttributeUsage(AttributeTargets.Field)] public class StringValueAttribute : Attribute { public string Value { get; private set; }
csharp
{ var container = new Container(); var child = container.CreateChildContainer(); child.Configure(_ => { _.ForSingletonOf<IColorCache>().Use<ColorCache>(); }); var singleton = child.GetInstance<IColorCache>(); // SingletonThing's should be resolved fr...
csharp
BackStackHandler.Add(() => appCompatActivity.SupportActionBar.Title = currentTitle); appCompatActivity.SupportActionBar.Title = title; } } } }
csharp
* under the License. */ namespace TencentCloud.Cdn.V20180606.Models { using Newtonsoft.Json;
csharp
using System.Web.Http; using Microsoft.AspNet.SignalR; using TodoList.API.Hubs; using TodoList.Data.Messages; namespace TodoList.API.Controllers { public class NotificationController : ApiController { // POST api/notification public void Post([FromBody] PointTally tally) { IHubContext ...
csharp
namespace B1SLayer { internal static class MultipartExtensions { internal static Task<IFlurlResponse> PatchMultipartAsync(this IFlurlRequest request, Action<CapturedMultipartContent> buildContent, CancellationToken cancellationToken = default(CancellationToken)) { var cmc = new Captu...
csharp
Int64 startTicks = Log.CONSTRUCTOR($"Enter: literalToken:{literalToken} value:{value}", Common.LOG_CATEGORY); LiteralToken = literalToken; Value = value;
csharp
foreach(var controller in controllers) { controller.Activate(); } } public void ReturnToHome() { GC.Collect(); OnGameExit(); StartCoroutine(ReturnHomeCoroutine()); } IEnumerator ReturnHomeC...
csharp
{ counter++; nbytes_totran = Math.Min(numBytesMax, fsize - current_position); result += "Downloading chunk " + counter.ToString(System.Globalization.CultureInfo.CurrentCulture) + " of size " + nbytes_totran.ToString(System.Globalization.CultureInfo.CurrentCult...
csharp
namespace ElementSearch { [Transaction(TransactionMode.Manual)] [Regeneration(RegenerationOption.Manual)] public class Command : IExternalCommand
csharp
namespace abremir.AllMyBricks.Data.Tests.Configuration { public interface IMemoryRepositoryService { void ResetDatabase(); } }
csharp
{ public interface IProductOwnerRepository { ICollection<ProductOwner> GetAllProductOwners(TenantId tenantId); ProductOwner Get(TenantId tenantId, string userName); void Remove(ProductOwner owner); void RemoveAll(IEnumerable<ProductOwner> owners); void Save(ProductOwn...
csharp
WarehouseFilter.OrderBy = WarehouseOrder.Id; WarehouseFilter.OrderType = OrderType.ASC; WarehouseFilter.Selects = WarehouseSelect.ALL; WarehouseFilter.Id = new LongFilter{ Equal = StockMaster_WarehouseFilterDTO.Id }; WarehouseFilter.Name = new Str...
csharp
[NotNull] public PmxVertex Clone() { var result = new PmxVertex(); result.Position = Position; result.Normal = Normal; result.UV = UV; for (var i = 0; i < MaxUvaCount; i += 1) {
csharp
internal ApplicationSummary(Commvault.Powershell.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } {_cluster = If( json?.PropertyT<Commvault.Power...
csharp
if (values.IsNotNullOrEmpty()) { await _redisProvider.Value.BloomReserveAsync(this.Name, this.ErrorRate, this.Capacity); await _redisProvider.Value.BloomAddAsync(this.Name, values); }
csharp
Type type = null; foreach (Newtonsoft.Json.Linq.JObject trackSrc in dataSrc.media.track) { media = new Media(); typeList = new List<Type>(); foreach (JProperty property in trackSrc.Children()) { try ...
csharp
} /// <summary> /// Updates the orientation. /// </summary> void LateUpdate()
csharp
{ Span = span; Name = name; } public TokenSpan Span { get; } public Identifier Name { get; } }
csharp
public List<Product> Featured { get; set; } public List<Product> NewRelease { get; set; } public List<Product> Trending { get; set; } public List<Product> OnSale { get; set; } public List<Product> OnClearance { get; set; } } }
csharp
{ internal struct ReferenceEqualsWrapper : IEquatable<ReferenceEqualsWrapper> { private object _object; public ReferenceEqualsWrapper(object obj) => _object = obj; public override bool Equals([NotNullWhen(true)] object? obj) => obj is ReferenceEqualsWrapper otherObj && Equals(otherObj);
csharp
catch { try { playerStorer.GetPlayers()[i].GetComponent<CPUInput>().SkipTurn(); } catch { } } } catch
csharp
{ private IModule module; public Injector(IModule module) { this.module = module; } public TClass Inject<TClass>() { Type classType = typeof(TClass);
csharp
private UnityEngine.Camera m_Camera; public JTweenCameraNCP() { m_tweenType = (int)JTweenCamera.NCP; m_tweenElement = JTweenElement.Camera; }
csharp
return l_Image; }, p_OnFree: (p_Image) => { try { p_Image.AnimStateUpdater.controllerData = null; p_Image.gameObject.SetActive(false); p_Image.rectTransform.SetParent(null); ...
csharp
return Guid.Empty; } } DateTime IComplianceReport.end_time => Convert.ToDateTime(end_time_utc); Guid IComplianceReport.id { get; } = Guid.NewGuid(); ComplianceReportProfile[] IComplianceReport.profiles => failed_critical_profiles; public string type...
csharp
{ public static class XLuaUIComponentExtension { /// <summary> /// 1 竖屏 /// 3 横屏 /// </summary> /// <param name="ui"></param> /// <param name="orientation"></param> public static void SetOrientation(this UIManager ui, int orientation)
csharp
{ public object Frame { get; set; } public uint FrameId { get; set; } public string ExportResultId { get; set; } public string CaptureId { get; set; } public uint ConversationIndex { get; set; }
csharp
using System; using System.Collections.Generic; using System.IO; using System.Xml.Serialization; using Thunderdome.Util; namespace Thunderdome.FileOperations { /// <summary> /// Settings for the Vault client to pass to the utility. /// </summary> [XmlRoot("UtilSettings")] public class UtilSettings...
csharp
ItemId = msg.GetUInt16(); MaxLength = msg.GetUInt16(); Text = msg.GetString(); Author = msg.GetString(); Date = msg.GetString(); return true; } public override void ToNetworkMessage(NetworkMessage msg) { ...
csharp
namespace Microsoft.Extensions.DependencyInjection { public static class XrmFrameworkServiceCollectionExtension { public static IServiceCollection AddXrmFramework(this IServiceCollection serviceCollection, Action<XrmFrameworkOptionBuilder> optionsBuilderAction = null) { var optionsBu...
csharp
{ if (isFatal) { LogFatal(exceptionObj.ToString()); }
csharp
using System; using System.Runtime.InteropServices; namespace DirectN { [StructLayout(LayoutKind.Sequential, Pack = 1)] public partial struct _DXGK_BRIGHTNESS_SET_IN { public uint BrightnessMillinits;
csharp
{ BeginTime = new TimeSpan(13, 0, 0), }; Assert.AreEqual("130000", history.BeginTimeString); } [TestMethod] public void HistoryInfo_EndDate_1() { HistoryInfo history = new HistoryInfo {
csharp
var schema = record.GetString("TABLE_SCHEMA"); var tableName = record.GetString("TABLE_NAME"); var columnName = record.GetString("COLUMN_NAME"); var computed = record.GetString("GENERATION_EXPRESSION"); var table = new DatabaseColumn { ...
csharp
//public int score { get; set; } //public string md5 { get; set; } //public int file_size { get; set; } public string file_url { get; set; } //public bool is_shown_in_index { get; set; } //public string preview_url { get; set; } //public int preview_width { get; s...
csharp
{ if (p == null || p == null) throw new ArgumentNullException(); uint constraintCode = MathUtil.Jenkins32Hash(BitConverter.GetBytes(p.VertexCode), 0); constraintCode = MathUtil.Jenkins32Hash(BitConverter.GetBytes(q.VertexCode), constraintCode);
csharp
using MinecraftMappings.Internal.Textures.Block; namespace MinecraftMappings.Minecraft.Java.Textures.Block { public class BubbleCoralBlock : JavaBlockTexture { public BubbleCoralBlock() : base("Bubble Coral Block") { AddVersion("bubble_coral_block") .WithDefaultMode...
csharp
using VRageMath; namespace Sandbox.Game.Entities.Cube { //TODO: the BlockBuilder still has placement related methods directly implemented => move them to provider? public interface IMyPlacementProvider { Vector3D RayStart { get; }
csharp
public abstract bool Failed { get; } public IPublishTunnel<HeartBeat> HeartBeatTunnel { get; set; } public abstract void Collect(); public HeartBeat Get() {
csharp
{ WebDriver.Setup(x => x.SwitchTo().Alert()); Actor.AsksFor(AlertPresence.InBrowser()).Should().BeTrue(); WebDriver.Verify(x => x.SwitchTo().Alert(), Times.Once); }
csharp
bool Disposed; CacheDictionary<DnsQuestion, DnsCacheEntry> Cache; UdpClient[] Upstreams; HostsFile HostsFile; public Task<DnsResourceRecord> this[DnsQuestion question] => Cache[question].ContinueWith(t => t.Result.ToResourceRecord(question)); void ResolveHos...
csharp
public static void RefreshBlinkToggleQueue( Queue<BlinkToggleData> blinks, long timeStamp, long duration ) { while ( blinks.Count > 0 &&