lang
stringclasses
10 values
seed
stringlengths
5
2.12k
csharp
using System.ComponentModel; namespace SharperCryptoApiAnalysis.Shell.Interop.ViewManager { /// <inheritdoc /> /// <summary> /// Base interface for all view models. /// </summary> public interface IViewModel : INotifyPropertyChanged { } }
csharp
IQueryable<TEntity> GetIQueryable(); void SetDbContext(IDbContext dbContext); IQueryable<TEntity> GetList(Expression<Func<TEntity, bool>> expression = null, bool noTracking = false); TEntity Get(TPrimaryKey id, bool noTracking = false); TEntity SelectFirse(Expression<Func<TEntity, bool>> expression, bool noTracking = false); int Count(Expression<Func<TEntity, bool>> expression = null); long CountLong(Expression<Func<TEntity, bool>> expression = null); void Insert(TEntity entity);
csharp
~Trace() { Dispose(true); }
csharp
} //===================== // Conversion //===================== public static string ToHex(this int current) { return current.ToString("X6"); } public static Enum ToEnum(this int current, Type enumType) { return (Enum)Enum.ToObject(enumType, current); } public static T ToEnum<T>(this int current) { return (T)Enum.ToObject(typeof(T), current); }
csharp
.Where(p => this.Grid.WithinGrid(p) && WillFlash(p) && flashed.Add(p)) .ForEach(toFlash.Enqueue); } // Clear all flashed octopi flashed.ForEach(p => this.Grid[p] = 0); flashed.Clear(); return flashes; } /// <summary> /// Check if a given octopi will flash on the given turn /// </summary>
csharp
using Xunit; namespace Rezolver.Tests.Examples { public class ArrayExamples { [Fact] public void ShouldCreateEmptyArray() { // <example1> // this is fundamentally identical to the first example in the
csharp
public CdsAttributeValidator() { RuleFor(attribute => attribute.DisplayName) .NotEmpty() .WithMessage(attribute => $"Display name is always a mandatory field. Check for any attributes with a missing display name"); When(attribute => attribute.DataType == CdsAttributeDataType.Memo, () => { RuleFor(attribute => attribute.MaxLength) .NotEmpty() .WithMessage(attribute => $"{attribute.DisplayName}: Max length is a mandatory field for multi-line text fields"); });
csharp
using System.Text; using System.Reflection; using System.ComponentModel; namespace Data { public class EnumStringValue { public static string StringValue(Enum value)
csharp
using System.Text; using System.Threading.Tasks; namespace ZSB.Infrastructure.ProductKey.Generator { class UniqueKeyGenerator { private static RandomNumberGenerator rng = RandomNumberGenerator.Create(); public static string GenerateUniqueKey(string prefix, string allowedCharacters, int charCount) { byte[] indices = new byte[charCount - prefix.Length]; rng.GetBytes(indices); string result = new string(indices.Select(a => a % allowedCharacters.Length).Select(a => allowedCharacters[a]).ToArray());
csharp
modelDef.BindWebApplication(webApplication); } else { string modelDefinerTemplate = File.ReadAllText(jsonFilePath); modelDef = JsonConvert.DeserializeObject<ModelDefinition>(modelDefinerTemplate, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All }); modelDef.BindWebApplication(webApplication);
csharp
csharp
using System.Collections.Generic; using System.Linq; using System.Text; namespace OpenSRS.Services { public enum PrivacyDisplayType { PRIVATE, FULL
csharp
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Drawing;
csharp
engine.SetValue("TimeSpan", TypeReference.CreateTypeReference(engine, typeof(TimeSpan))); } public string GetDeclaration() { return new TypeScriptClass(null, typeof(TimeSpan), true, TypeScriptClass.MaxDepth).GenerateCode("declare"); } }
csharp
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Charlotte.Games.Scripts { public static class ScriptCommon {
csharp
{ All, Breakfast, Lunch, Dinner, Dessert } }
csharp
{ url = url.Remove(url.Length - 1); } return url; } internal override void Clear() {
csharp
internal interface IContextFactory { IContext Create( IConfigParserFactory configParserFactory, IEnvironmentAnalyzer environmentAnalyzer, IResolverFactory resolverFactory, IAssemblyReader reader, AnalyzeRuntime useRuntime, string assemblyFileName,
csharp
public Client Add(Client client) { this.Context.Client.Add(client); this.Context.SaveChanges(); return client; } }
csharp
/// Represents an expression that indicates the search parameter should be missing. /// </summary> public class MissingSearchParameterExpression : SearchParameterExpressionBase { /// <summary> /// Initializes a new instance of the <see cref="MissingSearchParameterExpression"/> class. /// </summary> /// <param name="searchParameter">The search parameter this expression is bound to.</param> /// <param name="isMissing">A flag indicating whether the parameter should be missing or not.</param> public MissingSearchParameterExpression(SearchParameter searchParameter, bool isMissing) : base(searchParameter) { IsMissing = isMissing; }
csharp
return StatusCode(HttpStatusCode.Unauthorized); return Ok(new Model { Id = Guid.NewGuid() }); } [Route("testdrive")] public List<Model> GetAll(string sort = null) { return new List<Model> {
csharp
using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Stryker.Core.MutantFilters { public class DiffMutantFilter : IMutantFilter { private readonly DiffResult _diffResult;
csharp
}; var multiBehavior = new MultiValidationBehavior(); multiBehavior.Children.Add(characterValidationBehavior); multiBehavior.Children.Add(requiredStringValidationBehavior); var entry = new Entry { Text = value }; entry.Behaviors.Add(multiBehavior); // Act await multiBehavior.ForceValidate();
csharp
using System.Threading.Tasks; using Maya.BulkGate.Sms.Model.Credit; namespace Maya.BulkGate.Sms { public interface IBalanceClient { Task<BalanceResponse> CheckCreditBalance(); } }
csharp
public System.Double variance { get; set; } public Illuminance(): base() { } public Illuminance(System.IO.BinaryReader binaryReader): base(binaryReader) { } public override void Serilize(System.IO.BinaryWriter binaryWriter)
csharp
[Benchmark] public void BasicRateInterface() { IList<BasicRate> basicRate = new List<BasicRate>(); } [Benchmark] public void BasicRateConcrete() { List<BasicRate> basicRate = new List<BasicRate>(); }
csharp
//private List<Vector3> GrassPosList = new List<Vector3>(); private Rigidbody PlayerRigidbody; private const float EncounterPokemonProbability = 0.2f; private Vector3[] grassPosList; public CheckPlayerInGrassSystem(Contexts contexts,Transform player) { context = contexts.game;
csharp
using MyJetWallet.Domain.ExternalMarketApi.Models; namespace Service.Liquidity.PortfolioHedger.Domain.Models { public class Level { public string Exchange { get; set; } public LeOrderBookLevel OriginalLevel { get; set; } public LeOrderBookLevel NormalizeLevel { get; set; } public bool NormalizeIsOriginal { get; set; } } }
csharp
using Decia.Business.Common.TypedIds; namespace Decia.Business.Domain.Reporting { public class ReportElementId_DefaultComparer : IEqualityComparer<ReportElementId>, IStringGenerator<ReportElementId>
csharp
{ public interface IPacketHandler { int GetPacketType(); bool OnPacketHandler(Byte[] data); } }
csharp
internal TimeSlotModel( ITimeSlot timeSlot ) { this.Id = timeSlot.Id; this.StartTime = timeSlot.StartTime; this.EndTime = timeSlot.EndTime; } internal TimeSlotModel( SqlDataReader dataReader ) { for( int lcv = 0; lcv < dataReader.FieldCount; ++lcv ) { GetType().GetProperty( dataReader.GetName( lcv ), BindingFlags.Instance | BindingFlags.Public )?.SetValue( this, dataReader.GetValue( lcv ) ); } }
csharp
this.Controls.Add(this.button13); this.Controls.Add(this.button12); this.Controls.Add(this.button11); this.Controls.Add(this.button10); this.Controls.Add(this.button9); this.Controls.Add(this.button8);
csharp
{ public interface IBeatmaniaPs2SampleRateFinder { BigRational GetRate(int encodedRate); } }
csharp
public interface IBodyModel { } public class NullBodyModel : IBodyModel { } public class SimpleBodyModel : IBodyModel {
csharp
} private async Task LoadFontCommentsAsync(TextReader reader) { for (var i = 0; i < CommentLinesCount; i++) { var line = await reader.ReadLineAsync(); _comments.Add(line); } } private async Task LoadCharacters(TextReader reader)
csharp
/// </summary> [Output("sizeInBytes")] public Output<string> SizeInBytes { get; private set; } = null!; /// <summary> /// The current state of the artifact. /// </summary> [Output("state")]
csharp
} #endregion #region Properties /// <summary> /// Gets the active point name. /// </summary> public string ActiveName { get => _ActiveName; private set => SetProperty(ref _ActiveName, value);
csharp
new Vector(new[] { new Number(4), new Number(0), new Number(6) }), new Vector(new[] { new Number(-7), new Number(8), new Number(9) }) }); var expected = new Matrix(new[] { new Vector(new[] { new Number(-7), new Number(8), new Number(9) }), new Vector(new[] { new Number(4), new Number(0), new Number(6) }), new Vector(new[] { new Number(1), new Number(-2), new Number(3) }) });
csharp
if (strBens == "") strBens = "carro"; else strBens = strBens + ", carro"; if (chkBarco.Checked) if (strBens.Length == 0) strBens = "barco"; else strBens = strBens + ", barco";
csharp
private void OnQuestAcceptanceIndicated(bool accepted, DialogueLine dialogueLine) { if (accepted) { dialogueLine.StartQuest(); _closeAfterLinesShown = true; AdvanceLine(); } else { AdvanceItem();
csharp
conventionSet.PropertyAddedConventions.Add(new StringLengthAttributeConvention()); conventionSet.PropertyAddedConventions.Add(new TimestampAttributeConvention()); var keyAttributeConvention = new KeyAttributeConvention(); conventionSet.PropertyAddedConventions.Add(keyAttributeConvention); var keyConvention = new KeyConvention(); conventionSet.KeyAddedConventions.Add(keyConvention); conventionSet.ForeignKeyAddedConventions.Add(new ForeignKeyPropertyDiscoveryConvention()); conventionSet.ForeignKeyRemovedConventions.Add(keyConvention); conventionSet.ModelBuiltConventions.Add(keyAttributeConvention);
csharp
namespace Monifier.Web.Auth { public static class MonifierClaimTypes { public static readonly string SessionId = "SessionId"; public static readonly string UserId = "UserId"; public static readonly string TimeZoneOffset = "TimeZoneOffset"; } }
csharp
using System.Text; using System.Threading.Tasks; namespace Checkout.ApiServices.ShoppingList.ResponseModels { public class DrinkList { public string PrevPageUrl { get; set; }
csharp
public Text postscript; public Text questionText; public Text aText; public Text bText; public Text cText; public Text dText; public Text resultText; public Image resultImage; public Text resultBtnText; public GameObject begin;
csharp
namespace Junkyard; public class OutgoingMailBox { public string Name { get; set; } public string Email { get; set; } public string AccessKey { get; set; } public string Host { get; set; } public int Port { get; set; } public bool UseSSL { get; set; } }
csharp
{ public class Vector { public Vector() { this.DeltaR = 0; this.DeltaC = 0; } public Vector(int deltaR, int deltaC)
csharp
// Copyright (c) MASA Stack All rights reserved. // Licensed under the Apache License. See LICENSE.txt in the project root for license information. namespace Masa.Auth.Service.Admin.Application.Sso.Commands; public class AddIdentityResourceCommandValidator : AbstractValidator<AddIdentityResourceCommand> { public AddIdentityResourceCommandValidator() { RuleFor(command => command.IdentityResource).SetValidator(new AddIdentityResourceValidator()); } }
csharp
using CSC.CSClassroom.Model.Projects; namespace CSC.CSClassroom.WebApp.BasePages { /// <summary> /// The base page for a view using in a particular checkpoint. /// </summary> public abstract class CheckpointPage<TModel> : ProjectPage<TModel> { /// <summary> /// The current checkpoint. /// </summary> public Checkpoint Checkpoint => ViewBag.Checkpoint; } }
csharp
using Sandbox.Game.GameSystems; using Sandbox.Common; using Sandbox.ModAPI.Ingame; using Sandbox.Game.Localization; namespace Sandbox.Game.Weapons { [MyCubeBlockType(typeof(MyObjectBuilder_SmallMissileLauncherReload))] class MySmallMissileLauncherReload : MySmallMissileLauncher, IMySmallMissileLauncherReload { const int NUM_ROCKETS_TO_COOLDOWN = 4; const int COOLDOWN_TIME_MILISECONDS = 5000; int m_numRocketsShot = 0;
csharp
// TODO: Delete this line of code to remove the default AutoFill for 'northwindDataSet.Suppliers'. if (this.NeedsFill("northwindDataSet")) { this.suppliersTableAdapter.Fill(this.northwindDataSet.Suppliers); } } private void Sheet1_Shutdown(object sender, System.EventArgs e) { } #region VSTO Designer generated code /// <summary>
csharp
<gh_stars>0 using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Scenario{ public interface ScenarioListener { void StartListeningFor(ScenarioManager manager); void StopListening(); } }
csharp
var agentgo = new GameObject("Agent"); var a = agentgo.transform; var agent = agentgo.AddComponent<DotsNavPathFindingAgent>(); agent.DrawCorners = true; agent.DrawGizmos = false;
csharp
// // 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 Wooli.Foundation.Connect.Managers
csharp
if (!TypeHelpers.IsCompatibleObject(bindingContext.ModelType, vpResult.RawValue)) { return null; // value is of incompatible type } return vpResult; }
csharp
private readonly Dictionary<string, bool> _exchanges = new(); public RabbitMqConnection(RabbitMqBusConfiguration busConfiguration, ILogger<RabbitMqConnection> logger) { _logger = logger; _busConfiguration = busConfiguration; //setup connection and channels
csharp
public static double CalculateMainBPM(Beatmap beatmap) { // beatLength, duration of that beatLength var beatLengthsDuration = new Dictionary<double, int>(); var uninheritedTimingPoints = beatmap.TimingPoints.Where(t => t.Uninherited).ToList(); if (!uninheritedTimingPoints.Any()) return 0; for (int i = 0; i < uninheritedTimingPoints.Count - 1; i++)
csharp
namespace DataAccess.Abstract { public interface IDalInstance { } }
csharp
else { return new StringBuilder(); } } public static void ReleaseStringBuilder(StringBuilder stBuilder) { stBuilder.Length = 0; s_stringBuilderPool.Push(stBuilder); } public static StringBuilderPoolContext<T> GetFreeStringBuilder(out StringBuilder stbuilder)
csharp
Core.LoadingCS(Instance, projectNamespace, LOCKER); Core.ProxiesCS(Instance, projectNamespace, LOCKER); Core.RequestCS(Instance, projectNamespace, LOCKER); } // Token: 0x06000026 RID: 38 RVA: 0x000034A0 File Offset: 0x000016A0 public static void ProgramCS(Config Instance, string projectNamespace, object LOCKER)
csharp
public interface IEntity { Guid PublicKey { get; set; } string RoleName { get; set; } } }
csharp
public static IServiceCollection AddDbRepositories(this IServiceCollection services) { services.AddScoped<IAccountRepository, AccountRepository>(); services.AddScoped<ITicketRepository, TicketRepository>(); return services; } }
csharp
{ var html = input.ToStringValue(); if (String.IsNullOrEmpty(html)) { return StringValue.Empty; } try
csharp
public class LazyItem<T> : ILazyLoader<T> { public LazyItem(T value) => Value = value; public T Value { get; } public bool Loaded { get; private set; } public T Load() { Loaded = true; return Value; }
csharp
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SuperTiled2Unity.Editor { public enum DataEncoding {
csharp
string ispDisplayName = (await _userHistoryService.GetISP(int.Parse(result.IspId.Value.ToString()))).Value; string ispOfferName = (await _userHistoryService.GetISPOffers(int.Parse(result.IspOfferId.Value.ToString()))).Value; return View(UserActionDTO.FromUserHistory(result, ispDisplayName, ispOfferName)); } [HttpGet] public async Task<IActionResult> GetISPAsync() { try { var result = await _userHistoryService.GetISP(); return Json(result); } catch (Exception exp) {
csharp
namespace Com.Setarit.Ramses.LifecycleListener { public interface IBeforeAddingListener {
csharp
this.lblMyList.AutoSize = true; this.lblMyList.Cursor = System.Windows.Forms.Cursors.Hand; this.lblMyList.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblMyList.ForeColor = System.Drawing.Color.White; this.lblMyList.Location = new System.Drawing.Point(459, 20); this.lblMyList.Name = "lblMyList"; this.lblMyList.Size = new System.Drawing.Size(108, 31); this.lblMyList.TabIndex = 10; this.lblMyList.Text = "Wishlist"; this.lblMyList.Click += new System.EventHandler(this.lblMyList_Click); // // lbMyMovies
csharp
using Nucleo.IO; namespace Nucleo.Services { public interface IPostedFilesService : IService { PostedFile Get(string key);
csharp
using System; using System.Collections.Generic; using System.Text; namespace RefactoringExceptions.Core { public interface TodayDate { DateTime Date { get; } } }
csharp
// the software. // // 3. Conditions and Limitations // (A) Reciprocal Grants- For any file you distribute that contains code from the software (in // source code or binary format), you must provide recipients the source code to that file along // with a copy of this license, which license will govern that file. You may license other files // that are entirely your own work and do not contain code from the software under any terms you // choose. // (B) No Trademark License- This license does not grant you rights to use any contributors' name, // logo, or trademarks. // (C) If you bring a patent claim against any contributor over patents that you claim are // infringed by the software, your patent license from such contributor to the software ends
csharp
{ public class GameScore { public int id { get; set; } public int highscore { get; set; } public string game { get; set; } public string name { get; set; } public string email { get; set; } public string phrase { get; set; } } }
csharp
using QuestPDF.Fluent; using QuestPDF.Infrastructure; namespace QuestPDF.ReportSample { public static class Typography { public static TextStyle Title => TextStyle.Default.FontType("Helvetica").Color("#000000").Size(20).Bold(); public static TextStyle Headline => TextStyle.Default.FontType("Helvetica").Color("#047AED").Size(14); public static TextStyle Normal => TextStyle.Default.FontType("Helvetica").Color("#000000").Size(10).LineHeight(1.25f).AlignLeft(); } }
csharp
/// </summary> [JsonProperty("name")] public string Name; /// <summary> /// Pages associated to the topic. /// </summary>
csharp
namespace SiGen.Common { public enum StringMaterial { Nylon, PlainSteel, SteelWound, BronzeWound, } }
csharp
return MathTools.Max3(tData.Vertex1.y, tData.Vertex2.y, tData.Vertex3.y); } private void DrawTriangle(TriangleData tData, DepthTexture modelTexture, DepthTexture screenTexture) { //set array boundes int left = 0; int right = 0; int top = 0; int bottom = 0; if (!OnScreen(tData, screenTexture, ref left, ref right, ref top, ref bottom)) return; //cull out triangles not in screen space //setup values for the draw loop
csharp
// Load the configuration data return Task.FromResult(new UbiIniData_RaymanM(AppFilePaths.UbiIniPath1)); } /// <summary> /// Imports the <see cref="Config_UbiIni_BaseViewModel{Handler}.ConfigData"/> /// </summary> /// <returns>The task</returns> protected override Task ImportConfigAsync() { RayGLI_Mode gliMode = ConfigData.FormattedGLI_Mode; if (gliMode != null) {
csharp
if (ident.Name.Equals("abi")) { if (member.MemberName.Equals("encodePacked")) return true; } } } return false; } public static bool IsAssert(FunctionCall node) {
csharp
public class EclairClientIntegrationTest : LightningClientIntegrationTestBase { protected override bool NeedBitcoind => true; protected override Task<ILightningClient> GetClient() { ILightningClient client = EclairClient.New("http://localhost:4570/", "eclairpassword"); return Task.FromResult(client);
csharp
public const string XCaSignature = "x-ca-signature"; public const string XCaSignatureMethod = "x-ca-signature-method"; public const string XCaSignatureHeaders = "X-Ca-Signature-Headers"; public const string ContentMD5 = "Content-MD5"; public const string ContentType = "Content-Type"; public const string Date = "Date"; public const string Accept = "Accept"; }
csharp
public const string CameraProjectionWindow = "CameraProjectionWindow"; public const string ConfirmationPopup = "ConfirmationPopup"; public const string HomeWindow = "HomeWindow"; public const string NavigationPanel = "NavigationPanel";
csharp
} } return true; } /// <summary> /// Gets the identifier of the migration /// </summary> /// <value>The identifier.</value> public string Id {
csharp
// Nifty little trick to quickly position the window in the middle of the editor. window.position = GUIHelper.GetEditorWindowRect().AlignCenter(700, 700); } [EnumToggleButtons] [InfoBox("Inherit from OdinEditorWindow instead of EditorWindow in order to create editor windows like you would inspectors - by exposing members and using attributes.")] public ViewTool SomeField; } }
csharp
using System.Collections.Generic; using Usivity.Entities; namespace Usivity.Data { public interface ISubscriptionDataAccess { //--- Methods --- IEnumerable<Subscription> Get(IOrganization organization); Subscription Get(string id, IOrganization organization); void Save(Subscription subscription); void Delete(Subscription subscription); } }
csharp
AppContext.Data.dataToPrint = data; } private void BuildProcessView() { String data = String.Empty;
csharp
// // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation // files (the "Software"), to deal in the Software without // restriction, including without limitation the rights to use, // copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following // conditions: // // 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
csharp
IsChanged = false; } } public void UndoChanges() { if (!IsChanged) return; lock (OriginalValues) { var evnArg = new CancelEventArgs(); #if !NETSTANDARD1_6 OnUndoChange(evnArg);
csharp
/// <summary> /// Ширина карты /// </summary> private int MapWidth { get; set; } /// <summary> /// Высота карты /// </summary> private int MapHeight { get; set; } /// <summary>
csharp
} public FillStyleRGB Visit(BitmapFillStyleRGB fillStyle, ISwfStreamReader reader) { fillStyle.BitmapID = reader.ReadUInt16(); fillStyle.BitmapMatrix = reader.ReadMatrix();
csharp
} public override IEnumerable<string> Suffix() { if (!SignatureOnly)
csharp
namespace WpfGroupFinder.Logic { public interface IRaidCategorizer {
csharp
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks;
csharp
["height"] = $"{height}", }); return result.CoinSolution; } public Task<CoinSolution> GetPuzzleAndSolution(CoinRecord coinRecord) => GetPuzzleAndSolution(coinRecord.Name(), coinRecord.SpentBlockIndex); } }
csharp
using Xamarin.Forms; namespace LiveCodingEmployer.Controls { public class EntryCustom : Entry { public EntryCustom() : base() {
csharp
{ var sequence = await DbSet.FirstOrDefaultAsync(s => s.Key == sequenceKey.Value); return sequence; }
csharp
{ ControlsCommands.Unregister(string.Format(@"HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)); } public override void OnClick() { IFeature copiedFeature = Editor.UniqueInstance.CopiedFeature; if (((copiedFeature != null) && (copiedFeature.Shape.GeometryType == Editor.UniqueInstance.TargetLayer.FeatureClass.ShapeType)) && ((!Editor.UniqueInstance.CheckOverlap || Editor.UniqueInstance.CheckFeatureOverlap(copiedFeature.ShapeCopy, false)) || (XtraMessageBox.Show("要素与其他要素重叠!是否保留此要素?", "", MessageBoxButtons.YesNo) != DialogResult.No))) { Editor.UniqueInstance.StartEditOperation(); IFeature feature = Editor.UniqueInstance.TargetLayer.FeatureClass.CreateFeature(); (feature as IRowSubtypes).InitDefaultValues(); feature.Shape = copiedFeature.ShapeCopy; Editor.UniqueInstance.AddAttribute = true; feature.Store();
csharp
readonly PathBase pathField; readonly IDirectoryInfoFactory directoryInfoFactory; public MockFileSystem() : this(null) { } public MockFileSystem(IDictionary<string, MockFileData> files, string currentDirectory = @"C:\Foo\Bar") { this.files = new Dictionary<string, MockFileData>(StringComparer.InvariantCultureIgnoreCase);
csharp
using System; namespace RepoInspector.Records { public class Comment { public long Id { get; set; } public User User { get; set; }
csharp
private readonly ScenarioContext _scenarioContext; public _2848_LinkingEnglishMathsAchievementAndIPPageSteps(ScenarioContext scenarioContext) { _scenarioContext = scenarioContext; } [Given(@"I have a created a registration without LRS data")] public void GivenIHaveACreatedARegistrationWithoutLRSData() { var uln = UlnHelper.GenerateUln().ToString(); _scenarioContext["uln"] = uln;
csharp
@using ExercicioFinalWEBAPI.Areas.HelpPage.ModelDescriptions @model SimpleTypeModelDescription @Model.Documentation
csharp
} var multiplier = Math.Pow(10, decimalPlaces); var bigValue = (double)input * multiplier; var trimmedValue = trimmer(bigValue); var finalResult = (decimal)(trimmedValue / multiplier); return finalResult; } } }