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 | fluentassertions__fluentassertions | Tests/FluentAssertions.Specs/AssemblyInitializer.cs | {
"start": 227,
"end": 451
} | public static class ____
{
public static void AcknowledgeSoftWarning()
{
// Suppress the soft warning about the license requirements for commercial use
License.Accepted = true;
}
}
| AssemblyInitializer |
csharp | NSubstitute__NSubstitute | tests/NSubstitute.Specs/ExtensionsSpecs.cs | {
"start": 2065,
"end": 2340
} | public class ____
{
[Test]
public void Join_strings()
{
var strings = new[] { "hello", "world" };
Assert.That(strings.Join("; "), Is.EqualTo("hello; world"));
}
}
}
} | JoinExtension |
csharp | dotnet__efcore | test/EFCore.Relational.Tests/Extensions/RelationalBuilderExtensionsTest.cs | {
"start": 55479,
"end": 55513
} | private class ____ : Splot;
| Splow |
csharp | AutoMapper__AutoMapper | src/UnitTests/CollectionMapping.cs | {
"start": 16265,
"end": 16861
} | public class ____
{
private IList<string> _myCollection = new List<string>();
public IEnumerable<string> MyCollection => _myCollection;
}
protected override MapperConfiguration CreateConfiguration() => new(cfg =>
cfg.CreateMap<Source, Destination>().ForMember(m => m.MyCollection, op... | Destination |
csharp | dotnet__aspnetcore | src/Http/Routing/test/UnitTests/Template/TemplateMatcherTests.cs | {
"start": 228,
"end": 30907
} | public class ____
{
[Fact]
public void TryMatch_Success()
{
// Arrange
var matcher = CreateMatcher("{controller}/{action}/{id}");
var values = new RouteValueDictionary();
// Act
var match = matcher.TryMatch("/Bank/DoAction/123", values);
// Assert
A... | TemplateMatcherTests |
csharp | dotnet__aspnetcore | src/Mvc/Mvc.ViewFeatures/src/IHtmlGenerator.cs | {
"start": 396,
"end": 30310
} | public interface ____
{
/// <summary>
/// Gets the replacement for '.' in an Id attribute.
/// </summary>
string IdAttributeDotReplacement { get; }
/// <summary>
/// Encodes a value.
/// </summary>
/// <param name="value">The value to encode.</param>
/// <returns>The encoded value.<... | IHtmlGenerator |
csharp | dotnet__aspnetcore | src/Http/Http/src/Internal/ItemsDictionary.cs | {
"start": 3963,
"end": 4068
} | private sealed class ____ : IEnumerator<KeyValuePair<object, object?>>
{
// In own | EmptyEnumerator |
csharp | unoplatform__uno | src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WBOP/ObservablePropertyGenerator_TestRepro.MyViewModel.g.cs | {
"start": 111,
"end": 3352
} | partial class ____
{
/// <inheritdoc cref="_isEnabled"/>
[global::System.CodeDom.Compiler.GeneratedCode("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "8.2.0.0")]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool IsEnabled
{
... | MyViewModel |
csharp | dotnet__aspnetcore | src/Mvc/test/Mvc.IntegrationTests/ServicesModelBinderIntegrationTest.cs | {
"start": 374,
"end": 5818
} | public class ____
{
[Fact]
public async Task BindParameterFromService_WithData_GetsBound()
{
// Arrange
var parameterBinder = ModelBindingTestHelper.GetParameterBinder();
var parameter = new ParameterDescriptor()
{
Name = "Parameter1",
BindingInfo = ne... | ServicesModelBinderIntegrationTest |
csharp | NLog__NLog | src/NLog/Internal/ExceptionHelper.cs | {
"start": 1830,
"end": 7566
} | internal static class ____
{
private const string LoggedKey = "NLog.ExceptionLoggedToInternalLogger";
/// <summary>
/// Mark this exception as logged to the <see cref="InternalLogger"/>.
/// </summary>
/// <param name="exception"></param>
/// <returns></returns>
... | ExceptionHelper |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/CheckMvc/CheckWebGlobalNamespace.dtos.cs | {
"start": 39494,
"end": 39656
} | public partial class ____
: HelloBase<Poco>
{
public virtual string Result { get; set; }
}
[Serializable]
| HelloWithGenericInheritance |
csharp | SixLabors__ImageSharp | tests/ImageSharp.Tests/Memory/DiscontiguousBuffers/MemoryGroupIndex.cs | {
"start": 2460,
"end": 3383
} | internal static class ____
{
public static T GetElementAt<T>(this IMemoryGroup<T> group, MemoryGroupIndex idx)
where T : struct
{
return group[idx.BufferIndex].Span[idx.ElementIndex];
}
public static void SetElementAt<T>(this IMemoryGroup<T> group, MemoryGroupIndex idx, T value)
... | MemoryGroupIndexExtensions |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Controls/RelativePanel.AttachedProperties.cs | {
"start": 85,
"end": 25950
} | public partial class ____
{
static RelativePanel()
{
ClipToBoundsProperty.OverrideDefaultValue<RelativePanel>(true);
AffectsParentArrange<RelativePanel>(
AlignLeftWithPanelProperty, AlignLeftWithProperty, LeftOfProperty,
AlignRightWithPanelPr... | RelativePanel |
csharp | npgsql__npgsql | src/Npgsql/NpgsqlTypeLoadingOptions.cs | {
"start": 3066,
"end": 3636
} | public enum ____
{
/// <summary>
/// No special server compatibility mode is active
/// </summary>
None,
/// <summary>
/// The server is an Amazon Redshift instance.
/// </summary>
[Obsolete("ServerCompatibilityMode.Redshift no longer does anything and can be safely removed.")]
Reds... | ServerCompatibilityMode |
csharp | dotnet__maui | src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.Android.cs | {
"start": 1040,
"end": 24246
} | public partial class ____
{
[Fact(DisplayName = "No crash going back using 'Shell.Current.GoToAsync(\"..\")'")]
public async Task GoingBackUsingGoToAsyncMethod()
{
SetupBuilder();
var page1 = new ContentPage();
var page2Content = new Label { Text = "Test" };
var page2 = new ContentPage { Content = ... | ShellTests |
csharp | dotnet__machinelearning | src/Microsoft.ML.Core/Data/ISchemaBindableMapper.cs | {
"start": 1877,
"end": 2021
} | internal interface ____
{
ISchemaBoundMapper Bind(IHostEnvironment env, RoleMappedSchema schema);
}
/// <summary>
/// This | ISchemaBindableMapper |
csharp | MassTransit__MassTransit | src/MassTransit/Audit/MetadataFactories/DefaultSendMetadataFactory.cs | {
"start": 78,
"end": 1461
} | public class ____ :
ISendMetadataFactory
{
MessageAuditMetadata ISendMetadataFactory.CreateAuditMetadata<T>(SendContext<T> context)
{
return CreateMetadata(context, "Send");
}
MessageAuditMetadata ISendMetadataFactory.CreateAuditMetadata<T>(PublishContext<T> cont... | DefaultSendMetadataFactory |
csharp | MassTransit__MassTransit | tests/MassTransit.Tests/ContainerTests/Common_Tests/Common_Consumer.cs | {
"start": 4114,
"end": 5631
} | public class ____ :
InMemoryContainerTestFixture
{
[Test]
public async Task Should_receive_using_the_first_consumer()
{
const string name = "Joe";
await InputQueueSendEndpoint.Send(new SimpleMessageClass(name));
var lastConsumer = await SimpleCon... | Registering_a_consumer_directly_in_the_container |
csharp | unoplatform__uno | src/Uno.UWP/Generated/3.0.0.0/Windows.System.Display/DisplayRequest.cs | {
"start": 336,
"end": 1591
} | public partial class ____
{
#if false || false || false || IS_UNIT_TESTS || false || __SKIA__ || __NETSTD_REFERENCE__
[global::Uno.NotImplemented("IS_UNIT_TESTS", "__SKIA__", "__NETSTD_REFERENCE__")]
public DisplayRequest()
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.S... | DisplayRequest |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack/Html/MarkdownDeep/Token.cs | {
"start": 1869,
"end": 2564
} | internal class ____
{
// Constructor
public Token(TokenType type, int startOffset, int length)
{
this.type = type;
this.startOffset = startOffset;
this.length = length;
}
// Constructor
public Token(TokenType type, object data)
{
this.type = type;
this.data = data;
}
public override ... | Token |
csharp | dotnet__orleans | src/Orleans.Serialization/Codecs/DateTimeCodec.cs | {
"start": 309,
"end": 2088
} | public sealed class ____ : IFieldCodec<DateTime>
{
void IFieldCodec<DateTime>.WriteField<TBufferWriter>(ref Writer<TBufferWriter> writer, uint fieldIdDelta, Type expectedType, DateTime value)
{
ReferenceCodec.MarkValueField(writer.Session);
writer.WriteFieldHeader(fieldIdDelt... | DateTimeCodec |
csharp | JamesNK__Newtonsoft.Json | Src/Newtonsoft.Json/Utilities/ConvertUtils.cs | {
"start": 30818,
"end": 55927
} | private static class ____
{
/// <summary>
/// Exponents for both powers of 10 and 0.1
/// </summary>
private static readonly int[] MultExp64Power10 = new int[]
{
4, 7, 10, 14, 17, 20, 24, 27, 30, 34, 37, 40, 44, 47, 50
};
... | IEEE754 |
csharp | unoplatform__uno | src/Uno.UI.Runtime.Skia.Win32/Graphics/Win32NativeOpenGLWrapper.cs | {
"start": 417,
"end": 4658
} | internal class ____ : INativeOpenGLWrapper
{
private static readonly Type _type = typeof(Win32NativeOpenGLWrapper);
private static readonly Lazy<IntPtr> _opengl32 = new Lazy<IntPtr>(() =>
{
if (!NativeLibrary.TryLoad("opengl32.dll", _type.Assembly, DllImportSearchPath.UserDirectories, out var _handle))
{
if (... | Win32NativeOpenGLWrapper |
csharp | pythonnet__pythonnet | src/runtime/Native/StolenReference.cs | {
"start": 1939,
"end": 2645
} | static class ____
{
[Pure]
[DebuggerHidden]
public static IntPtr DangerousGetAddressOrNull(this in StolenReference reference)
=> reference.Pointer;
[Pure]
[DebuggerHidden]
public static IntPtr DangerousGetAddress(this in StolenReference reference)
... | StolenReferenceExtensions |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Linq/Observable/TakeLastBuffer.cs | {
"start": 2671,
"end": 4412
} | internal sealed class ____ : Sink<TSource, IList<TSource>>
{
private readonly TimeSpan _duration;
private readonly Queue<Reactive.TimeInterval<TSource>> _queue;
public _(TimeSpan duration, IObserver<IList<TSource>> observer)
: base(observe... | _ |
csharp | SixLabors__ImageSharp | tests/ImageSharp.Tests/Processing/Processors/Convolution/ConvolutionProcessorHelpersTest.cs | {
"start": 243,
"end": 2006
} | public class ____
{
[Theory]
[InlineData(3)]
[InlineData(5)]
[InlineData(9)]
[InlineData(22)]
[InlineData(33)]
[InlineData(80)]
public void VerifyGaussianKernelDecomposition(int radius)
{
int kernelSize = (radius * 2) + 1;
float sigma = radius / 3F;
float[] ke... | ConvolutionProcessorHelpersTest |
csharp | xunit__xunit | src/xunit.v3.core/CollectionBehaviorAttribute.cs | {
"start": 236,
"end": 2130
} | public sealed class ____ : Attribute, ICollectionBehaviorAttribute
{
/// <summary>
/// Initializes a new instance of the <see cref="CollectionBehaviorAttribute" /> class.
/// Uses the default collection behavior (<see cref="CollectionBehavior.CollectionPerClass"/>).
/// </summary>
public CollectionBehaviorAttribut... | CollectionBehaviorAttribute |
csharp | unoplatform__uno | src/Uno.UI/Controls/NativeFramePresente.Properties.UIKit.cs | {
"start": 278,
"end": 1182
} | public partial class ____ : FrameworkElement
{
#region IsNavigationBarHidden DependencyProperty
/// <summary>
/// Provides a Xaml access to the <see cref="UINavigationController.NavigationBarHidden"/> property.
/// </summary>
public int IsNavigationBarHidden
{
get => (int)GetValue(IsNavigationBarHidden... | NativeFramePresenter |
csharp | simplcommerce__SimplCommerce | src/Modules/SimplCommerce.Module.PaymentMomo/Areas/PaymentMomo/Components/MomoLandingViewComponent.cs | {
"start": 439,
"end": 1378
} | public class ____ : ViewComponent
{
private readonly IRepositoryWithTypedId<PaymentProvider, string> _paymentProviderRepository;
public MomoLandingViewComponent(IRepositoryWithTypedId<PaymentProvider, string> paymentProviderRepository)
{
_paymentProviderRepository = paymentProvi... | MomoLandingViewComponent |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.ContentManagement.Display/ContentDisplay/IContentPartDisplayDriverResolver.cs | {
"start": 65,
"end": 304
} | public interface ____
{
IList<IContentPartDisplayDriver> GetDisplayModeDrivers(string partName, string displayMode);
IList<IContentPartDisplayDriver> GetEditorDrivers(string partName, string editor);
}
| IContentPartDisplayDriverResolver |
csharp | unoplatform__uno | src/Uno.UWP/Generated/3.0.0.0/Windows.Media.Streaming.Adaptive/AdaptiveMediaSourceDiagnosticType.cs | {
"start": 270,
"end": 1602
} | public enum ____
{
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
ManifestUnchangedUponReload = 0,
#endif
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
ManifestMismatchUponReload = 1,
#endif
#if __AND... | AdaptiveMediaSourceDiagnosticType |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/test/Types.Analyzers.Integration.Tests/Product.cs | {
"start": 140,
"end": 248
} | public class ____
{
public required string Id { get; set; }
}
[InterfaceType<Product>]
public static | Product |
csharp | ChilliCream__graphql-platform | src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/SchemaGeneratorTests.cs | {
"start": 3411,
"end": 10185
} | interface ____ {
id: ID!
}
type NewsItem implements Node {
id: ID!
feedId: UUID!
feedUrl: String!
html: String!
image: String!
keywords: [String!]!
language: String!
... | Node |
csharp | ChilliCream__graphql-platform | src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/EntityIdOrDataTest.Client.cs | {
"start": 17680,
"end": 18578
} | private sealed class ____ : System.IServiceProvider, System.IDisposable
{
private readonly System.IServiceProvider _provider;
public ClientServiceProvider(System.IServiceProvider provider)
{
_provider = provider;
}
public object? GetSe... | ClientServiceProvider |
csharp | dotnet__aspire | tests/Aspire.Hosting.RabbitMQ.Tests/RabbitMQPublicApiTests.cs | {
"start": 248,
"end": 4671
} | public class ____(ITestOutputHelper testOutputHelper)
{
[Fact]
public void AddRabbitMQShouldThrowWhenBuilderIsNull()
{
IDistributedApplicationBuilder builder = null!;
const string name = "rabbitMQ";
var action = () => builder.AddRabbitMQ(name);
var exception = Assert.Throws... | RabbitMQPublicApiTests |
csharp | MassTransit__MassTransit | tests/MassTransit.Tests/ITestBusConfiguration.cs | {
"start": 279,
"end": 560
} | public class ____ :
ITestBusConfiguration
{
public void ConfigureBus<T>(IBusRegistrationContext context, IBusFactoryConfigurator<T> configurator)
where T : IReceiveEndpointConfigurator
{
}
}
| Json |
csharp | OrchardCMS__OrchardCore | src/OrchardCore.Modules/OrchardCore.Seo/Startup.cs | {
"start": 697,
"end": 1919
} | public sealed class ____ : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddDataMigration<Migrations>();
services.AddContentPart<SeoMetaPart>()
.UseDisplayDriver<SeoMetaPartDisplayDriver>()
.AddHandler<SeoMetaPartHandler>();... | Startup |
csharp | jellyfin__jellyfin | MediaBrowser.XbmcMetadata/Parsers/SeriesNfoSeasonParser.cs | {
"start": 386,
"end": 2485
} | public class ____ : BaseNfoParser<Season>
{
/// <summary>
/// Initializes a new instance of the <see cref="SeriesNfoSeasonParser"/> class.
/// </summary>
/// <param name="logger">Instance of the <see cref="ILogger"/> interface.</param>
/// <param name="config">Instance of the... | SeriesNfoSeasonParser |
csharp | dotnet__extensions | test/Libraries/Microsoft.Extensions.Diagnostics.Probes.Tests/MockHealthCheckService.cs | {
"start": 352,
"end": 1261
} | internal class ____ : HealthCheckService
{
private readonly Task<HealthReport> _healthyReport = CreateHealthReport(HealthStatus.Healthy);
private readonly Task<HealthReport> _unhealthyReport = CreateHealthReport(HealthStatus.Unhealthy);
public bool IsHealthy = true;
public override Task<HealthReport> C... | MockHealthCheckService |
csharp | GtkSharp__GtkSharp | Source/Libs/GLibSharp/MainLoop.cs | {
"start": 33,
"end": 905
} | class ____
//
// Author: Jeroen Zwartepoorte <jeroen@xs4all.nl>
//
// Copyright (c) 2004 Jeroen Zwartepoorte
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// Thi... | implementation |
csharp | bitwarden__server | src/Core/Settings/GlobalSettings.cs | {
"start": 27753,
"end": 27941
} | public class ____
{
public string AccessKeyId { get; set; }
public string AccessKeySecret { get; set; }
public string Region { get; set; }
}
| AmazonSettings |
csharp | AutoMapper__AutoMapper | src/UnitTests/CustomMapping.cs | {
"start": 30565,
"end": 30689
} | public class ____
{
public int Id { get; set; }
public string NumberValue { get; set; }
}
| SourceDto |
csharp | dotnet__efcore | benchmark/EFCore.SqlServer.Benchmarks/Support/SqlServerBenchmarkEnvironment.cs | {
"start": 439,
"end": 1404
} | public static class ____
{
public static IConfiguration Config { get; }
static SqlServerBenchmarkEnvironment()
{
var configBuilder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("config.json", optional: true)
.AddEnvironme... | SqlServerBenchmarkEnvironment |
csharp | louthy__language-ext | LanguageExt.Tests/Transformer/Traverse/Arr/Sync/Either.cs | {
"start": 161,
"end": 1448
} | public class ____
{
[Fact]
public void LeftIsSingletonLeft()
{
var ma = Left<Error, Arr<int>>(Error.New("alt"));
var mb = ma.KindT<Either<Error>, Arr, Arr<int>, int>()
.SequenceM()
.AsT<Arr, Either<Error>, Either<Error, int>, int>()
.... | EitherArr |
csharp | abpframework__abp | framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Toolbars/StandardToolbars.cs | {
"start": 65,
"end": 145
} | public static class ____
{
public const string Main = "Main";
}
| StandardToolbars |
csharp | dotnet__machinelearning | src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs | {
"start": 12799,
"end": 15080
} | private sealed class ____ : ValueReaderBase<ReadOnlyMemory<char>>
{
private readonly int _entries;
private readonly int[] _boundaries;
private int _index;
private readonly string _text;
public Reader(TextCodec codec, Stream str... | Reader |
csharp | EventStore__EventStore | src/KurrentDB.Core/LogAbstraction/IRecordFactory.cs | {
"start": 287,
"end": 374
} | public interface ____ {
ISystemLogRecord CreateEpoch(EpochRecord epoch);
}
| IRecordFactory |
csharp | icsharpcode__ILSpy | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs | {
"start": 1182,
"end": 1906
} | internal class ____ : IHandler
{
public BamlRecordType Type => BamlRecordType.PropertyArrayStart;
public BamlElement Translate(XamlContext ctx, BamlNode node, BamlElement parent)
{
var record = (PropertyArrayStartRecord)((BamlBlockNode)node).Header;
var doc = new BamlElement(node);
var elemAttr = ctx.... | PropertyArrayHandler |
csharp | protobuf-net__protobuf-net | src/protobuf-net.Test/Nullables/CollectionsWithNullsTests_DuplicateMessageNames.cs | {
"start": 4940,
"end": 5442
} | class ____
{
[ProtoMember(1), NullWrappedValue]
public List<Bar> Items1 { get; set; } = new();
[ProtoMember(2), NullWrappedValue(AsGroup = true)]
public List<Bar> Items2 { get; set; } = new();
[ProtoMember(3)] // [SupportNull] defined in test
... | DuplicateFieldTypesWithDifferentNullWrappingModel |
csharp | OrchardCMS__OrchardCore | src/OrchardCore.Modules/OrchardCore.Demo/Models/CustomViewModel.cs | {
"start": 80,
"end": 168
} | public class ____ : ShapeViewModel
{
public string Value { get; set; }
}
| CustomViewModel |
csharp | FoundatioFx__Foundatio | src/Foundatio/Messaging/MessageBusBase.cs | {
"start": 15349,
"end": 16304
} | protected class ____
{
private readonly ConcurrentDictionary<Type, bool> _assignableTypesCache = new();
public string Id { get; private set; } = Guid.NewGuid().ToString("N");
public CancellationToken CancellationToken { get; set; }
public Type Type { get; set; }
public Type ... | Subscriber |
csharp | EventStore__EventStore | src/KurrentDB.Core.Tests/Services/ElectionsService/ElectionsServiceTests.cs | {
"start": 39381,
"end": 40528
} | public class ____ : ElectionsFixture {
public when_receiving_accept_for_not_the_current_installed_view() :
base(NodeFactory(3), NodeFactory(2), NodeFactory(1)) {
_sut.Handle(new GossipMessage.GossipUpdated(new ClusterInfo(
MemberInfoFromVNode(_node, _timeProvider.UtcNow, VNodeState.Unknown, true, 0, _epochId, 0... | when_receiving_accept_for_not_the_current_installed_view |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.WebHost.Endpoints.Tests/DeclarativeValidationTests.cs | {
"start": 481,
"end": 861
} | public class ____ : IReturn<EmptyResponse>
{
[ValidateNotEmpty]
[ValidateMaximumLength(20)]
public string Site { get; set; }
public List<DeclarativeChildValidation> DeclarativeValidations { get; set; }
public List<FluentChildValidation> FluentValidations { get; set; }
public List<NoValidators> N... | DeclarativeCollectiveValidationTest |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/test/Types.Tests/Types/Relay/NodeResolverTests.cs | {
"start": 11662,
"end": 11800
} | public class ____
{
public EntityNoId GetEntity(int id)
=> new EntityNoId { Data = id };
}
| QueryEntityRenamed |
csharp | grpc__grpc-dotnet | src/Grpc.AspNetCore.Server/Model/ServiceMethodProviderContext.cs | {
"start": 7138,
"end": 7303
} | class
____ TResponse : class
{
var methodModel = new MethodModel(method, pattern, metadata, invoker);
Methods.Add(methodModel);
}
}
| where |
csharp | microsoft__FASTER | cs/samples/FasterLogSample/Program.cs | {
"start": 8787,
"end": 9117
} | private struct ____ : IReadOnlySpanBatch
{
private readonly int batchSize;
public ReadOnlySpanBatch(int batchSize) => this.batchSize = batchSize;
public ReadOnlySpan<byte> Get(int index) => staticEntry;
public int TotalEntries() => batchSize;
}
}
}
| ReadOnlySpanBatch |
csharp | unoplatform__uno | src/Uno.UI.RuntimeTests/MUX/Microsoft_UI_Xaml_Controls/ScrollPresenter/ScrollPresenterLayoutTests.cs | {
"start": 743,
"end": 798
} | partial class ____ : MUXApiTestBase
{
| ScrollPresenterTests |
csharp | atata-framework__atata | test/Atata.IntegrationTests/Sessions/AtataSessionCollectionTests.cs | {
"start": 15215,
"end": 18842
} | public sealed class ____
{
[Test]
public async Task WhenNoBuilder()
{
// Arrange
await using AtataContext context = await AtataContext.CreateDefaultNonScopedBuilder().BuildAsync();
// Act
var call = context.Sessions.Invoking(x => x.BuildAsync<... | BuildAsync |
csharp | dotnet__aspnetcore | src/Http/Routing/test/UnitTests/Builder/FallbackEndpointRouteBuilderExtensionsTest.cs | {
"start": 267,
"end": 1695
} | public class ____
{
private EndpointDataSource GetBuilderEndpointDataSource(IEndpointRouteBuilder endpointRouteBuilder) =>
Assert.Single(endpointRouteBuilder.DataSources);
[Fact]
public void MapFallback_AddFallbackMetadata()
{
var builder = new DefaultEndpointRouteBuilder(new Applicatio... | FallbackEndpointRouteBuilderExtensionsTest |
csharp | ServiceStack__ServiceStack | ServiceStack.Redis/tests/ServiceStack.Redis.Tests/RedisStatsTests.cs | {
"start": 118,
"end": 1216
} | public class ____
: RedisClientTestsBase
{
[OneTimeSetUp]
public void OneTimeSetUp()
{
RedisConfig.AssumeServerVersion = 2821;
}
[Test]
[Ignore("too long")]
public void Batch_and_Pipeline_requests_only_counts_as_1_request()
{
... | RedisStatsTests |
csharp | CommunityToolkit__WindowsCommunityToolkit | Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Controls/DataGrid.Metadata.cs | {
"start": 830,
"end": 9458
} | internal class ____ : AttributeTableBuilder
{
public DataGridMetadata() : base()
{
AddCallback(ControlTypes.DataGrid,
b =>
{
b.AddCustomAttributes(new FeatureAttribute(typeof(DataGridDefaults)));
b.AddCustomAttribute... | DataGridMetadata |
csharp | MassTransit__MassTransit | src/MassTransit/Consumers/Configuration/InstanceMessageConnector.cs | {
"start": 506,
"end": 638
} | public class ____<TConsumer, TMessage> :
IInstanceMessageConnector<TConsumer>
where TConsumer : | InstanceMessageConnector |
csharp | dotnet__machinelearning | src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs | {
"start": 18848,
"end": 19253
} | private sealed class ____ : Column<string, ReadOnlyMemory<char>>
{
public StringToTextColumn(string[] values)
: base(TextDataViewType.Instance, values)
{
}
protected override void CopyOut(in string src, ref ReadOnlyMemory<char> dst)
{
... | StringToTextColumn |
csharp | abpframework__abp | framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController.cs | {
"start": 191,
"end": 649
} | public class ____ : AbpController, IRemoteService
{
protected readonly IApiDescriptionModelProvider ModelProvider;
public AbpApiDefinitionController(IApiDescriptionModelProvider modelProvider)
{
ModelProvider = modelProvider;
}
[HttpGet]
public virtual ApplicationApiDescriptionModel Ge... | AbpApiDefinitionController |
csharp | dotnet__aspnetcore | src/Security/Authentication/test/WsFederation/WsFederationTest_Handler.cs | {
"start": 728,
"end": 10803
} | public class ____
{
[Fact]
public async Task VerifySchemeDefaults()
{
var services = new ServiceCollection();
services.AddSingleton<IConfiguration>(new ConfigurationManager());
services.AddAuthentication().AddWsFederation();
var sp = services.BuildServiceProvider();
v... | WsFederationTestHandlers |
csharp | CommunityToolkit__Maui | samples/CommunityToolkit.Maui.Sample/Views/Popups/ExplicitStylePopup.xaml.cs | {
"start": 222,
"end": 325
} | public partial class ____
{
public ExplicitStylePopup()
{
InitializeComponent();
}
} | ExplicitStylePopup |
csharp | aspnetboilerplate__aspnetboilerplate | test/aspnet-core-demo/AbpAspNetCoreDemo/Controllers/ModelValidationController.cs | {
"start": 120,
"end": 384
} | public class ____ : DemoControllerBase
{
public IActionResult Index()
{
return View();
}
[HttpPost]
public IActionResult CreateUser(UserModel model, string test)
{
return View("Index", model);
}
}
| ModelValidationController |
csharp | ChilliCream__graphql-platform | src/Nitro/CommandLine/src/CommandLine.Cloud/Generated/ApiClient.Client.cs | {
"start": 6365974,
"end": 6366841
} | public partial record ____
{
public ValidateFusionConfigurationCompositionPayloadData(global::System.String __typename, global::System.Collections.Generic.IReadOnlyList<global::ChilliCream.Nitro.CommandLine.Cloud.Client.State.IValidateFusionConfigurationCompositionErrorData>? errors = default !)
{
... | ValidateFusionConfigurationCompositionPayloadData |
csharp | ServiceStack__ServiceStack | ServiceStack.Text/src/ServiceStack.Text/PclExport.NetFx.cs | {
"start": 636,
"end": 12885
} | public class ____ : PclExport
{
public static NetFxPclExport Provider = new();
public NetFxPclExport()
{
this.DirSep = Path.DirectorySeparatorChar;
this.AltDirSep = Path.DirectorySeparatorChar == '/' ? '\\' : '/';
this.RegexOptions = RegexOptions.Compiled... | NetFxPclExport |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/src/Types.Analyzers/Models/DataLoaderParameterKind.cs | {
"start": 48,
"end": 287
} | public enum ____
{
Key = 0,
Service = 1,
ContextData = 2,
CancellationToken = 3,
SelectorBuilder = 4,
PagingArguments = 5,
PredicateBuilder = 6,
SortDefinition = 7,
QueryContext = 8
}
| DataLoaderParameterKind |
csharp | PrismLibrary__Prism | src/Maui/Prism.Maui/Navigation/IWindowManager.cs | {
"start": 144,
"end": 995
} | public interface ____
{
/// <summary>
/// Gets a read-only collection of all currently open windows.
/// </summary>
IReadOnlyList<Window> Windows { get; }
/// <summary>
/// Gets the currently active window, if any.
/// </summary>
Window? Current { get; }
/// <summary>
/// Opens... | IWindowManager |
csharp | dotnet__aspnetcore | src/Components/Endpoints/test/FormMapping/BrowserFileFromFormFileTests.cs | {
"start": 428,
"end": 4074
} | public class ____
{
[Fact]
public void Name_ReturnsFormFileFileName_NotFormFileName()
{
// Arrange
const string expectedFileName = "document.pdf";
const string formFieldName = "fileInput";
var mockFormFile = new Mock<IFormFile>();
mockFormFile.Setup(x => x.Fi... | BrowserFileFromFormFileTests |
csharp | CommunityToolkit__Maui | samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/UserStoppedTypingBehaviorPage.xaml.cs | {
"start": 116,
"end": 402
} | public partial class ____ : BasePage<UserStoppedTypingBehaviorViewModel>
{
public UserStoppedTypingBehaviorPage(UserStoppedTypingBehaviorViewModel userStoppedTypingBehaviorViewModel)
: base(userStoppedTypingBehaviorViewModel)
{
InitializeComponent();
}
} | UserStoppedTypingBehaviorPage |
csharp | CommunityToolkit__WindowsCommunityToolkit | Microsoft.Toolkit.Uwp.UI.Controls.Primitives/WrapPanel/WrapPanel.Data.cs | {
"start": 2478,
"end": 3361
} | private struct ____
{
public Row(List<UvRect> childrenRects, UvMeasure size)
{
ChildrenRects = childrenRects;
Size = size;
}
public List<UvRect> ChildrenRects { get; }
public UvMeasure Size { get; set; }
p... | Row |
csharp | icsharpcode__ILSpy | ICSharpCode.Decompiler/Metadata/LightJson/JsonObject.cs | {
"start": 491,
"end": 5357
} | internal sealed class ____ : IEnumerable<KeyValuePair<string, JsonValue>>, IEnumerable<JsonValue>
{
private IDictionary<string, JsonValue> properties;
/// <summary>
/// Initializes a new instance of the <see cref="JsonObject"/> class.
/// </summary>
public JsonObject()
{
this.properties = new Dictionar... | JsonObject |
csharp | dotnetcore__FreeSql | Providers/FreeSql.Provider.MsAccess/Curd/MsAccessSelect.cs | {
"start": 16492,
"end": 17062
} | class ____ T4 : class
{
public MsAccessSelect(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, object dywhere) : base(orm, commonUtils, commonExpression, dywhere) { }
public override string ToSql(string field = null) => MsAccessSelect<T1>.ToSqlStatic(_commonUtils, _commonExp... | where |
csharp | unoplatform__uno | src/Uno.UWP/Generated/3.0.0.0/Windows.ApplicationModel.Email.DataProvider/EmailDataProviderTriggerDetails.cs | {
"start": 318,
"end": 1337
} | public partial class ____
{
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
internal EmailDataProviderTriggerDetails()
{
}
#endif
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
[global::Uno.NotImple... | EmailDataProviderTriggerDetails |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Data/src/Data/QueryContextParameterExpressionBuilder.cs | {
"start": 313,
"end": 3359
} | internal sealed class ____()
: IParameterExpressionBuilder
, IParameterBindingFactory
, IParameterBinding
{
private static readonly MethodInfo s_createQueryContext =
typeof(QueryContextParameterExpressionBuilder)
.GetMethod(nameof(CreateQueryContext), BindingFlags.Static | BindingFla... | QueryContextParameterExpressionBuilder |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Base/Platform/AlphaFormat.cs | {
"start": 139,
"end": 633
} | public enum ____
{
/// <summary>
/// All pixels have their alpha premultiplied in their color components.
/// </summary>
Premul,
/// <summary>
/// All pixels have their color components stored without any regard to the alpha. e.g. this is the default configuration for... | AlphaFormat |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Predicates/NotExpression.cs | {
"start": 179,
"end": 354
} | public class ____ : IPredicate
{
private readonly IPredicate _predicate;
/// <summary>
/// Initialize a new instance of the <see cref="NotExpression" /> | NotExpression |
csharp | unoplatform__uno | src/Uno.UI/UI/Xaml/Controls/ScrollPresenter/ScrollPresenterTestHooks.cs | {
"start": 440,
"end": 12194
} | internal partial class ____
{
private static ScrollPresenterTestHooks s_testHooks;
public ScrollPresenterTestHooks()
{
}
private static ScrollPresenterTestHooks EnsureGlobalTestHooks()
{
return s_testHooks ??= new ScrollPresenterTestHooks();
}
internal static bool AreAnchorNotificationsRaised
{
get
{
... | ScrollPresenterTestHooks |
csharp | dotnet__orleans | test/Grains/TestGrainInterfaces/ISampleStreamingGrain.cs | {
"start": 397,
"end": 643
} | public interface ____ : IGrainWithGuidKey
{
Task BecomeConsumer(Guid streamId, string streamNamespace, string providerToUse);
Task StopConsuming();
Task<int> GetNumberConsumed();
}
| ISampleStreaming_ConsumerGrain |
csharp | MonoGame__MonoGame | MonoGame.Framework/Platform/Native/Graphics.Interop.cs | {
"start": 1058,
"end": 1129
} | struct ____ { }
[StructLayout(LayoutKind.Sequential)]
| MGG_OcclusionQuery |
csharp | EventStore__EventStore | src/KurrentDB.TestClient/Program.cs | {
"start": 609,
"end": 651
} | internal enum ____ {
Csv,
Json
}
| StatsFormat |
csharp | SixLabors__ImageSharp | src/ImageSharp/Processing/Processors/Transforms/Linear/AutoOrientProcessor{TPixel}.cs | {
"start": 457,
"end": 4462
} | internal class ____<TPixel> : ImageProcessor<TPixel>
where TPixel : unmanaged, IPixel<TPixel>
{
/// <summary>
/// Initializes a new instance of the <see cref="AutoOrientProcessor{TPixel}"/> class.
/// </summary>
/// <param name="configuration">The configuration which allows altering default behaviou... | AutoOrientProcessor |
csharp | cake-build__cake | src/Cake.Common/Tools/OctopusDeploy/OctopusDeployPacker.cs | {
"start": 409,
"end": 3795
} | public sealed class ____ : OctopusDeployTool<OctopusPackSettings>
{
/// <summary>
/// Initializes a new instance of the <see cref="OctopusDeployPacker"/> class.
/// </summary>
/// <param name="fileSystem">The file system.</param>
/// <param name="environment">The environment.... | OctopusDeployPacker |
csharp | EventStore__EventStore | src/KurrentDB.Core.Tests/Services/ElectionsService/Randomized/elections_service_4_nodes_full_gossip_some_http_loss_some_dup.cs | {
"start": 323,
"end": 1136
} | public class ____ {
private RandomizedElectionsTestCase _randomCase;
[SetUp]
public void SetUp() {
_randomCase = new RandomizedElectionsTestCase(ElectionParams.MaxIterationCount,
instancesCnt: 4,
httpLossProbability: 0.3,
httpDupProbability: 0.3,
httpMaxDelay: 20,
timerMinDelay: 100,
timerMaxDel... | elections_service_4_nodes_full_gossip_some_http_loss_some_dup |
csharp | ChilliCream__graphql-platform | src/HotChocolate/AspNetCore/src/Transport.Abstractions/OperationResult.cs | {
"start": 324,
"end": 515
} | public sealed class ____ : IDisposable
{
private readonly IDisposable? _memoryOwner;
/// <summary>
/// Initializes a new instance of the <see cref="OperationResult"/> | OperationResult |
csharp | dotnet__efcore | src/ef/Commands/DatabaseDropCommand.Configure.cs | {
"start": 290,
"end": 784
} | internal partial class ____ : ContextCommandBase
{
private CommandOption? _force;
private CommandOption? _dryRun;
public override void Configure(CommandLineApplication command)
{
command.Description = Resources.DatabaseDropDescription;
_force = command.Option("-f|--force", Resources.Da... | DatabaseDropCommand |
csharp | FluentValidation__FluentValidation | src/FluentValidation/TestHelper/ITestValidationContinuation.cs | {
"start": 221,
"end": 420
} | public interface ____ : IEnumerable<ValidationFailure> {
IEnumerable<ValidationFailure> UnmatchedFailures { get; }
IEnumerable<ValidationFailure> MatchedFailures { get; }
}
| ITestValidationContinuation |
csharp | icsharpcode__ILSpy | ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.Expected.cs | {
"start": 72,
"end": 179
} | public class ____
{
public Program thisField;
public int field1;
public string field2;
}
| DisplayClass |
csharp | dotnet__machinelearning | src/Microsoft.ML.FastTree/Training/ScoreTracker.cs | {
"start": 359,
"end": 4323
} | internal class ____
{
public string DatasetName;
public Dataset Dataset;
public double[] Scores;
protected double[] InitScores;
public delegate void ScoresUpdatedDelegate();
public ScoresUpdatedDelegate ScoresUpdated;
public ScoreTracker(ScoreTracker s)
... | ScoreTracker |
csharp | AutoMapper__AutoMapper | src/UnitTests/Bug/BaseMapWithIncludesAndUnincludedMappings.cs | {
"start": 252,
"end": 296
} | public class ____ : ADTO
{
}
| BDTO2 |
csharp | abpframework__abp | framework/test/Volo.Abp.Json.Tests/Volo/Abp/Json/InputAndOutputDateTimeFormat_Tests.cs | {
"start": 1883,
"end": 2062
} | public class ____
{
public DateTime DateTime1 { get; set; }
public DateTime? DateTime2 { get; set; }
}
}
[Collection("AbpJsonNewtonsoftJsonTest")]
| DateTimeDto |
csharp | dotnet__machinelearning | src/Microsoft.Data.Analysis/DataFrameColumns/StringDataFrameColumn.cs | {
"start": 561,
"end": 22095
} | public partial class ____ : DataFrameColumn, IEnumerable<string>
{
public static int MaxCapacity = ArrayUtility.ArrayMaxSize / Unsafe.SizeOf<IntPtr>(); // Max Size in bytes / size of pointer (8 bytes on x64)
private readonly List<List<string>> _stringBuffers = new List<List<string>>(); // To store ... | StringDataFrameColumn |
csharp | dotnet__reactive | Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/UsingTest.cs | {
"start": 504,
"end": 10201
} | public class ____ : ReactiveTest
{
[TestMethod]
public void Using_ArgumentChecking()
{
ReactiveAssert.Throws<ArgumentNullException>(() => Observable.Using(null, DummyFunc<IDisposable, IObservable<int>>.Instance));
ReactiveAssert.Throws<ArgumentNullException>(() => Ob... | UsingTest |
csharp | unoplatform__uno | src/Uno.UWP/Generated/3.0.0.0/Windows.UI.Input/SystemButtonEventController.cs | {
"start": 291,
"end": 7478
} | public partial class ____ : global::Windows.UI.Input.AttachableInputObject
{
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
internal SystemButtonEventController()
{
}
#endif
// Forced skipping of method Windows.UI.Input.SystemButtonEventController.System... | SystemButtonEventController |
csharp | dotnet__maui | src/Essentials/samples/Samples/ViewModel/LauncherViewModel.cs | {
"start": 214,
"end": 2484
} | public class ____ : BaseViewModel
{
string fileAttachmentName;
string fileAttachmentContents;
public string LaunchUri { get; set; }
public ICommand LaunchCommand { get; }
public ICommand CanLaunchCommand { get; }
public ICommand LaunchMailCommand { get; }
public ICommand LaunchBrowserCommand { get; ... | LauncherViewModel |
csharp | microsoft__semantic-kernel | dotnet/test/VectorData/VectorData.ConformanceTests/TypeTests/DataTypeTests.cs | {
"start": 23260,
"end": 24061
} | public class ____ : RecordBase
{
public byte Byte { get; set; }
public short Short { get; set; }
public int Int { get; set; }
public long Long { get; set; }
public float Float { get; set; }
public double Double { get; set; }
public decimal Decimal { get; set;... | DefaultRecord |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/TaskObservable.cs | {
"start": 971,
"end": 1051
} | public interface ____<out T> : IObservable<T>
{
// NB: An | ITaskObservable |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.