language stringclasses 1
value | repo stringclasses 133
values | path stringlengths 13 229 | class_span dict | source stringlengths 14 2.92M | target stringlengths 1 153 |
|---|---|---|---|---|---|
csharp | AutoFixture__AutoFixture | Src/AutoFixtureDocumentationTest/Simple/Filter.cs | {
"start": 68,
"end": 750
} | public class ____
{
private int max;
private int min;
public int Max
{
get => this.max;
set
{
if (value < this.Min)
{
throw new ArgumentOutOfRangeException(nameof(value));
}
... | Filter |
csharp | files-community__Files | src/Files.App/Data/Enums/WindowsCompatibilityModes.cs | {
"start": 613,
"end": 779
} | public enum ____
{
[Description("")]
None,
[Description("256COLOR")]
Color8Bit,
[Description("16BITCOLOR")]
Color16Bit
}
| WindowsCompatReducedColorModeKind |
csharp | dotnet__machinelearning | src/Microsoft.ML.FastTree/Training/Applications/GradientWrappers.cs | {
"start": 312,
"end": 363
} | class ____ the targets.
/// </summary>
| holding |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Linq/Observable/Range.cs | {
"start": 2396,
"end": 3013
} | internal sealed class ____ : Producer<int, RangeLongRunning.RangeSink>
{
private readonly int _start;
private readonly int _count;
private readonly ISchedulerLongRunning _scheduler;
public RangeLongRunning(int start, int count, ISchedulerLongRunning scheduler)
{
... | RangeLongRunning |
csharp | dotnet__extensions | test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/ThrowUserAgentExceptionHandler.cs | {
"start": 267,
"end": 568
} | internal sealed class ____ : HttpMessageHandler
{
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) =>
throw new InvalidOperationException($"User-Agent header: {request.Headers.UserAgent}");
}
| ThrowUserAgentExceptionHandler |
csharp | unoplatform__uno | src/SolutionTemplate/UnoAppWinUI/UnoAppWinUI.Server/Controllers/WeatherForecastController.cs | {
"start": 223,
"end": 921
} | public class ____ : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
private readonly ILogger<WeatherForecastController> _logger;
public WeatherForecastController(ILogger<WeatherFor... | WeatherForecastController |
csharp | ServiceStack__ServiceStack | ServiceStack.OrmLite/tests/ServiceStack.OrmLite.Oracle.Tests/OracleParamTests.cs | {
"start": 43111,
"end": 43362
} | public class ____ : Param<ParamSize>
{
public int Size { get; set; }
public override void SetValue(int value) { Size = value; }
public override ParamSize GetObject() { return this; }
}
| ParamSize |
csharp | MassTransit__MassTransit | tests/MassTransit.Tests/MessageUrnSpecs.cs | {
"start": 4226,
"end": 4291
} | public class ____
{
}
[MessageUrn(null)]
| Attributed |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.Abstractions/Modules/Services/TimeZoneSelectorResult.cs | {
"start": 32,
"end": 165
} | public class ____
{
public int Priority { get; set; }
public Func<Task<string>> TimeZoneId { get; set; }
}
| TimeZoneSelectorResult |
csharp | Xabaril__AspNetCore.Diagnostics.HealthChecks | test/HealthChecks.Sqlite.Tests/Functional/SqliteHealthCheckTests.cs | {
"start": 68,
"end": 2543
} | public class ____
{
[Fact]
public async Task be_healthy_when_sqlite_is_available()
{
var webHostBuilder = new WebHostBuilder()
.ConfigureServices(services =>
{
services.AddHealthChecks()
.AddSqlite($"Data Source=sqlite.db", healthQuery: "select... | sqlite_healthcheck_should |
csharp | graphql-dotnet__graphql-dotnet | src/GraphQL/Validation/Errors/ArgumentsOfCorrectTypeError.cs | {
"start": 133,
"end": 851
} | public class ____ : ValidationError
{
internal const string NUMBER = "5.6.1";
/// <summary>
/// Initializes a new instance with the specified properties.
/// </summary>
public ArgumentsOfCorrectTypeError(ValidationContext context, GraphQLArgument node, string verboseErrors)
: base(context.D... | ArgumentsOfCorrectTypeError |
csharp | unoplatform__uno | src/Uno.UI/UI/Xaml/DragDrop/DropCompletedEventArgs.cs | {
"start": 155,
"end": 684
} | public partial class ____ : RoutedEventArgs
{
internal DropCompletedEventArgs(UIElement originalSource, CoreDragInfo info, DataPackageOperation result)
: base(originalSource)
{
Info = info;
DropResult = result;
CanBubbleNatively = false;
}
/// <summary>
/// Get access to the shared data, for in... | DropCompletedEventArgs |
csharp | dotnet__extensions | test/Generators/Microsoft.Gen.Logging/Unit/ParserTests.LogProperties.cs | {
"start": 4533,
"end": 4568
} | struct ____ {{ }}
| MyStruct |
csharp | MonoGame__MonoGame | MonoGame.Framework/Content/ContentReaders/SByteReader.cs | {
"start": 364,
"end": 632
} | internal class ____ : ContentTypeReader<sbyte>
{
public SByteReader()
{
}
protected internal override sbyte Read(ContentReader input, sbyte existingInstance)
{
return input.ReadSByte();
}
}
}
| SByteReader |
csharp | dotnet__machinelearning | src/Microsoft.ML.Data/TrainCatalog.cs | {
"start": 7116,
"end": 16138
} | public sealed class ____ : CatalogInstantiatorBase
{
internal BinaryClassificationTrainers(BinaryClassificationCatalog catalog)
: base(catalog)
{
}
}
/// <summary>
/// Evaluates scored binary classification data.
/// </summary>... | BinaryClassificationTrainers |
csharp | CommunityToolkit__dotnet | tests/CommunityToolkit.Mvvm.SourceGenerators.UnitTests/Test_SourceGeneratorsCodegen.cs | {
"start": 77572,
"end": 77986
} | partial class ____ : ObservableObject
{
[ObservableProperty]
[property: DefaultValue(NegativeEnum1.Problem)]
[property: DefaultValue(NegativeEnum2.Problem)]
[property: DefaultValue(NegativeEnum3.Problem)]
[property: DefaultValue... | MyViewModel |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage_.cs | {
"start": 243,
"end": 311
} | internal partial class ____ : IQueryLanguage
{
}
}
| QueryLanguage |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/src/Execution/Processing/SelectionSetOptimizerContext.cs | {
"start": 295,
"end": 5198
} | struct ____
{
private readonly OperationCompiler _compiler;
private readonly OperationCompiler.CompilerContext _compilerContext;
private readonly Dictionary<Selection, OperationCompiler.SelectionSetInfo[]> _selectionLookup;
private readonly CreateFieldPipeline _createFieldPipeline;
/// <summary>
... | SelectionSetOptimizerContext |
csharp | mongodb__mongo-csharp-driver | src/MongoDB.Driver.Encryption/StatusSafeHandle.cs | {
"start": 916,
"end": 1748
} | internal class ____ : SafeHandle
{
private StatusSafeHandle()
: base(IntPtr.Zero, true)
{
}
private StatusSafeHandle(IntPtr ptr)
: base(ptr, false)
{
}
public static StatusSafeHandle FromIntPtr(IntPtr ptr)
{
return... | StatusSafeHandle |
csharp | unoplatform__uno | src/Uno.Foundation/Uno.Core.Extensions/Uno.Core.Extensions.Equality/IKeyEquatable.cs | {
"start": 1046,
"end": 1702
} | internal interface ____
{
/// <summary>
/// Gets the hash code of the key of this object.
/// </summary>
/// <returns>A hash code for the current object's key.</returns>
int GetKeyHashCode();
/// <summary>
/// Indicates whether the key of current object is equal to another object's key of the same type.... | IKeyEquatable |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.Localization.Core/LocalizationPermissions.cs | {
"start": 78,
"end": 232
} | public static class ____
{
public static readonly Permission ManageCultures = new("ManageCultures", "Manage supported culture");
}
| LocalizationPermissions |
csharp | microsoft__garnet | libs/server/Resp/IRespSerializable.cs | {
"start": 239,
"end": 508
} | public interface ____
{
/// <summary>
/// Serializes the current object to RESP format
/// </summary>
/// <returns>Serialized value in RESP format</returns>
void ToRespFormat(ref RespMemoryWriter writer);
}
} | IRespSerializable |
csharp | ShareX__ShareX | ShareX.UploadersLib/Controls/AccountTypeControl.Designer.cs | {
"start": 37,
"end": 2554
} | partial class ____
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if man... | AccountTypeControl |
csharp | unoplatform__uno | src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Media_Animation/SetTarget_After_Start.cs | {
"start": 342,
"end": 2680
} | public partial class ____ : SampleControlUITestBase
{
[Test]
[AutoRetry]
public void When_Target_Is_Set_After_Start()
{
Run("UITests.Shared.Windows_UI_Xaml_Media_Animation.SetTargetProperty");
var playBtn = _app.Marked("playButton");
var animatedRect = _app.Query("AnimatedRect");
var animatedRectR... | SetTarget_After_Start |
csharp | unoplatform__uno | src/Uno.UI.Tests/BinderTests/Given_Binder.TargetNullValue.cs | {
"start": 3172,
"end": 3615
} | public class ____ : TestConverter
{
public const string ConverterNullReplacement = "converted from null";
public override object Convert(object value, Type targetType, object parameter, string culture)
{
ConvertHitCount++;
return value ?? ConverterNullReplacement;
}
public override object Con... | NeverNullConverter |
csharp | dotnet__aspire | src/Aspire.Hosting.Docker/api/Aspire.Hosting.Docker.cs | {
"start": 26646,
"end": 26985
} | partial class ____
{
[YamlDotNet.Serialization.YamlMember(Alias = "hard")]
public int? Hard { get { throw null; } set { } }
[YamlDotNet.Serialization.YamlMember(Alias = "soft")]
public int? Soft { get { throw null; } set { } }
}
[YamlDotNet.Serialization.YamlSerializable]
... | Ulimit |
csharp | dotnet__aspnetcore | src/Mvc/test/Mvc.IntegrationTests/ComplexTypeIntegrationTestBase.cs | {
"start": 130574,
"end": 130760
} | private class ____
{
[ModelBinder(typeof(SuccessfulModelBinder))]
public bool IsBound { get; set; }
public LoopyModel2 Inner { get; set; }
}
| LoopyModel1 |
csharp | dotnet__aspnetcore | src/Mvc/test/WebSites/RazorPagesWebSite/ModelWithPageFilter.cs | {
"start": 599,
"end": 1040
} | public class ____ : Attribute, IPageFilter
{
public void OnPageHandlerSelected(PageHandlerSelectedContext context)
{
context.HandlerMethod = context.ActionDescriptor.HandlerMethods.First(m => m.Name == "Edit");
}
public void OnPageHandlerExecuting(PageHandlerExecutingContext context)
{
... | HandlerChangingPageFilterAttribute |
csharp | ChilliCream__graphql-platform | src/Nitro/CommandLine/src/CommandLine.Cloud/Generated/ApiClient.Client.cs | {
"start": 1160286,
"end": 1160872
} | public partial interface ____
{
/// <summary>
/// A cursor for use in pagination.
/// </summary>
public global::System.String Cursor { get; }
/// <summary>
/// The item at the end of the edge.
/// </summary>
public global::ChilliCream.Nitro.CommandLine... | IListMockCommand_MockEdge |
csharp | dotnet__efcore | src/EFCore.Relational/Query/SqlExpressions/ColumnExpression.cs | {
"start": 544,
"end": 5339
} | public class ____ : SqlExpression
{
private static ConstructorInfo? _quotingConstructor;
/// <summary>
/// Creates a new instance of the <see cref="ColumnExpression" /> class.
/// </summary>
/// <param name="name">The name of the column.</param>
/// <param name="tableAlias">The alias of the... | ColumnExpression |
csharp | icsharpcode__ILSpy | ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.cs | {
"start": 1765,
"end": 1934
} | internal class ____<T>
{
public GenericClassWithMultipleCtors()
{
}
public GenericClassWithMultipleCtors(int x)
{
}
}
| GenericClassWithMultipleCtors |
csharp | domaindrivendev__Swashbuckle.AspNetCore | test/Swashbuckle.AspNetCore.TestSupport/Fixtures/Enums.cs | {
"start": 208,
"end": 242
} | public enum ____:int
{
}
| EmptyIntEnum |
csharp | pythonnet__pythonnet | src/embed_tests/Events.cs | {
"start": 856,
"end": 1240
} | public class ____
{
internal static int alive;
public event EventHandler LeakEvent;
private Array arr; // dummy array to exacerbate memory leak
public ClassWithEventHandler()
{
Interlocked.Increment(ref alive);
this.arr = new int[800];
}
~ClassWithEventHandler()
{
... | ClassWithEventHandler |
csharp | unoplatform__uno | src/SourceGenerators/Uno.UI.SourceGenerators/BindableTypeProviders/BindableTypeProvidersGenerationTask.cs | {
"start": 7501,
"end": 7987
} | private class ____ : IEqualityComparer<IPropertySymbol>
{
public bool Equals(IPropertySymbol? x, IPropertySymbol? y)
{
return x?.Name == y?.Name;
}
public int GetHashCode(IPropertySymbol obj)
{
return obj.Name.GetHashCode();
}
}
private void GenerateMetadata(IndentedStringBu... | PropertyNameEqualityComparer |
csharp | smartstore__Smartstore | src/Smartstore.Web/Areas/Admin/Models/Messages/QueuedEmailModel.cs | {
"start": 285,
"end": 1765
} | public class ____ : EntityModelBase
{
[LocalizedDisplay("*Id")]
public override int Id { get; set; }
[LocalizedDisplay("*Priority")]
public int Priority { get; set; }
[LocalizedDisplay("*From")]
public string From { get; set; }
[LocalizedDisplay("*To")]
... | QueuedEmailModel |
csharp | unoplatform__uno | src/Uno.UI/UI/Xaml/Controls/ItemsStackPanel/IVirtualizingPanel.cs | {
"start": 380,
"end": 625
} | internal interface ____
{
/// <summary>
/// Get a native layout object with the same layout configuration as the panel and is databound to the panel's properties.
/// </summary>
VirtualizingPanelLayout GetLayouter();
}
}
| IVirtualizingPanel |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack/Host/Handlers/GenericHandler.cs | {
"start": 218,
"end": 4716
} | public class ____ : ServiceStackHandlerBase, IRequestHttpHandler
{
public GenericHandler(string contentType, RequestAttributes handlerAttributes, Feature format)
{
this.HandlerContentType = contentType;
this.ContentTypeAttribute = ContentFormat.GetEndpointAttributes(contentType);
this.Ha... | GenericHandler |
csharp | dotnet__machinelearning | src/Microsoft.ML.Transforms/OneHotHashEncoding.cs | {
"start": 3507,
"end": 3694
} | class ____ a merger of <see cref="HashingTransformer.Options"/> and <see cref="KeyToVectorMappingTransformer.Options"/>
/// with join option removed
/// </summary>
| is |
csharp | LibreHardwareMonitor__LibreHardwareMonitor | LibreHardwareMonitor/UI/NodeToolTipProvider.cs | {
"start": 381,
"end": 542
} | internal class ____ : IToolTipProvider
{
public string GetToolTip(TreeNodeAdv node, NodeControl nodeControl) => (node.Tag as Node)?.ToolTip;
} | NodeToolTipProvider |
csharp | SixLabors__ImageSharp | tests/ImageSharp.Tests/ColorProfiles/YccKTests.cs | {
"start": 276,
"end": 1246
} | public class ____
{
[Fact]
public void YccKConstructorAssignsFields()
{
const float y = .75F;
const float cb = .5F;
const float cr = .25F;
const float k = .125F;
YccK ycckValue = new(y, cb, cr, k);
Assert.Equal(y, ycckValue.Y);
Assert.Equal(cb, ycckVa... | YccKTests |
csharp | Humanizr__Humanizer | src/Humanizer/DateTimeHumanizeStrategy/IDateOnlyHumanizeStrategy.cs | {
"start": 208,
"end": 487
} | public interface ____
{
/// <summary>
/// Calculates the distance of time in words between two provided dates used for DateOnly.Humanize
/// </summary>
string Humanize(DateOnly input, DateOnly comparisonBase, CultureInfo? culture);
}
#endif
| IDateOnlyHumanizeStrategy |
csharp | neuecc__MessagePack-CSharp | tests/MessagePack.SourceGenerator.Tests/StringKeyedFormatterTests.cs | {
"start": 5113,
"end": 5695
} | public class ____
{
public int A { get; set; }
public string B { get; set; }
public MyMessagePackObject(int a, string b)
{
A = a;
B = b;
}
}
}
""";
await VerifyCS.Test.RunDefaultAsync(this.testOutputHelper, testSource);
}
[Fact]
... | MyMessagePackObject |
csharp | getsentry__sentry-dotnet | src/Sentry/StringOrRegex.cs | {
"start": 238,
"end": 1939
} | public class ____
{
internal readonly Regex? _regex;
internal readonly string? _string;
/// <summary>
/// Constructs a <see cref="StringOrRegex"/> instance.
/// </summary>
/// <param name="stringOrRegex">The prefix or regular expression pattern to match on.</param>
public StringOrRegex(stri... | StringOrRegex |
csharp | MassTransit__MassTransit | tests/MassTransit.EntityFrameworkIntegration.Tests/ChoirStatePessimisticSagaDbContext.cs | {
"start": 180,
"end": 556
} | class ____ : SagaDbContext
{
public ChoirStatePessimisticSagaDbContext(string nameOrConnectionString)
: base(nameOrConnectionString)
{
}
protected override IEnumerable<ISagaClassMap> Configurations
{
get { yield return new EntityFrameworkChoirStateMap... | ChoirStatePessimisticSagaDbContext |
csharp | EventStore__EventStore | src/KurrentDB.Native/TransactionLog/Unbuffered/INativeFile.cs | {
"start": 325,
"end": 978
} | public interface ____ {
uint GetDriveSectorSize(string path);
long GetPageSize(string path);
void SetFileSize(SafeFileHandle handle, long count);
unsafe void Write(SafeFileHandle handle, byte* buffer, uint count, ref int written);
unsafe int Read(SafeFileHandle handle, byte* buffer, int offset, int count);
long G... | INativeFile |
csharp | dotnet__aspnetcore | src/Shared/ServerInfrastructure/MemoryPoolExtensions.cs | {
"start": 290,
"end": 845
} | internal static class ____
{
/// <summary>
/// Computes a minimum segment size
/// </summary>
/// <param name="pool"></param>
/// <returns></returns>
public static int GetMinimumSegmentSize(this MemoryPool<byte> pool)
{
if (pool == null)
{
return 4096;
}
... | MemoryPoolExtensions |
csharp | dotnet__efcore | test/EFCore.Specification.Tests/TestModels/ChangedChangingMonsterContext.cs | {
"start": 36127,
"end": 37363
} | public class ____ : NotificationEntity, ISupplier
{
private int _supplierId;
private string _name;
private ICollection<IProduct> _products;
private ISupplierLogo _logo;
private ICollection<IBackOrderLine> _backOrderLines;
public void InitializeCollections()
{... | Supplier |
csharp | ServiceStack__ServiceStack.Text | src/ServiceStack.Text/AutoMappingUtils.cs | {
"start": 48238,
"end": 50600
} | internal static class ____
{
public static GetMemberDelegate CreateTypeConverter(Type fromType, Type toType)
{
if (fromType == toType)
return null;
var converter = AutoMappingUtils.GetConverter(fromType, toType);
if (converter != null)... | TypeConverter |
csharp | icsharpcode__ILSpy | ICSharpCode.Decompiler.Tests/TestCases/Correctness/MemberLookup.cs | {
"start": 1211,
"end": 1509
} | public class ____
{
static readonly Action delegateConstruction = (new Child1() as Base1).TestAction;
public static int Main()
{
Console.WriteLine((new Child1() as Base1).Field);
Child1.Test();
delegateConstruction();
new Child2b().CallTestMethod();
return 0;
}
| MemberLookup |
csharp | ChilliCream__graphql-platform | src/Nitro/CommandLine/src/CommandLine.Cloud/Generated/ApiClient.Client.cs | {
"start": 826536,
"end": 828121
} | public partial class ____ : global::System.IEquatable<ListClientCommandQuery_Node_GraphQLOutputFieldDefinition>, IListClientCommandQuery_Node_GraphQLOutputFieldDefinition
{
public ListClientCommandQuery_Node_GraphQLOutputFieldDefinition()
{
}
public virtual global::System.Boolean Eq... | ListClientCommandQuery_Node_GraphQLOutputFieldDefinition |
csharp | microsoft__PowerToys | src/modules/MouseWithoutBorders/App/Class/MyKnownBitmap.cs | {
"start": 890,
"end": 1078
} | internal class ____
{
private const int BITMAP_FILE_HEADER_SIZE = 14;
[StructLayout(LayoutKind.Sequential, Pack = 1, Size = BITMAP_FILE_HEADER_SIZE)]
| MyKnownBitmap |
csharp | EventStore__EventStore | src/KurrentDB.Projections.Core.Tests/Services/core_projection/checkpoint_manager/multi_stream/when_starting_with_prerecorded_events_after_the_last_checkpoint.cs | {
"start": 645,
"end": 5632
} | public class ____<TLogFormat, TStreamId> :
TestFixtureWithMultiStreamCheckpointManager<TLogFormat, TStreamId> {
private readonly CheckpointTag _tag1 =
CheckpointTag.FromStreamPositions(0, new Dictionary<string, long> { { "a", 0 }, { "b", 0 }, { "c", 1 } });
private readonly CheckpointTag _tag2 =
CheckpointTag.F... | when_starting_with_prerecorded_events_after_the_last_checkpoint |
csharp | abpframework__abp | framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs | {
"start": 420,
"end": 2733
} | public class ____ : IViewComponentHelper, IViewContextAware, ITransientDependency
{
protected AbpWidgetOptions Options { get; }
protected IPageWidgetManager PageWidgetManager { get; }
protected DefaultViewComponentHelper DefaultViewComponentHelper { get; }
public AbpViewComponentHelper(
Default... | AbpViewComponentHelper |
csharp | dotnet__extensions | test/Libraries/Microsoft.AspNetCore.Testing.Tests/TestResources/Startup.cs | {
"start": 910,
"end": 937
} | class ____ testing
}
}
| for |
csharp | AutoMapper__AutoMapper | src/UnitTests/BidirectionalRelationships.cs | {
"start": 11762,
"end": 12329
} | public class ____ : IEquatable<Parent>
{
public Guid Id { get; private set; }
public string Name { get; set; }
public List<Child> Children { get; set; }
public Parent()
{
Id = Guid.NewGuid();
Children = new List<Child>();
}
public bo... | Parent |
csharp | JamesNK__Newtonsoft.Json | Src/Newtonsoft.Json.Tests/TestObjects/BaseWithContract.cs | {
"start": 1269,
"end": 1690
} | public class ____
{
[DataMember(Name = "VirtualWithDataMemberBase")]
public virtual string VirtualWithDataMember { get; set; }
[DataMember]
public virtual string Virtual { get; set; }
[DataMember(Name = "WithDataMemberBase")]
public string WithDataMember { get; set;... | BaseWithContract |
csharp | smartstore__Smartstore | src/Smartstore.Core/Checkout/Payment/Domain/PaymentMethod.cs | {
"start": 365,
"end": 1802
} | internal class ____ : IEntityTypeConfiguration<PaymentMethod>
{
public void Configure(EntityTypeBuilder<PaymentMethod> builder)
{
builder
.HasMany(c => c.RuleSets)
.WithMany(c => c.PaymentMethods)
.UsingEntity<Dictionary<string, object>>(
... | PaymentMethodMap |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Internal/Either.Generic.cs | {
"start": 301,
"end": 789
} | internal abstract class ____<TLeft, TRight>
{
private Either()
{
}
public static Either<TLeft, TRight> CreateLeft(TLeft value) => new Left(value);
public static Either<TLeft, TRight> CreateRight(TRight value) => new Right(value);
public abstract TResult Switch<TRes... | Either |
csharp | dotnet__maui | src/Controls/src/Core/SwipeView/SwipeEventArgs.cs | {
"start": 759,
"end": 1209
} | public class ____ : EventArgs
{
public OpenRequestedEventArgs(OpenSwipeItem openSwipeItem, bool animated)
{
OpenSwipeItem = openSwipeItem;
Animated = animated;
}
public OpenSwipeItem OpenSwipeItem { get; set; }
public bool Animated { get; set; }
}
/// <include file="../../docs/Microsoft.Maui.Contro... | OpenRequestedEventArgs |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Base/Visual.cs | {
"start": 998,
"end": 29641
} | public partial class ____ : StyledElement, IAvaloniaListItemValidator<Visual>
{
internal static int RootedVisualChildrenCount { get; private set; }
/// <summary>
/// Defines the <see cref="Bounds"/> property.
/// </summary>
public static readonly DirectProperty<Visual, Rect>... | Visual |
csharp | DuendeSoftware__IdentityServer | identity-server/src/IdentityServer/Services/Default/KeyManagement/X509KeyContainer.cs | {
"start": 516,
"end": 4664
} | public class ____ : KeyContainer
#pragma warning restore CA1001
{
private const string ServerAuthenticationOid = "1.3.6.1.5.5.7.3.1";
/// <summary>
/// Constructor for X509KeyContainer.
/// </summary>
public X509KeyContainer() => HasX509Certificate = true;
/// <summary>
/// Constructor for... | X509KeyContainer |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack.Server/ApiKeysFeature.cs | {
"start": 13350,
"end": 13528
} | public class ____(ApiKeysFeature feature) : IApiKeyResolver
{
public string? GetApiKeyToken(IRequest req)
{
return feature.GetApiKeyToken(req);
}
}
| ApiKeyResolver |
csharp | reactiveui__ReactiveUI | src/ReactiveUI/Platforms/uikit-common/ReactiveNavigationController.cs | {
"start": 972,
"end": 6042
} | public abstract class ____ : UINavigationController, IReactiveNotifyPropertyChanged<ReactiveNavigationController>, IHandleObservableErrors, IReactiveObject, ICanActivate, IActivatableView
{
private readonly Subject<Unit> _activated = new();
private readonly Subject<Unit> _deactivated = new();
/// <summary>... | ReactiveNavigationController |
csharp | dotnet-architecture__eShopOnWeb | tests/FunctionalTests/Web/Pages/Basket/BasketPageCheckout.cs | {
"start": 146,
"end": 1823
} | public class ____ : IClassFixture<TestApplication>
{
public BasketPageCheckout(TestApplication factory)
{
Client = factory.CreateClient(new WebApplicationFactoryClientOptions
{
AllowAutoRedirect = true
});
}
public HttpClient Client { get; }
[Fact]
public as... | BasketPageCheckout |
csharp | protobuf-net__protobuf-net | src/Examples/DictionaryTests.cs | {
"start": 8390,
"end": 15760
} | public class ____
{
const string ExpectedHex = "0A-11-0A-03-61-62-63-12-0A-0A-03-64-65-66-12-03-67-68-69";
/*
0A = field 1, type String
11 = length 17
0A = field 1, type String
03 = length 3
61-62-63 = "abc"
12 = field 2, type String
0A = length 10
0A = field 1, type String
03 = le... | NestedDictionaryTests |
csharp | DuendeSoftware__IdentityServer | identity-server/src/IdentityServer/Events/InvalidIdentityProviderConfiguration.cs | {
"start": 288,
"end": 1314
} | public class ____ : Event
{
/// <summary>
/// Initializes a new instance of the <see cref="InvalidIdentityProviderConfiguration" /> class.
/// </summary>
public InvalidIdentityProviderConfiguration(IdentityProvider idp, string errorMessage)
: base(EventCategories.Error,
"Invalid Iden... | InvalidIdentityProviderConfiguration |
csharp | npgsql__npgsql | src/Npgsql.Json.NET/Internal/JsonNetTypeInfoResolverFactory.cs | {
"start": 158,
"end": 457
} | sealed class ____(JsonSerializerSettings? settings = null) : PgTypeInfoResolverFactory
{
public override IPgTypeInfoResolver CreateResolver() => new Resolver(settings);
public override IPgTypeInfoResolver? CreateArrayResolver() => new ArrayResolver(settings);
| JsonNetTypeInfoResolverFactory |
csharp | microsoft__PowerToys | src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/QueryTests.cs | {
"start": 446,
"end": 11501
} | public class ____
{
private static Mock<Main> _main;
private static Mock<IPublicAPI> _api;
[TestInitialize]
public void Initialize()
{
_api = new Mock<IPublicAPI>();
_api.Setup(api => api.ChangeQuery(It.IsAny<string>(), It.IsAny<bool>())).Verifiable()... | QueryTests |
csharp | nuke-build__nuke | source/Nuke.Build/CICD/InvokeBuildServerConfigurationGenerationAttribute.cs | {
"start": 389,
"end": 2359
} | public class ____
: BuildServerConfigurationGenerationAttributeBase, IOnBuildCreated
{
public void OnBuildCreated(IReadOnlyCollection<ExecutableTarget> executableTargets)
{
if (Build.IsServerBuild || Build.IsInterceptorExecution)
return;
var hasConfigurationChanged = GetGenerato... | InvokeBuildServerConfigurationGenerationAttribute |
csharp | dotnet__aspnetcore | src/Mvc/Mvc.Api.Analyzers/test/TestFiles/AddResponseTypeAttributeCodeFixProviderIntegrationTest/CodeFixAddsFullyQualifiedProducesResponseType.Output.cs | {
"start": 273,
"end": 366
} | public class ____ : ControllerBase
{
}
}
namespace TestApp._OUTPUT_
{
| BaseController |
csharp | EventStore__EventStore | src/KurrentDB.Core.Tests/Services/Storage/WriteEventsToIndexScenario.cs | {
"start": 760,
"end": 6716
} | public abstract class ____<TLogFormat, TStreamId> : SpecificationWithDirectoryPerTestFixture {
protected SynchronousScheduler _publisher;
protected ITransactionFileReader _tfReader;
protected ITableIndex<TStreamId> _tableIndex;
protected IIndexBackend<TStreamId> _indexBackend;
protected IValueLookup<TStreamId> _st... | WriteEventsToIndexScenario |
csharp | dotnet__aspnetcore | src/Components/Endpoints/test/Binding/FormDataMetadataFactoryTests.cs | {
"start": 28926,
"end": 29032
} | public class ____
{
public string Name { get; set; }
public Address Address { get; set; }
}
| Warehouse |
csharp | dotnet__aspire | src/Aspire.Hosting.Kubernetes/Resources/PodV1.cs | {
"start": 812,
"end": 1232
} | public sealed class ____() : BaseKubernetesResource("v1", "Pod")
{
/// <summary>
/// Represents the specification for the Kubernetes Pod resource.
/// Contains detailed configuration for the behavior and lifecycle management
/// of the Kubernetes Pod. This property is of type <see cref="PodSpecV1"/>.
... | Pod |
csharp | dotnet__extensions | test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAIEmbeddingGeneratorTests.cs | {
"start": 511,
"end": 44871
} | public class ____
{
[Fact]
public void AsIEmbeddingGenerator_InvalidArgs_Throws()
{
Assert.Throws<ArgumentNullException>("embeddingClient", () => ((EmbeddingClient)null!).AsIEmbeddingGenerator());
}
[Fact]
public void AsIEmbeddingGenerator_OpenAIClient_ProducesExpectedMetadata()
{
... | OpenAIEmbeddingGeneratorTests |
csharp | cake-build__cake | src/Cake.Core.Tests/Unit/IO/PathCollapserTests.cs | {
"start": 5806,
"end": 7074
} | public sealed class ____
{
[Fact]
public void Should_Collapse_Path_With_Windows_Root()
{
// Given, When
var path = PathCollapser.Collapse(new DirectoryPath("c:/hello/temp/test/../../world"));
// Then... | WithPathsInWindowsFormat |
csharp | grandnode__grandnode2 | src/Business/Grand.Business.Authentication/Startup/StartupApplication.cs | {
"start": 341,
"end": 1406
} | public class ____ : IStartupApplication
{
public void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
services.AddScoped<IGrandAuthenticationService, CookieAuthenticationService>();
services.AddScoped<ICookieOptionsFactory, CookieOptionsFactory>();
services... | StartupApplication |
csharp | unoplatform__uno | src/Uno.UI/UI/Xaml/Controls/ItemContainer/ItemContainer.cs | {
"start": 529,
"end": 20399
} | partial class ____ : Control
{
// Change to 'true' to turn on debugging outputs in Output window
//bool ItemContainerTrace::s_IsDebugOutputEnabled{ false };
//bool ItemContainerTrace::s_IsVerboseDebugOutputEnabled{ false };
// Keeps track of the one ItemContainer with the mouse pointer over, if any.
// The OnPoin... | ItemContainer |
csharp | dotnet__orleans | test/TesterInternal/GrainDirectory/DistributedGrainDirectoryTests.cs | {
"start": 334,
"end": 856
} | public sealed class ____(DefaultClusterFixture fixture, ITestOutputHelper output)
: GrainDirectoryTests<IGrainDirectory>(output), IClassFixture<DefaultClusterFixture>
{
private readonly TestCluster _testCluster = fixture.HostedCluster;
private InProcessSiloHandle Primary => (InProcessSiloHandle)_testCluster... | DefaultGrainDirectoryTests |
csharp | microsoft__semantic-kernel | dotnet/test/VectorData/Qdrant.ConformanceTests/TypeTests/QdrantDataTypeTests.cs | {
"start": 279,
"end": 1097
} | public class ____(QdrantDataTypeTests.Fixture fixture)
: DataTypeTests<Guid, DataTypeTests<Guid>.DefaultRecord>(fixture), IClassFixture<QdrantDataTypeTests.Fixture>
{
// Qdrant doesn't seem to support filtering on float/double or string ararys,
// https://qdrant.tech/documentation/concepts/filtering/#match
... | QdrantDataTypeTests |
csharp | AutoMapper__AutoMapper | src/UnitTests/Mappers/StringDictionaryMapperTests.cs | {
"start": 9269,
"end": 9515
} | public class ____ : SomeBase
{
public override int X { get { return _x + 10; } }
public override int Y { get { return _y + 20; } }
private int _z = 300;
public int Z { get { return _z + 30; } }
}
| SomeBody |
csharp | Xabaril__AspNetCore.Diagnostics.HealthChecks | src/CallerArgumentExpressionAttribute.cs | {
"start": 1036,
"end": 2088
} | internal static class ____
{
/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null.</summary>
/// <param name="argument">The reference type argument to validate as non-null.</param>
/// <param name="throwOnEmptyString">Only applicable to strings.</param>
/// <... | Guard |
csharp | LibreHardwareMonitor__LibreHardwareMonitor | LibreHardwareMonitor/UI/NotifyIconAdv.cs | {
"start": 25335,
"end": 25631
} | public enum ____ : int
{
Message = 0x1,
Icon = 0x2,
Tip = 0x4,
State = 0x8,
Info = 0x10
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
| NotifyIconDataFlags |
csharp | ChilliCream__graphql-platform | src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsIntrospectionTest.Client.cs | {
"start": 144815,
"end": 145728
} | public partial interface ____ : IIntrospectionQuery___schema_Types_Interfaces_OfType_OfType
{
}
// StrawberryShake.CodeGeneration.CSharp.Generators.ResultInterfaceGenerator
/// <summary>
/// The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represen... | IIntrospectionQuery___schema_Types_Interfaces_OfType_OfType___Type |
csharp | MiniProfiler__dotnet | src/MiniProfiler.Providers.PostgreSql/PostgreSqlStorage.cs | {
"start": 532,
"end": 884
} | class ____ the specified connection string.
/// </summary>
/// <param name="connectionString">The connection string to use.</param>
public PostgreSqlStorage(string connectionString) : base(connectionString) { /* base call */ }
/// <summary>
/// Initializes a new instance of the ... | with |
csharp | dotnet__aspire | src/Tools/ConfigurationSchemaGenerator/ConfigurationBindingGenerator.ForSchemaGeneration.cs | {
"start": 688,
"end": 998
} | internal sealed class ____
{
public bool LanguageVersionIsSupported { get; } = true;
public KnownTypeSymbols? TypeSymbols { get; }
public CompilationData(KnownTypeSymbols? typeSymbols)
{
TypeSymbols = typeSymbols;
}
}
internal sealed | CompilationData |
csharp | JamesNK__Newtonsoft.Json | Src/Newtonsoft.Json.Tests/Serialization/CamelCaseNamingStrategyTests.cs | {
"start": 9009,
"end": 9986
} | public class ____
{
public string Prop1 { get; set; }
public string Prop2 { get; set; }
[JsonProperty(NamingStrategyType = typeof(DefaultNamingStrategy))]
public string HasAttributeNamingStrategy { get; set; }
}
[Test]
public void JsonObje... | ContainerAttributeNamingStrategyTestClass |
csharp | RicoSuter__NJsonSchema | src/NJsonSchema.CodeGeneration/CodeGeneratorSettingsBase.cs | {
"start": 554,
"end": 1877
} | public abstract class ____
{
/// <summary>Initializes a new instance of the <see cref="CodeGeneratorSettingsBase"/> class.</summary>
#pragma warning disable CS8618
public CodeGeneratorSettingsBase()
#pragma warning restore CS8618
{
GenerateDefaultValues = true;
Exclud... | CodeGeneratorSettingsBase |
csharp | bitwarden__server | src/Api/SecretsManager/Models/Request/ServiceAccountGrantedPoliciesRequestModel.cs | {
"start": 192,
"end": 1077
} | public class ____
{
public required IEnumerable<GrantedAccessPolicyRequest> ProjectGrantedPolicyRequests { get; set; }
public ServiceAccountGrantedPolicies ToGrantedPolicies(ServiceAccount serviceAccount)
{
var projectGrantedPolicies = ProjectGrantedPolicyRequests
.Select(x => x.ToServi... | ServiceAccountGrantedPoliciesRequestModel |
csharp | unoplatform__uno | src/SourceGenerators/System.Xaml.Tests/Test/System.Xaml/TestedTypes.cs | {
"start": 9568,
"end": 9777
} | public class ____
{
public ListWrapper ()
{
Items = new List<int> ();
}
public ListWrapper (List<int> items)
{
Items = items;
}
public List<int> Items { get; private set; }
}
| ListWrapper |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/CancellationTests.cs | {
"start": 5826,
"end": 5868
} | public record ____(int Id);
}
| Product |
csharp | dotnet__maui | src/Controls/tests/ManualTests/Tests/Commands/G6.xaml.cs | {
"start": 305,
"end": 437
} | public partial class ____ : ContentPage
{
public G6()
{
InitializeComponent();
BindingContext = new MainPageViewModel();
}
}
| G6 |
csharp | abpframework__abp | framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/Repositories/Repository_Specifications_Tests.cs | {
"start": 77,
"end": 183
} | public class ____ : Repository_Specifications_Tests<AbpMemoryDbTestModule>
{
}
| Repository_Specifications_Tests |
csharp | nuke-build__nuke | source/Nuke.Common/Tools/Pulumi/Pulumi.Generated.cs | {
"start": 535650,
"end": 548991
} | partial class ____
{
#region Name
/// <inheritdoc cref="PulumiStackTagSetSettings.Name"/>
[Pure] [Builder(Type = typeof(PulumiStackTagSetSettings), Property = nameof(PulumiStackTagSetSettings.Name))]
public static T SetName<T>(this T o, string v) where T : PulumiStackTagSetSettings => o.Modify(b => b.S... | PulumiStackTagSetSettingsExtensions |
csharp | dotnet__maui | src/Essentials/src/Share/Share.macos.cs | {
"start": 195,
"end": 1581
} | partial class ____ : IShare
{
Task PlatformRequestAsync(ShareTextRequest request)
{
var items = new List<NSObject>();
if (!string.IsNullOrWhiteSpace(request.Title))
items.Add(new NSString(request.Title));
if (!string.IsNullOrWhiteSpace(request.Text))
items.Add(new NSString(request.Text));
if (!... | ShareImplementation |
csharp | moq__moq4 | src/Moq.Tests/RecursiveMocksFixture.cs | {
"start": 236,
"end": 9388
} | public class ____
{
[Fact]
public void CreatesMockForAccessedProperty()
{
var mock = new Mock<IFoo>();
mock.SetupGet(m => m.Bar.Value).Returns(5);
Assert.Equal(5, mock.Object.Bar.Value);
}
[Fact]
public void RetrievesSameMockForP... | RecursiveMocksFixture |
csharp | ShareX__ShareX | ShareX.HelpersLib/Controls/ExportImportControl.Designer.cs | {
"start": 35,
"end": 6420
} | partial class ____
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if man... | ExportImportControl |
csharp | aspnetboilerplate__aspnetboilerplate | src/Abp/IHasErrorCode.cs | {
"start": 21,
"end": 96
} | public interface ____
{
int Code { get; set; }
}
} | IHasErrorCode |
csharp | nopSolutions__nopCommerce | src/Plugins/Nop.Plugin.Misc.Zettle/Controllers/ZettleAdminController.cs | {
"start": 868,
"end": 16567
} | public class ____ : BasePluginController
{
#region Fields
protected readonly CurrencySettings _currencySettings;
protected readonly IBaseAdminModelFactory _baseAdminModelFactory;
protected readonly ICurrencyService _currencyService;
protected readonly IDateTimeHelper _dateTimeHelper;
protected ... | ZettleAdminController |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack.Client/AuthDtos.cs | {
"start": 35729,
"end": 35912
} | public class ____ : IGet, IReturn<AdminGetJobProgressResponse>
{
[ValidateGreaterThan(0)]
public long Id { get; set; }
public int? LogStart { get; set; }
}
| AdminGetJobProgress |
csharp | dotnet__efcore | test/EFCore.Specification.Tests/ModelBuilding/GiantModel.cs | {
"start": 122539,
"end": 122756
} | public class ____
{
public int Id { get; set; }
public RelatedEntity565 ParentEntity { get; set; }
public IEnumerable<RelatedEntity567> ChildEntities { get; set; }
}
| RelatedEntity566 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.