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 | louthy__language-ext | LanguageExt.Core/Monads/Alternative Monads/Fin/Extensions/Fin.Guard.cs | {
"start": 99,
"end": 1265
} | public static class ____
{
/// <summary>
/// Natural transformation to `Fin`
/// </summary>
public static Fin<Unit> ToFin(this Guard<Error, Unit> ma) =>
ma.Flag
? Fin.Succ(unit)
: Fin.Fail<Unit>(ma.OnFalse());
/// <summary>
/// Monadic binding support for `Fi... | FinGuardExtensions |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Concurrency/CatchScheduler.cs | {
"start": 325,
"end": 2291
} | internal sealed class ____<TException> : SchedulerWrapper
where TException : Exception
{
private readonly Func<TException, bool> _handler;
public CatchScheduler(IScheduler scheduler, Func<TException, bool> handler)
: base(scheduler)
{
_handler = handler;
... | CatchScheduler |
csharp | icsharpcode__AvalonEdit | ICSharpCode.AvalonEdit/Document/TextDocument.cs | {
"start": 2262,
"end": 25427
} | class ____ not thread-safe. A document instance expects to have a single owner thread
/// and will throw an <see cref="InvalidOperationException"/> when accessed from another thread.
/// It is possible to change the owner thread using the <see cref="SetOwnerThread"/> method.</para>
/// </remarks>
public void V... | is |
csharp | Tyrrrz__YoutubeExplode | YoutubeExplode/YoutubeHttpHandler.cs | {
"start": 346,
"end": 6622
} | internal class ____ : ClientDelegatingHandler
{
private readonly CookieContainer _cookieContainer = new();
public YoutubeHttpHandler(
HttpClient http,
IReadOnlyList<Cookie> initialCookies,
bool disposeClient = false
)
: base(http, disposeClient)
{
// Consent to t... | YoutubeHttpHandler |
csharp | MassTransit__MassTransit | src/MassTransit/SagaStateMachine/StateMachineRequestExtensions.cs | {
"start": 5851,
"end": 7487
} | class
____ TResponse : class
{
ScheduleTokenId.UseTokenId<RequestTimeoutExpired<TRequest>>(x => x.RequestId);
var activity = new RequestActivity<TInstance, TData, TRequest, TResponse>(request, serviceAddressProvider,
MessageFactory<TRequest>.Create(messageFact... | where |
csharp | microsoft__PowerToys | src/common/AllExperiments/Microsoft.VariantAssignment/Contract/IVariantAssignmentProvider.cs | {
"start": 337,
"end": 949
} | public interface ____ : IDisposable
{
/// <summary>
/// Computes variant assignments based on <paramref name="request"/> data.
/// </summary>
/// <param name="request">Variant assignment parameters.</param>
/// <param name="ct">Propagates notification that operations should b... | IVariantAssignmentProvider |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/src/Types/Types/Directives/TagDirectiveExtensions.cs | {
"start": 274,
"end": 1564
} | public static class ____
{
/// <summary>
/// Adds a @tag(name: "your-value") to an <see cref="ObjectType"/>.
/// <code>
/// type Book @tag(name: "your-value") {
/// id: ID!
/// title: String!
/// author: String!
/// }
/// </code>
/// </summary>
/// <param name="descript... | TagDirectiveExtensions |
csharp | smartstore__Smartstore | src/Smartstore.Core/Platform/Stores/SmartDbContext.Stores.cs | {
"start": 69,
"end": 231
} | public partial class ____
{
public DbSet<Store> Stores { get; set; }
public DbSet<StoreMapping> StoreMappings { get; set; }
}
}
| SmartDbContext |
csharp | bitwarden__server | util/SqliteMigrations/Migrations/20231024181657_LimitCollectionCreateDelete.Designer.cs | {
"start": 461,
"end": 81559
} | partial class ____
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.5");
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.A... | LimitCollectionCreateDelete |
csharp | scriban__scriban | src/Scriban/Syntax/ScientificFunctionCallRewriter.cs | {
"start": 11119,
"end": 11238
} | private enum ____
{
None,
Regular,
Expression
}
}
} | FunctionCallKind |
csharp | dotnet__maui | src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21314.cs | {
"start": 145,
"end": 530
} | public class ____ : _IssuesUITest
{
public override string Issue => "Image has wrong orientation on iOS";
public Issue21314(TestDevice device) : base(device)
{
}
[Test]
[Category(UITestCategories.Image)]
public void ImageShouldBePortrait()
{
var image = App.WaitForElement("theImage").GetRect();
... | Issue21314 |
csharp | icsharpcode__ILSpy | ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeMemberTests.cs | {
"start": 8022,
"end": 8197
} | public class ____ : T23_G_HideMembers2
{
#if ROSLYN
public int this[int i] => 2;
#else
public int this[int i] {
get {
return 2;
}
}
#endif
}
| T23_G2_HideMembers2 |
csharp | dotnet__maui | src/Controls/tests/CustomAttributes/Test.cs | {
"start": 1374,
"end": 1460
} | public enum ____
{
Command,
Text,
Detail,
TextColor,
DetailColor,
}
| TextCell |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack/ModularStartup.cs | {
"start": 14265,
"end": 15459
} | public class ____
{
public static Type? StartupType { get; set; }
protected IConfiguration Configuration { get; }
protected readonly ModularStartup Instance;
public ModularStartupActivator(IConfiguration configuration)
{
Configuration = configuration;
var ci = StartupType!.GetConstr... | ModularStartupActivator |
csharp | dotnetcore__Util | src/Util.Ui.NgZorro/Components/Forms/Renders/FormSplitRender.cs | {
"start": 194,
"end": 844
} | public class ____ : RenderBase {
/// <summary>
/// 配置
/// </summary>
private readonly Config _config;
/// <summary>
/// 初始化表单分隔符渲染器
/// </summary>
/// <param name="config">配置</param>
public FormSplitRender( Config config ) {
_config = config;
}
/// <summary>
///... | FormSplitRender |
csharp | mongodb__mongo-csharp-driver | tests/MongoDB.Driver.Tests/AggregateFluentFacetTests.cs | {
"start": 28370,
"end": 28818
} | private class ____ : IEqualityComparer<CategorizedByYear>
{
public bool Equals(CategorizedByYear x, CategorizedByYear y)
{
return
x.Id == y.Id &&
x.Count == y.Count;
}
public int GetHashCode(CategorizedByYea... | CategorizedByYearComparer |
csharp | CommunityToolkit__dotnet | tests/CommunityToolkit.Mvvm.SourceGenerators.Roslyn4001.UnitTests/Test_FieldReferenceForObservablePropertyFieldCodeFixer.cs | {
"start": 9265,
"end": 10539
} | class ____
{
void M()
{
var c = new C();
_ = c?.I;
}
}
""";
CSharpCodeFixTest test = new()
{
TestCode = original,
FixedCode = @fixed,
Reference... | D |
csharp | fluentassertions__fluentassertions | Tests/FluentAssertions.Specs/Types/TypeAssertionSpecs.cs | {
"start": 806,
"end": 845
} | public interface ____;
| IDummyInterface |
csharp | Humanizr__Humanizer | src/Humanizer/Localisation/ResourceKeys.TimeUnitSymbol.cs | {
"start": 23,
"end": 187
} | public partial class ____
{
/// <summary>
/// Encapsulates the logic required to get the resource keys for TimeUnit.ToSymbol
/// </summary>
| ResourceKeys |
csharp | dotnetcore__FreeSql | FreeSql.Tests/FreeSql.Tests/KingbaseES/KingbaseESExpression/DateTimeTest.cs | {
"start": 163,
"end": 309
} | public class ____
{
ISelect<Topic> select => g.kingbaseES.Select<Topic>();
[Table(Name = "tb_topic111333")]
| DateTimeTest |
csharp | icsharpcode__ILSpy | ILSpy/TextView/ReferenceElementGenerator.cs | {
"start": 2964,
"end": 4009
} | sealed class ____ : VisualLineText
{
readonly ReferenceElementGenerator parent;
readonly ReferenceSegment referenceSegment;
/// <summary>
/// Creates a visual line text element with the specified length.
/// It uses the <see cref="ITextRunConstructionContext.VisualLine"/> and its
/// <see cref="VisualLine... | VisualLineReferenceText |
csharp | EventStore__EventStore | src/KurrentDB.Core.Tests/Index/IndexV1/when_merging_ptables.cs | {
"start": 612,
"end": 2806
} | public class ____ : SpecificationWithDirectoryPerTestFixture {
private readonly List<string> _files = new List<string>();
private readonly List<PTable> _tables = new List<PTable>();
private PTable _newtable;
private readonly byte _ptableVersion;
private readonly bool _skipIndexVerify;
public when_merging_ptable... | when_merging_ptables |
csharp | mysql-net__MySqlConnector | src/MySqlConnector/Protocol/Serialization/CompressedPayloadHandler.cs | {
"start": 11391,
"end": 12794
} | private sealed class ____ : IByteHandler
{
public CompressedByteHandler(CompressedPayloadHandler compressedPayloadHandler, ProtocolErrorBehavior protocolErrorBehavior)
{
m_compressedPayloadHandler = compressedPayloadHandler;
m_protocolErrorBehavior = protocolErrorBehavior;
}
public void Dispose()
{
... | CompressedByteHandler |
csharp | microsoft__semantic-kernel | dotnet/samples/Concepts/ChatCompletion/OpenAI_CustomClient.cs | {
"start": 479,
"end": 2604
} | public sealed class ____(ITestOutputHelper output) : BaseTest(output)
{
[Fact]
public async Task UsingCustomHttpClientWithOpenAI()
{
Assert.NotNull(TestConfiguration.OpenAI.ChatModelId);
Assert.NotNull(TestConfiguration.OpenAI.ApiKey);
Console.WriteLine($"======== Open AI - {nameof(... | OpenAI_CustomClient |
csharp | dotnet__machinelearning | src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs | {
"start": 286,
"end": 427
} | class ____ a cursor has an input cursor, but still needs to do work on <see cref="DataViewRowCursor.MoveNext"/>.
/// </summary>
[BestFriend]
| for |
csharp | microsoft__garnet | libs/storage/Tsavorite/cs/src/core/Index/Tsavorite/Implementation/TryCopyToReadCache.cs | {
"start": 4463,
"end": 6076
} | record ____ the chain, then once we CAS'd it in someone could have spliced into
// it, but then that splice will call ReadCacheCheckTailAfterSplice and invalidate it if it's the same key.
// Consistency Notes:
// - This is only a concern for CTT; an update would take an... | in |
csharp | duplicati__duplicati | Duplicati/Library/Main/Operation/ListFilesHandler.cs | {
"start": 1466,
"end": 12346
} | internal class ____
{
/// <summary>
/// The tag used for logging
/// </summary>
private static readonly string LOGTAG = Logging.Log.LogTagFromType<ListFilesHandler>();
private readonly Options m_options;
private readonly ListResults m_result;
public ListFile... | ListFilesHandler |
csharp | dotnet__aspnetcore | src/Hosting/Hosting/test/GenericWebHostBuilderTests.cs | {
"start": 6599,
"end": 7064
} | private class ____
{
public void ConfigureServices(IServiceCollection services) { services.AddSingleton<FirstStartup>(); }
public void Configure(IApplicationBuilder app)
{
Assert.NotNull(app.ApplicationServices.GetService<FirstStartup>());
Assert.Null(app.Application... | FirstStartup |
csharp | mongodb__mongo-csharp-driver | tests/MongoDB.Driver.Tests/Core/Bindings/WritableServerBindingTests.cs | {
"start": 933,
"end": 12421
} | public class ____
{
private Mock<IClusterInternal> _mockCluster;
public WritableServerBindingTests()
{
_mockCluster = new Mock<IClusterInternal>();
}
[Fact]
public void Constructor_should_throw_if_cluster_is_null()
{
Action act = () =... | WritableServerBindingTests |
csharp | dotnetcore__Util | src/Util.FileStorage.Abstractions/ILocalFileStore.cs | {
"start": 73,
"end": 2342
} | public interface ____ {
/// <summary>
/// 文件是否存在
/// </summary>
/// <param name="fileName">文件名</param>
/// <param name="policy">文件名处理策略</param>
/// <param name="cancellationToken">取消令牌</param>
Task<bool> FileExistsAsync( string fileName, string policy = null, CancellationToken cancellationTo... | ILocalFileStore |
csharp | dotnet__efcore | test/EFCore.InMemory.FunctionalTests/ConfigPatternsInMemoryTest.cs | {
"start": 14086,
"end": 14912
} | private class ____
{
private readonly InjectDifferentConfigurationsBlogContext _context;
public InjectDifferentConfigurationsBlogController(InjectDifferentConfigurationsBlogContext context)
{
Assert.NotNull(context);
_context = context;
}
public voi... | InjectDifferentConfigurationsBlogController |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Concurrency/ThreadPoolScheduler.cs | {
"start": 7906,
"end": 9331
} | private sealed class ____<TState> : IDisposable
{
private TState _state;
private Func<TState, TState> _action;
private readonly AsyncLock _gate;
private volatile Timer? _timer;
public PeriodicTimer(TState state, TimeSpan period, Func<TState, TState> ... | PeriodicTimer |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Linq/Observable/RetryWhen.cs | {
"start": 387,
"end": 1940
} | internal sealed class ____<T, U> : IObservable<T>
{
private readonly IObservable<T> _source;
private readonly Func<IObservable<Exception>, IObservable<U>> _handler;
internal RetryWhen(IObservable<T> source, Func<IObservable<Exception>, IObservable<U>> handler)
{
_source ... | RetryWhen |
csharp | microsoft__FASTER | cs/src/core/Async/RMWAsync.cs | {
"start": 2768,
"end": 9483
} | public struct ____<Input, TOutput, Context>
{
internal readonly AsyncOperationInternal<Input, TOutput, Context, RmwAsyncOperation<Input, TOutput, Context>, RmwAsyncResult<Input, TOutput, Context>> updateAsyncInternal;
/// <summary>Current status of the RMW operation</summary>
... | RmwAsyncResult |
csharp | dotnetcore__Util | src/Util.Data.EntityFrameworkCore/ValueConverters/ExtraPropertiesValueConverter.cs | {
"start": 159,
"end": 1481
} | public class ____ : ValueConverter<ExtraPropertyDictionary, string> {
/// <summary>
/// 初始化扩展属性值转换器
/// </summary>
public ExtraPropertiesValueConverter()
: base( extraProperties => PropertiesToJson( extraProperties ), json => JsonToProperties( json ) ) {
}
/// <summary>
/// 扩展属性转换为j... | ExtraPropertiesValueConverter |
csharp | dotnet__efcore | test/EFCore.Specification.Tests/ModelBuilding/GiantModel.cs | {
"start": 132304,
"end": 132521
} | public class ____
{
public int Id { get; set; }
public RelatedEntity610 ParentEntity { get; set; }
public IEnumerable<RelatedEntity612> ChildEntities { get; set; }
}
| RelatedEntity611 |
csharp | xunit__xunit | src/xunit.v3.assert.tests/Asserts/EqualityAssertsTests.cs | {
"start": 2970,
"end": 3670
} | class ____<T>(bool result) :
IEqualityComparer<T>
{
readonly bool result = result;
public bool Equals(T? x, T? y) => result;
public int GetHashCode(T obj) => throw new NotImplementedException();
}
[Fact]
public void NonEnumerable_WithThrow_RecordsInnerException()
{
var ex = Record.... | Comparer |
csharp | abpframework__abp | framework/src/Volo.Abp.Threading/Volo/Abp/Threading/AmbientDataContextAmbientScopeProvider.cs | {
"start": 232,
"end": 2279
} | public class ____<T> : IAmbientScopeProvider<T>
{
public ILogger<AmbientDataContextAmbientScopeProvider<T>> Logger { get; set; }
private static readonly ConcurrentDictionary<string, ScopeItem> ScopeDictionary = new ConcurrentDictionary<string, ScopeItem>();
private readonly IAmbientDataContext _dataContex... | AmbientDataContextAmbientScopeProvider |
csharp | graphql-dotnet__graphql-dotnet | src/GraphQL.Tests/Types/AutoRegisteringInputObjectGraphTypeTests.cs | {
"start": 22820,
"end": 22952
} | private class ____
{
public int Id { get; set; }
public string Name { get; set; } = null!;
}
| TestBasicClass |
csharp | dotnet__BenchmarkDotNet | tests/BenchmarkDotNet.Tests/Exporters/MarkdownExporterVerifyTests.cs | {
"start": 2432,
"end": 2921
} | public class ____
{
[Params(2, 10), UsedImplicitly] public int Param;
[Benchmark] public void Base() { }
[Benchmark] public void Foo() { }
[Benchmark] public void Bar() { }
}
[RankColumn, LogicalGroupColumn, BaselineCo... | NoBaseline_MethodsParamsJobs |
csharp | MassTransit__MassTransit | src/MassTransit/Configuration/DependencyInjection/DependencyInjectionRegistrationExtensions.cs | {
"start": 7626,
"end": 10321
} | class
____ TImplementation : class, TService
{
services.Replace(new ServiceDescriptor(typeof(TService), typeof(TImplementation), ServiceLifetime.Scoped));
}
static void AddInstrumentation(IServiceCollection collection)
{
collection.AddOptions<Instrume... | where |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/src/Types/Types/DirectiveType.cs | {
"start": 626,
"end": 7198
} | public partial class ____
: TypeSystemObject<DirectiveTypeConfiguration>
, IDirectiveDefinition
, IHasRuntimeType
, ITypeIdentityProvider
{
private Action<IDirectiveTypeDescriptor>? _configure;
private Func<object?[], object> _createInstance = null!;
private Action<object, object?[]> _getFie... | DirectiveType |
csharp | dotnet__efcore | src/EFCore/Metadata/ITypeBase.cs | {
"start": 428,
"end": 12612
} | public interface ____ : IReadOnlyTypeBase, IAnnotatable
{
/// <summary>
/// Gets the model that this type belongs to.
/// </summary>
new IModel Model { get; }
/// <summary>
/// Gets this entity type or the one on which the complex property chain is declared.
/// </summary>
new I... | ITypeBase |
csharp | App-vNext__Polly | src/Polly/Caching/ISyncCacheProvider.cs | {
"start": 185,
"end": 1205
} | public interface ____
{
#pragma warning disable SA1414
/// <summary>
/// Gets a value from cache.
/// </summary>
/// <param name="key">The cache key.</param>
/// <returns>
/// A tuple whose first element is a value indicating whether the key was found in the cache,
/// and whose second eleme... | ISyncCacheProvider |
csharp | xunit__xunit | src/xunit.v1.tests/xunit/NotNullTests.cs | {
"start": 51,
"end": 280
} | public class ____
{
[Fact]
public void NotNull()
{
Assert.NotNull(new object());
}
[Fact]
public void NotNullThrowsException()
{
Assert.Throws<NotNullException>(() => Assert.NotNull(null));
}
}
}
| NotNullTests |
csharp | MassTransit__MassTransit | tests/MassTransit.EventHubIntegration.Tests/Configuration.cs | {
"start": 55,
"end": 421
} | static class ____
{
public static string ConsumerGroup = "cg1";
public static string EventHubNamespace =>
"Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;";
public static string StorageAccount => "... | Configuration |
csharp | icsharpcode__ILSpy | ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs | {
"start": 3956,
"end": 11195
} | class ____ the original parameters.</summary>
/// <remarks>Set in MatchEnumeratorCreationPattern() and ResolveIEnumerableIEnumeratorFieldMapping()</remarks>
readonly Dictionary<IField, ILVariable> fieldToParameterMap = new Dictionary<IField, ILVariable>();
/// <summary>This dictionary stores the information ext... | to |
csharp | ChilliCream__graphql-platform | src/Nitro/CommandLine/src/CommandLine.Cloud/Generated/ApiClient.Client.cs | {
"start": 3107173,
"end": 3107544
} | public partial interface ____ : IOnFusionConfigurationPublishingTaskChanged_OnFusionConfigurationPublishingTaskChanged_Changes_Changes_6, IUnionMemberAdded
{
}
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "15.1.8.0")]
| IOnFusionConfigurationPublishingTaskChanged_OnFusionConfigurationPublishingTaskChanged_Changes_Changes_UnionMemberAdded |
csharp | icsharpcode__ILSpy | ICSharpCode.ILSpyX/Analyzers/Builtin/FindTypeInAttributeDecoder.cs | {
"start": 2140,
"end": 5697
} | class ____ : ICustomAttributeTypeProvider<TokenSearchResult>
{
readonly MetadataFile declaringModule;
readonly MetadataModule currentModule;
readonly TypeDefinitionHandle handle;
readonly PrimitiveTypeCode primitiveType;
/// <summary>
/// Constructs a FindTypeInAttributeDecoder that can be used to find <p... | FindTypeInAttributeDecoder |
csharp | exceptionless__Exceptionless | tests/Exceptionless.Tests/SerializerTests.cs | {
"start": 332,
"end": 6712
} | public class ____ : TestWithServices
{
public SerializerTests(ITestOutputHelper output) : base(output) { }
[Fact]
public void CanDeserializeEventWithUnknownNamesAndProperties()
{
const string json = @"{""tags"":[""One"",""Two""],""reference_id"":""12"",""Message"":""Hello"",""SomeString"":""Hi"... | SerializerTests |
csharp | jbogard__MediatR | src/MediatR/MicrosoftExtensionsDI/MediatrServiceConfiguration.cs | {
"start": 5729,
"end": 8131
} | interface ____</typeparam>
/// <typeparam name="TImplementationType">Closed behavior implementation type</typeparam>
/// <param name="serviceLifetime">Optional service lifetime, defaults to <see cref="ServiceLifetime.Transient"/>.</param>
/// <returns>This</returns>
public MediatRServiceConfiguration A... | type |
csharp | nuke-build__nuke | source/Nuke.Common/Tools/Kubernetes/Kubernetes.Generated.cs | {
"start": 875159,
"end": 876339
} | public partial class ____ : Enumeration
{
public static KubernetesRunOutput json = (KubernetesRunOutput) "json";
public static KubernetesRunOutput yaml = (KubernetesRunOutput) "yaml";
public static KubernetesRunOutput name = (KubernetesRunOutput) "name";
public static KubernetesRunOutput templatefile = ... | KubernetesRunOutput |
csharp | unoplatform__uno | src/Uno.UWP/Generated/3.0.0.0/Windows.Web.Http.Headers/HttpContentDispositionHeaderValue.cs | {
"start": 299,
"end": 8870
} | public partial class ____ : global::Windows.Foundation.IStringable
{
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "__TVOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__")]
public ulo... | HttpContentDispositionHeaderValue |
csharp | graphql-dotnet__graphql-dotnet | src/GraphQL.Tests/Bugs/Issue4060.cs | {
"start": 258,
"end": 3746
} | public class ____
{
[Fact]
public async Task VariableModification_ShouldReflectInSecondField()
{
var query = new ObjectGraphType();
query.Field<StringGraphType>("modifyVar")
.Resolve(context =>
{
context.Variables.Find("inputVar")!.Value = "modifiedVa... | Issue4060 |
csharp | dotnet__aspnetcore | src/Components/Web/src/WebEventData/FocusEventArgsReader.cs | {
"start": 229,
"end": 866
} | internal static class ____
{
private static readonly JsonEncodedText Type = JsonEncodedText.Encode("type");
internal static FocusEventArgs Read(JsonElement jsonElement)
{
var eventArgs = new FocusEventArgs();
foreach (var property in jsonElement.EnumerateObject())
{
if (... | FocusEventArgsReader |
csharp | dotnet__aspnetcore | src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/PublishedSitesFixture.cs | {
"start": 459,
"end": 657
} | public class ____ : ICollectionFixture<PublishedSitesFixture>, ICollectionFixture<ClientCertificateFixture>
{
public const string Name = nameof(PublishedSitesCollection);
}
| PublishedSitesCollection |
csharp | dotnet__BenchmarkDotNet | tests/BenchmarkDotNet.Tests/Builders/HostEnvironmentInfoBuilder.cs | {
"start": 2552,
"end": 3931
} | internal class ____ : HostEnvironmentInfo
{
public MockHostEnvironmentInfo(
string architecture, string benchmarkDotNetVersion, Frequency chronometerFrequency, string configuration, string dotNetSdkVersion,
HardwareTimerKind hardwareTimerKind, bool hasAttachedDebugger, bool hasRyuJit... | MockHostEnvironmentInfo |
csharp | JamesNK__Newtonsoft.Json | Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs | {
"start": 19034,
"end": 19622
} | internal class ____ : XObjectWrapper
{
private XProcessingInstruction ProcessingInstruction => (XProcessingInstruction)WrappedNode!;
public XProcessingInstructionWrapper(XProcessingInstruction processingInstruction)
: base(processingInstruction)
{
}
public overr... | XProcessingInstructionWrapper |
csharp | MonoGame__MonoGame | MonoGame.Framework/GamePlatform.cs | {
"start": 367,
"end": 9295
} | partial class ____ : IDisposable
{
#region Fields
protected TimeSpan _inactiveSleepTime = TimeSpan.FromMilliseconds(20.0);
protected bool _needsToResetElapsedTime = false;
bool disposed;
protected bool InFullScreenMode = false;
protected bool IsDisposed { get { retu... | GamePlatform |
csharp | microsoft__PowerToys | src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/ExtensionInstanceManager`1.cs | {
"start": 4188,
"end": 4437
} | internal partial interface ____
{
void CreateInstance(
[MarshalAs(UnmanagedType.Interface)] object pUnkOuter,
Guid riid,
out IntPtr ppvObject);
void LockServer([MarshalAs(UnmanagedType.Bool)] bool fLock);
}
| IClassFactory |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.Abstractions/Caching/Distributed/IMessageBus.cs | {
"start": 44,
"end": 205
} | public interface ____
{
Task SubscribeAsync(string channel, Action<string, string> handler);
Task PublishAsync(string channel, string message);
}
| IMessageBus |
csharp | dotnet__aspnetcore | src/Mvc/test/WebSites/BasicWebSite/Controllers/ContentNegotiation/ContentNegotiationController.cs | {
"start": 254,
"end": 879
} | public class ____ : Controller
{
public IActionResult Index()
{
return new JsonResult("Index Method");
}
public User UserInfo()
{
return CreateUser();
}
[Produces<User>]
public IActionResult UserInfo_ProducesWithTypeOnly()
{
return new ObjectResult(CreateUse... | ContentNegotiationController |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Data/src/Data/Sorting/Convention/SortOperationConventionConfiguration.cs | {
"start": 38,
"end": 209
} | public class ____
{
public int Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
}
| SortOperationConventionConfiguration |
csharp | MassTransit__MassTransit | src/MassTransit/Configuration/ITransactionConfigurator.cs | {
"start": 80,
"end": 405
} | public interface ____
{
/// <summary>
/// Sets the transaction timeout
/// </summary>
TimeSpan Timeout { set; }
/// <summary>
/// Sets the isolation level of the transaction
/// </summary>
IsolationLevel IsolationLevel { set; }
}
}
| ITransactionConfigurator |
csharp | CommunityToolkit__WindowsCommunityToolkit | Microsoft.Toolkit.Uwp.UI.Controls.Layout/BladeView/BladeItem.cs | {
"start": 668,
"end": 3945
} | public partial class ____ : Expander
{
private Button _closeButton;
private Button _enlargeButton;
private double _normalModeWidth;
private bool _loaded = false;
/// <summary>
/// Initializes a new instance of the <see cref="BladeItem"/> class.
/// </summary>... | BladeItem |
csharp | AutoMapper__AutoMapper | src/UnitTests/MappingInheritance/PropertyOnMappingShouldResolveMostSpecificType.cs | {
"start": 239,
"end": 282
} | public class ____ :ItemBase{}
| SpecificItem |
csharp | moq__moq4 | src/Moq.Tests/Regressions/IssueReportsFixture.cs | {
"start": 154630,
"end": 154804
} | public class ____
{
[Fact]
public void Test()
{
new Mock<IFoo>().SetupAllProperties();
}
| _205 |
csharp | ChilliCream__graphql-platform | src/Nitro/CommandLine/src/CommandLine.Cloud/Generated/ApiClient.Client.cs | {
"start": 4575643,
"end": 4576634
} | public partial class ____ : global::StrawberryShake.IOperationResultDataInfo
{
public ShowWorkspaceCommandQueryResultInfo(global::ChilliCream.Nitro.CommandLine.Cloud.Client.State.INodeData? node)
{
Node = node;
}
/// <summary>
/// Fetches an object given its ID.
... | ShowWorkspaceCommandQueryResultInfo |
csharp | dotnet__aspnetcore | src/Components/Web/src/Forms/ValidationMessage.cs | {
"start": 408,
"end": 3675
} | public class ____<TValue> : ComponentBase, IDisposable
{
private EditContext? _previousEditContext;
private Expression<Func<TValue>>? _previousFieldAccessor;
private readonly EventHandler<ValidationStateChangedEventArgs>? _validationStateChangedHandler;
private FieldIdentifier _fieldIdentifier;
///... | ValidationMessage |
csharp | unoplatform__uno | src/SourceGenerators/System.Xaml.Tests/Test/System.Xaml/TestedTypes.cs | {
"start": 11086,
"end": 11417
} | public class ____
{
public NamedItem2 ()
{
References = new List<NamedItem2> ();
}
public NamedItem2 (string name)
: this ()
{
ItemName = name;
}
public string ItemName { get; set; }
public IList<NamedItem2> References { get; private set; }
}
[TypeConverter (typeof (TestValueConverter... | NamedItem2 |
csharp | LibreHardwareMonitor__LibreHardwareMonitor | LibreHardwareMonitorLib/Hardware/Psu/Msi/MsiPsu.cs | {
"start": 2711,
"end": 3254
} | private class ____ : Sensor
{
private readonly UsbApi.IndexInfo _indexInfo;
public PsuSensor(string name, int index, SensorType type, MsiPsu hardware, ISettings settings, UsbApi.IndexInfo indexInfo, bool noHistory = false)
: base(name, index, false, type, hardware, null, settings, noHis... | PsuSensor |
csharp | dotnet__aspnetcore | src/Components/Analyzers/test/SupplyParameterFromFormAnalyzerTest.cs | {
"start": 867,
"end": 1135
} | public class ____ : System.Attribute
{{
public string Name {{ get; set; }}
public string FormName {{ get; set; }}
}}
public interface {typeof(IComponent).Name}
{{
}}
| SupplyParameterFromFormAttribute |
csharp | dotnet__aspnetcore | src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests/Internal/KeyManagementOptionsSetupTest.cs | {
"start": 584,
"end": 4583
} | public class ____
{
[Fact]
public void Configure_SetsExpectedValues()
{
// Arrange
var setup = new KeyManagementOptionsSetup(NullLoggerFactory.Instance);
var options = new KeyManagementOptions()
{
AuthenticatedEncryptorConfiguration = null
};
// A... | KeyManagementOptionsSetupTest |
csharp | dotnet__extensions | src/Libraries/Microsoft.Extensions.AI.Evaluation.Quality/RelevanceTruthAndCompletenessEvaluator.cs | {
"start": 8587,
"end": 8852
} | record ____ value of "relevanceReasoning" as "100% of the response is 100% related to the request". If the score is not 5, write your Reasoning as fewer than 100 words and prioritizing the most important contributing reasons to the score.
Step 1c. Now, | the |
csharp | EventStore__EventStore | src/KurrentDB.Core/Messages/TcpMessage.cs | {
"start": 413,
"end": 803
} | public partial class ____ : Message {
public override TcpConnectionManager Affinity => ConnectionManager;
public readonly TcpConnectionManager ConnectionManager;
public readonly Message Message;
public TcpSend(TcpConnectionManager connectionManager, Message message) {
ConnectionManager = connectionManager;... | TcpSend |
csharp | EventStore__EventStore | src/KurrentDB.Core/ClusterVNode.cs | {
"start": 3807,
"end": 6117
} | public abstract class ____ {
protected static readonly ILogger Log = Serilog.Log.ForContext<ClusterVNode>();
public static readonly TimeSpan ShutdownTimeout =
ClusterVNodeController.ShutdownTimeout + TimeSpan.FromSeconds(1);
public static ClusterVNode<TStreamId> Create<TStreamId>(
ClusterVNodeOptions options,
... | ClusterVNode |
csharp | xunit__xunit | src/xunit.v3.core.tests/Acceptance/Xunit3AcceptanceTests.cs | {
"start": 27465,
"end": 27730
} | class ____
{
[Fact]
public void Test1() { }
[Fact]
public void Test2() { }
}
[CollectionDefinition("Non-Parallel Collection", DisableParallelization = true)]
[TestCaseOrderer(typeof(TestOrdering.AlphabeticalOrderer))]
| TestClassParallelCollection |
csharp | graphql-dotnet__graphql-dotnet | src/GraphQL.Analyzers.Tests/FieldNameAnalyzerTests.cs | {
"start": 19602,
"end": 20006
} | public class ____ : ObjectGraphType
{
public MyGraphType()
{
Field<string>(name: "Text1", nullable: true).{|#0:Name("Text2")|}.Resolve(context => "Test");
}
}
""";
const string fix0 =
"""
... | MyGraphType |
csharp | nopSolutions__nopCommerce | src/Tests/Nop.Tests/Nop.Services.Tests/ScheduleTasks/ScheduleTaskTests.cs | {
"start": 170,
"end": 908
} | public class ____ : BaseNopTest
{
private IStaticCacheManager _staticCacheManager;
[OneTimeSetUp]
public void SetUp()
{
_staticCacheManager = GetService<IStaticCacheManager>();
}
[Test]
public async Task TestClearCacheTask()
{
var test = new ClearCacheTask(_staticCacheM... | ScheduleTaskTests |
csharp | dotnet__machinelearning | src/Microsoft.ML.FastTree/Training/EarlyStoppingCriteria.cs | {
"start": 3637,
"end": 3846
} | internal interface ____ : IComponentFactory<bool, EarlyStoppingRuleBase>
{
new EarlyStoppingRuleBase CreateComponent(IHostEnvironment env, bool lowerIsBetter);
}
| IEarlyStoppingCriterionFactory |
csharp | moq__moq4 | src/Moq/Language/Flow/ISetup.cs | {
"start": 638,
"end": 934
} | public interface ____<TMock, TResult> : ICallback<TMock, TResult>, IReturnsThrows<TMock, TResult>, IVerifies, IFluentInterface
where TMock : class
{
}
/// <summary>
/// Implements the fluent API.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
| ISetup |
csharp | kgrzybek__modular-monolith-with-ddd | src/Modules/Meetings/Domain/Meetings/Rules/AttendeeCanBeAddedOnlyInRsvpTermRule.cs | {
"start": 199,
"end": 593
} | public class ____ : IBusinessRule
{
private readonly Term _rsvpTerm;
internal AttendeeCanBeAddedOnlyInRsvpTermRule(Term rsvpTerm)
{
_rsvpTerm = rsvpTerm;
}
public bool IsBroken() => !_rsvpTerm.IsInTerm(SystemClock.Now);
public string Message => "Attende... | AttendeeCanBeAddedOnlyInRsvpTermRule |
csharp | microsoft__semantic-kernel | dotnet/test/VectorData/Weaviate.ConformanceTests/ModelTests/WeaviateBasicModelTests.cs | {
"start": 835,
"end": 984
} | class ____ : BasicModelTests<Guid>.Fixture
{
public override TestStore TestStore => WeaviateTestStore.UnnamedVectorInstance;
}
}
| Fixture |
csharp | jellyfin__jellyfin | src/Jellyfin.Networking/Manager/NetworkManager.cs | {
"start": 35487,
"end": 35668
} | interface ____ matching subnet, using it as bind address: {Result}", source, result);
return result;
}
}
// Fallback to first available | with |
csharp | unoplatform__uno | src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/Image_Stretch_Full_Taller.xaml.cs | {
"start": 627,
"end": 766
} | partial class ____ : UserControl
{
public Image_Stretch_Full_Taller()
{
this.InitializeComponent();
}
}
}
| Image_Stretch_Full_Taller |
csharp | simplcommerce__SimplCommerce | src/SimplCommerce.Infrastructure/Data/ICustomModelBuilder.cs | {
"start": 89,
"end": 187
} | public interface ____
{
void Build(ModelBuilder modelBuilder);
}
}
| ICustomModelBuilder |
csharp | MassTransit__MassTransit | src/Persistence/MassTransit.MongoDbIntegration/MongoDbIntegration/Courier/Consumers/RoutingSlipActivityFaultedConsumer.cs | {
"start": 161,
"end": 735
} | public class ____ :
IConsumer<RoutingSlipActivityFaulted>
{
readonly IRoutingSlipEventPersister _persister;
public RoutingSlipActivityFaultedConsumer(IRoutingSlipEventPersister persister)
{
_persister = persister;
}
public Task Consume(ConsumeContext<Rou... | RoutingSlipActivityFaultedConsumer |
csharp | MassTransit__MassTransit | tests/MassTransit.Tests/Serialization/JsonSerialization_Specs.cs | {
"start": 10718,
"end": 11158
} | class ____
{
public Envelope()
{
Headers = new Dictionary<string, string>();
MessageType = new List<string>();
}
public IDictionary<string, string> Headers { get; set; }
public object Message { get; set; }
p... | Envelope |
csharp | serilog__serilog-sinks-file | src/Serilog.Sinks.File/Sinks/File/SharedFileSink.AtomicAppend.cs | {
"start": 993,
"end": 7488
} | public sealed class ____ : IFileSink, IDisposable, ISetLoggingFailureListener
{
readonly MemoryStream _writeBuffer;
readonly string _path;
readonly TextWriter _output;
readonly ITextFormatter _textFormatter;
readonly long? _fileSizeLimitBytes;
readonly object _syncRoot = new();
ILoggingFail... | SharedFileSink |
csharp | AvaloniaUI__Avalonia | tests/Avalonia.Markup.Xaml.UnitTests/MarkupExtensions/OptionsMarkupExtensionTests.cs | {
"start": 21460,
"end": 21618
} | public class ____
{
public string Name { get; set; }
public ChildObject()
{
OptionsMarkupExtensionTests.ObjectsCreated++;
}
}
| ChildObject |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/src/Types.Queries/QueryConventionTypeInterceptor.cs | {
"start": 135,
"end": 10354
} | internal sealed class ____ : TypeInterceptor
{
private readonly ErrorTypeHelper _errorTypeHelper = new();
private readonly StringBuilder _sb = new();
private readonly List<ObjectTypeConfiguration> _typeDefs = [];
private TypeInitializer _typeInitializer = null!;
private TypeRegistry _typeRegistry = ... | QueryConventionTypeInterceptor |
csharp | dotnet__orleans | test/Benchmarks/Serialization/Models/Vector3.cs | {
"start": 399,
"end": 532
} | public struct ____
{
[Id(0)]
public float X;
[Id(1)]
public float Y;
[Id(2)]
public float Z;
}
| ImmutableVector3 |
csharp | npgsql__npgsql | src/Npgsql/PostgresDatabaseInfo.cs | {
"start": 22019,
"end": 22944
} | enum ____
Expect<RowDescriptionMessage>(await conn.ReadMessage(async).ConfigureAwait(false), conn);
currentOID = uint.MaxValue;
PostgresEnumType? currentEnum = null;
skipCurrent = false;
while (true)
{
msg = await conn.ReadMessag... | fields |
csharp | SixLabors__ImageSharp | src/ImageSharp/PixelAccessor{TPixel}.cs | {
"start": 1798,
"end": 2823
} | struct ____<TPixel>
where TPixel : unmanaged, IPixel<TPixel>
{
private Buffer2D<TPixel> buffer;
internal PixelAccessor(Buffer2D<TPixel> buffer) => this.buffer = buffer;
/// <summary>
/// Gets the width of the backing <see cref="Image{TPixel}"/>.
/// </summary>
public int Width => this.buf... | PixelAccessor |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Caching/src/Caching/Types/CacheControlDirectiveType.cs | {
"start": 236,
"end": 322
} | interface ____ union types to provide caching hints to
/// the executor.
/// </summary>
| or |
csharp | dotnet__efcore | test/EFCore.SqlServer.FunctionalTests/SqlServerConfigPatternsTest.cs | {
"start": 8720,
"end": 9453
} | public class ____
{
[ConditionalFact]
public async Task Can_register_context_with_DI_container_and_have_it_injected()
{
var serviceProvider = new ServiceCollection()
.AddEntityFrameworkSqlServer()
.AddTransient<NorthwindContext>()
.... | InjectContext |
csharp | OrchardCMS__OrchardCore | src/OrchardCore.Modules/OrchardCore.Placements/Deployment/PlacementsDeploymentSource.cs | {
"start": 230,
"end": 1323
} | public sealed class ____
: DeploymentSourceBase<PlacementsDeploymentStep>
{
private readonly PlacementsManager _placementsManager;
private readonly JsonSerializerOptions _jsonSerializerOptions;
public PlacementsDeploymentSource(
PlacementsManager placementsManager,
IOptions<DocumentJson... | PlacementsDeploymentSource |
csharp | dotnet__efcore | test/EFCore.Tests/ChangeTracking/ComplexPropertyEntryTest.cs | {
"start": 24622,
"end": 24793
} | private class ____
{
public string? Name;
public int Rating;
public FieldTag Tag = null!;
public FieldTog Tog;
}
| FieldManufacturer |
csharp | ServiceStack__ServiceStack | ServiceStack.Text/tests/ServiceStack.Text.Benchmarks/MiniProfiler/ClientTimings.cs | {
"start": 260,
"end": 6685
} | public class ____
{
private const string TimingPrefix = "clientPerformance[timing][";
private const string ProbesPrefix = "clientProbes[";
/// <summary>
/// Gets or sets the list of client side timings
/// </summary>
[DataMember(Order = 2)]
public List<Client... | ClientTimings |
csharp | dotnet__orleans | test/Tester/MinimalReminderTests.cs | {
"start": 287,
"end": 424
} | public class ____ : IClassFixture<MinimalReminderTests.Fixture>
{
private readonly Fixture fixture;
| MinimalReminderTests |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.