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 | dotnet__aspnetcore | src/Mvc/Mvc.Analyzers/test/AvoidHtmlPartialAnalyzerTest.cs | {
"start": 415,
"end": 974
} | public class ____
{
private static readonly DiagnosticDescriptor DiagnosticDescriptor = DiagnosticDescriptors.MVC1000_HtmlHelperPartialShouldBeAvoided;
[Fact]
public Task NoDiagnosticsAreReturned_ForNonUseOfHtmlPartial()
{
var source = @"
namespace AspNetCore
{
using System;
using Syste... | AvoidHtmlPartialAnalyzerTest |
csharp | unoplatform__uno | src/Uno.UI.Runtime.Skia.Wpf/UI/Xaml/Window/UnoWpfWindowHost.cs | {
"start": 627,
"end": 5392
} | internal class ____ : WpfControl, IWpfWindowHost
{
private const string NativeOverlayLayerHost = "NativeOverlayLayerHost";
private const string RenderLayerHost = "RenderLayerHost";
private readonly Style _style = (Style)XamlReader.Parse(
"""
<Style
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentat... | UnoWpfWindowHost |
csharp | dotnetcore__FreeSql | FreeSql/Extensions/AdoNetExtensions.cs | {
"start": 23091,
"end": 23451
} | class ____ T8 : class =>
Select<T1>(that).From<T2, T3, T4, T5, T6, T7, T8>((s, b, c, d, e, f, g, h) => s);
/// <summary>
/// 多表查询
/// </summary>
/// <returns></returns>
public static ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> Select<T1, T2, T3, T4, T5, T6, T7, T8, T9... | where |
csharp | EventStore__EventStore | src/KurrentDB.Core.Tests/Http/BasicAuthentication/basic_authentication.cs | {
"start": 1962,
"end": 2766
} | class ____<TLogFormat, TStreamId> : with_admin_user<TLogFormat, TStreamId> {
protected override async Task Given() {
var response = await MakeJsonPost(
"/users/", new { LoginName = "test1", FullName = "User Full Name", Password = "Pa55w0rd!" }, _admin);
Assert.AreEqual(HttpStatusCode.Created, response.S... | when_requesting_a_protected_resource_with_credentials_provided |
csharp | smartstore__Smartstore | src/Smartstore.Core/Platform/Localization/Utils/LocalizedUrlHelper.cs | {
"start": 176,
"end": 3396
} | public class ____
{
private readonly string _pathBase;
private string _path;
private string? _cultureCode;
public LocalizedUrlHelper(HttpRequest httpRequest)
: this(httpRequest.PathBase.Value!, httpRequest.Path.Value!)
{
Guard.NotNull(httpRequest);
... | LocalizedUrlHelper |
csharp | MonoGame__MonoGame | MonoGame.Framework.Content.Pipeline/Graphics/VertexContent.cs | {
"start": 776,
"end": 11750
} | public sealed class ____
{
VertexChannelCollection channels;
VertexChannel<int> positionIndices;
IndirectPositionCollection positions;
/// <summary>
/// Gets the list of named vertex data channels in the VertexContent.
/// </summary>
/// <value>Collection of ... | VertexContent |
csharp | abpframework__abp | framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/CarouselDemo/CarouselDemoViewComponent.cs | {
"start": 379,
"end": 638
} | public class ____ : AbpViewComponent
{
public const string ViewPath = "/Views/Components/Themes/Shared/Demos/CarouselDemo/Default.cshtml";
public virtual IViewComponentResult Invoke()
{
return View(ViewPath);
}
}
| CarouselDemoViewComponent |
csharp | icsharpcode__ILSpy | ICSharpCode.ILSpyX/MermaidDiagrammer/Factory.Relationships.cs | {
"start": 1341,
"end": 5673
} | partial class ____
{
private IProperty[] GetHasOneRelations(IProperty[] properties) => properties.Where(property => {
IType type = property.ReturnType;
if (type.TryGetNullableType(out var typeArg))
type = typeArg;
return selectedTypes!.Contains(type);
}).ToArray();
private (IProperty property, IT... | ClassDiagrammerFactory |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack.NetFramework/SmartThreadPool/WorkItemsGroupBase.cs | {
"start": 93,
"end": 17869
} | public abstract class ____ : IWorkItemsGroup
{
#region Private Fields
/// <summary>
/// Contains the name of this instance of SmartThreadPool.
/// Can be changed by the user.
/// </summary>
private string _name = "WorkItemsGroupBase";
public WorkItemsGroupBa... | WorkItemsGroupBase |
csharp | abpframework__abp | framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/StandardBundles.cs | {
"start": 97,
"end": 189
} | public static class ____
{
public static string Global = "Global";
}
| Styles |
csharp | dotnetcore__Util | src/Util.FileStorage.Aliyun/IAliyunOssConfigProvider.cs | {
"start": 83,
"end": 246
} | public interface ____ : ITransientDependency {
/// <summary>
/// 获取配置
/// </summary>
Task<AliyunOssOptions> GetConfigAsync();
} | IAliyunOssConfigProvider |
csharp | DapperLib__Dapper | tests/Dapper.Tests/AsyncTests.cs | {
"start": 22316,
"end": 33902
} | private class ____
{
public string? Value { get; set; }
}
[Fact]
public async Task TypeBasedViaTypeAsync()
{
Type type = Common.GetSomeType();
dynamic actual = (await MarsConnection.QueryAsync(type, "select @A as [A], @B as [B]", new { A = 12... | BasicType |
csharp | EventStore__EventStore | src/KurrentDB.Core.Tests/Services/RequestManagement/WriteStreamMgr/when_write_stream_gets_stream_deleted.cs | {
"start": 544,
"end": 1545
} | public class ____ : RequestManagerSpecification<WriteEvents> {
protected override WriteEvents OnManager(FakePublisher publisher) {
return WriteEvents.ForSingleStream(
publisher,
CommitTimeout,
Envelope,
InternalCorrId,
ClientCorrId,
"test123",
ExpectedVersion.Any,
new(DummyEvent()),
Commit... | when_write_stream_gets_stream_deleted |
csharp | atata-framework__atata | test/Atata.IntegrationTests/DataProvision/DirectorySubjectTests.cs | {
"start": 50,
"end": 921
} | public sealed class ____
{
[Test]
public void Ctor_WithNullAsString() =>
Assert.Throws<ArgumentNullException>(() =>
new DirectorySubject((null as string)!));
[Test]
public void Ctor_WithNullAsDirectoryInfo() =>
Assert.Throws<ArgumentNullException>(() =>
new Direc... | DirectorySubjectTests |
csharp | louthy__language-ext | LanguageExt.Core/Concurrency/STM/CommuteRef.cs | {
"start": 483,
"end": 1207
} | struct ____<A>
{
internal CommuteRef(Ref<A> r) => Ref = r;
internal readonly Ref<A> Ref;
public A Value
{
get => Ref.Value;
set => Ref.Value = value;
}
public static implicit operator A(CommuteRef<A> r) => r.Value;
public override string ToString() => Value?.ToString() ??... | CommuteRef |
csharp | unoplatform__uno | src/Uno.UWP/Generated/3.0.0.0/Windows.Media.Core/AudioTrackSupportInfo.cs | {
"start": 293,
"end": 3363
} | public partial class ____
{
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
internal AudioTrackSupportInfo()
{
}
#endif
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
[global::Uno.NotImplemented("__... | AudioTrackSupportInfo |
csharp | mysql-net__MySqlConnector | src/MySqlConnector/Core/ILoadBalancer.cs | {
"start": 32,
"end": 329
} | internal interface ____
{
/// <summary>
/// Returns an <see cref="IEnumerable{String}"/> containing <paramref name="hosts"/> in the order they
/// should be tried to satisfy the load balancing policy.
/// </summary>
IReadOnlyList<string> LoadBalance(IReadOnlyList<string> hosts);
}
| ILoadBalancer |
csharp | unoplatform__uno | src/Uno.UI.Composition/Generated/3.0.0.0/Microsoft.UI.Composition/CompositionPath.cs | {
"start": 259,
"end": 559
} | public partial class ____
{
// Skipping already declared method Microsoft.UI.Composition.CompositionPath.CompositionPath(Windows.Graphics.IGeometrySource2D)
// Forced skipping of method Microsoft.UI.Composition.CompositionPath.CompositionPath(Windows.Graphics.IGeometrySource2D)
}
}
| CompositionPath |
csharp | ardalis__Specification | tests/Ardalis.Specification.Tests/Builders/Builder_OrderThenBy.cs | {
"start": 67,
"end": 5273
} | public record ____(int Id, string FirstName, string LastName, string Email);
[Fact]
public void DoesNothing_GivenThenByWithFalseCondition()
{
var spec1 = new Specification<Customer>();
spec1.Query
.OrderBy(x => x.FirstName)
.ThenBy(x => x.LastName, false);
v... | Customer |
csharp | microsoft__semantic-kernel | dotnet/src/Experimental/Process.IntegrationTests.Resources/ProcessCycleTestResources.cs | {
"start": 7245,
"end": 8305
} | public sealed class ____ : KernelProcessStep<StepState>
{
private StepState? _state;
public override ValueTask ActivateAsync(KernelProcessStepState<StepState> state)
{
this._state = state.State;
return default;
}
[KernelFunction]
public async Task EmitCombinedMessageAsync(Kerne... | FanInStep |
csharp | FastEndpoints__FastEndpoints | Tests/IntegrationTests/FastEndpoints/MessagingTests/CommandBusTests.cs | {
"start": 2050,
"end": 2374
} | public class ____ : ICommandHandler<VoidCommand>
{
public static string FullName = default!;
public Task ExecuteAsync(VoidCommand command, CancellationToken ct)
{
FullName = command.FirstName + " " + command.LastName + " z";
return Task.CompletedTask;
}
}
[DontRegister]
| TestVoidCommandHandler |
csharp | nunit__nunit | src/NUnitFramework/framework/Constraints/CollectionItemsEqualConstraint.cs | {
"start": 284,
"end": 431
} | class ____ all
/// collection constraints that apply some notion of item equality
/// as a part of their operation.
/// </summary>
| for |
csharp | MassTransit__MassTransit | tests/MassTransit.RabbitMqTransport.Tests/PublishFaultObserver_Specs.cs | {
"start": 1602,
"end": 1685
} | public interface ____
{
int Index { get; }
}
| Test |
csharp | CommunityToolkit__dotnet | src/CommunityToolkit.HighPerformance/Helpers/ParallelHelper.ForEach.IInAction.cs | {
"start": 7086,
"end": 7323
} | public interface ____<T>
{
/// <summary>
/// Executes the action on a specified <typeparamref name="T"/> item.
/// </summary>
/// <param name="item">The current item to process.</param>
void Invoke(in T item);
}
| IInAction |
csharp | dotnet__efcore | test/EFCore.Relational.Specification.Tests/Scaffolding/CompiledModelRelationalTestBase.cs | {
"start": 350,
"end": 53459
} | public abstract class ____(NonSharedFixture fixture) : CompiledModelTestBase(fixture)
{
[ConditionalFact]
public virtual Task BigModel_with_JSON_columns()
=> Test(
modelBuilder => BuildBigModel(modelBuilder, jsonColumns: true),
model => AssertBigModel(model, jsonColumns: true),
... | CompiledModelRelationalTestBase |
csharp | abpframework__abp | framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/Microservice/UpdateDockerImagesStep.cs | {
"start": 209,
"end": 831
} | public class ____ : ProjectBuildPipelineStep
{
private readonly string _ymlFilePath;
public UpdateDockerImagesStep(string ymlFilePath)
{
_ymlFilePath = ymlFilePath;
}
public override void Execute(ProjectBuildContext context)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)... | UpdateDockerImagesStep |
csharp | Cysharp__ZLogger | sandbox/GeneratorSandbox/GeneratedMock.cs | {
"start": 263,
"end": 1636
} | partial class ____
{
// [ZLoggerMessage(Information, "Could not open socket to {hostName} {ipAddress}.")]
public static void CouldNotOpenSocket(this ILogger<FooBarBaz> logger, string hostName, int ipAddress)
{
if (!logger.IsEnabled(LogLevel.Information)) return;
logger.Log(LogLevel.Informat... | Log22 |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.WebHost.Endpoints.Tests/AutoQueryCrudModels.cs | {
"start": 12556,
"end": 13136
} | public class ____ : ICreateDb<RockstarAuto>, IReturn<RockstarWithIdAndResultResponse>
{
public string FirstName { get; set; }
public string LastName { get; set; }
[AutoDefault(Value = 21)]
public int? Age { get; set; }
[AutoDefault(Expression = "date(2001,1,1)")]
public DateTime DateOfBirth { ge... | CreateRockstarAdhocNonDefaults |
csharp | smartstore__Smartstore | src/Smartstore.Core/Platform/Configuration/Extensions/IOutputCacheInvalidationObserverSettingExtensions.cs | {
"start": 434,
"end": 684
} | class ____ be observed by the framework. If any setting property
/// of <typeparamref name="TSetting"/> changes, the framework will purge the cache.
/// </summary>
/// <typeparam name="TSetting">The type of the concrete setting | to |
csharp | microsoft__semantic-kernel | dotnet/src/Agents/Orchestration/Handoff/HandoffMessages.cs | {
"start": 1260,
"end": 1964
} | public sealed class ____
{
/// <summary>
/// The chat response message.
/// </summary>
public ChatMessageContent Message { get; init; } = Empty;
}
/// <summary>
/// Extension method to convert a <see cref="ChatMessageContent"/> to a <see cref="Result"/>.
/// </summar... | Response |
csharp | dotnet__aspnetcore | src/Security/Authentication/Google/src/GoogleExtensions.cs | {
"start": 378,
"end": 4081
} | public static class ____
{
/// <summary>
/// Adds Google OAuth-based authentication to <see cref="AuthenticationBuilder"/> using the default scheme.
/// The default scheme is specified by <see cref="GoogleDefaults.AuthenticationScheme"/>.
/// <para>
/// Google authentication allows application users... | GoogleExtensions |
csharp | EventStore__EventStore | src/KurrentDB.Core.Tests/Services/UserManagementService/user_management_service.cs | {
"start": 5503,
"end": 6684
} | public class ____<TLogFormat, TStreamId> : TestFixtureWithUserManagementService<TLogFormat, TStreamId> {
protected override IEnumerable<WhenStep> When() {
yield return
new UserManagementMessage.Create(
Envelope, _ordinaryUser, "user1", "John Doe", new[] { "admin", "other" }, "Johny123!");
}
[Test]
... | when_ordinary_user_attempts_to_create_a_user |
csharp | smartstore__Smartstore | src/Smartstore.Web.Common/TagHelpers/Shared/Media/CoverImageTagHelper.cs | {
"start": 1304,
"end": 6680
} | public class ____ : ImageTagHelper
{
const string PositionAttributeName = "sm-position";
const string EditUrlAttributeName = "sm-edit-url";
/// <summary>
/// Specifies the position of the image inside its content box. Empty by default (image is centered).
/// See "object-pos... | CoverImageTagHelper |
csharp | restsharp__RestSharp | test/RestSharp.Tests.Serializers.Xml/SampleClasses/ListSamples.cs | {
"start": 665,
"end": 764
} | public class ____ {
public string Src { get; set; }
public string Value { get; set; }
}
| Image |
csharp | dotnet__maui | src/TestUtils/src/UITest.Appium/AppiumQuery.cs | {
"start": 137,
"end": 5812
} | public class ____ : IQuery
{
const string ClassToken = "class";
const string IdToken = "id";
const string NameToken = "name";
const string AccessibilityToken = "accessibilityid";
const string XPathToken = "xpath";
const string QuerySeparatorToken = "&";
const string IdQuery = IdToken + "={0}";
const st... | AppiumQuery |
csharp | unoplatform__uno | src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/SwipeControlTests/SwipeControl_ScrollViewer.xaml.cs | {
"start": 557,
"end": 1293
} | partial class ____ : Page
{
public SwipeControl_ScrollViewer()
{
this.InitializeComponent();
TheSecondSUT.ItemsSource = new[]
{
"#FFFF0018",
"#FFFFA52C",
"#FFFFFF41",
"#FF008018",
"#FF0000F9",
"#FF86007D",
"#CCFF0018",
"#CCFFA52C",
"#CCFFFF41",
"#CC008018",
"... | SwipeControl_ScrollViewer |
csharp | icsharpcode__ILSpy | ICSharpCode.Decompiler/Metadata/ReferenceLoadInfo.cs | {
"start": 1225,
"end": 2960
} | public class ____
{
readonly Dictionary<string, UnresolvedAssemblyNameReference> loadedAssemblyReferences = new Dictionary<string, UnresolvedAssemblyNameReference>();
public void AddMessage(string fullName, MessageKind kind, string message)
{
lock (loadedAssemblyReferences)
{
if (!loadedAssemblyRefere... | ReferenceLoadInfo |
csharp | unoplatform__uno | src/Uno.UI.Tests/DependencyProperty/Given_DependencyProperty.ManualPropagation.cs | {
"start": 8598,
"end": 9451
} | public partial class ____ : DependencyObject
{
public MyObject()
{
}
#region SubObject DependencyProperty
public SubObject SubObject
{
get { return (SubObject)GetValue(SubObjectProperty); }
set { SetValue(SubObjectProperty, value); }
}
// Using a DependencyProperty as the backing store for Su... | MyObject |
csharp | abpframework__abp | framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/IBundleItemTagHelper.cs | {
"start": 60,
"end": 174
} | public interface ____ : IBundleTagHelper
{
BundleTagHelperItem CreateBundleTagHelperItem();
}
| IBundleItemTagHelper |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/test/Types.Tests/Types/Validation/InterfaceHasAtLeastOneImplementationRuleTests.cs | {
"start": 311,
"end": 553
} | interface ____ {string: String}
");
}
[Fact]
public void AcceptInterfaceWithOneImplementor()
{
ExpectValid(@"
type Query { stub: Foo }
type Bar implements Foo { string: String }
| Foo |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.ContentManagement.Abstractions/Handlers/IContentFieldHandler.cs | {
"start": 164,
"end": 2454
} | public interface ____
{
Task ActivatedAsync(ActivatedContentFieldContext context, ContentField field);
Task ActivatingAsync(ActivatingContentFieldContext context, ContentField field);
Task InitializingAsync(InitializingContentFieldContext context, ContentField field);
Task InitializedAsync(InitializingC... | IContentFieldHandler |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.WebHost.Endpoints.Tests/ScriptTests/SharpPagesIntegrationTests.cs | {
"start": 1727,
"end": 1879
} | public class ____ : SharpCodePage
{
string render() => @"<h1>Shadowed Index Code Page</h1>";
}
[Page("rockstar")]
| ShadowedIndexPage |
csharp | unoplatform__uno | src/Uno.UI/UI/Xaml/Controls/CommandBar/CommandBarElementCollection.Partial.h.cs | {
"start": 362,
"end": 549
} | internal partial class ____ : IObservableVector<ICommandBarElement>, IVector<ICommandBarElement>
{
bool m_notifyCollectionChanging;
CommandBar? m_parent;
}
}
| CommandBarElementCollection |
csharp | unoplatform__uno | src/Uno.UWP/Generated/3.0.0.0/Windows.UI.Composition/CompositionScopedBatch.cs | {
"start": 297,
"end": 4464
} | public partial class ____ : global::Windows.UI.Composition.CompositionObject
{
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
internal CompositionScopedBatch()
{
}
#endif
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __... | CompositionScopedBatch |
csharp | abpframework__abp | framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/PackageVersionCheckerService.cs | {
"start": 9757,
"end": 9917
} | public class ____
{
public int TotalHits { get; set; }
public NuGetSearchResultPackagesDto[] Data { get; set; }
}
| NuGetSearchResultDto |
csharp | dotnet__aspnetcore | src/Analyzers/Microsoft.AspNetCore.Analyzer.Testing/src/DiagnosticVerifier.cs | {
"start": 733,
"end": 7584
} | public abstract class ____
{
private readonly ITestOutputHelper _testOutputHelper;
/// <inheritdoc />
protected DiagnosticVerifier() : this(null)
{
}
/// <inheritdoc />
protected DiagnosticVerifier(ITestOutputHelper testOutputHelper)
{
_testOutputHelper = testOutputHelper;
... | DiagnosticVerifier |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Concurrency/LocalScheduler.TimerQueue.cs | {
"start": 20457,
"end": 22337
} | private abstract class ____ : IComparable<WorkItem>, IDisposable
{
public readonly LocalScheduler Scheduler;
public readonly DateTimeOffset DueTime;
private SingleAssignmentDisposableValue _disposable;
private int _hasRun;
protected WorkItem(LocalSch... | WorkItem |
csharp | simplcommerce__SimplCommerce | src/Modules/SimplCommerce.Module.PaymentMomo/MomoSecurityHelper.cs | {
"start": 154,
"end": 734
} | public static class ____
{
public static string HashSHA256(string message, string key)
{
byte[] keyBytes = Encoding.UTF8.GetBytes(key);
byte[] messageBytes = Encoding.UTF8.GetBytes(message);
using (var hmacsha256 = new HMACSHA256(keyBytes))
{
... | MomoSecurityHelper |
csharp | SixLabors__Fonts | tests/SixLabors.Fonts.Tests/WriterExtensions.cs | {
"start": 350,
"end": 36546
} | internal static class ____
{
public static void WriteTableHeader(this BigEndianBinaryWriter writer, string tag, uint checksum, uint? offset, uint length)
{
// table header
// Record Type | Name | Description
// ------------|----------|-------------------------------------------------... | WriterExtensions |
csharp | dotnet__efcore | test/EFCore.OData.FunctionalTests/Query/GearsOfWarODataContext.cs | {
"start": 252,
"end": 3668
} | public class ____(DbContextOptions options) : PoolableDbContext(options)
{
public DbSet<Gear> Gears { get; set; }
public DbSet<Squad> Squads { get; set; }
public DbSet<CogTag> Tags { get; set; }
public DbSet<Weapon> Weapons { get; set; }
public DbSet<City> Cities { get; set; }
public DbSet<Missi... | GearsOfWarODataContext |
csharp | dotnet__aspnetcore | src/Mvc/Mvc.RazorPages/src/DependencyInjection/MvcRazorPagesMvcCoreBuilderExtensions.cs | {
"start": 719,
"end": 810
} | class ____ adds razor page functionality to <see cref="IMvcCoreBuilder"/>.
/// </summary>
| that |
csharp | dotnet__aspnetcore | src/Mvc/test/Mvc.IntegrationTests/ComplexTypeIntegrationTestBase.cs | {
"start": 115565,
"end": 115697
} | private class ____
{
public TestInnerModel[] InnerModels { get; set; } = Array.Empty<TestInnerModel>();
}
| TestModel |
csharp | grandnode__grandnode2 | src/Web/Grand.Web.Admin/Controllers/EmailAccountController.cs | {
"start": 648,
"end": 7252
} | public class ____ : BaseAdminController
{
private readonly ICacheBase _cacheBase;
private readonly IEmailAccountService _emailAccountService;
private readonly EmailAccountSettings _emailAccountSettings;
private readonly IEmailAccountViewModelService _emailAccountViewModelService;
private readonly IS... | EmailAccountController |
csharp | Cysharp__MemoryPack | src/MemoryPack.Core/MemoryPackWriter.cs | {
"start": 355,
"end": 20253
} | partial struct ____<TBufferWriter>
#if NET7_0_OR_GREATER
where TBufferWriter : IBufferWriter<byte>
#else
where TBufferWriter : class, IBufferWriter<byte>
#endif
{
const int DepthLimit = 1000;
#if NET7_0_OR_GREATER
ref TBufferWriter bufferWriter;
ref byte bufferReference;
#else
TBufferWriter bu... | MemoryPackWriter |
csharp | rabbitmq__rabbitmq-dotnet-client | projects/Benchmarks/WireFormatting/PrimitivesSerialization.cs | {
"start": 1802,
"end": 2281
} | public class ____ : PrimitivesBase
{
public override void Setup() => WireFormatting.WriteLong(ref _buffer.Span.GetStart(), 12345u);
[Benchmark]
public uint LongRead()
{
WireFormatting.ReadLong(_buffer.Span, out uint v1);
return v1;
}
[Benchma... | PrimitivesLong |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/test/Features.Tests/FeatureCollectionTests.cs | {
"start": 1569,
"end": 2865
} | struct ____ method can't return null. Use 'featureCollection[typeof(System.Int32)] "
+ "is not null' to check if the feature exists.", ex.Message);
}
[Fact]
public void GetMissingFeatureReturnsNull()
{
var interfaces = new FeatureCollection();
Assert.Null(interfaces.Get<Th... | the |
csharp | ServiceStack__ServiceStack | ServiceStack.Redis/src/ServiceStack.Redis/RedisClientSortedSet.Async.cs | {
"start": 466,
"end": 5241
} | internal partial class ____
: IRedisSortedSetAsync
{
private IRedisClientAsync AsyncClient => client;
ValueTask IRedisSortedSetAsync.AddAsync(string value, CancellationToken token)
=> AsyncClient.AddItemToSortedSetAsync(setId, value, token).Await();
private IRedisSortedSetAsync AsAsync() => th... | RedisClientSortedSet |
csharp | xunit__xunit | src/xunit.v3.core.tests/Utility/FixtureMappingManagerTests.cs | {
"start": 4015,
"end": 4688
} | class ____(
IMessageSink messageSink,
ITestContextAccessor contextAccessor)
{
public ITestContextAccessor ContextAccessor { get; } = contextAccessor;
public IMessageSink MessageSink { get; } = messageSink;
}
[Fact]
public async ValueTask CallsDispose()
{
var manager = new TestableFixtureMappingManager()... | FixtureWithMessageSinkAndTestContext |
csharp | microsoft__garnet | test/Garnet.test/RespEtagTests.cs | {
"start": 24218,
"end": 41176
} | record ____ 40 bytes here, because they do not have expirations
while (info.ReadOnlyAddress < untilAddress)
{
var key = $"key{i++:00000}";
_ = db.StringSet(key, key);
info = TestUtils.GetStoreAddressInfo(server);
}
}
#... | is |
csharp | dotnet__maui | src/Controls/src/Core/PlatformConfiguration/iOSSpecific/ScrollView.cs | {
"start": 245,
"end": 2488
} | public static class ____
{
/// <summary>Bindable property for <see cref="ShouldDelayContentTouches"/>.</summary>
public static readonly BindableProperty ShouldDelayContentTouchesProperty = BindableProperty.Create(nameof(ShouldDelayContentTouches), typeof(bool), typeof(ScrollView), true);
/// <summary>Returns a ... | ScrollView |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Controls/Primitives/Thumb.cs | {
"start": 2318,
"end": 2724
} | class ____
/// for this event.
/// </summary>
/// <param name="e">Data about the event.</param>
protected virtual void OnDragStarted(VectorEventArgs e)
{
}
/// <summary>
/// Invoked when an unhandled <see cref="DragDeltaEvent"/> reaches an element in it... | handling |
csharp | aspnetboilerplate__aspnetboilerplate | test/Abp.Tests/Threading/LockExtensions_Tests.cs | {
"start": 133,
"end": 608
} | public class ____
{
private readonly List<int> _list;
public LockExtensions_Tests()
{
_list = new List<int> { 1 };
}
[Fact]
public void Test_Locking()
{
//Just sample usages:
_list.Locking(() => { });
_list.Loc... | LockExtensions_Tests |
csharp | dotnet__aspire | src/Aspire.Hosting/Backchannel/AuxiliaryBackchannelRpcTarget.cs | {
"start": 523,
"end": 5197
} | internal sealed class ____(
ILogger<AuxiliaryBackchannelRpcTarget> logger,
IServiceProvider serviceProvider)
{
private const string McpEndpointName = "mcp";
/// <summary>
/// Gets information about the AppHost for the MCP server.
/// </summary>
/// <param name="cancellationToken">A cancella... | AuxiliaryBackchannelRpcTarget |
csharp | abpframework__abp | framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueProviderManager.cs | {
"start": 236,
"end": 1622
} | public class ____ : IPermissionValueProviderManager, ISingletonDependency
{
public IReadOnlyList<IPermissionValueProvider> ValueProviders => _lazyProviders.Value;
private readonly Lazy<List<IPermissionValueProvider>> _lazyProviders;
protected AbpPermissionOptions Options { get; }
protected IServiceProv... | PermissionValueProviderManager |
csharp | duplicati__duplicati | Duplicati/WebserverCore/Abstractions/ISystemInfoProvider.cs | {
"start": 1318,
"end": 1619
} | public interface ____
{
/// <summary>
/// Gets the system information.
/// </summary>
/// <param name="browserlanguage">The browser language.</param>
/// <returns>The system information.</returns>
Dto.SystemInfoDto GetSystemInfo(CultureInfo? browserlanguage);
}
| ISystemInfoProvider |
csharp | EventStore__EventStore | src/KurrentDB.Core.Tests/Services/Storage/Metastreams/when_having_multiple_metaevents_in_metastream_and_read_index_is_set_to_keep_last_2.cs | {
"start": 600,
"end": 4028
} | public class
____<TLogFormat, TStreamId> : SimpleDbTestScenario<TLogFormat, TStreamId> {
public when_having_multiple_metaevents_in_metastream_and_read_index_is_set_to_keep_last_2()
: base(metastreamMaxCount: 2) {
}
protected override ValueTask<DbResult> CreateDb(TFChunkDbCreationHelper<TLogFormat, TStreamId> dbC... | when_having_multiple_metaevents_in_metastream_and_read_index_is_set_to_keep_last_2 |
csharp | dotnet__aspnetcore | src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs | {
"start": 23203,
"end": 23322
} | public enum ____
{
None = 0,
FlushHeaders = 1,
Aborted = 2,
Completed = 4
}
}
| State |
csharp | dotnet__maui | src/Compatibility/Core/src/iOS/Renderers/NavigationRenderer.cs | {
"start": 29901,
"end": 31343
} | class ____ : UIToolbar
{
readonly List<UIView> _lines = new List<UIView>();
public SecondaryToolbar()
{
TintColor = UIColor.White;
}
public override UIBarButtonItem[] Items
{
get { return base.Items; }
set
{
base.Items = value;
SetupLines();
}
}
public override... | SecondaryToolbar |
csharp | SixLabors__ImageSharp | src/ImageSharp/Processing/ResizeMode.cs | {
"start": 214,
"end": 1438
} | public enum ____
{
/// <summary>
/// Crops the resized image to fit the bounds of its container.
/// </summary>
Crop,
/// <summary>
/// Pads the resized image to fit the bounds of its container.
/// If only one dimension is passed, will maintain the original aspect ratio.
/// </summary>... | ResizeMode |
csharp | PrismLibrary__Prism | tests/Prism.Core.Tests/Events/EventBaseFixture.cs | {
"start": 3196,
"end": 3644
} | class ____ : IEventSubscription
{
public Action<object[]> GetPublishActionReturnValue;
public bool GetPublishActionCalled;
public Action<object[]> GetExecutionStrategy()
{
GetPublishActionCalled = true;
return GetPublishActionRetur... | MockEventSubscription |
csharp | dotnet__aspnetcore | src/Servers/Kestrel/Core/test/MessageBodyTests.cs | {
"start": 53716,
"end": 54892
} | private class ____ : Stream
{
public override void Flush()
{
throw new NotImplementedException();
}
public override int Read(byte[] buffer, int offset, int count)
{
throw new NotImplementedException();
}
public override long Seek(long... | ThrowOnWriteAsynchronousStream |
csharp | abpframework__abp | modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/Documents/Rendering/ScribanDocumentSectionRenderer.cs | {
"start": 298,
"end": 5214
} | public class ____ : IDocumentSectionRenderer
{
protected readonly static List<DocsJsonSection> DocsJsonSections =
[
new("````json", "````"),
new("```json", "```")
];
protected const string DocsParam = "//[doc-params]";
protected const string DocsTemplates = "//[doc-template]";
p... | ScribanDocumentSectionRenderer |
csharp | aspnetboilerplate__aspnetboilerplate | src/Abp.Dapper/Dapper/Filters/Query/MayHaveTenantDapperQueryFilter.cs | {
"start": 273,
"end": 2925
} | public class ____ : IDapperQueryFilter
{
private readonly ICurrentUnitOfWorkProvider _currentUnitOfWorkProvider;
public MayHaveTenantDapperQueryFilter(ICurrentUnitOfWorkProvider currentUnitOfWorkProvider)
{
_currentUnitOfWorkProvider = currentUnitOfWorkProvider;
}
... | MayHaveTenantDapperQueryFilter |
csharp | dotnet__aspnetcore | src/Identity/EntityFrameworkCore/test/EF.InMemory.Test/InMemoryContext.cs | {
"start": 1314,
"end": 2226
} | public class ____<TUser> :
IdentityUserContext<TUser, string>
where TUser : IdentityUser
{
private readonly DbConnection _connection;
private readonly IServiceProvider _serviceProvider;
private InMemoryContext(DbConnection connection, IServiceProvider serviceProvider)
{
_connection = co... | InMemoryContext |
csharp | Cysharp__MemoryPack | src/MemoryPack.Generator/MemoryPackGenerator.cs | {
"start": 3577,
"end": 12348
} | record
____ (node is ClassDeclarationSyntax
or StructDeclarationSyntax
or RecordDeclarationSyntax
or InterfaceDeclarationSyntax);
},
transform: static (context, token) ... | return |
csharp | CommunityToolkit__Maui | src/CommunityToolkit.Maui.Core/Primitives/TouchInteractionStatusChangedEventArgs.shared.cs | {
"start": 126,
"end": 408
} | public class ____(TouchInteractionStatus touchInteractionStatus) : EventArgs
{
/// <summary>
/// Gets the current touch interaction status.
/// </summary>
public TouchInteractionStatus TouchInteractionStatus { get; } = touchInteractionStatus;
} | TouchInteractionStatusChangedEventArgs |
csharp | dotnetcore__WTM | src/WalkingTec.Mvvm.Core/Support/ClaimComparer.cs | {
"start": 198,
"end": 347
} | public class ____ : EqualityComparer<Claim>
{
/// <summary>
/// Claim comparison options
/// </summary>
| ClaimComparer |
csharp | dotnet__efcore | src/ef/Commands/DbContextScriptCommand.Configure.cs | {
"start": 290,
"end": 665
} | internal partial class ____ : ContextCommandBase
{
private CommandOption? _output;
public override void Configure(CommandLineApplication command)
{
command.Description = Resources.DbContextScriptDescription;
_output = command.Option("-o|--output <FILE>", Resources.OutputDescription);
... | DbContextScriptCommand |
csharp | simplcommerce__SimplCommerce | src/Modules/SimplCommerce.Module.Catalog/Models/ProductOption.cs | {
"start": 142,
"end": 462
} | public class ____ : EntityBase
{
public ProductOption()
{
}
public ProductOption(long id)
{
Id = id;
}
[Required(ErrorMessage = "The {0} field is required.")]
[StringLength(450)]
public string Name { get; set; }
}
}
| ProductOption |
csharp | Cysharp__MemoryPack | src/MemoryPack.Unity/Assets/MemoryPack.Unity/Runtime/UnityFormatters.cs | {
"start": 1446,
"end": 2879
} | internal sealed class ____ : MemoryPackFormatter<Gradient>
{
[Preserve]
public override void Serialize<TBufferWriter>(ref MemoryPackWriter<TBufferWriter> writer, ref Gradient? value)
{
if (value == null)
{
writer.WriteNullObjectHeader();
... | GradientFormatter |
csharp | Antaris__RazorEngine | src/source/RazorEngine.Core/Compilation/ReferenceResolver/CompilerReference.cs | {
"start": 11041,
"end": 11931
} | public class ____ : CompilerReference
{
/// <summary>
/// The referenced file.
/// </summary>
public string File { get; private set; }
internal FileReference(string file)
: base(CompilerReferenceType.FileReference)
{
... | FileReference |
csharp | mongodb__mongo-csharp-driver | tests/MongoDB.Driver.Tests/UnifiedTestOperations/UnifiedAssertDifferentLsidOnLastTwoCommandsOperation.cs | {
"start": 784,
"end": 1487
} | public class ____ : IUnifiedSpecialTestOperation
{
private readonly EventCapturer _eventCapturer;
public UnifiedAssertDifferentLsidOnLastTwoCommandsOperation(EventCapturer eventCapturer)
{
_eventCapturer = eventCapturer;
}
public void Execute()
{
... | UnifiedAssertDifferentLsidOnLastTwoCommandsOperation |
csharp | louthy__language-ext | LanguageExt.Parsec/Exceptions.cs | {
"start": 91,
"end": 408
} | public class ____ : Exception
{
public ParserException()
{
}
public ParserException(string message) : base(message)
{
}
public ParserException(string message, Exception innerException) : base(message, innerException)
{
}
}
} | ParserException |
csharp | Testably__Testably.Abstractions | Tests/Testably.Abstractions.Testing.Tests/FileSystem/FileStreamFactoryMockTests.SafeFileHandle.cs | {
"start": 262,
"end": 3430
} | partial class ____
{
[Theory]
[AutoData]
public void MissingFile_ShouldThrowFileNotFoundException(
string path, string contents)
{
Skip.If(Test.IsNetFramework);
path = RealFileSystem.Path.GetFullPath(path);
RealFileSystem.File.WriteAllText(path, contents);
using SafeFileHandle handle = UnmanagedFileLoa... | FileStreamFactoryMockTests |
csharp | unoplatform__uno | src/Uno.UWP/Generated/3.0.0.0/Windows.UI.Composition/RectangleClip.cs | {
"start": 297,
"end": 7483
} | public partial class ____ : global::Windows.UI.Composition.CompositionClip
{
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
internal RectangleClip()
{
}
#endif
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFE... | RectangleClip |
csharp | grandnode__grandnode2 | src/Web/Grand.Web/Commands/Models/News/InsertNewsCommentCommand.cs | {
"start": 114,
"end": 273
} | public class ____ : IRequest<NewsComment>
{
public NewsItem NewsItem { get; set; }
public AddNewsCommentModel Model { get; set; }
} | InsertNewsCommentCommand |
csharp | FastEndpoints__FastEndpoints | Src/Library/Endpoint/Processor/IPreProcessorContext.cs | {
"start": 1024,
"end": 1219
} | interface ____ a pre-processor context with a specific type for the request.
/// </summary>
/// <typeparam name="TRequest">The type of the request object, which must be non-nullable.</typeparam>
| for |
csharp | dotnetcore__FreeSql | Extensions/FreeSql.Extensions.Linq/FreeSqlExtensionsLinq.cs | {
"start": 296,
"end": 2570
} | public static class ____
{
/// <summary>
/// 将 ISelect<T1> 转换为 IQueryable<T1><para></para>
/// 用于扩展如:abp IRepository GetAll() 接口方法需要返回 IQueryable 对象<para></para>
/// 提示:IQueryable 方法污染严重,查询功能的实现也不理想,应尽量避免此转换<para></para>
/// IQueryable<T1> 扩展方法 RestoreToSelect() 可以还原为 ISelect<T... | FreeSqlExtensionsLinqSql |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.Server.Tests/ProxyFeatureTests.cs | {
"start": 9915,
"end": 10005
} | public partial class ____
: TechnologyBase
{
}
| Technology |
csharp | ChilliCream__graphql-platform | src/Nitro/CommandLine/src/CommandLine.Cloud/Generated/ApiClient.Client.cs | {
"start": 244932,
"end": 246968
} | public partial class ____ : global::System.IEquatable<FetchConfiguration_FusionConfigurationByApiId_FusionConfiguration>, IFetchConfiguration_FusionConfigurationByApiId_FusionConfiguration
{
public FetchConfiguration_FusionConfigurationByApiId_FusionConfiguration(global::System.String downloadUrl, global::S... | FetchConfiguration_FusionConfigurationByApiId_FusionConfiguration |
csharp | abpframework__abp | modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityLinkUserRepository.cs | {
"start": 169,
"end": 901
} | public interface ____ : IBasicRepository<IdentityLinkUser, Guid>
{
Task<IdentityLinkUser> FindAsync(
IdentityLinkUserInfo sourceLinkUserInfo,
IdentityLinkUserInfo targetLinkUserInfo,
CancellationToken cancellationToken = default);
Task<List<IdentityLinkUser>> GetListAsync(
Ident... | IIdentityLinkUserRepository |
csharp | dotnet__efcore | src/Shared/ExpressionVisitorExtensions.cs | {
"start": 295,
"end": 4494
} | internal static class ____
{
/// <summary>
/// Dispatches the list of expressions to one of the more specialized visit methods in this class.
/// </summary>
/// <param name="visitor">The expression visitor.</param>
/// <param name="nodes">The expressions to visit.</param>
/// <returns>
/... | ExpressionVisitorExtensions |
csharp | AvaloniaUI__Avalonia | src/Markup/Avalonia.Markup/Markup/Parsers/PropertyPathGrammar.cs | {
"start": 7782,
"end": 8293
} | public class ____ : ISyntax
{
public string TypeName { get; set; } = string.Empty;
public string? TypeNamespace { get; set; }
public override bool Equals(object? obj)
=> obj is CastTypeSyntax other
&& other.TypeName == TypeName
... | CastTypeSyntax |
csharp | smartstore__Smartstore | src/Smartstore.Web.Common/Modelling/InvariantFloatingPointTypeModelBinderProvider.cs | {
"start": 392,
"end": 1126
} | public class ____ : IModelBinderProvider
{
public IModelBinder GetBinder(ModelBinderProviderContext context)
{
Guard.NotNull(context, nameof(context));
var modelType = context.Metadata.UnderlyingOrModelType;
if (modelType == typeof(decimal))
{
... | InvariantFloatingPointTypeModelBinderProvider |
csharp | fluentassertions__fluentassertions | Tests/FluentAssertions.Specs/Types/TypeSelectorSpecs.cs | {
"start": 621,
"end": 24564
} | public class ____
{
[Fact]
public void When_type_selector_is_created_with_a_null_type_it_should_throw()
{
// Arrange
TypeSelector propertyInfoSelector;
// Act
Action act = () => propertyInfoSelector = new TypeSelector((Type)null);
... | TypeSelectorSpecs |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.WebHost.Endpoints.Tests/ScriptTests/JsArrowFunctionTests.cs | {
"start": 7085,
"end": 8287
} | public class ____ : IEqualityComparer<string>
{
public bool Equals(string x, string y) => GetCanonicalString(x) == GetCanonicalString(y);
public int GetHashCode(string obj) => GetCanonicalString(obj).GetHashCode();
private string GetCanonicalString(string word)
... | AnagramEqualityComparer |
csharp | ChilliCream__graphql-platform | src/Nitro/CommandLine/src/CommandLine.Cloud/Generated/ApiClient.Client.cs | {
"start": 3217702,
"end": 3219209
} | public partial class ____ : global::System.IEquatable<PageClientVersionDetailQuery_Node_Workspace>, IPageClientVersionDetailQuery_Node_Workspace
{
public PageClientVersionDetailQuery_Node_Workspace()
{
}
public virtual global::System.Boolean Equals(PageClientVersionDetailQuery_Node_... | PageClientVersionDetailQuery_Node_Workspace |
csharp | unoplatform__uno | src/Uno.UI.Tests/Windows_UI_Input/Given_GestureRecognizer.cs | {
"start": 65433,
"end": 69267
} | public abstract class ____<TArgs> : Validator
{
private string _pendingAssertIdentifier;
private List<(string name, object expected, object actual)> _pendingAssertResult;
internal override void Assert(object args, string identifier)
{
try
{
_pendingAssertIdentifier = identifier;
if (!(a... | Validator |
csharp | xunit__xunit | src/xunit.v3.core.tests/Acceptance/Xunit3TheoryAcceptanceTests.cs | {
"start": 97397,
"end": 97530
} | class ____ : Repro<ClassUnderTest_StaticInterfaceMethod>, IInterfaceWithStaticVirtualMember
{ }
| ClassUnderTest_StaticInterfaceMethod |
csharp | dotnet__aspnetcore | src/Http/Http/test/ApplicationBuilderTests.cs | {
"start": 5397,
"end": 6156
} | private class ____ : IHttpResponseFeature
{
private int _statusCode = 200;
public int StatusCode
{
get => _statusCode;
set
{
_statusCode = HasStarted ? throw new NotSupportedException("The response has already started") : value;
... | TestHttpResponseFeature |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.