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 | DuendeSoftware__IdentityServer | identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubTokenResponseGenerator.cs | {
"start": 247,
"end": 512
} | internal class ____ : ITokenResponseGenerator
{
public TokenResponse Response { get; set; } = new TokenResponse();
public Task<TokenResponse> ProcessAsync(TokenRequestValidationResult validationResult) => Task.FromResult(Response);
}
| StubTokenResponseGenerator |
csharp | ChilliCream__graphql-platform | src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Formatters/DefaultHttpResponseFormatter.cs | {
"start": 27818,
"end": 29080
} | private sealed class ____
{
private readonly byte[] _schema;
public CachedSchemaOutput(ISchemaDefinition schema, ulong version, DateTimeOffset lastModifiedTime)
{
_schema = Encoding.UTF8.GetBytes(schema.ToString());
FileName = GetSchemaFileName(schema);
E... | CachedSchemaOutput |
csharp | abpframework__abp | modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/Documents/MongoDocumentRepository.cs | {
"start": 334,
"end": 13997
} | public class ____ : MongoDbRepository<IDocsMongoDbContext, Document, Guid>, IDocumentRepository
{
public MongoDocumentRepository(IMongoDbContextProvider<IDocsMongoDbContext> dbContextProvider)
: base(dbContextProvider)
{
}
public virtual async Task<List<DocumentWithoutDe... | MongoDocumentRepository |
csharp | dotnet__machinelearning | src/Microsoft.ML.Transforms/SvmLight/SvmLightLoader.cs | {
"start": 20657,
"end": 36836
} | private sealed class ____ : RootCursorBase
{
private readonly TextDataView _parent;
private readonly bool _isActive;
private int _fileIdx;
private TextReader _currReader;
private ReadOnlyMemory<char> _text;
priva... | Cursor |
csharp | SixLabors__Fonts | tests/SixLabors.Fonts.Tests/ImageComparison/TolerantImageComparer.cs | {
"start": 272,
"end": 5378
} | public class ____ : ImageComparer
{
// 1% of all pixels in a 100*100 pixel area are allowed to have a difference of 1 unit
// 257 = (1 / 255) * 65535.
public const float DefaultImageThreshold = 257F / (100 * 100 * 65535);
/// <summary>
/// Individual Manhattan pixel difference is only added to tota... | TolerantImageComparer |
csharp | RicoSuter__NJsonSchema | src/NJsonSchema.Tests/Generation/SystemTextJson/SystemTextJsonInheritanceTests.cs | {
"start": 3062,
"end": 3518
} | public class ____
{
public string Baz { get; set; }
}
[Fact]
public async Task When_using_native_attributes_and_integer_discriminator_in_SystemTextJson_then_schema_is_correct()
{
// Act
var schema = JsonSchema.FromType<Dog>();
var ... | Dog |
csharp | dotnet__orleans | src/Orleans.TestingHost/TestClusterOptions.cs | {
"start": 227,
"end": 6873
} | public class ____
{
/// <summary>
/// Gets or sets the cluster identifier.
/// </summary>
/// <seealso cref="ClusterOptions.ClusterId"/>
/// <value>The cluster identifier.</value>
public string ClusterId { get; set; }
/// <summary>
/// Gets or sets th... | TestClusterOptions |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Linq/Observable/CombineLatest.cs | {
"start": 14660,
"end": 15468
} | private sealed class ____ : SafeObserver<TSource>
{
private readonly _ _parent;
private readonly int _index;
public SourceObserver(_ parent, int index)
{
_parent = parent;
_index = index;
... | SourceObserver |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Linq/Observable/OnErrorResumeNext.cs | {
"start": 293,
"end": 761
} | internal sealed class ____<TSource> : Producer<TSource, OnErrorResumeNext<TSource>._>
{
private readonly IEnumerable<IObservable<TSource>> _sources;
public OnErrorResumeNext(IEnumerable<IObservable<TSource>> sources)
{
_sources = sources;
}
protected override _ ... | OnErrorResumeNext |
csharp | ChilliCream__graphql-platform | src/Nitro/CommandLine/src/CommandLine.Cloud/Generated/ApiClient.Client.cs | {
"start": 678350,
"end": 679016
} | public partial interface ____ : ISchemaChange
{
public global::System.String Coordinate { get; }
public global::System.String Name { get; }
/// <summary>
/// The name of the current Object type at runtime.
/// </summary>
public global::System.String __typename { get; ... | IArgumentChanged |
csharp | smartstore__Smartstore | src/Smartstore.Web/Areas/Admin/Models/Orders/OrderModel.cs | {
"start": 5073,
"end": 5349
} | public class ____ : ModelBase
{
[LocalizedDisplay("Admin.Orders.Fields.GiftCardInfo")]
public string CouponCode { get; set; }
public string Amount { get; set; }
public int GiftCardId { get; set; }
}
| GiftCard |
csharp | dotnet__reactive | Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs | {
"start": 49459,
"end": 54088
} | private sealed class ____<TSource, TKey, TElement, TResult> : AsyncIterator<TResult>, IAsyncIListProvider<TResult>
{
private readonly IAsyncEnumerable<TSource> _source;
private readonly Func<TSource, ValueTask<TKey>> _keySelector;
private readonly Func<TSource, ValueTask<TEle... | GroupedResultAsyncEnumerableWithTask |
csharp | ardalis__CleanArchitecture | MinimalClean/src/MinimalClean.Architecture.Web/Infrastructure/Data/SeedData.cs | {
"start": 197,
"end": 989
} | public static class ____
{
public const int NUMBER_OF_PRODUCTS = 10;
public static async Task InitializeAsync(AppDbContext dbContext, ILogger logger)
{
if (await dbContext.Products.AnyAsync())
{
logger.LogInformation("DB has data - seeding not required.");
return; // DB has been seeded
}
... | SeedData |
csharp | dotnet__orleans | test/Grains/TestGrainInterfaces/IRequestContextTestGrain.cs | {
"start": 330,
"end": 777
} | public interface ____ : IGrainWithIntegerKey
{
Task<string> TraceIdEcho();
Task<string> TraceIdDoubleEcho();
Task<string> TraceIdDelayedEcho1();
Task<string> TraceIdDelayedEcho2();
Task<string> TraceIdDelayedEchoAwait();
Task<string> TraceIdDelayedEchoTaskRun();
... | IRequestContextTaskGrain |
csharp | nuke-build__nuke | source/Nuke.Build.Tests/SchemaUtilityTest.cs | {
"start": 3485,
"end": 3636
} | private class ____ : NukeBuild
{
[CustomParameter] readonly ComplexType ComplexTypeParamWithAttribute;
}
| CustomParameterAttributeBuild |
csharp | nuke-build__nuke | source/Nuke.Utilities/Text/String.KnownWords.cs | {
"start": 184,
"end": 495
} | partial class ____
{
private static readonly string[] KnownWords =
{
"DotNet",
"GitHub",
"GitVersion",
"MSBuild",
"NuGet",
"ReSharper",
"AppVeyor",
"TeamCity",
"GitLab",
"SignPath",
"JetBrains"
};
} | StringExtensions |
csharp | dotnet__extensions | test/Analyzers/Microsoft.Analyzers.Local.Tests/ApiLifecycle/AnalysisModelTest.cs | {
"start": 295,
"end": 2586
} | public class ____
{
[Fact]
public void Field_Fallbacks_To_NotNull_Defaults_When_Value_Not_Found_In_Json()
{
var field = new Field([]);
Assert.Equal(string.Empty, field.Member);
Assert.Equal(Stage.Experimental, field.Stage);
}
[Fact]
public void PublicMember_Fallbacks_To... | AnalysisModelTest |
csharp | MahApps__MahApps.Metro | src/MahApps.Metro/Controls/MultiSelectionComboBox/SelectedItemsOrderType.cs | {
"start": 351,
"end": 714
} | public enum ____
{
/// <summary>
/// Displays the selected items in the same order as they were selected
/// </summary>
SelectedOrder,
/// <summary>
/// Displays the selected items in the same order as they are stored in the ItemsSource
/// </summary>
... | SelectedItemsOrderType |
csharp | dotnet__orleans | test/Orleans.CodeGenerator.Tests/snapshots/OrleansSourceGeneratorTests.TestClassWithOptionalConstructorParameters.verified.cs | {
"start": 7286,
"end": 10638
} | public sealed class ____ : global::Orleans.Serialization.Cloning.IDeepCopier<global::TestProject.OptionalCtorParams>, global::Orleans.Serialization.Cloning.IBaseCopier<global::TestProject.OptionalCtorParams>
{
private readonly global::Orleans.Serialization.Activators.IActivator<global::TestProject.OptionalC... | Copier_OptionalCtorParams |
csharp | nopSolutions__nopCommerce | src/Plugins/Nop.Plugin.Payments.PayPalCommerce/Services/Api/PaymentTokens/DeletePaymentTokenRequest.cs | {
"start": 214,
"end": 758
} | public class ____ : IAuthorizedRequest
{
#region Properties
/// <summary>
/// Gets or sets the ID of the payment token.
/// </summary>
[JsonIgnore]
public string Id { get; set; }
/// <summary>
/// Gets the request path
/// </summary>
[JsonIgnore]
public string Path => $"v3/... | DeletePaymentTokenRequest |
csharp | louthy__language-ext | LanguageExt.Core/Monads/Alternative Monads/Either/Operators/Either.Operators.Monad.cs | {
"start": 78,
"end": 1609
} | partial class ____
{
extension<L, A, B>(K<Either<L>, A> self)
{
/// <summary>
/// Monad bind operator
/// </summary>
/// <param name="ma">Monad to bind</param>
/// <param name="f">Binding function</param>
/// <returns>Mapped monad</returns>
public static ... | EitherExtensions |
csharp | louthy__language-ext | LanguageExt.Streaming/Pipes/PipeT/PipeT.DSL.cs | {
"start": 4871,
"end": 6608
} | record ____<IN, OUT, M, A>(Func<PipeT<IN, OUT, M, A>> Acquire) : PipeT<IN, OUT, M, A>
where M : MonadIO<M>
{
public override PipeT<IN, OUT, M, B> Map<B>(Func<A, B> f) =>
new PipeTLazy<IN, OUT, M, B>(() => Acquire().Map(f));
public override PipeT<IN, OUT, M, B> MapM<B>(Func<K<M, A>, K<M, B>> f) =>
... | PipeTLazy |
csharp | smartstore__Smartstore | src/Smartstore.Core/Checkout/Permissions.Checkout.cs | {
"start": 96,
"end": 637
} | public static class ____
{
public const string Self = "order";
public const string Read = "order.read";
public const string Update = "order.update";
public const string Create = "order.create";
public const string Delete = "order.delete";
p... | Order |
csharp | cake-build__cake | src/Cake.Frosting/Annotations/TaskNameAttribute.cs | {
"start": 427,
"end": 880
} | public sealed class ____ : Attribute
{
/// <summary>
/// Gets the task name.
/// </summary>
public string Name { get; }
/// <summary>
/// Initializes a new instance of the <see cref="TaskNameAttribute"/> class.
/// </summary>
/// <param name="name">Th... | TaskNameAttribute |
csharp | ardalis__Specification | tests/Ardalis.Specification.Tests/Evaluators/InMemorySpecificationEvaluatorTests.cs | {
"start": 269,
"end": 7030
} | public record ____(int Id, string FirstName, string LastName, List<string> Emails);
[Fact]
public void Evaluate_ThrowsSelectorNotFoundException_GivenNoSelector()
{
var spec = new Specification<Customer, string>();
var sut = () => _evaluator.Evaluate([], spec);
sut.Should().Throw<S... | CustomerWithMails |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Vulkan/Interop/VulkanCommandBufferPool.cs | {
"start": 125,
"end": 2622
} | internal class ____ : IDisposable
{
private readonly IVulkanPlatformGraphicsContext _context;
private readonly bool _autoFree;
private readonly Queue<VulkanCommandBuffer> _commandBuffers = new();
private VkCommandPool _handle;
public VkCommandPool Handle => _handle;
public VulkanCommandBufferPo... | VulkanCommandBufferPool |
csharp | bitwarden__server | test/Core.Test/AdminConsole/Services/OrganizationServiceTests.cs | {
"start": 1572,
"end": 68329
} | public class ____
{
private readonly IDataProtectorTokenFactory<OrgUserInviteTokenable> _orgUserInviteTokenDataFactory = new FakeDataProtectorTokenFactory<OrgUserInviteTokenable>();
[Theory]
[OrganizationInviteCustomize(InviteeUserType = OrganizationUserType.User,
InvitorUserType = OrganizationUse... | OrganizationServiceTests |
csharp | mongodb__mongo-csharp-driver | src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstPickAccumulatorOperator.cs | {
"start": 673,
"end": 849
} | internal enum ____
{
Bottom,
BottomN,
FirstN,
LastN,
MaxN,
MinN,
Top,
TopN
}
| AstPickAccumulatorOperator |
csharp | domaindrivendev__Swashbuckle.AspNetCore | test/Swashbuckle.AspNetCore.TestSupport/Fixtures/SelfReferencingType.cs | {
"start": 48,
"end": 138
} | public class ____
{
public SelfReferencingType Another { get; set; }
}
| SelfReferencingType |
csharp | ServiceStack__ServiceStack | ServiceStack.OrmLite/tests/ServiceStack.OrmLite.Tests/Issues/SqlExpressionJoinWithRowversionTests.cs | {
"start": 247,
"end": 447
} | public class ____
{
public int Id { get; set; }
public bool Bool { get; set; }
public string Name { get; set; }
public ulong RowVersion { get; set; }
}
| TableA |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Base/Utilities/SafeEnumerableHashSet.cs | {
"start": 411,
"end": 567
} | class ____'t actually implement <see cref="ISet{T}"/> as it's not
/// currently needed - feel free to add missing methods etc.
/// </remarks>
| doesn |
csharp | icsharpcode__ILSpy | ICSharpCode.Decompiler/TypeSystem/InheritanceHelper.cs | {
"start": 1469,
"end": 1951
} | interface ____? (would allow for easy caching)
#region GetBaseMember
/// <summary>
/// Gets the base member that has the same signature.
/// </summary>
public static IMember? GetBaseMember(IMember member)
{
return GetBaseMembers(member, false).FirstOrDefault();
}
/// <summary>
/// Gets all base ... | itself |
csharp | dotnet__orleans | src/Orleans.Analyzers/Constants.cs | {
"start": 34,
"end": 1075
} | internal static class ____
{
public const string SystemNamespace = "System";
public const string IAddressibleFullyQualifiedName = "Orleans.Runtime.IAddressable";
public const string GrainBaseFullyQualifiedName = "Orleans.Grain";
public const string IdAttributeName = "Id";
p... | Constants |
csharp | dotnetcore__CAP | src/DotNetCore.CAP/Transport/IConsumerClient.cs | {
"start": 515,
"end": 2971
} | public interface ____ : IAsyncDisposable
{
/// <summary>
/// Gets the broker address information that this consumer is connected to
/// </summary>
BrokerAddress BrokerAddress { get; }
/// <summary>
/// Creates (if necessary) and retrieves topic identifiers from the message broker
/// </summ... | IConsumerClient |
csharp | App-vNext__Polly | src/Polly.Extensions/DependencyInjection/ConfigureResiliencePipelineRegistryOptions.cs | {
"start": 61,
"end": 242
} | internal sealed class ____<TKey>
where TKey : notnull
{
public List<Action<ResiliencePipelineRegistry<TKey>>> Actions { get; } = [];
}
| ConfigureResiliencePipelineRegistryOptions |
csharp | dotnetcore__Util | test/Util.Ui.NgZorro.Tests/Autocompletes/AutocompleteTagHelperTest.Extend.cs | {
"start": 230,
"end": 7764
} | public partial class ____ {
#region 辅助操作
/// <summary>
/// 添加选项
/// </summary>
private void AppendOptions( StringBuilder result ) {
result.Append( "@if(x_id.isGroup){" );
result.Append( "@for(group of x_id.optionGroups;track group.text ){" );
... | AutocompleteTagHelperTest |
csharp | dotnet__orleans | src/api/Orleans.Core/Orleans.Core.cs | {
"start": 109909,
"end": 110630
} | partial class ____ : global::Orleans.Serialization.Cloning.IDeepCopier<global::Orleans.MembershipEntry>, global::Orleans.Serialization.Cloning.IDeepCopier
{
public Copier_MembershipEntry(global::Orleans.Serialization.Serializers.ICodecProvider codecProvider) { }
public global::Orleans.MembershipEn... | Copier_MembershipEntry |
csharp | dotnet__orleans | test/NonSilo.Tests/Caching/ConcurrentLruSoakTests.cs | {
"start": 673,
"end": 10144
} | public sealed class ____
{
private readonly ITestOutputHelper testOutputHelper;
private const int HotCap = 3;
private const int WarmCap = 3;
private const int ColdCap = 3;
private const int Capacity = HotCap + WarmCap + ColdCap;
private ConcurrentLruCache<int, string> lru = new ConcurrentLruCa... | ConcurrentLruCacheSoakTests |
csharp | protobuf-net__protobuf-net | src/protobuf-net.Test/DateTimeOnlyTests.cs | {
"start": 3499,
"end": 3725
} | public class ____
{
[ProtoMember(1)]
public DateOnly[] Dates { get; set; }
[ProtoMember(2)]
public TimeOnly[] Times { get; set; }
}
}
}
#endif | SomeTypeWithArrays |
csharp | dotnet__aspnetcore | src/Servers/Kestrel/Core/src/Internal/HttpConnection.cs | {
"start": 12913,
"end": 13019
} | private enum ____
{
Initializing,
Selected,
Aborted
}
}
| ProtocolSelectionState |
csharp | dotnet__aspire | src/Aspire.Hosting.Testing/Properties/Resources.Designer.cs | {
"start": 1119,
"end": 4805
} | internal class ____ {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidU... | Resources |
csharp | microsoft__FASTER | cs/test/ReadAddressTests.cs | {
"start": 279,
"end": 591
} | internal class ____
{
const int numKeys = 1000;
const int keyMod = 100;
const int maxLap = numKeys / keyMod;
const int deleteLap = maxLap / 2;
const int defaultKeyToScan = 42;
private static int LapOffset(int lap) => lap * numKeys * 100;
| ReadAddressTests |
csharp | dotnet__maui | src/Core/src/Graphics/PaintExtensions.iOS.cs | {
"start": 178,
"end": 5598
} | partial class ____
{
public static CALayer? ToCALayer(this Paint paint, CGRect frame = default)
{
if (paint is SolidPaint solidPaint)
return solidPaint.CreateCALayer(frame);
if (paint is LinearGradientPaint linearGradientPaint)
return linearGradientPaint.CreateCALayer(frame);
if (paint is Radia... | PaintExtensions |
csharp | MassTransit__MassTransit | tests/MassTransit.Tests/SagaStateMachineTests/Automatonymous/Exception_Specs.cs | {
"start": 17456,
"end": 18045
} | public class ____
{
[Test]
public void Should_finalize_in_catch_block()
{
Assert.That(_instance.CurrentState, Is.EqualTo(_machine.Final));
}
Instance _instance;
InstanceStateMachine _machine;
[OneTimeSetUp]
public async Task Specifying_an... | When_an_action_throws_an_exception_and_catches_it |
csharp | ShareX__ShareX | ShareX.HistoryLib/HistoryManagerSQLite.cs | {
"start": 1178,
"end": 8814
} | public class ____ : HistoryManager, IDisposable
{
private SqliteConnection connection;
public HistoryManagerSQLite(string filePath) : base(filePath)
{
Connect(filePath);
EnsureDatabase();
}
private void Connect(string filePath)
{
... | HistoryManagerSQLite |
csharp | dotnet__aspnetcore | src/SignalR/samples/ClientSample/Tcp/TcpConnection.cs | {
"start": 485,
"end": 7072
} | public class ____ : ConnectionContext, IConnectionInherentKeepAliveFeature
{
private readonly Socket _socket;
private volatile bool _aborted;
private readonly EndPoint _endPoint;
private IDuplexPipe _application;
private readonly SocketSender _sender;
private readonly SocketReceiver _receiver;
... | TcpConnection |
csharp | ServiceStack__ServiceStack | ServiceStack.Blazor/tests/UI.Gallery/Gallery/MyApp/Configure.Markdown.cs | {
"start": 161,
"end": 1891
} | public class ____ : IHostingStartup
{
public void Configure(IWebHostBuilder builder) => builder
.ConfigureServices((context, services) =>
{
context.Configuration.GetSection(nameof(AppConfig)).Bind(AppConfig.Instance);
services.AddSingleton(AppConfig.Instance);
ser... | ConfigureSsg |
csharp | ServiceStack__ServiceStack.OrmLite | tests/ServiceStack.OrmLite.MySql.Tests/Issues/CustomMappingIssue.cs | {
"start": 1546,
"end": 3424
} | public class ____
{
[AutoIncrement]
[PrimaryKey]
public long check_id { get; set; }
public long room_state_id { get; set; }
public DateTime? entry_stamp { get; set; }
public int student_id { get; set; }
public string reason { ge... | Check |
csharp | npgsql__npgsql | src/Npgsql/Internal/Postgres/DataTypeNames.cs | {
"start": 176,
"end": 7087
} | static class ____
{
// Generated from the following query:
// SELECT '"' || string_agg(typname, '" or "') || '"' FROM (
// SELECT typname FROM pg_catalog.pg_type WHERE typtype = 'b' AND typcategory <> 'A'
// AND typnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'pg_catalog') ORDER BY typna... | DataTypeNames |
csharp | dotnet__efcore | test/EFCore.Specification.Tests/PropertyValuesTestBase.cs | {
"start": 165791,
"end": 165871
} | protected struct ____
{
public string? Text { get; set; }
}
| Tog |
csharp | ardalis__CleanArchitecture | sample/tests/NimblePros.SampleToDo.UnitTests/ToDoItemBuilder.cs | {
"start": 208,
"end": 818
} | public class ____
{
private ToDoItem _todo = new ToDoItem();
public ToDoItemBuilder Id(int id)
{
_todo.Id = ToDoItemId.From(id);
return this;
}
public ToDoItemBuilder Title(string title)
{
_todo.Title = title;
return this;
}
public ToDoItemBuilder Description(string description)
{
... | ToDoItemBuilder |
csharp | EventStore__EventStore | src/KurrentDB.Core.Tests/Services/Storage/Transactions/when_having_two_intermingled_transactions_and_some_uncommitted_prepares_in_the_end_read_index_should.cs | {
"start": 631,
"end": 12083
} | public class
____<TLogFormat, TStreamId> :
ReadIndexTestScenario<TLogFormat, TStreamId> {
private EventRecord _p1;
private EventRecord _p2;
private EventRecord _p3;
private EventRecord _p4;
private EventRecord _p5;
private long _pos6, _pos7, _pos8;
private long _t1CommitPos;
private long _t2CommitPos;
pr... | when_having_two_intermingled_transactions_and_some_uncommitted_prepares_in_the_end_read_index_should |
csharp | dotnetcore__FreeSql | FreeSql.Tests/FreeSql.Tests/KingbaseES/MapType/DateTimeOffSetTest.cs | {
"start": 176,
"end": 2380
} | class ____
{
public Guid id { get; set; }
[Column(MapType = typeof(DateTime))]
public DateTimeOffset dtos_to_dt { get; set; }
[Column(MapType = typeof(DateTime))]
public DateTimeOffset? dtofnil_to_dt { get; set; }
}
[Fact]
publ... | Dtos_dt |
csharp | dotnet__maui | src/Controls/src/Core/Interactivity/DataTrigger.cs | {
"start": 316,
"end": 1911
} | public sealed class ____ : TriggerBase
{
/// <include file="../../../docs/Microsoft.Maui.Controls/DataTrigger.xml" path="//Member[@MemberName='.ctor']/Docs/*" />
public DataTrigger([System.ComponentModel.TypeConverter(typeof(TypeTypeConverter))][Parameter("TargetType")] Type targetType) : base(new BindingCondition... | DataTrigger |
csharp | nunit__nunit | src/NUnitFramework/framework/Internal/Extensions/ArgumentsExtensions.cs | {
"start": 217,
"end": 1754
} | internal static class ____
{
/// <summary>
/// Checks if the last element of an argument list is a <see cref="CancellationToken"/>
/// </summary>
public static bool LastArgumentIsCancellationToken(this object?[] arguments)
{
return arguments.Length > 0 && argument... | ArgumentsExtensions |
csharp | graphql-dotnet__graphql-dotnet | src/GraphQL.Tests/Types/Vector3ScalarTests.cs | {
"start": 2370,
"end": 2532
} | public class ____ : Schema
{
public Vector3ScalarSchema()
{
Query = new Vector3ScalarQuery();
}
}
| Vector3ScalarSchema |
csharp | MaterialDesignInXAML__MaterialDesignInXamlToolkit | tests/MaterialDesignThemes.UITests/Samples/AutoSuggestBoxes/AutoSuggestTextBoxWithInteractiveTemplate.xaml.cs | {
"start": 509,
"end": 1739
} | public partial class ____ : ObservableObject
{
private readonly List<SuggestionThing2> _baseSuggestions;
[ObservableProperty]
private List<SuggestionThing2> _suggestions = [];
[ObservableProperty]
private string? _autoSuggestText;
partial void OnAutoSuggestTextChanged(string? value)
{
... | AutoSuggestTextBoxWithInteractiveTemplateViewModel |
csharp | unoplatform__uno | src/Uno.UI/DirectUI/JoltCollections.h.cs | {
"start": 27268,
"end": 28286
} | class ____<xaml_docs.TextRange> :
// public PresentationFrameworkCollectionTemplateBase<xaml_docs.TextRange>
// {
// public:
// // IVector<wf.TextRange> implementation
// IFACEMETHOD(Append)( xaml_docs.TextRange item) override;
// IFACEMETHOD(GetAt)( uint index, out xaml_docs.TextRange item) override;
// IF... | PresentationFrameworkCollection |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/test/Authorization.Tests/CodeFirstAuthorizationTests.cs | {
"start": 16541,
"end": 16807
} | private sealed class ____
{
public Person? GetPerson()
=> new("Joe");
public ICityOrStreet? GetCityOrStreet(bool street)
=> street
? new Street("Somewhere")
: new City("Else");
}
| Query |
csharp | MassTransit__MassTransit | src/MassTransit/Configuration/Configuration/CompositePredicate.cs | {
"start": 124,
"end": 1299
} | public class ____<T>
{
readonly List<Func<T, bool>> _list = new List<Func<T, bool>>();
Func<T, bool> _matchesAll = x => true;
Func<T, bool> _matchesAny = x => true;
Func<T, bool> _matchesNone = x => false;
public void Add(Func<T, bool> filter)
{
_matchesA... | CompositePredicate |
csharp | dotnet__efcore | test/EFCore.SqlServer.FunctionalTests/SeedingSqlServerTest.cs | {
"start": 487,
"end": 772
} | protected class ____(string testId) : SeedingContext(testId)
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseSqlServer(SqlServerTestStore.CreateConnectionString($"Seeds{TestId}"));
}
}
| SeedingSqlServerContext |
csharp | EventStore__EventStore | src/Connectors/KurrentDB.Connectors/Planes/Management/RequestValidation.cs | {
"start": 435,
"end": 1009
} | public class ____(IServiceProvider serviceProvider) {
public ValidationResult Validate<T>(T request) {
var validator = serviceProvider.GetService<IValidator<T>>();
if (validator is null)
throw new InvalidOperationException($"No validator found for {request!.GetType().Name}");
r... | RequestValidationService |
csharp | dotnet__aspnetcore | src/Mvc/Mvc.RazorPages/src/Builder/PageActionEndpointConventionBuilderResourceCollectionExtensions.cs | {
"start": 487,
"end": 2148
} | public static class ____
{
private const string ResourceCollectionResolverKey = "__ResourceCollectionResolver";
/// <summary>
/// Adds a <see cref="ResourceAssetCollection"/> metadata instance to the endpoints.
/// </summary>
/// <param name="builder">The <see cref="PageActionEndpointConventionBuil... | PageActionEndpointConventionBuilderResourceCollectionExtensions |
csharp | dotnetcore__Util | test/Util.Ui.Tests/Samples/Containers/ContainerTagHelper.cs | {
"start": 364,
"end": 705
} | public class ____ : AngularTagHelperBase {
/// <inheritdoc />
protected override IRender GetRender( TagHelperContext context, TagHelperOutput output, TagHelperContent content ) {
var config = new Config( context, output, content );
return new ContainerRender( config );
}
... | ContainerTagHelper |
csharp | nopSolutions__nopCommerce | src/Libraries/Nop.Core/Domain/News/NewsItem.cs | {
"start": 178,
"end": 2029
} | public partial class ____ : BaseEntity, ISlugSupported, IStoreMappingSupported, IMetaTagsSupported
{
/// <summary>
/// Gets or sets the language identifier
/// </summary>
public int LanguageId { get; set; }
/// <summary>
/// Gets or sets the news title
/// </summary>
public string Title... | NewsItem |
csharp | dotnet__maui | src/Controls/tests/Xaml.UnitTests/Issues/Bz28689.xaml.cs | {
"start": 273,
"end": 693
} | class ____
{
[Test]
public void XArrayInResources([Values] XamlInflator inflator)
{
var layout = new Bz28689(inflator);
var array = layout.Resources["stringArray"];
Assert.That(array, Is.TypeOf<string[]>());
var stringarray = (string[])array;
Assert.AreEqual(2, stringarray.Length);
As... | Tests |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.Common.Tests/ContainerChildTests.cs | {
"start": 339,
"end": 511
} | public class ____
{
public readonly string label;
public Dependency(string label)
{
this.label = label;
}
}
| Dependency |
csharp | dotnet__efcore | src/ef/Json.cs | {
"start": 281,
"end": 799
} | internal static class ____
{
public static CommandOption ConfigureOption(CommandLineApplication command)
=> command.Option("--json", Resources.JsonDescription);
public static string Literal(string? text)
=> text != null
? "\"" + text.Replace("\\", "\\\\").Replace("\"", "\\\"") + "\"... | Json |
csharp | RicoSuter__NJsonSchema | src/NJsonSchema.CodeGeneration.CSharp.Tests/ArrayTests.cs | {
"start": 1053,
"end": 1886
} | public class ____
{
[NotNull]
[ItemsCanBeNull]
public List<int?> Items { get; set; }
}
[Fact]
public async Task When_array_item_is_nullable_then_generated_CSharp_is_correct()
{
// Arrange
var schema = NewtonsoftJsonSche... | ClassWithNullableArrayItems |
csharp | JoshClose__CsvHelper | src/CsvHelper/Configuration/ClassMapBuilder.cs | {
"start": 3696,
"end": 3991
} | public interface ____<TClass, TMember> :
IHasMap<TClass>,
IHasTypeConverter<TClass, TMember>,
IHasName<TClass, TMember>,
IHasDefault<TClass, TMember>,
IHasValidate<TClass, TMember>
{ }
/// <summary>
/// Has optional capabilities.
/// </summary>
/// <typeparam name="TClass">The | IHasIndexOptions |
csharp | dotnet__aspnetcore | src/ObjectPool/test/DisposableObjectPoolTest.cs | {
"start": 3121,
"end": 3390
} | private class ____ : IPooledObjectPolicy<List<int>>
{
public List<int> Create()
{
return new List<int>(17);
}
public bool Return(List<int> obj)
{
return obj.Capacity == 17;
}
}
| ListPolicy |
csharp | unoplatform__uno | src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Input/GestureEventsCommons_Tests.cs | {
"start": 295,
"end": 2602
} | public partial class ____ : SampleControlUITestBase
{
[Test]
[AutoRetry]
[ActivePlatforms(Platform.Android)] // Fixed in another commit coming soon
public void When_Tapped_Then_ArgsLocationIsValid()
{
Run("UITests.Shared.Windows_UI_Input.GestureRecognizerTests.GestureEventsCommons");
var root = _app.W... | GestureEventsCommons_Tests |
csharp | nunit__nunit | src/NUnitFramework/framework/Interfaces/ResultState.cs | {
"start": 566,
"end": 9095
} | public class ____ : IEquatable<ResultState>
{
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="ResultState"/> class.
/// </summary>
/// <param name="status">The TestStatus.</param>
public ResultState(TestStatus status) : this(status... | ResultState |
csharp | bitwarden__server | src/Core/Entities/Transaction.cs | {
"start": 143,
"end": 907
} | public class ____ : ITableObject<Guid>
{
public Guid Id { get; set; }
public Guid? UserId { get; set; }
public Guid? OrganizationId { get; set; }
public TransactionType Type { get; set; }
public decimal Amount { get; set; }
public bool? Refunded { get; set; }
public decimal? RefundedAmount {... | Transaction |
csharp | nunit__nunit | src/NUnitFramework/framework/Constraints/CollectionOrderedConstraint.cs | {
"start": 448,
"end": 864
} | public class ____ : CollectionConstraint
{
private readonly List<OrderingStep> _steps = new();
// The step we are currently building
private OrderingStep _activeStep;
// If not ordered, index where ordering breaks
private int _breakingIndex;
// If not ordered, value o... | CollectionOrderedConstraint |
csharp | dotnet__maui | src/Core/src/Handlers/ScrollView/ScrollViewHandler.Standard.cs | {
"start": 106,
"end": 848
} | public partial class ____ : ViewHandler<IScrollView, object>
{
protected override object CreatePlatformView() => throw new NotImplementedException();
public static void MapContent(IViewHandler handler, IScrollView scrollView) { }
public static void MapHorizontalScrollBarVisibility(IViewHandler handler, IScrollV... | ScrollViewHandler |
csharp | ServiceStack__ServiceStack | ServiceStack.Azure/src/ServiceStack.Azure/Storage/AzureTableCacheClient.cs | {
"start": 9868,
"end": 10688
} | public class ____ : TableEntity
{
public TableCacheEntry(string key)
{
this.PartitionKey = "";
this.RowKey = key;
}
public TableCacheEntry() { }
[StringLength(1024 * 2014 /* 1 MB max */
- 1024 /* partition key max size*/
... | TableCacheEntry |
csharp | dotnet__orleans | test/Transactions/Orleans.Transactions.Azure.Test/TestFixture.cs | {
"start": 3194,
"end": 3486
} | public class ____ : TestFixture
{
protected override void ConfigureTestCluster(TestClusterBuilder builder)
{
builder.AddSiloBuilderConfigurator<SkewedClockConfigurator>();
base.ConfigureTestCluster(builder);
}
}
| SkewedClockTestFixture |
csharp | MassTransit__MassTransit | src/Transports/MassTransit.ActiveMqTransport/Topology/IActiveMqSendTopology.cs | {
"start": 60,
"end": 812
} | public interface ____ :
ISendTopology
{
new IActiveMqMessageSendTopologyConfigurator<T> GetMessageTopology<T>()
where T : class;
SendSettings GetSendSettings(ActiveMqEndpointAddress address);
/// <summary>
/// Return the error settings for the queue
/// ... | IActiveMqSendTopology |
csharp | dotnet__orleans | src/Orleans.Core/Providers/IGrainStorageSerializer.cs | {
"start": 1024,
"end": 1717
} | public static class ____
{
/// <summary>
/// Deserializes the provided data.
/// </summary>
/// <param name="serializer">The grain state serializer.</param>
/// <param name="input">The data to deserialize.</param>
/// <typeparam name="T">The output type.</typeparam>
... | GrainStorageSerializerExtensions |
csharp | ChilliCream__graphql-platform | src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/Models/EnumTypeModel.cs | {
"start": 355,
"end": 449
} | enum ____.
/// </param>
/// <param name="description">
/// The description of the | type |
csharp | AvaloniaUI__Avalonia | src/Windows/Avalonia.Win32/DirectX/DirectXStructs.cs | {
"start": 3141,
"end": 3335
} | struct ____
{
public uint DirtyRectsCount;
public RECT* pDirtyRects;
public RECT* pScrollRect;
public POINT* pScrollOffset;
}
| DXGI_PRESENT_PARAMETERS |
csharp | unoplatform__uno | src/Uno.UWP/Devices/Sensors/Barometer.iOS.cs | {
"start": 128,
"end": 1091
} | public partial class ____
{
private CMAltimeter? _altimeter;
private static Barometer? TryCreateInstance() => !CMAltimeter.IsRelativeAltitudeAvailable ?
null :
new Barometer();
private void StartReading()
{
_altimeter ??= new();
_altimeter.StartRelativeAltitudeUpdates(new NSOperationQueue(), Rel... | Barometer |
csharp | Xabaril__AspNetCore.Diagnostics.HealthChecks | test/HealthChecks.UI.Tests/Functional/DatabaseProviders/HostBuilderHelper.cs | {
"start": 129,
"end": 1700
} | public class ____
{
public static IWebHostBuilder Create(ManualResetEventSlim hostReset, ManualResetEventSlim? collectorReset = null, Action<HealthChecksUIBuilder>? configureUI = null)
{
return new WebHostBuilder()
.ConfigureServices(services =>
{
var builder = servi... | HostBuilderHelper |
csharp | aspnetboilerplate__aspnetboilerplate | test/Abp.ZeroCore.SampleApp/Application/AppAuthorizationProvider.cs | {
"start": 121,
"end": 614
} | public class ____ : AuthorizationProvider
{
public override void SetPermissions(IPermissionDefinitionContext context)
{
context.CreatePermission(AppPermissions.TestPermission, AppLocalizationHelper.L("TestPermission"), multiTenancySides: MultiTenancySides.Tenant);
context.CreatePermission("Perm... | AppAuthorizationProvider |
csharp | npgsql__npgsql | test/Npgsql.Tests/CommandTests.cs | {
"start": 40730,
"end": 68923
} | record ____
{
public string A { get; set; } = null!;
public string B { get; set; } = null!;
public string C { get; set; } = null!;
public string D { get; set; } = null!;
public string E { get; set; } = null!;
public string F { get; set; } = null!;
public strin... | BigComposite |
csharp | graphql-dotnet__graphql-dotnet | src/GraphQL/Validation/Variables.cs | {
"start": 269,
"end": 2360
} | public class ____ : IEnumerable<Variable>
{
private List<Variable>? _variables;
/// <summary>
/// Initializes a new instance.
/// </summary>
public Variables()
{
}
internal Variables(int initialCount)
{
_variables = new List<Variable>(initialCount);
}
/// <summary>... | Variables |
csharp | dotnet__aspnetcore | src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs | {
"start": 524,
"end": 6818
} | internal static class ____
{
// These endpoints are required by the Identity Razor components defined in the /Components/Account/Pages directory of this project.
public static IEndpointConventionBuilder MapAdditionalIdentityEndpoints(this IEndpointRouteBuilder endpoints)
{
ArgumentNullException.Thro... | IdentityComponentsEndpointRouteBuilderExtensions |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Fusion-vnext/src/Fusion.Execution.Types/FusionEnumTypeDefinition.cs | {
"start": 1660,
"end": 1909
} | enum ____.
/// </summary>
public string? Description { get; }
/// <summary>
/// Gets the kind of this type.
/// </summary>
public TypeKind Kind => TypeKind.Enum;
/// <summary>
/// Gets the schema coordinate of this | type |
csharp | CommunityToolkit__Maui | src/CommunityToolkit.Maui/Behaviors/PlatformBehaviors/SelectAllText/SelectAllTextBehavior.macios.cs | {
"start": 195,
"end": 2510
} | public class ____ : BasePlatformBehavior<InputView>
{
/// <inheritdoc/>
protected override void OnAttachedTo(InputView bindable, UIView platformView)
{
base.OnAttachedTo(bindable, platformView);
ApplyBehaviorToControl(true, bindable, platformView);
}
/// <inheritdoc/>
protected override void OnDetachedFrom(... | SelectAllTextBehavior |
csharp | dotnet__maui | src/Core/src/Platform/Windows/RoutedEventArgsExtensions.cs | {
"start": 233,
"end": 1602
} | internal static class ____
{
public static void SetHandled(this RoutedEventArgs e, bool value)
{
if (e is RightTappedRoutedEventArgs rt)
rt.Handled = value;
else if (e is TappedRoutedEventArgs t)
t.Handled = value;
else if (e is DoubleTappedRoutedEventArgs dt)
dt.Handled = value;
}
public... | RoutedEventArgsExtensions |
csharp | EventStore__EventStore | src/KurrentDB.LogV3/Raw.cs | {
"start": 8253,
"end": 8357
} | public enum ____ : byte {
Prepare = 0,
Committed = 1,
Failed = 2,
Removed = 3
}
| TransactionStatus |
csharp | microsoft__semantic-kernel | dotnet/src/SemanticKernel.Core/Memory/Mem0/Mem0Client.cs | {
"start": 4495,
"end": 4985
} | internal sealed class ____
{
[JsonPropertyName("app_id")]
public string? AppId { get; set; }
[JsonPropertyName("agent_id")]
public string? AgentId { get; set; }
[JsonPropertyName("run_id")]
public string? RunId { get; set; }
[JsonPropertyName("user_id")]
... | CreateMemoryRequest |
csharp | dotnet__aspnetcore | src/Mvc/perf/benchmarkapps/BasicApi/Migrations/BasicApiContextModelSnapshot.cs | {
"start": 313,
"end": 7981
} | partial class ____ : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
.HasAnnotation("... | BasicApiContextModelSnapshot |
csharp | dotnet__aspire | src/Aspire.Cli/Projects/ProjectUpdater.cs | {
"start": 41468,
"end": 41896
} | internal record ____(
string Description,
Func<Task> Callback,
string PackageId,
string CurrentVersion,
string NewVersion,
FileInfo ProjectFile) : UpdateStep(Description, Callback)
{
public override string GetFormattedDisplayText()
{
return $"[bold yellow]{PackageId}[/] [bold gre... | PackageUpdateStep |
csharp | dotnet__aspnetcore | src/Mvc/Mvc.Razor.RuntimeCompilation/test/FileProviderRazorProjectFileSystemTest.cs | {
"start": 327,
"end": 10583
} | public class ____
{
[Fact]
public void EnumerateFiles_ReturnsEmptySequenceIfNoCshtmlFilesArePresent()
{
// Arrange
var fileProvider = new TestFileProvider("BasePath");
var file1 = fileProvider.AddFile("/File1.txt", "content");
var file2 = fileProvider.AddFile("/File2.js", "co... | FileProviderRazorProjectFileSystemTest |
csharp | unoplatform__uno | src/Uno.Foundation/Metadata/RangeAttribute.cs | {
"start": 189,
"end": 572
} | public partial class ____ : Attribute
{
/// <summary>
/// Creates and initializes a new instance of the attribute with the specified minimum and maximum values.
/// </summary>
/// <param name="minValue">The minimum value allowed.</param>
/// <param name="maxValue">The maximum value allowed.</param>
public RangeAt... | RangeAttribute |
csharp | graphql-dotnet__graphql-dotnet | src/GraphQL.Tests/Types/AutoRegisteringInterfaceGraphTypeTests.cs | {
"start": 34184,
"end": 34284
} | private interface ____ { }
[OutputName("TestWithCustomName")]
| TestInterface_WithCustomInputName |
csharp | OrchardCMS__OrchardCore | test/OrchardCore.Tests/Apis/Context/AuthenticationContext.cs | {
"start": 112,
"end": 2923
} | internal sealed class ____ : AuthorizationHandler<PermissionRequirement>
{
private readonly PermissionsContext _permissionsContext;
// Used for http based graphql tests, marries a permission context to a request
public PermissionContextAuthorizationHandler(IHttpContextAccessor httpContextAccessor, IDiction... | PermissionContextAuthorizationHandler |
csharp | dotnet__BenchmarkDotNet | tests/BenchmarkDotNet.IntegrationTests/ExceptionHandlingTests.cs | {
"start": 4248,
"end": 4982
} | public class ____
{
[IterationCleanup] public void Cleanup() => throw new Exception(IterationCleanupExceptionMessage);
[Benchmark] public void Throw() => throw new Exception(BenchmarkExceptionMessage);
}
[Fact]
public void WhenOneBenchmarkThrowsTheRunnerDoesNotT... | ThrowInBenchmarkAndInIterationCleanup |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.