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<T... |
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 sta... |
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... |
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.Data... |
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 charCoun... |
csharp | modelDef.BindWebApplication(webApplication);
}
else
{
string modelDefinerTemplate = File.ReadAllText(jsonFilePath);
modelDef = JsonConvert.DeserializeObject<ModelDefinition>(modelDefinerTemplate, new JsonSerializerSettings
... |
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... |
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.
... |
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 bin... |
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; }
publi... |
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( lc... |
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(... |
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) ... |
csharp | if (strBens == "")
strBens = "carro";
else
strBens = strBens + ", carro";
if (chkBarco.Checked)
if (strBens.Length == 0)
strBens = "barco";
else
strBens = strBens ... |
csharp |
private void OnQuestAcceptanceIndicated(bool accepted, DialogueLine dialogueLine)
{
if (accepted)
{
dialogueLine.StartQuest();
_closeAfterLinesShown = true;
AdvanceLine();
}
else
{
... |
csharp | conventionSet.PropertyAddedConventions.Add(new StringLengthAttributeConvention());
conventionSet.PropertyAddedConventions.Add(new TimestampAttributeConvention());
var keyAttributeConvention = new KeyAttributeConvention();
conventionSet.PropertyAddedConventions.Add(keyAtt... |
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... |
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>
publ... |
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
... |
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... |
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, softw... |
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 (!uninhe... |
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 StringBuilderPoolCont... |
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(Con... |
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, ispDispla... |
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.ForeC... |
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 ma... |
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("He... |
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;
... |
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 ImportCon... |
csharp | if (ident.Name.Equals("abi"))
{
if (member.MemberName.Equals("encodePacked"))
return true;
}
}
}
return false;
}
public static bool IsAssert(FunctionCa... |
csharp | public class EclairClientIntegrationTest : LightningClientIntegrationTestBase
{
protected override bool NeedBitcoind => true;
protected override Task<ILightningClient> GetClient()
{
ILightningClient client = EclairClient.New("http://localhost:4570/", "eclairpassword");
... |
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 cons... |
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 wind... |
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(... |
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 ... |
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.... |
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, M... |
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 Giv... |
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;
}
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.