lang stringclasses 10
values | seed stringlengths 5 2.12k |
|---|---|
csharp | // The .NET Foundation licenses this file to you under the MS-PL license.
// See the LICENSE file in the project root for more information.
namespace MvvmCross.Binding.Parse.PropertyPath.PropertyTokens
{
public class MvxPropertyNamePropertyToken : MvxPropertyToken
{
public MvxPropertyNamePropertyToken(... |
csharp | // Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if(isStarted && readyforhit && !Hit)
{
if (victim._controller.isGrounded)
{
victim.PlaySFX(hit); |
csharp | {
public interface IMockTypedBuilderSettings: ITypedBuilderSettings, ITypedResultMocker<IMockTypedBuilderSettings>
{
}
} |
csharp | // copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS B... |
csharp |
namespace SquidEyes.UnitTests.Context;
public class OffsetEmbargoTests
{
[Theory]
[InlineData("00:00:00.000", "23:59:59.999", null)]
[InlineData("00:00:00.000", "23:59:59.999", Monday)]
[InlineData("00:00:00.000", "23:59:59.999", Tuesday)] |
csharp | int TotalPages { get; }
/// <summary>
/// Representa a quantidade total de registros da coleção
/// </summary>
int TotalCount { get; }
/// <summary>
/// Verifica se a coleção possui uma página anterior
/// </summary>
bool HasPrevious { get; }
|
csharp | namespace Tenant.Mvc
{
public partial class Startup
{
}
} |
csharp | </div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form> |
csharp | using DotNetty.Handlers.Streams;
using DotNetty.Handlers.Timeout;
using DotNetty.Transport.Bootstrapping;
using DotNetty.Transport.Channels;
using DotNetty.Transport.Libuv;
using JT1078.Gateway.Configurations;
using JT1078.Gateway.Http.Handlers;
using JT1078.Protocol;
using Microsoft.Extensions.DependencyInjection;
usi... |
csharp |
private static int EnterElementToCheck(int[] array)
{
int element = int.Parse(Console.ReadLine());
if ((element == 0) || (element == (array.Length - 1)))
{
Console.WriteLine("This element has only one neighbour. Enter another one!"); |
csharp | Console.WriteLine(FileNameUtils.GetFileNameWithoutExtension("example.pdf"));
Console.WriteLine(FileNameUtils.GetFileNameWithoutExtension("example.new.pdf"));
Console.WriteLine("Distance in the 2D space = {0:f2}", GeometryUtils.CalculateDistance2D(1, -2, 3, 4));
Console.W... |
csharp | private readonly Uri _websiteUrl;
public VacancyViewModel(DAL.Vacancy vacancy, Uri webSiteUrl, string fallbackImage = null)
{
_websiteUrl = webSiteUrl;
var fallbackImageUrl = string.IsNullOrWhiteSpace(fallbackImage) ? null : new Uri(fallbackImage);
Id = vacancy.Id;
Title = vacancy.Title;
Imag... |
csharp | }
public async Task DeleteAsync(string id, string clusterId = null)
{
var httpResponseMessage = await _httpClient.DeleteAsync( |
csharp | namespace Kysect.BotFramework.Data.Entities
{
public class TelegramSenderInfoEntity : SenderInfoEntity
{
public static TelegramSenderInfoEntity GetOrCreate(TelegramSenderInfo senderInfo, BotFrameworkDbContext dbContext)
{
var senderInfoEntity = dbContext.TelegramSenderInfos.FirstOrDe... |
csharp | }
private static void MouseDoubleClick(object sender, RoutedEventArgs e)
{
Control control = sender as Control;
ICommand command = (ICommand)control.GetValue(CommandProperty);
object commandParameter = control.GetValue(CommandParameterProperty);
c... |
csharp |
public static class MyTestContract
{
public static MyHope Hope = MyBogus.Contract.Hope.Generate();
public static MyFeedback Feedback = MyBogus.Contract.Feedback.Generate(); |
csharp | using System.Collections.Generic;
namespace GherkinSyncTool.Interfaces
{
public interface IFeatureFilesGrabber
{
List<IFeatureFile> TakeFiles();
}
} |
csharp | namespace SFA.DAS.WebTemplateSourceName.Web.Authorization
{
public static class AuthorizationContextKeys
{
public const string AccountId = "AccountId";
}
}
|
csharp | Root = Env.Db;
}
public IWfDb Relocate(FS.FolderPath root)
{
Root = root;
return this;
}
}
} |
csharp | new
{
RoleId = roleId,
ClaimId = result.Id
},
result);
return actionResult;
} |
csharp |
//retorna a lista
var consulta = banco.Consulta(comando);
foreach(var s in consulta.Linhas)
{
Registro reg = new Registro(s); |
csharp | namespace CoreConsole {
class Program {
static void Main(string[] args) {
string say_it = "Hello World!";
System.Console.WriteLine(say_it);
}
}
}
|
csharp |
public ShortcutkeyProperty TogglePinApp => this.Cache(key => new ShortcutkeyProperty(key, this._provider));
#region default values
private static int[] SwitchToLeftDefaultValue { get; } =
{
037, // <=
162, // Left Ctrl
091, // Left Windows
};
|
csharp |
namespace Balancer.Setups
{
public class DependencyInjectionService
{
public void SetupServices(IServiceCollection services)
{
//services.AddTransient<IAuthService, AuthService>();
}
} |
csharp | /// The total device count.
/// </summary>
[JsonProperty(PropertyName = "totalDeviceCount")]
public long? TotalDeviceCount { get; set; }
/// <summary>
/// The enabled device count.
/// </summary>
[JsonProperty(PropertyName = "enabledDeviceCount")]... |
csharp | [Fact]
public void Should_Return_All_Level_In_Db()
{
var fakeContext = new FakeContext("GetAllLevel");
fakeContext.FillWith<Level>();
using (var context = new MainContext(fakeContext.FakeOptions))
{ |
csharp |
using (Mocks.Record())
{
_messageProvider.BuildStatisticValue(_task.Key, _task.Value);
}
|
csharp |
[Required]
[Display(Name = "City: ")]
public string City { get; set; }
[Required]
[Display(Name = "State: ")] |
csharp | using Zu.AsyncWebDriver;
namespace Zu.AsyncChromeDriver.Tests.Environment
{
public class UrlBuilder
{
string _protocol; |
csharp | using System;
using BLD;
using BLD.Builder;
using UnityEngine;
public interface IBIWPublishController : IBIWController { } |
csharp | m--;
n--;
for (var i = m + n + 1; i >= 0; i--)
{
if (m >= 0 && n >= 0)
if (nums1[m] >= nums2[n]) nums1[i] = nums1[m--];
else nums1[i] = nums2[n--];
else if (n >= 0)
nums1[i] = nums... |
csharp | static void Main(string[] args)
{
Random r = new Random();
ThetaList<int> theta = new ThetaList<int>() ;
List<int> list = new List<int>(); |
csharp | // We don't care which thread release the semaphore
return await taskFunction().ConfigureAwait(false);
}
finally
{
semaphore.Release();
}
}
public async Task Run(Func<Task> taskFunction)
{
... |
csharp | private static string GetPrivateBinPath()
{
string binPath = null;
#if !NETSTANDARD2_0
// TODO: FACAVAL AppContext.BaseDirectory is equivalent to AppDomain.CurrentDomain.BaseDirectory
// Explore whether an alternative is needed and what they would be.
// ... |
csharp | namespace Intelecom.DirectPayment.Client.Models
{
/// <summary>
/// Details about the payment.
/// </summary>
public class PaymentDetails
{
/// <summary> |
csharp | namespace TwainDotNet.TwainNative
{
// all values are in Inches (2.54 cm)
[StructLayout(LayoutKind.Sequential, Pack = 2)]
public class Frame
{
public Fix32 Left;
public Fix32 Top;
public Fix32 Right;
public Fix32 Bottom; |
csharp | public EventArgs(IEnumerable<ContentTypeChange<TItem>> changes)
{
Changes = changes.ToArray();
}
public EventArgs(ContentTypeChange<TItem> change)
: this(new[] { change })
{ }
public IEnumerable<ContentTypeChange<T... |
csharp | public string Title { get; set; }
public string Team { get; set; }
public string AssignedTo { get; set; }
public string Status { get; set; }
public string Project { get; set; }
public string Description { get; set; }
public string Urgency { get; set; }
pub... |
csharp | public string AccountAsset { get; set; }
/// <summary>
/// Id and description of used account
/// </summary>
[JsonReadOnly]
public string AccountValueLoss { get; set; } |
csharp | namespace BuilderPattern.BusinessLogic.Domain
{
public enum ComboMenuType
{
BigMac = 1,
McChicken = 2,
McFish = 3,
BigTasty = 4
}
} |
csharp | /// The Token customer’s card expiry year.
/// </summary>
public string CardExpiryYear { get; set; }
/// <summary>
/// The Token customer’s card valid from month.
/// UK Only.
/// </summary>
public string CardStartMonth { get; set; }
/// <summary... |
csharp | {
public interface IRecipeFactory
{
IDrink CreateDrink(string name, decimal price, int calories, int quantityPerServing, int timeToPrepare, bool isCarbonated);
ISalad CreateSalad(string name, decimal price, int calories, int quantityPerServing, int timeToPrepare, bool containsPasta); |
csharp | namespace engenious.Content.Models.History
{
/// <summary>
/// A history item for a change occuring on a collection.
/// </summary>
/// <typeparam name="T">The generic type of the collection items.</typeparam>
public class HistoryCollectionChange<T> : IHistoryItem
{
// ReSharper disa... |
csharp | : default(R);
}
public static R? Bind<T, R>(this T? self, Func<T, R?> Some, Func<R?> None)
where T : struct
where R : struct
{
return self.HasValue
? Some(self.Value)
: None();
}... |
csharp | using System;
using System.Threading.Tasks;
namespace DbMigrate.Model.Support.Database
{
public interface ITranection : IDisposable
{
bool IsOpen { get; }
string ConnectionString { get; }
Task<T> ExecuteScalar<T>(string sql);
Task<int> ExecuteNonQuery(string sql); |
csharp | /// </summary>
public interface IMoveController {
/// <summary>
/// 获取移动参数: x为旋转、y为移动、z暂时无用
/// </summary>
/// <returns></returns>
Vector3 GetInput();
} |
csharp |
namespace Microsoft.AspNetCore.ResponseCaching;
/// <summary>
/// A feature for configuring additional response cache options on the HTTP response.
/// </summary>
public interface IResponseCachingFeature
{
/// <summary>
/// Gets or sets the query keys used by the response cache middleware for calculating seco... |
csharp | entity.HasOne(d => d.Empresa)
.WithMany(p => p.Usuarios)
.HasForeignKey(d => d.EmpresaId)
.HasConstraintName("FK_Usuarios_Empresas");
entity.HasOne(d => d.Role) |
csharp | /// <summary>
/// A collection of ImageRendition objects
/// </summary>
public partial class ImageRenditionCollection : BaseProvisioningTemplateObjectCollection<ImageRendition>
{
/// <summary> |
csharp | name: "name",
schema: "customer_profile",
table: "referral_hotel_profiles",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "phone_number", |
csharp | public bool HidePinnedPlaces { get; set; }
/// <summary>ショートカットの参照先解決をしない。(ショートカットファイル自体を選択可能とする)</summary>
/// <remarks>デフォルト値は false となる。</remarks>
public bool NoDereferenceLinks { get; set; } |
csharp | public sealed class EtwFileLog : FileLog
{
private readonly EtwOnlyTextLogger m_logger;
/// <summary>
/// Class constructor
/// </summary>
|
csharp | .Where(x => taggedUsernames.Contains(x.TaggedUsername))
.ToListAsync();
return entries;
}
[HttpGet("GetIdentity")]
public async Task<ActionResult<RSAPubKey>> GetIdentity([FromQuery] string taggedUsername)
{
var key = (await _dbCont... |
csharp |
private void ScaleSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
OsdWindowManager.Scale = e.NewValue;
}
private void ShowBtn_Click(object sender, RoutedEventArgs e)
{
OsdWindowManager.ShowFull(); |
csharp | if (State == GestureRecognizerState.Began || State == GestureRecognizerState.Executing) {
CalculateFocus(CurrentTrackedTouches);
SetState(GestureRecognizerState.Ended);
}
else {
CalculateFocus(CurrentTrackedTouches);
Set... |
csharp |
string endpoint = configuration["EndPointUrl"];
if (string.IsNullOrEmpty(endpoint))
{
throw new ArgumentNullException("Please specify a valid endpoint in the appSettings.json");
}
string authKey = configuration["Author... |
csharp | "MwoRTWVhc3VyZW1lbnRzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIg",
"ASgBOgI4AUI0qgIxTWljcm9zb2Z0LkxvY2FsRm9yd2FyZGVyLkxpYnJhcnku",
"SW5wdXRzLkNvbnRyYWN0c2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global:... |
csharp | using Volo.Abp.Validation;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;
namespace EasyAbp.Cms
{
[DependsOn(
typeof(AbpValidationModule)
)]
public class CmsDomainSharedModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext con... |
csharp | namespace GbxRemoteNet.Structs {
public class ClubLinks {
public string ClubLink1 { get; set; }
public string ClubLink2 { get; set; }
}
}
|
csharp | * CryptTest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
using System.Text;
namespace CryptTest.Framework.Crypt
{
/// <summary>
/// Static class to get Adler32 Hash fr... |
csharp | {
private int compteur;
public ObjectContainedInventory()
{
compteur = 1;
}
public void AddCompteur()
{
compteur++;
}
public int GetCompteur() |
csharp | private _Unmarshal_Helper SendReceive(int p, _Marshal_Helper m)
{
return new _Unmarshal_Helper(SendReceive(p, m.DataRepresentation, m.ToArray(), m.Handles));
}
public int s_winmmGetPnpInfo(out int p0, out byte[] p1)
{ |
csharp | namespace BSim.Simulations
{
public class Wall : SimulationObject
{
public float Length { get; set; }
}
} |
csharp | using Newtonsoft.Json;
namespace SimpleJira.Impl.Dto
{
internal class JiraAvatarUrlsDto
{
[JsonProperty("16x16")] public string Size16x16 { get; set; }
[JsonProperty("24x24")] public string Size24x24 { get; set; }
[JsonProperty("32x32")] public string Size32x32 { get; set; }
[Js... |
csharp | using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace entity_lib
{
[Table("Books")]
public class Book |
csharp |
namespace RAaA.API
{
public class Startup
{
public Startup(IConfiguration configuration) |
csharp | methodInfo.Invoke(clientContext, parametersArray);
};
return clonedClientContext;
}
} |
csharp | // Copyright (c) Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information.
namespace Narvalo.Internal
{
internal delegate bool TryParser<TResult>(string value, out TResult result);
}
|
csharp | {
class SkillData
{
public int ID { get; private set; }
public int SkillEffect { get; private set; }
public int SetData(BsonDocument document)
|
csharp | m_scheduler = scheduler;
m_workerId = workerId;
m_tracerEnabled = ((IPipExecutionEnvironment)m_scheduler).Configuration.Logging.LogTracer;
}
/// <inheritdoc/>
public override void CacheMaterializationError(CacheMaterializationErrorEventData data)
... |
csharp | // Serialize blueprints to binary.
var binaryBlueprintFile =
new FileInfo(Path.ChangeExtension(file.FullName, BlueprintFileExtensionBinary));
using (var fileStream = binaryBlueprintFile.Create())
{
... |
csharp | {
batch.Draw(texture, position, sourceRectangle, color ?? Color.White, rotation, origin, scale ?? Vector2.One, effects, layerDepth);
}
public static void Draw(this SpriteBatch batch, Texture2D texture, Rectangle position, Rectangle? sourceRectangle = null, Color? color = null, float ... |
csharp |
namespace RetroClash.Protocol.Commands.Client
{
public class LogicCommandFailed : Command
{
public LogicCommandFailed(Device device, Reader reader) : base(device, reader)
{ |
csharp | namespace ASPNetCoreExecutor
{
public class SourceComplier
{
public static Assembly Compile(string text, params Assembly[] referencedAssemblies)
{
var references = referencedAssemblies.Select(it => MetadataReference.CreateFromFile(it.Location));
var options = new CSharpCo... |
csharp | {
public static void Main()
{
var sortedSetByName = new SortedSet<Person>(new NameComparator());
var sortedSetByAge = new SortedSet<Person>(new AgeComparator()); |
csharp | }
}
/// <summary>
///Represents the strongly named DataTable class.
///</summary>
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class VW_Urunler1DataTable : ... |
csharp | var poco = new SystemSettingsPOCOs()
{
SourceFilePath = _backupExecution.SourceDirectoryPath,
DestinationFilePath = _backupExecution.DestinationFilePath,
TemporaryFilePath = _backupExecution.TemporaryFilePath,
AllowOverwrite = _backupExecution.AllowOverwrite,
BufferSize = _backupExecution.Buff... |
csharp |
namespace Prime31.ZestKit
{
public class SplineTween : Tween<Vector3>, ITweenTarget<Vector3>
{
Transform _transform;
Spline _spline;
bool _isRelativeTween;
public SplineTween( Transform transform, Spline spline, float duration ) |
csharp | <h1>Delete Activity</h1>
<h3 style="color:brown">Are you sure you want to delete this?</h3>
<div>
@using (Html.BeginForm("Delete", "Activities", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
<p>@Html.DisplayFor(x => Model.Id)</p>
<div class="form... |
csharp | class Program
{
public static void Main()
{
Console.Title = "Steam Five Minutes Sharing " + Assembly.GetExecutingAssembly().GetName().Version;
ConsoleHelper.Init();
SteamHelper.Init();
FirewallHelper.Init();
Cycler.Init();
}
}
} |
csharp | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class enableItem : MonoBehaviour
{
public bool disableLook;
public bool enableLook;
public Vector3 angles;
public GameObject[] disable;
// Start is called before the first frame update
private void Start() |
csharp | }
if (!refreshers.Any()) {
ThrowHelper.ThrowInvalidOperationException(message: $"Unable to find a {nameof(DbClientConfigurationProvider)} refresher. Please ensure that one has been configured correctly.");
}
Refreshers = refreshers;
}
} |
csharp |
namespace SpeedSlidingTrainer.Application.Infrastructure
{
public interface ITimerFactory
{
[NotNull]
ITimer Create(TimeSpan interval, [NotNull] Action onTick);
} |
csharp |
[assembly: OwinStartup(typeof(Travo.WebAPI.Startup))]
namespace Travo.WebAPI
{
public class Startup
{ |
csharp | /// </summary>
[DataMember(Name = "InternalCurrencyContractHourlyRate")]
public double? InternalCurrencyContractHourlyRate { get; set; }
/// <summary>
/// Gets or Sets RoleID
/// </summary>
[DataMember(Name = "RoleID")]
public int? RoleID { get; set; }
/// <summary>
/// Gets or Sets SoapParentPropertyId
//... |
csharp |
[Header("player controll")]
public float dragSpeed;
public GameObject self, nextPart, scoreTracker;
Vector2 sawBegin = new Vector2(0, 0.10f);
Vector2 sawEnd = new Vector2(0, -7.2f);
private InputManager inputManager;
private void Start()
{
inputManager = InputManage... |
csharp | {
/// <summary>
/// Interaction logic for SelectionExamples.xaml
/// </summary>
public partial class SelectionExamples : UserControl
{
public SelectionExamples()
{
InitializeComponent();
this.DataContextChanged += (sender, args) => {
... |
csharp | using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace KaisEngine
{
class C... |
csharp | namespace Sharlayan.Models.Structures
{
public class CameraInfo
{
public int Heading { get; set; }
public int Elevation { get; set; }
public int Mode { get; set; }
}
}
|
csharp |
}
}
public static long usec
{
get |
csharp | @using gitapp2
@namespace gitapp2.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
csharp | using System.Threading.Tasks;
using HealthGateway.Medication.Models;
using HealthGateway.Medication.Parsers;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
/// <summary>
/// The Medication data service.
/// </summary>
public class RestPharmacyService : IPharmacySer... |
csharp | /// the owner of the dialog box while the dialog box is displayed.
/// </summary>
DS_NOIDLEMSG = 0x100,
/// <summary>
/// Indicates that the header of the dialog box template (either standard or extended) contains additional data
/// specifying the font to use for text i... |
csharp | protected override void ReturnToPool()
{
var blast = Instantiate(RocketBlastPrefab);
blast.transform.position = this.transform.position + Vector3.back * 2;
base.ReturnToPool();
}
public void BlastSfx()
{
//Generate a random number between 0 and the length of our array... |
csharp | // License: MS-LPL
//===================================================================================
using System;
namespace Microsoft.Practices.Common
{
/// <summary>
/// Interface implemented by elements that allow arbitrary attributes to be
/// specified in the configuration file.
|
csharp | using Lykke.Core.Domain.Exchange.Models;
namespace Lykke.Core.Domain.Exchange
{
public interface IMarketOrderRepository : IOrderRepository<MarketOrder>
{
|
csharp | new DatabaseExecutionStep
{
DatabaseConnectionId = Constants.PortalDatabaseId,
ExecuteCommand = versionContext.ConnectionType == Core.Persistences.Conne... |
csharp | myClass.Should().NotBeNull();
myClass.Property1.Should().BeTrue();
}
[Test] |
csharp | namespace MvcApp.Services.Security
{
public static class Random
{
public static string GenerateString(int length)
{
char[] chars = new char[62];
chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".ToCharArray();
byte[] data = new byte[1];
... |
csharp | [Serializable]
public class LinkStat
{
/// <summary>
/// Время начала отсчета
/// </summary>
[JsonProperty(propertyName: "timestamp")]
[JsonConverter(converterType: typeof(UnixDateTimeConverter))]
public DateTime Timestamp { get; set; }
/// <summary>
/// Общее число переходов
/// </summary> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.