lang
stringclasses
10 values
seed
stringlengths
5
2.12k
csharp
/// models and views. /// <para/> /// Note that this Model is a plain old CLR type, since it does not inherit from <see cref="DependencyObject"/>. /// </summary> public class Model { public string Message { get; } = "Hello, World!"; } }
csharp
#if (UNITY_STANDALONE || UNITY_EDITOR) && UNITY_ENABLE_STEAM_CONTROLLER_SUPPORT namespace UnityEngine.Experimental.Input.Plugins.Steam { /// <summary> /// This is a wrapper around the Steamworks SDK controller API. /// </summary> public interface ISteamControllerAPI { int GetConnectedControllers(ulong[] outHandles); int GetActionSetHandle(string actionSetName); int GetDigitalActionHandle(string actionName); }
csharp
} void Start() { if(text == null) text = this.gameObject.GetComponent<Text>(); } void Update() { framesCount++;
csharp
}, () => { to.Dispose(); }); } } } }
csharp
} /** * Calls Destroyed() when this object reaches 0hp by being damaged by a projectile * @param collision The collision event */ void OnCollisionEnter2D(Collision2D collision) {
csharp
public float RelativeHumidity { get; set; } = 0; public float FogLevel { get; set; } = 0; public IIRacingEventFactory.IRacingCategoryEnum RaceCategory { get; set; } = IIRacingEventFactory.IRacingCategoryEnum.Road; public SessionFlags SessionFlags { get; set; } = SessionFlags.None;
csharp
public ColorAttribute (string color) { Color = color; } } }
csharp
var gridSize = new GridSize(100, 100); var cellSize = new Size(Distance.FromMeters(1), Distance.FromMeters(1)); this.Grid = Grid.CreateGridWithLateralAndDiagonalConnections(gridSize, cellSize, MaxSpeed); this.GridWithGradient = Grid.CreateGridWithLateralAndDiagonalConnections(gridSize, cellSize, MaxSpeed); GridBuilder.SetGradientLimits(this.GridWithGradient); this.GridWithHole = Grid.CreateGridWithLateralAndDiagonalConnections(gridSize, cellSize, MaxSpeed);
csharp
/// <param name="context">The parse tree.</param> void EnterNumberAddress([NotNull] sim6502Parser.NumberAddressContext context); /// <summary> /// Exit a parse tree produced by the <c>numberAddress</c> /// labeled alternative in <see cref="sim6502Parser.address"/>. /// </summary>
csharp
@using Academy.Web.Views.Manage
csharp
namespace EducationProcess.Services.Interfaces { public interface ILessonTypeService { Task<LessonType> GetLessonTypeByIdAsync(int lessonTypeId); Task<LessonType[]> GetAllLessonTypesAsync(); Task<LessonType> AddLessonTypeAsync(LessonType newLessonType); Task<LessonType[]> AddRangeLessonTypeAsync(LessonType[] newLessonTypes); Task<LessonType> UpdateLessonTypeAsync(LessonType newLessonType); Task<LessonType[]> UpdateRangeLessonTypeAsync(LessonType[] newLessonType); Task DeleteLessonTypeAsync(LessonType lessonType);
csharp
Employee CreateEmployee( Employee employee , EmployeeGroup employeeGroup ); /// <summary> /// Update an existing employee in the database. /// </summary> /// <param name="employee">The employee to update.</param> /// <param name="employeeGroup">The employeegroup that will contain this employee.</param> /// <returns>The updated employee.</returns> Employee UpdateEmployee( Employee employee , EmployeeGroup employeeGroup );
csharp
using TG.Common.Models.Request.Share; using TG.Common.Models.Response.Share; using TG.Core.Request; using System.Collections.Generic; using System.Threading.Tasks; namespace TG.Services.Interface { public interface IShareService { public Task<BaseResult<List<ListShareResponseModel>>> GetShares(ListSharesRequestModel model); public Task<GetShareResponseModel> GetShare(string Id); } }
csharp
<div class="oneCourse-introduce">專業飲食控制,保持完美體態。</div> <div class="oneCourse-introduce">一對一教練紀錄各堂體態變化,改變清晰可見。</div> </div> <div class="div16-oneCourse-introduce-pic"> <img src="~/img/16img/background/oneCoach.png" /> </div> </div> </div>
csharp
}); } public virtual IEnumerable<TOut> NamedQueryAs<TContract, TOut>(INamedQuery query) where TContract : class where TOut : class { return Try(() => OnNamedQueryAs<TContract, TOut>(query)); } public virtual IEnumerable<TOut> NamedQueryAs<TContract, TOut>(string name, Expression<Func<TContract, bool>> predicate) where TContract : class where TOut : class { return Try(() => { var queryBuilder = Db.ProviderFactory.GetQueryBuilder<TContract>(Db.StructureSchemas); queryBuilder.Where(predicate);
csharp
using Verse; namespace CultOfCthulhu { internal class IncidentWorker_CultSeed_NightmareMonolith : IncidentWorker_CultSeed { protected override bool TryExecuteWorker(IncidentParms parms) { //Create a spawn point for our nightmare Tree if (!(parms.target is Map map)) { return false;
csharp
internal BreadType BreadType { get => breadType; set => breadType = value; } // Default constructor public Bread() { } public Bread(string description, BreadType breadType, Double price) { this.description = description; this.breadType = breadType;
csharp
using System.Threading.Tasks; namespace AKD.AKDTrading.Web.HttpAggregator.Controllers { [Route("api/v1/[controller]")] [Authorize] [ApiController] public class OrderController : ControllerBase {
csharp
=> _logger.Error(format, args); public void Error(Exception exception, string format, params object[] args) => _logger.Error(exception, format, args); public void Fatal(string format, params object[] args)
csharp
public void Controls() { GameStateManager.Instance.EnterGameState(GameState.ControlsMenu); }
csharp
new Category() { Name = "Грижа за дете" }, new Category() { Name = "Грижа за възрастен човек" } }; List<Status> statuses = new List<Status>() { new Status() { Name = "Чакаща" }, new Status() { Name = "Назначена на домашен помощник" }, new Status() { Name = "За преглед" }, new Status() { Name = "Изпълнена" }, new Status() { Name = "Отказана" } };
csharp
using JavaScript.Manager.Http.Helpers.Node; using JavaScript.Manager.Loaders; namespace JavaScript.Manager.Http.Packages { public class HttpPackage : RequiredPackage { public HttpPackage() { PackageId = "javascript_request_factory_http"; HostObjects.Add(new HostObject { Name = "javascript_request_factory_http", Target = new NodeHttp() }); //HostTypes.Add(new HostType{ Name="Buffer", Type = typeof(NodeBuffer)}); }
csharp
} } /// <summary> /// Looks up a localized string similar to |||12|||.
csharp
using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; namespace Interfaces.BL { public interface IBankInstallmentBL { BankInstallmentDO Add(BankInstallmentDO model); bool Update(BankInstallmentDO model); bool Delete(BankInstallmentDO model); BankInstallmentDO GetById(int id); BankInstallmentDO Get(Expression<Func<BankInstallmentDO, bool>> predicate = null);
csharp
//Doc PrimaryUIItems would be scrolled automatically but secondary wont public class ScrollInterceptor : IWhiteInterceptor { public virtual void PreProcess(IInvocation invocation, CoreInterceptContext context) { if (invocation.Method.Name.StartsWith("get_") || "ToString".Equals(invocation.Method.Name)) return;
csharp
using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("QText")] [assembly: AssemblyDescription("Tool for taking quick text notes.")] [assembly: CLSCompliant(true)] [assembly: ComVisible(false)] [assembly: NeutralResourcesLanguage("en-US")]
csharp
bool loggingEnabled = true; public bool LoggingEnabled { get => loggingEnabled; set { log.Enabled = value; loggingEnabled = value; }
csharp
namespace OmniSharp.Extensions.LanguageServer.Protocol.Models { [JsonConverter(typeof(NumberEnumConverter))] public enum MessageType { /// <summary> /// An error message. /// </summary> Error = 1, /// <summary> /// A warning message.
csharp
using WireMock.Matchers.Request; namespace WireMock.Owin { internal class MappingMatcherResult { public IMapping Mapping { get; set; } public RequestMatchResult RequestMatchResult { get; set; } } }
csharp
@if (Request.IsAuthenticated) { <div style="float: right; padding-right: 20px; color"> @Html.ActionLink("Hello " + HttpContext.Current.User.Identity.Name + "", "Index", "Home", routeValues: null, htmlAttributes: new { title = "Home", @class = "dark-fc" }) | @Html.ActionLink("Log off", "Logout", "Account", routeValues: null, htmlAttributes: new { title = "Home", @class = "dark-fc" }) </div> } else { <div style="float: right; padding-right: 20px; color"> @Html.ActionLink("Log in", "Index", "Account", routeValues: null, htmlAttributes: new { id = "loginLink", @class = "dark-fc" }) </div> }
csharp
public interface CommandHandler { public void Execute(GameObject gameObject, float torqueAmount); } public class LeftCommandHandler : CommandHandler { public void Execute(GameObject gameObject, float torqueAmount) { gameObject.GetComponent<Rigidbody2D>().AddTorque(torqueAmount); } } public class RightCommandHandler : CommandHandler {
csharp
public int Currency { get { return this.currency; } set { this.currency = value; } } [D2OIgnore] public String TooltipKey { get { return this.tooltipKey; } set { this.tooltipKey = value; } } [D2OIgnore]
csharp
public int Width { get; set; } = 0; [JsonProperty ("height")] public int Height { get; set; } = 0; [JsonProperty ("url_hosted")] public string HostedURL { get; set; } = null; }
csharp
public SABoneColliderProperty Copy() { SABoneColliderProperty r = new SABoneColliderProperty(); if( this.boneProperty != null ) r.boneProperty = this.boneProperty.ShallowCopy(); if( this.splitProperty != null ) r.splitProperty = this.splitProperty.ShallowCopy(); if( this.reducerProperty != null )
csharp
{ public sealed class EmailNotification : Notification { public override MessageType MessageType => MessageType.Email; public string ToEmail { get; } private EmailNotification() { } public EmailNotification(Guid id, NotificationType notificationType, string toEmail,
csharp
[BkAuthorize(Roles = UserRoleNames.Manager)] public class AdministrationController : BaseController { private readonly IAgentRepository _agentRepository; private readonly IResolutionRepository _resolutionRepository; public AdministrationController(IAgentRepository agentRepository, IResolutionRepository resolutionRepository, ILogger logger) : base (logger) { _agentRepository = agentRepository; _resolutionRepository = resolutionRepository; }
csharp
namespace EmergencyV { // TODO: implement partners commands // These will be actions performed by the player partners, that the player will choose from the menu // i.e.: closing a road, perform CPR on nearby peds, ... internal interface IFirefighterPartnerCommand
csharp
<form method="POST" action='@Url.Action("Login", "Usuario")'> <div> <label for="email">E-mail</label> <br /> <input id="email" type="email" name="email"/> </div> <div> <label for="senha">Senha</label> <br /> <input id="senha" type="password" name="senha"/> </div> <input type="submit" value="Logar" />
csharp
} } public virtual void Reset() { var e = _signatures.GetEnumerator();
csharp
// Update is called once per frame void Update() { } /** https://leetcode.com/problems/majority-element/ 第一种解法,排序之后,位于中间的一定是这个数 */ public int MajorityElement_1(int[] nums) { Array.Sort(nums);
csharp
} public override bool Equals(object? obj) { if (ReferenceEquals(null, obj)) return false;
csharp
[SLua.CustomLuaClass] public enum TileType : System.Byte { None, Block, Sea, Forbidden }
csharp
} set { if (this.Data.ContainsKey("RecordId")) { this.Data["RecordId"] = value;
csharp
{ [Table("Booking")] public class DatabaseBooking { [Key] public long Id { get; set; } public long PersonId { get; set; } public long TimeslotId { get; set; } public DateTime Timestamp { get; set; } public bool Cancelled { get; set; } }
csharp
[DataContract] public class SiteRequest<T> : ISiteRequest<ISiteData> { [DataMember] public ISiteData Payload { get; set; } public RequestType RequestType { get; set; }
csharp
using System.Text.Json.Serialization; namespace SplitwiseClient.Model.Users { /// <summary> /// Notification preferences. /// </summary> public record Notifications {
csharp
var sur1 = db1.Stavka_u_realizaciji.Where(s => s.Id_Realizacija_osiguranja == ro.Id_Realizacija_osiguranja).Where(s => s.Nosilac_Stavka_u_realiziciji == true).Include(s => s.Osoba).FirstOrDefault(); Osoba o = db1.Osoba.Where(os => os.Id_Osigurani_entitet == sur1.Id_Osigurana_osoba).FirstOrDefault(); Paragraph paragraph = addressFrame.AddParagraph(); paragraph.AddText("Nosilac: "); paragraph.AddLineBreak(); paragraph.AddText(o.Ime_Osoba + " " + o.Prezime_Osoba); paragraph.AddLineBreak();
csharp
return isValid; } public static bool IsValidLength(string s) { if (s.Length >= 3 && s.Length <= 16) { return true; } return false; }
csharp
if (change.tickPos > (long)tickPos) break; currentTempo = change; } var mpq = currentTempo.mpq; var deltaPosT = tickPos - currentTempo.tickPos;
csharp
if (Vector3.Distance(hit.point, rewardGardenController.seedPlaces[i].transform.position) < 8.0f) { Debug.Log("Seed is to near a flower"); return false;
csharp
public class FoldersService { private readonly MyDbContext _context; public FoldersService(MyDbContext context) { _context = context; } private async Task<bool> EntitynameAlreadyExist(string name)
csharp
public static T DefaultIfEmpty<T>(this XElement element, T defaultValue) { T returnValue = defaultValue; if(element != null && !string.IsNullOrEmpty(element.Value)) { returnValue = (T)Convert.ChangeType(element.Value, typeof(T)); } return returnValue; } public static T DefaultIfEmpty<T>(this XAttribute attribute, T defaultValue) {
csharp
using System; namespace CssOptimizer.Domain.Exceptions { public class UnsupportedContentTypeException : Exception { public UnsupportedContentTypeException(string message) : base(message) { } } }
csharp
public class CollectionCodaTests { [Test] [ExpectedException (typeof (ArgumentNullException))] public void RemoveAll_SelfNull() { CollectionCoda.RemoveAll<int> (null, i => i == 1); } [Test] [ExpectedException (typeof (ArgumentNullException))] public void RemoveAll_PredicateNull() { ICollection<int> c = Enumerable.Range (0, 1).ToList();
csharp
_eventStore = eventStore ?? throw new ArgumentNullException(nameof(eventStore)); } public IActionResult OnGet(int eventId) { var eventFromStore = _eventStore.GetById(eventId); if (eventFromStore == null) { return RedirectToPage("./NotFound"); }
csharp
if (index >= 0) { index--; } return index == -1 ? string.Empty : commands[index]; }
csharp
throw new System.Exception("Unable to find building with type: " + UnitType + ". Please add it to the BuildingType class."); return "Building " + BuildingType.LookUp[UnitType].Name + " " + Number + (Exact ? " exact" : ""); } public StepResult Perform(BuildListState state) { if (!Condition.Invoke()) return new NextItem(); if (UnitTypes.LookUp[UnitType].TechRequirement != 0 && Bot.Main.UnitManager.Completed(UnitTypes.LookUp[UnitType].TechRequirement) == 0
csharp
{ _companyRepository = companyRepository; } public async Task<Company> AddCompanyToUserAsync(User user, Company company) { company.User = user; company.UserId = user.Id; return await InsertCompanyAsync(company);
csharp
} protected abstract EnumerableValueRetriever CreateTestee(); protected abstract IEnumerable<Type> BuildPropertyTypes(Type valueType); } public enum TestEnum
csharp
b.Key(""Id""); b.Index(""Id"", ""AlternateId""); }); ", o => { Assert.Equal(1, o.EntityTypes.First().GetIndexes().Count());
csharp
/// <summary> /// 构造函数 /// </summary> /// <param name="dbConnString">链接字符串</param> public Mssql2008DbProcedurer(string dbConnString) {
csharp
Assert.AreEqual(expectedLength, response.BodyLength); } [Test] public void AppendToBody_WithStringAndNullEncoding_ThrowsException() { var response = new BasicHttpResponse(); Assert.That( () => response.AppendToBody(string.Empty, null),
csharp
Oktober, November, December } }
csharp
public GameObject coinTriggerPrefab; public int segmentsDepth = 30; public float unitsWidth = 10f; public Vector3 up = Vector3.up; public int numberOfCoins = 10; [HideInInspector] public BezierSpline curve; [HideInInspector] public List<Vector3> tangents; [HideInInspector] public List<Vector3> normals; void Start() {
csharp
{ public ApiPresence Presence { get; set; } public byte[] UserPhoto { get; set; } public UserProfile(ApiPresence presence, byte[] userPhoto) { Presence = presence; UserPhoto = userPhoto; }
csharp
/// A new object that is a copy of this instance. /// </returns> object ICloneable.Clone() { return Clone(); } #endregion #endregion
csharp
// public static List<Usuario> Get() // { // var users = new List<Usuario>(); // //users.Add(new Usuario { Id = 1, UserName = "Batman", Password = "dc", Role = "Gerente" }); // //users.Add(new Usuario { Id = 2, UserName = "Ironman", Password = "<PASSWORD>", Role = "Gerente" }); // //users.Add(new Usuario { Id = 3, UserName = "Robin", Password = "dc", Role = "Funcionário" }); // //users.Add(new Usuario { Id = 4, UserName = "Spiderman", Password = "<PASSWORD>", Role = "Funcionário" }); // return users.ToList(); // } //}
csharp
bool firstLoop = true; string formdataTemplate = "Content-Disposition: form-data; name=\"{0}\"\r\n\r\n{1}"; foreach (string key in nvc.Keys) { if (firstLoop) { rs.Write(boundarybytesF, 0, boundarybytesF.Length); firstLoop = false; } else { rs.Write(boundarybytes, 0, boundarybytes.Length); } string formitem = string.Format(formdataTemplate, key, nvc[key]);
csharp
output.AssertOutput("##octopus[createArtifact path='QzpcUGF0aFxGaWxlLnR4dA==' name='RmlsZS50eHQ=' length='MA==']"); } [Test] [Category(TestEnvironment.CompatibleOS.Windows)] public void ShouldAllowDotSourcing()
csharp
if (!IsClrObject) return @__env.CallIntMethod(this.JvmHandle, global::java.nio.channels.WritableByteChannel_._write14608, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); else return @__env.CallNonVirtualIntMethod(this.JvmHandle, global::java.nio.channels.WritableByteChannel_.staticClass, global::java.nio.channels.WritableByteChannel_._write14608, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } internal static global::MonoJavaBridge.MethodId _close14609; void java.nio.channels.Channel.close() {
csharp
{ public class AbstractCommand : IRequest<ExecutionResult> { } }
csharp
using UnityEngine; namespace RoRSkinBuilder.Data { [Serializable] public struct Dependency { public string value; [Tooltip("SoftDependency - mod will be loaded even if dependency is not loaded\nHardDependency - mod will not be loaded if dependency is not loaded")] public DependencyType type; } }
csharp
if (!(obj is AssetPair other)) throw new InvalidCastException(nameof(obj)); return Equals(other); } /// <inheritdoc /> public override int GetHashCode()
csharp
<gh_stars>0 using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("AspNetLib.AntiXsrf.dll")] [assembly: AssemblyDescription("AspNetLib.AntiXsrf.dll")]
csharp
namespace Armory.Ranks.Application.Update { public class UpdateRankCommand : Command { public int Id { get; init; } public string Name { get; init; } } }
csharp
/// <summary> /// Adds or updates a value /// </summary> /// <param name="scriptObject">Script object that is being updated</param> /// <param name="key">Key</param> /// <param name="value">Value</param> public static void AddOrUpdate(this ScriptObject scriptObject, string key, object value) { if(scriptObject.ContainsKey(key)) {
csharp
/// which specifies a problem with creating the current snapshot. /// </summary> /// <param name="info">The data for serializing or deserializing the object. /// </param> /// <param name="context">The source and destination for the object.</param> [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] protected SnapShotException(SerializationInfo info, StreamingContext context)
csharp
private void PatchCharacterBehavior(Character character) { ((CompositeNode<Character>)character.Behavior).mChildren.Insert(0, new Condition<Character>(new ConditionDelegate<Character>(this.NoThinkingWhenPaused))); } private TaskResult NoThinkingWhenPaused(Character character, float dt) { if (GnomanEmpire.Instance.World.Paused) { return TaskResult.Success;
csharp
} public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>() .UseSerilog((hostingContext, loggerConfiguration) => loggerConfiguration .ReadFrom.Configuration(hostingContext.Configuration) .Enrich.FromLogContext() .WriteTo.Console() .WriteTo.File(@"D:\home\LogFiles\http\RawLogs\log-{Date}.txt", fileSizeLimitBytes: 1_000_000, rollOnFileSizeLimit: true, shared: true,
csharp
using CrmSystem.Domain.Models; namespace CrmSystem.Domain.Repositories { public interface IRequestedEmployeeRepository:IRepository<RequestedEmployee> {
csharp
<gh_stars>1-10 using QS.DomainModel.UoW; using QS.Navigation; using QS.Project.Domain; using QS.Test.TestApp.Domain; using QS.Validation; using QS.ViewModels.Dialog; namespace QS.Test.TestApp.ViewModels { public class EntityDialogViewModel : EntityDialogViewModelBase<SimpleEntity> { public EntityDialogViewModel(IEntityUoWBuilder uowBuilder, IUnitOfWorkFactory unitOfWorkFactory, INavigationManager navigation, IValidator validator = null) : base(uowBuilder, unitOfWorkFactory, navigation, validator)
csharp
td.Settings.DisallowStartIfOnBatteries = false; td.Settings.StopIfGoingOnBatteries = false; // Register the task in the root folder ts.RootFolder.RegisterTaskDefinition(theName, td); } catch (UnauthorizedAccessException ex)
csharp
using System.Threading.Tasks; namespace Examples { public class Examples : BotExtension { private Random rnd = new Random();
csharp
Assert.AreEqual(@"B", MakeRelativePath(@"A:\B", @"A:\")); Assert.AreEqual(@"..", MakeRelativePath(@"A:\", @"A:\B")); Assert.AreEqual(@"..\C", MakeRelativePath(@"A:\C", @"A:\B")); Assert.ThrowsException<InvalidOperationException>(() => MakeRelativePath(@"B:\", @"A:\")); Assert.ThrowsException<InvalidOperationException>(() => MakeRelativePath(@"\\A\B\", @"A:\"));
csharp
using StardewValley.Monsters; namespace ToolGeodes.Overrides { public static class MummyPiercingHook { public static void Prefix(Mummy __instance, int damage, int xTrajectory, int yTrajectory, ref bool isBomb, double addedPrecision, Farmer who) { if (who.HasAdornment(ToolType.Weapon, Mod.Config.GEODE_PIERCE_ARMOR) > 0)
csharp
FrontBlackStart = 2, BackWhiteStart = 3, BackBlackStart = 4 } public enum PartitionType // TypeDefIndex: 4478 { Normal = 0, ForCutscene = 1 } [Serializable] private class Data : ISerializationCallbackReceiver // TypeDefIndex: 4479
csharp
using System; using System.ComponentModel.DataAnnotations; namespace WorldCollector.Taobao.Infrastructures.Models { public class TaobaoItem { [Key] public string ItemId { get; set; } public DateTime LastCheckDt { get; set; } } }
csharp
[SerializeField, Tooltip("The item to be drawn")] public T item; [SerializeField, Tooltip("The item's weight")] public int weight; } #endregion }
csharp
using System.Net; using Azure; namespace ElCamino.AspNetCore.Identity.AzureTable { public class RoleStore<TRole> : RoleStore<TRole, IdentityCloudContext> where TRole : Model.IdentityRole, new() { public RoleStore(IdentityCloudContext context, IKeyHelper keyHelper) : base(context, keyHelper) { } }
csharp
/// <summary> /// Gets the namespace root segment. /// </summary> /// <param name="type">The type.</param>
csharp
MovieType, TVType, MusicType, MusicArtistType, WebVideoType,
csharp
using System; namespace YS.Metrics.AspNetCore { public class Class1 { } }
csharp
using Data.Domain.Interfaces; using Microsoft.AspNetCore.Mvc; using Presentation.DTOs; namespace Presentation.Controllers { [Route("api/[controller]")] public class CategoriesController : Controller { private readonly ICategoryRepository _repository; public CategoriesController(ICategoryRepository repository) { _repository = repository; }
csharp
actual = L.Traverse(combined, typeof(Maybe<string>), i => Maybe.Just(i + ""), FuncList.Make(FuncList.Make<int>())).ToMaybe(); Assert.Single(actual.Value()); Assert.Empty(actual.Value()[0]); actual = L.Traverse(combined, typeof(Maybe<string>), i => Maybe.JustIf(i % 2 == 0, () => i + ""), FuncList.Make(FuncList.Make(0,2,4,6), FuncList.Make(10,12))).ToMaybe();
csharp
temperatures.RemoveAt(length - 1); times.RemoveAt(length - 1); length--; } } public void Clear()
csharp
public int ItemsHeightRequest { get { return (int)GetValue(ItemsHeightRequestProperty); } set { SetValue(ItemsHeightRequestProperty, value); } } /// <summary>The height of an item row in suggestion list</summary> public int ItemRowHeight { get { return (int)GetValue(ItemRowHeightProperty); } set { SetValue(ItemRowHeightProperty, value); }
csharp
parseProcedureStmt(procedureStmt); if (stmt.Statements != null && stmt.Statements.size() > 0) { parseStatementList(stmt.Statements); } } else if (stmt.Statements != null && stmt.Statements.size() > 0) { parseStatementList(stmt.Statements); } else { // System.err.println( stmt );
csharp
[System.Serializable] public class Score { public string name; public int point; }
csharp
using Vermeil.Core; using Vermeil.Core.Logging; #endregion namespace Sample { public class SampleBootstrapper : Bootstrapper { protected override void Init() { Container.Register<ILogger, NullLogger>("silent"); Container.Register<ILogger, DebugLogger>(); Container.Resolve<ILogger>().Debug("Init complete"); Container.RegisterInstance((IProgressIndicatorService) Application.Current.Resources["IndicatorService"]);
csharp
using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Pomelo.EntityFrameworkCore.MySql.Storage; using System.Diagnostics; using System.Linq; namespace IssueConsoleTemplateNet472 { public class IceCream { public int IceCreamId { get; set; } public string Name { get; set; }