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 | AvaloniaUI__Avalonia | src/iOS/Avalonia.iOS/Metal/MetalPlatformSurface.cs | {
"start": 75,
"end": 689
} | internal class ____ : IMetalPlatformSurface
{
private readonly CAMetalLayer _layer;
private readonly AvaloniaView _avaloniaView;
public MetalPlatformSurface(CAMetalLayer layer, AvaloniaView avaloniaView)
{
_layer = layer;
_avaloniaView = avaloniaView;
}
public IMetalPlatformSurf... | MetalPlatformSurface |
csharp | nunit__nunit | src/NUnitFramework/testdata/ExecutionHooks/TestActionHooksOutcomeFixtures.cs | {
"start": 302,
"end": 1836
} | public abstract class ____ : ExecutionHookAttribute
{
private TestContext.ResultAdapter? _beforeHookTestResult;
private static readonly string OutcomeMatched = "Outcome Matched";
private static readonly string OutcomeMismatch = "Outcome Mismatch!!!";
private static readonly string Ou... | OutcomeLoggerBaseAttribute |
csharp | getsentry__sentry-dotnet | samples/Sentry.Samples.Maui/Platforms/Windows/App.xaml.cs | {
"start": 321,
"end": 703
} | public partial class ____
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
InitializeComponent();
}
protected overr... | App |
csharp | bchavez__Bogus | Source/Bogus/Tokenizer.cs | {
"start": 96,
"end": 252
} | public class ____
{
public string Name { get; set; }
public MethodInfo Method { get; set; }
public object[] OptionalArgs { get; set; }
}
| MustashMethod |
csharp | icsharpcode__ILSpy | ICSharpCode.Decompiler.Tests/TestCases/Pretty/DeconstructionTests.cs | {
"start": 1537,
"end": 1726
} | public struct ____
{
public static implicit operator int(MyInt x)
{
return 0;
}
public static implicit operator MyInt(int x)
{
return default(MyInt);
}
}
| MyInt |
csharp | unoplatform__uno | src/Uno.UI.Tests/Windows_UI_XAML_Controls/ListViewBaseTests/Given_ListViewBase.cs | {
"start": 23630,
"end": 24094
} | public class ____ : Grid
{
public static int Count { get; private set; }
public static Action CtorCallback = null;
public SelfCountingGrid2()
{
Count++;
CtorCallback?.Invoke();
}
public static IDisposable RestartCounter() => HookCtor(null);
public static IDisposable HookCtor(Action callback)
{
... | SelfCountingGrid2 |
csharp | MassTransit__MassTransit | tests/MassTransit.SignalR.Tests/Utils/IHubManagerConsumerFactory.cs | {
"start": 91,
"end": 257
} | public interface ____<THub>
where THub : Hub
{
MassTransitHubLifetimeManager<THub> HubLifetimeManager { get; set; }
}
}
| IHubManagerConsumerFactory |
csharp | microsoft__garnet | libs/client/LightEpoch.cs | {
"start": 331,
"end": 16242
} | class ____
{
/// Size of cache line in bytes
public const int kCacheLineBytes = 64;
/// <summary>
/// Default invalid index entry.
/// </summary>
const int kInvalidIndex = 0;
/// <summary>
/// Default number of entries in the entries table
/... | LightEpoch |
csharp | getsentry__sentry-dotnet | src/Sentry/Internal/InterlockedBoolean.cs | {
"start": 122,
"end": 1595
} | internal struct ____
{
private volatile TBool _value;
[Browsable(false)]
internal TBool ValueForTests => _value;
#if NET9_0_OR_GREATER
private const TBool True = true;
private const TBool False = false;
#else
private const TBool True = 1;
private const TBool False = 0;
#endif
public I... | InterlockedBoolean |
csharp | dotnet__orleans | test/DefaultCluster.Tests/CodeGenTests/IRuntimeCodeGenGrain.cs | {
"start": 5221,
"end": 5812
} | public interface ____<T> : IGrainWithGuidKey
{
/// <summary>
/// Sets and returns the grain's state.
/// </summary>
/// <param name="value">The new state.</param>
/// <returns>The current state.</returns>
Task<T> SetState(T value);
/// <summary>
/// T... | IRuntimeCodeGenGrain |
csharp | mongodb__mongo-csharp-driver | src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Filters/AstNearFilterOperation.cs | {
"start": 767,
"end": 2189
} | internal sealed class ____ : AstFilterOperation
{
private readonly BsonDocument _geometry;
private readonly BsonValue _maxDistance;
private readonly BsonValue _minDistance;
public AstNearFilterOperation(
BsonDocument geometry,
BsonValue maxDistance = default,... | AstNearFilterOperation |
csharp | RicoSuter__NSwag | src/NSwag.Sample.Common/WeatherForecast.cs | {
"start": 37,
"end": 423
} | public class ____
{
public Station Station { get; set; }
public string DateFormatted { get; set; }
public int TemperatureC { get; set; }
public string Summary { get; set; }
public int TemperatureF
{
get
{
return 32 + (int)(T... | WeatherForecast |
csharp | getsentry__sentry-dotnet | benchmarks/Sentry.Benchmarks/TransactionBenchmarks.cs | {
"start": 65,
"end": 874
} | public class ____
{
private const string Operation = "Operation";
private const string Name = "Name";
[Params(1, 10, 100, 1000)]
public int SpanCount;
private IDisposable _sdk;
[GlobalSetup(Target = nameof(CreateTransaction))]
public void EnabledSdk() => _sdk = SentrySdk.Init(Constants.Va... | TransactionBenchmarks |
csharp | dotnet__orleans | src/Azure/Orleans.Persistence.AzureStorage/Providers/Storage/AzureTableStorage.cs | {
"start": 764,
"end": 15173
} | public partial class ____ : IGrainStorage, IRestExceptionDecoder, ILifecycleParticipant<ISiloLifecycle>
{
private readonly AzureTableStorageOptions options;
private readonly ClusterOptions clusterOptions;
private readonly IGrainStorageSerializer storageSerializer;
private readonly IL... | AzureTableGrainStorage |
csharp | ChilliCream__graphql-platform | src/StrawberryShake/Client/src/Transport.WebSockets/ISocketConnectionInterceptor.cs | {
"start": 140,
"end": 1354
} | public interface ____
{
/// <summary>
/// This method is called before the first message is sent to the server. The object
/// returned from this message, will be passed to the server as the initial payload.
/// </summary>
/// <param name="protocol">
/// The protocol over which the connection wi... | ISocketConnectionInterceptor |
csharp | jellyfin__jellyfin | MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumExternalUrlProvider.cs | {
"start": 315,
"end": 895
} | public class ____ : IExternalUrlProvider
{
/// <inheritdoc/>
public string Name => "TheAudioDb Album";
/// <inheritdoc/>
public IEnumerable<string> GetExternalUrls(BaseItem item)
{
if (item.TryGetProviderId(MetadataProvider.AudioDbAlbum, out var externalId))
{
var baseUr... | AudioDbAlbumExternalUrlProvider |
csharp | grandnode__grandnode2 | src/Web/Grand.Web/Features/Models/Courses/GetCheckOrder.cs | {
"start": 121,
"end": 250
} | public class ____ : IRequest<bool>
{
public Customer Customer { get; set; }
public Course Course { get; set; }
} | GetCheckOrder |
csharp | MassTransit__MassTransit | tests/MassTransit.Tests/Middleware/ConsumeContextRetryContext.cs | {
"start": 1744,
"end": 3419
} | public class ____<TFilter, TContext> :
RetryContext<TFilter>
where TFilter : class, CommandContext
where TContext : RetryCommandContext, TFilter
{
readonly TContext _context;
readonly RetryContext<TFilter> _retryContext;
public ConsumeContextRetryContext(RetryContext... | ConsumeContextRetryContext |
csharp | duplicati__duplicati | Duplicati/Library/Encryption/Strings.cs | {
"start": 2142,
"end": 2336
} | internal static class ____
{
public static string DecryptionError(string message) { return LC.L(@"Failed to decrypt data (invalid passphrase?): {0}", message); }
}
| EncryptionBase |
csharp | dotnet__machinelearning | src/Microsoft.ML.Data/Data/BufferBuilder.cs | {
"start": 673,
"end": 16351
} | internal sealed class ____<T>
{
// Don't walk more than this many items when doing an insert.
private const int InsertThreshold = 20;
private readonly Combiner<T> _comb;
// _length is the logical length of the feature set. Valid indices are non-negative
// indices less than... | BufferBuilder |
csharp | PrismLibrary__Prism | tests/Avalonia/Prism.Avalonia.Tests/Modularity/ModuleManagerFixture.cs | {
"start": 19493,
"end": 19739
} | internal class ____ : IModuleInitializer
{
public Action<ModuleInfo> LoadBody;
public void Initialize(IModuleInfo moduleInfo)
{
LoadBody((ModuleInfo)moduleInfo);
}
}
}
| MockDelegateModuleInitializer |
csharp | dotnet__aspnetcore | src/Mvc/Mvc.ViewFeatures/test/Rendering/HtmlHelperPartialExtensionsTest.cs | {
"start": 22561,
"end": 22709
} | private sealed class ____
{
public override string ToString()
{
return "test-model-content";
}
}
}
| TestModel |
csharp | simplcommerce__SimplCommerce | src/Modules/SimplCommerce.Module.Contacts/Areas/Contacts/ViewModels/ContactAreaTranslationForm.cs | {
"start": 73,
"end": 224
} | public class ____
{
public string DefaultCultureName { get; set; }
public string Name { get; set; }
}
}
| ContactAreaTranslationForm |
csharp | App-vNext__Polly | src/Polly.Core/CircuitBreaker/Health/HealthInfo.cs | {
"start": 57,
"end": 419
} | record ____ HealthInfo(int Throughput, double FailureRate, int FailureCount)
{
public static HealthInfo Create(int successes, int failures)
{
var total = successes + failures;
if (total == 0)
{
return new HealthInfo(0, 0, failures);
}
return new(total, failu... | struct |
csharp | FastEndpoints__FastEndpoints | Tests/IntegrationTests/FastEndpoints/MessagingTests/EventBusTests.cs | {
"start": 1968,
"end": 2228
} | sealed class ____ : IEventHandler<TestEventBus>
{
public static int Result;
public Task HandleAsync(TestEventBus eventModel, CancellationToken ct)
{
Result = eventModel.Id + 2;
return Task.CompletedTask;
}
} | AnotherFakeEventHandler |
csharp | unoplatform__uno | src/Uno.UI/UI/Xaml/Controls/BreadcrumbBar/BreadcrumbIterable.cs | {
"start": 355,
"end": 729
} | internal partial class ____ : IEnumerable<object?>
{
public BreadcrumbIterable()
{
}
public BreadcrumbIterable(object? itemsSource)
{
ItemsSource = itemsSource;
}
public object? ItemsSource { get; }
public IEnumerator<object?> GetEnumerator() => new BreadcrumbIterator(ItemsSource);
IEnumerator IEnumerabl... | BreadcrumbIterable |
csharp | FastEndpoints__FastEndpoints | Web/[Features]/TestCases/Messaging/CommandBusTest/CommandBusTest.cs | {
"start": 1381,
"end": 1505
} | public class ____ : ICommand
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
| VoidCommand |
csharp | microsoft__semantic-kernel | dotnet/src/Connectors/Connectors.Google.UnitTests/Core/Gemini/AuthorRoleConverterTests.cs | {
"start": 294,
"end": 4655
} | public sealed class ____
{
[Fact]
public void ReadWhenRoleIsUserReturnsUser()
{
// Arrange
var converter = new AuthorRoleConverter();
var reader = new Utf8JsonReader("\"user\""u8);
// Act
reader.Read();
var result = converter.Read(ref reader, typeof(AuthorRol... | AuthorRoleConverterTests |
csharp | smartstore__Smartstore | src/Smartstore.Core/Common/Configuration/HomePageSettings.cs | {
"start": 128,
"end": 711
} | public class ____ : ISettings
{
/// <summary>
/// Gets or sets the homepage meta title.
/// </summary>
[LocalizedProperty]
public string MetaTitle { get; set; }
/// <summary>
/// Gets or sets the homepage meta description.
/// </summary>
[Loca... | HomePageSettings |
csharp | microsoft__garnet | libs/common/StreamProvider.cs | {
"start": 1066,
"end": 1146
} | class ____ common logic between stream providers
/// </summary>
| containing |
csharp | dotnet__efcore | test/EFCore.Specification.Tests/ModelBuilding/GiantModel.cs | {
"start": 72846,
"end": 73063
} | public class ____
{
public int Id { get; set; }
public RelatedEntity336 ParentEntity { get; set; }
public IEnumerable<RelatedEntity338> ChildEntities { get; set; }
}
| RelatedEntity337 |
csharp | nopSolutions__nopCommerce | src/Libraries/Nop.Core/Infrastructure/ConcurrentTrie.cs | {
"start": 155,
"end": 19032
} | public partial class ____<TValue> : IConcurrentCollection<TValue>
{
#region Fields
protected volatile TrieNode _root = new();
protected readonly StripedReaderWriterLock _locks = new();
protected readonly ReaderWriterLockSlim _structureLock = new();
#endregion
#region Ctor
/// <summary>
... | ConcurrentTrie |
csharp | AutoFixture__AutoFixture | Src/AutoNSubstituteUnitTest/TestTypes/TypeWithIndexer.cs | {
"start": 64,
"end": 329
} | public abstract class ____
{
private readonly int[] array = new[] { -99, -99, -99 };
public int this[int index]
{
get { return this.array[index]; }
set { this.array[index] = value; }
}
}
}
| TypeWithIndexer |
csharp | dotnet__maui | src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla35733.cs | {
"start": 197,
"end": 1140
} | public class ____ : TestNavigationPage // or TestFlyoutPage, etc ...
{
protected override void Init()
{
var thisDoesNotWorkButton = new Button
{
Text = "This will crash",
AutomationId = "btnGo"
};
thisDoesNotWorkButton.Clicked += async (object sender, EventArgs e) => await ShowLocation("KÅRA")... | Bugzilla35733 |
csharp | dotnet__aspnetcore | src/Middleware/Rewrite/test/IISUrlRewrite/FileParserTests.cs | {
"start": 379,
"end": 9429
} | public class ____
{
[Fact]
public void RuleParse_ParseTypicalRule()
{
// arrange
var xml = @"<rewrite>
<rules>
<rule name=""Rewrite to article.aspx"">
<match url = ""^article/([0-9]+)/([_0-9a-z-]+... | FileParserTests |
csharp | duplicati__duplicati | LiveTests/Duplicati.Backend.Tests/JottaCloud/JottaCloudTests.cs | {
"start": 1286,
"end": 2029
} | public sealed class ____ : BaseTest
{
[TestMethod]
public Task TestJottaCloud()
{
CheckRequiredEnvironment(["TESTCREDENTIAL_JOTTACLOUD_AUTHID", "TESTCREDENTIAL_JOTTACLOUD_FOLDER"]);
var exitCode = CommandLine.BackendTester.Program.Main(
new[]
{
$"jott... | JottaCloudTests |
csharp | grandnode__grandnode2 | src/Business/Grand.Business.Core/Interfaces/Marketing/Newsletters/INewsLetterSubscriptionService.cs | {
"start": 195,
"end": 3176
} | public interface ____
{
/// <summary>
/// Inserts a newsletter subscription
/// </summary>
/// <param name="newsLetterSubscription">NewsLetter subscription</param>
/// <param name="publishSubscriptionEvents">if set to <c>true</c> [publish subscription events].</param>
Task InsertNewsLetterSu... | INewsLetterSubscriptionService |
csharp | nopSolutions__nopCommerce | src/Presentation/Nop.Web.Framework/Extensions/CommonExtensions.cs | {
"start": 204,
"end": 1778
} | public static class ____
{
/// <summary>
/// Returns a value indicating whether real selection is not possible
/// </summary>
/// <param name="items">Items</param>
/// <param name="ignoreZeroValue">A value indicating whether we should ignore items with "0" value</param>
/// <returns>A value indi... | CommonExtensions |
csharp | OrchardCMS__OrchardCore | src/OrchardCore.Modules/OrchardCore.Workflows/Deployment/AllWorkflowTypeDeploymentStep.cs | {
"start": 76,
"end": 229
} | public class ____ : DeploymentStep
{
public AllWorkflowTypeDeploymentStep()
{
Name = "AllWorkflowType";
}
}
| AllWorkflowTypeDeploymentStep |
csharp | icsharpcode__AvalonEdit | ICSharpCode.AvalonEdit/Snippets/SnippetReplaceableTextElement.cs | {
"start": 2136,
"end": 2431
} | public interface ____ : IActiveElement
{
/// <summary>
/// Gets the current text inside the element.
/// </summary>
string Text { get; }
/// <summary>
/// Occurs when the text inside the element changes.
/// </summary>
event EventHandler TextChanged;
}
| IReplaceableActiveElement |
csharp | JoshClose__CsvHelper | tests/CsvHelper.Tests/Reading/ValidateTests.cs | {
"start": 4932,
"end": 5166
} | private class ____ : ClassMap<Test>
{
public ValidationMessageMap()
{
Map(m => m.Id);
Map(m => m.Name).Validate(args => args.Field == "foo", args => $"Field '{args.Field}' was not foo.");
}
}
}
}
| ValidationMessageMap |
csharp | mongodb__mongo-csharp-driver | src/MongoDB.Driver/Linq/Linq3Implementation/Serializers/KeyValuePairWrappedValueSerializer.cs | {
"start": 1309,
"end": 2257
} | internal class ____<TKey, TValue> : SerializerBase<TValue>, IWrappedValueSerializer
{
private readonly IBsonSerializer<KeyValuePair<TKey, TValue>> _keyValuePairSerializer;
private readonly IBsonSerializer<TValue> _valueSerializer;
public KeyValuePairWrappedValueSerializer(IBsonSerializer<TKey> keySerialize... | KeyValuePairWrappedValueSerializer |
csharp | dotnet__aspire | src/Tools/ConfigurationSchemaGenerator/RuntimeSource/Configuration.Binder/Specs/Types/CollectionSpec.cs | {
"start": 1053,
"end": 1202
} | internal sealed record ____ : CollectionWithCtorInitSpec
{
public EnumerableSpec(ITypeSymbol type) : base(type) { }
}
| EnumerableSpec |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Base/Styling/StyleChildren.cs | {
"start": 98,
"end": 1056
} | internal class ____ : Collection<IStyle>
{
private readonly StyleBase _owner;
public StyleChildren(StyleBase owner) => _owner = owner;
protected override void InsertItem(int index, IStyle item)
{
(item as StyleBase)?.SetParent(_owner);
base.InsertItem(index,... | StyleChildren |
csharp | smartstore__Smartstore | src/Smartstore.Core/Data/SmartDbContext.cs | {
"start": 716,
"end": 4216
} | public partial class ____ : HookingDbContext
{
public SmartDbContext(DbContextOptions<SmartDbContext> options)
: base(options)
{
}
protected SmartDbContext(DbContextOptions options)
: base(options)
{
}
[SuppressMessage("Performance", ... | SmartDbContext |
csharp | dotnet__efcore | test/EFCore.Specification.Tests/TestModels/ManyToManyFieldsModel/ProxyableSharedType.cs | {
"start": 233,
"end": 523
} | public class ____
{
private readonly Dictionary<string, object> _keyValueStore = new();
public virtual object this[string key]
{
get => _keyValueStore.TryGetValue(key, out var value) ? value : default;
set => _keyValueStore[key] = value;
}
}
| ProxyableSharedType |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/CheckWebCore/Startup.cs | {
"start": 9318,
"end": 9512
} | public enum ____
{
[EnumMember(Value = "No ne")] None = 0,
[EnumMember(Value = "Template")] Template = 1,
[EnumMember(Value = "Rule")] Rule = 3,
}
| EnumMemberTest |
csharp | abpframework__abp | framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs | {
"start": 708,
"end": 14119
} | public class ____ : IApiDescriptionModelProvider, ITransientDependency
{
public ILogger<AspNetCoreApiDescriptionModelProvider> Logger { get; set; }
private readonly AspNetCoreApiDescriptionModelProviderOptions _options;
private readonly IApiDescriptionGroupCollectionProvider _descriptionProvider;
priva... | AspNetCoreApiDescriptionModelProvider |
csharp | dotnet__aspnetcore | src/Framework/AspNetCoreAnalyzers/test/Mvc/DetectAmbiguousActionRoutesTest.cs | {
"start": 16429,
"end": 16830
} | internal class ____
{
static void Main(string[] args)
{
}
}
";
// Act & Assert
await VerifyCS.VerifyAnalyzerAsync(source);
}
[Fact]
public async Task SameRoutes_SameAction_HostAttribute_HasDiagnostics()
{
// Arrange
var source = @"
using Microsoft.AspNetCore... | Program |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/test/Types.Analyzers.Tests/PagingTests.cs | {
"start": 48693,
"end": 49124
} | partial class ____
{
public static Task<AuthorConnection> GetAuthorsAsync(
GreenDonut.Data.PagingArguments pagingArgs,
CancellationToken cancellationToken)
=> default!;
}
}
... | AuthorQueries |
csharp | mysql-net__MySqlConnector | src/MySqlConnector/MySqlLoadBalance.cs | {
"start": 27,
"end": 602
} | public enum ____
{
/// <summary>
/// Each new connection opened for a connection pool uses the next host name (sequentially with wraparound).
/// </summary>
RoundRobin,
/// <summary>
/// Each new connection tries to connect to the first host; subsequent hosts are used only if connecting to the first one fails.
... | MySqlLoadBalance |
csharp | grandnode__grandnode2 | src/Tests/Grand.Business.Messages.Tests/Services/MimeMappingServiceTests.cs | {
"start": 197,
"end": 1002
} | public class ____
{
private MimeMappingService _service;
[TestInitialize]
public void Init()
{
_service = new MimeMappingService(new FileExtensionContentTypeProvider());
}
[TestMethod]
public void Map_ReturnExpectedValue()
{
Assert.AreEqual("text/plain", _service.Map("f... | MimeMappingServiceTests |
csharp | JamesNK__Newtonsoft.Json | Src/Newtonsoft.Json.Tests/TestObjects/MailAddressReadConverter.cs | {
"start": 1301,
"end": 2573
} | public class ____ : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return objectType == typeof(System.Net.Mail.MailAddress);
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
... | MailAddressReadConverter |
csharp | MassTransit__MassTransit | tests/MassTransit.Tests/PolymorphicFault_Specs.cs | {
"start": 3430,
"end": 3592
} | public interface ____ : IMyMessageInterface
{
string Message { get; }
}
[ExcludeFromTopology]
| IMyGeneralMessageInterface |
csharp | NLog__NLog | src/NLog/LayoutRenderers/ProcessIdLayoutRenderer.cs | {
"start": 2207,
"end": 3206
} | public class ____ : LayoutRenderer, IRawValue
{
private readonly int _processId;
/// <summary>
/// Initializes a new instance of the <see cref="ProcessIdLayoutRenderer" /> class.
/// </summary>
public ProcessIdLayoutRenderer()
: this(LogFactory.DefaultAppEnvironm... | ProcessIdLayoutRenderer |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Base/Utilities/AsyncEnumerableHelper.cs | {
"start": 759,
"end": 1577
} | private sealed class ____<T> : IAsyncEnumerator<T>
{
private readonly IEnumerator<T> _enumerator;
private readonly CancellationToken _cancellationToken;
public EnumeratorAsyncWrapper(IEnumerator<T> enumerator, CancellationToken cancellationToken)
{
_enumerator = enumerat... | EnumeratorAsyncWrapper |
csharp | dotnet__maui | src/Controls/src/Core/Interactivity/PlatformBehavior.cs | {
"start": 720,
"end": 3467
} | partial class ____<TView, TPlatformView> : Behavior<TView>
where TView : Element
where TPlatformView : class
{
TPlatformView? _platformView;
/// <inheritdoc />
protected sealed override void OnAttachedTo(BindableObject bindable)
{
base.OnAttachedTo(bindable);
}
/// <inheritdoc />
protected sealed override... | PlatformBehavior |
csharp | dotnet__aspnetcore | src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterEndpointRoutingTest.cs | {
"start": 268,
"end": 581
} | public class ____ : GlobalAuthorizationFilterTestBase<SecurityWebSite.StartupWithGlobalDenyAnonymousFilter>
{
public override void ConfigureWebHostBuilder(IWebHostBuilder builder) =>
builder.UseStartup<SecurityWebSite.StartupWithGlobalDenyAnonymousFilter>();
}
| GlobalAuthorizationFilterEndpointRoutingTest |
csharp | dotnetcore__FreeSql | Extensions/FreeSql.Extensions.ZeroEntity/Models/SchemaValidationException.cs | {
"start": 69,
"end": 211
} | public class ____ : Exception
{
public SchemaValidationException(string message) : base(message) { }
}
}
| SchemaValidationException |
csharp | microsoft__garnet | playground/Embedded.perftest/PerformanceTestLoggerProvider.cs | {
"start": 943,
"end": 3372
} | private class ____ : ILogger
{
private readonly string categoryName;
private readonly TextWriter textWriter;
public PerformanceTestLogger(string categoryName, TextWriter textWriter)
{
this.categoryName = categoryName;
this.textWrit... | PerformanceTestLogger |
csharp | smartstore__Smartstore | src/Smartstore.Core/Checkout/Permissions.Checkout.cs | {
"start": 2248,
"end": 2646
} | public static class ____
{
public const string Self = "configuration.paymentmethod";
public const string Read = "configuration.paymentmethod.read";
public const string Update = "configuration.paymentmethod.update";
public const string Activate ... | PaymentMethod |
csharp | AvaloniaUI__Avalonia | src/Linux/Avalonia.LinuxFramebuffer/Input/LibInput/LibInputNativeUnsafeMethods.cs | {
"start": 5007,
"end": 7099
} | public enum ____
{
LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL = 0,
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL = 1,
};
[DllImport(LibInput)]
public extern static void libinput_event_destroy(IntPtr ev);
[DllImport(LibInput)]
public extern static In... | LibInputPointerAxis |
csharp | microsoft__PowerToys | src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Pages/MainPage.xaml.cs | {
"start": 713,
"end": 8240
} | partial class ____ : Page
{
private readonly ObservableCollection<ClipboardItem> clipboardHistory;
private readonly Microsoft.UI.Dispatching.DispatcherQueue _dispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread();
private (VirtualKey Key, DateTime Timestamp) _lastK... | MainPage |
csharp | dotnet__maui | src/Controls/src/Core/Items/GroupableItemsView.cs | {
"start": 215,
"end": 1963
} | public class ____ : SelectableItemsView
{
/// <summary>Bindable property for <see cref="IsGrouped"/>.</summary>
public static readonly BindableProperty IsGroupedProperty =
BindableProperty.Create(nameof(IsGrouped), typeof(bool), typeof(GroupableItemsView), false);
/// <include file="../../../docs/Microsoft.M... | GroupableItemsView |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Data/test/Data.EntityFramework.Tests/Query.cs | {
"start": 3071,
"end": 4099
} | public class ____
{
public ValueTask<IQueryable<Author>> GetAuthors(
BookContext context)
=> new(context.Authors);
[UseOffsetPaging(IncludeTotalCount = true)]
[UseFiltering]
[UseSorting]
public ValueTask<IQueryable<Author>> GetAuthorOffsetPaging(
BookContext context)
... | QueryValueTask |
csharp | dotnet__aspire | tests/Aspire.Hosting.Tests/Orchestrator/ApplicationOrchestratorTests.cs | {
"start": 21972,
"end": 22044
} | private sealed class ____(string name) : Resource(name);
| CustomResource |
csharp | dotnet__maui | src/Controls/tests/TestCases.HostApp/Elements/CollectionView/GroupingGalleries/ViewModel.cs | {
"start": 117,
"end": 338
} | class ____ : List<Member>
{
public Team(string name, List<Member> members) : base(members)
{
Name = name;
}
public string Name { get; set; }
public override string ToString()
{
return Name;
}
}
| Team |
csharp | moq__moq4 | src/Moq.Tests/CaptureFixture.cs | {
"start": 2964,
"end": 3148
} | public interface ____
{
void DoSomething(string s);
void DoSomething(int i, string s);
void DoSomething(string s, int i);
}
}
}
| IFoo |
csharp | protobuf-net__protobuf-net | assorted/SilverlightExtended/Nuxleus.Extension/ExtensionMethods.cs | {
"start": 555,
"end": 1761
} | class ____ I have the time.
/// </summary>
/// <param name="source"></param>
/// <param name="value"></param>
/// <returns></returns>
public static string SubstringAfter(this string source, string value) {
if (string.IsNullOrEmpty(value)) {
return sou... | once |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.Abstractions/Shell/Scope/ShellScopeServices.cs | {
"start": 239,
"end": 848
} | public class ____(IServiceProvider services) : IKeyedServiceProvider
{
private readonly IServiceProvider _services = services;
private IServiceProvider Services
=> ShellScope.Services ?? _services;
public object GetKeyedService(Type serviceType, object serviceKey)
=> Services.GetKeyedServi... | ShellScopeServices |
csharp | mongodb__mongo-csharp-driver | src/MongoDB.Bson/Serialization/BsonSerializer.cs | {
"start": 1102,
"end": 1193
} | static class ____ represents the BSON serialization functionality.
/// </summary>
| that |
csharp | jellyfin__jellyfin | src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs | {
"start": 218,
"end": 700
} | public enum ____
{
/// <summary>
/// Default media type or custom one.
/// </summary>
Unknown = 0,
/// <summary>
/// Commercial.
/// </summary>
Commercial = 1,
/// <summary>
/// Preview.
/// </summary>
Preview = 2,
/// <summary>
/// Recap.
/// </summary>
... | MediaSegmentType |
csharp | louthy__language-ext | LanguageExt.Core/Immutable Collections/TrackingHashMap/TrackingHashMap.Module.Eq.cs | {
"start": 217,
"end": 27334
} | partial class ____
{
/// <summary>
/// Creates a singleton TrackingHashMap
/// </summary>
[Pure]
public static TrackingHashMap<EqK, K, V> singleton<EqK, K, V>((K, V) value) where EqK : Eq<K> =>
[value];
/// <summary>
/// Creates a singleton TrackingHashMap
/// </summary>... | TrackingHashMap |
csharp | Xabaril__AspNetCore.Diagnostics.HealthChecks | src/HealthChecks.Rabbitmq/RabbitMQHealthCheck.cs | {
"start": 182,
"end": 1400
} | public class ____ : IHealthCheck
{
private readonly IConnection? _connection;
private readonly IServiceProvider? _serviceProvider;
private readonly Func<IServiceProvider, Task<IConnection>>? _factory;
public RabbitMQHealthCheck(IConnection connection)
{
_connection = Guard.ThrowIfNull(conne... | RabbitMQHealthCheck |
csharp | mongodb__mongo-csharp-driver | tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/MethodTranslators/ConvertMethodToAggregationExpressionTranslatorTests.cs | {
"start": 24855,
"end": 26979
} | public sealed class ____ : MongoCollectionFixture<TestClass, BsonDocument>
{
protected override IEnumerable<BsonDocument> InitialData =>
[
BsonDocument.Parse("{ _id : 0 }"),
BsonDocument.Parse("{ _id : 1, BinaryProperty : BinData(0, 'ogIAAA==') }"),
... | ClassFixture |
csharp | AvaloniaUI__Avalonia | src/Windows/Avalonia.Win32/DComposition/DirectCompositionConnection.cs | {
"start": 427,
"end": 4187
} | internal class ____ : IRenderTimer, IWindowsSurfaceFactory
{
private static readonly Guid IID_IDCompositionDesktopDevice = Guid.Parse("5f4633fe-1e08-4cb8-8c75-ce24333f5602");
public event Action<TimeSpan>? Tick;
public bool RunsInBackground => true;
private readonly DirectCompositionShared _shared;
... | DirectCompositionConnection |
csharp | MapsterMapper__Mapster | src/Mapster.Core/Attributes/BaseAdaptAttribute.cs | {
"start": 2563,
"end": 2753
} | public class ____ : BaseAdaptAttribute
{
public AdaptToAttribute(Type type) : base(type) { }
public AdaptToAttribute(string name) : base(name) { }
}
| AdaptToAttribute |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Linq/Observable/Timeout.cs | {
"start": 1174,
"end": 4851
} | internal sealed class ____ : IdentitySink<TSource>
{
private readonly TimeSpan _dueTime;
private readonly IObservable<TSource> _other;
private readonly IScheduler _scheduler;
private long _index;
private SingleAssignmentDisposa... | _ |
csharp | MassTransit__MassTransit | src/Persistence/MassTransit.MongoDbIntegration/MongoDbIntegration/NoSessionMongoDbCollectionContext.cs | {
"start": 154,
"end": 1799
} | public class ____<T> :
MongoDbCollectionContext<T>
{
static readonly InsertOneOptions _options = new InsertOneOptions();
readonly IMongoCollection<T> _collection;
public NoSessionMongoDbCollectionContext(IMongoCollection<T> collection)
{
_collection = collection;... | NoSessionMongoDbCollectionContext |
csharp | dotnet__BenchmarkDotNet | tests/BenchmarkDotNet.Tests/Detectors/Cpu/PowershellWmiCpuInfoParserTests.cs | {
"start": 159,
"end": 3536
} | public class ____(ITestOutputHelper output)
{
private ITestOutputHelper Output { get; } = output;
[Fact]
public void EmptyTest()
{
CpuInfo? actual = PowershellWmiCpuInfoParser.Parse(string.Empty);
CpuInfo expected = new CpuInfo();
Output.AssertEqual(expected, actual);
}
... | PowershellWmiCpuInfoParserTests |
csharp | MassTransit__MassTransit | tests/MassTransit.Tests/SagaStateMachineTests/Automatonymous/Visualizer2_Specs.cs | {
"start": 689,
"end": 2442
} | public class ____ :
MassTransitStateMachine<IngestState>
{
public SampleStateMachine()
{
InstanceState(x => x.CurrentState);
Request(() => ProcessGetInventory, x => x.InventoryRequestId);
Event(() => SubmitOrderEvent, e =>
... | SampleStateMachine |
csharp | AvaloniaUI__Avalonia | tests/Avalonia.Benchmarks/Base/AvaloniaObject_GetValue.cs | {
"start": 177,
"end": 6270
} | public class ____
{
private BaselineTestClass _baseline = new(){ StringProperty = "foo" };
private TestClass _target = new();
public AvaloniaObject_GetValue()
{
RuntimeHelpers.RunClassConstructor(typeof(TestClass).TypeHandle);
}
[Benchmark(Baseline = tru... | AvaloniaObject_GetValue |
csharp | SixLabors__ImageSharp | tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_LoadFromInt16.cs | {
"start": 301,
"end": 1214
} | public class ____
{
private Block8x8 source;
private Block8x8F destination;
[GlobalSetup]
public void Setup()
{
if (Vector<float>.Count != 8)
{
throw new NotSupportedException("Vector<float>.Count != 8");
}
for (short i = 0; i < Block8x8F.Size; i++)
... | Block8x8F_LoadFromInt16 |
csharp | dotnet__efcore | src/EFCore.Relational/Migrations/Operations/CreateSequenceOperation.cs | {
"start": 500,
"end": 1238
} | public class ____ : SequenceOperation
{
/// <summary>
/// The schema that contains the sequence, or <see langword="null" /> if the default schema should be used.
/// </summary>
public virtual string? Schema { get; set; }
/// <summary>
/// The name of the sequence.
/// </summary>
... | CreateSequenceOperation |
csharp | jbogard__MediatR | src/MediatR/Wrappers/RequestHandlerWrapper.cs | {
"start": 165,
"end": 348
} | public abstract class ____
{
public abstract Task<object?> Handle(object request, IServiceProvider serviceProvider,
CancellationToken cancellationToken);
}
| RequestHandlerBase |
csharp | RicoSuter__NJsonSchema | src/NJsonSchema/ITypeNameGenerator.cs | {
"start": 536,
"end": 1028
} | public interface ____
{
/// <summary>Generates the type name.</summary>
/// <param name="schema">The property.</param>
/// <param name="typeNameHint">The type name hint (the property name or definition key).</param>
/// <param name="reservedTypeNames">The reserved type names.</param>... | ITypeNameGenerator |
csharp | MassTransit__MassTransit | src/MassTransit.Abstractions/Middleware/Configuration/Send/MessageSendPipeSplitFilterSpecification.cs | {
"start": 260,
"end": 879
} | class
____ T : class
{
readonly ISpecificationPipeSpecification<SendContext<T>> _specification;
public MessageSendPipeSplitFilterSpecification(ISpecificationPipeSpecification<SendContext<T>> specification)
{
_specification = specification;
}
public void ... | where |
csharp | jellyfin__jellyfin | MediaBrowser.Model/IO/IShortcutHandler.cs | {
"start": 70,
"end": 809
} | public interface ____
{
/// <summary>
/// Gets the extension.
/// </summary>
/// <value>The extension.</value>
string Extension { get; }
/// <summary>
/// Resolves the specified shortcut path.
/// </summary>
/// <param name="shortcutPath">The ... | IShortcutHandler |
csharp | MassTransit__MassTransit | src/MassTransit/SagaStateMachine/MassTransitStateMachine.cs | {
"start": 66893,
"end": 69591
} | class
____ TResponse2 : class
{
var property = propertyExpression.GetPropertyInfo();
var request = new StateMachineRequest<TRequest, TResponse, TResponse2>(property.Name, settings, requestIdExpression);
InitializeRequest(this, property, request);
Ev... | where |
csharp | unoplatform__uno | src/Uno.UI/UI/Xaml/Markup/ApplyExtensions.cs | {
"start": 108,
"end": 2009
} | public static class ____
{
public delegate Binding BindingApplyHandler(Binding binding);
public delegate Binding BindingApplyWithParamHandler(Binding binding, object that);
/// <summary>
/// Executes the provided apply handler on the binding instance. Used by the XAML code generator.
/// </summary>
[Edito... | ApplyExtensions |
csharp | EventStore__EventStore | src/KurrentDB.Core/Services/Transport/Http/UriRouters.cs | {
"start": 3475,
"end": 3626
} | private class ____ {
public readonly Dictionary<string, RouterNode> Children = new();
public readonly List<HttpRoute> LeafRoutes = [];
}
}
| RouterNode |
csharp | dotnet__aspnetcore | src/Components/Endpoints/src/Builder/ResourceCollectionConvention.cs | {
"start": 311,
"end": 2406
} | internal class ____(ResourceCollectionResolver resolver)
{
private string? _collectionUrl;
private ImportMapDefinition? _collectionEndpointImportMap;
private ResourceAssetCollection? _collection;
private ImportMapDefinition? _collectionImportMap;
public void OnBeforeCreateEndpoints(RazorComponentEn... | ResourceCollectionConvention |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Base/Input/PullGestureEventArgs.cs | {
"start": 76,
"end": 606
} | public class ____ : RoutedEventArgs
{
public int Id { get; }
public Vector Delta { get; }
public PullDirection PullDirection { get; }
private static int _nextId = 1;
internal static int GetNextFreeId() => _nextId++;
public PullGestureEventArgs(int id, Vecto... | PullGestureEventArgs |
csharp | EventStore__EventStore | src/KurrentDB.Licensing/Keygen/Models.cs | {
"start": 3250,
"end": 3452
} | public class ____ : KeygenAttributes {
public bool RequireHeartbeat { get; set; }
public int HeartbeatDuration { get; set; }
public string HeartbeatStatus { get; set; } = null!;
}
| MachineAttributes |
csharp | MassTransit__MassTransit | src/MassTransit.Abstractions/NewId/NewIdParsers/ZBase32Parser.cs | {
"start": 42,
"end": 502
} | public class ____ :
Base32Parser
{
const string ConvertChars = "ybndrfg8ejkmcpqxot1uwisza345h769YBNDRFG8EJKMCPQXOT1UWISZA345H769";
const string TransposeChars = "ybndrfg8ejkmcpqx0tlvwis2a345h769YBNDRFG8EJKMCPQX0TLVWIS2A345H769";
public ZBase32Parser(bool handleTransposedCharacters ... | ZBase32Parser |
csharp | protobuf-net__protobuf-net | src/protobuf-net.Test/Attribs/ProtoContractSurrogate.cs | {
"start": 3168,
"end": 4075
} | public class ____
{
[ProtoMember(1, IsRequired = true)]
public T Value { get; set; }
public static implicit operator ImmutableGenericType2<T>(Surrogate surrogate)
{
return surrogate == null ? null : new ImmutableGenericType... | Surrogate |
csharp | microsoft__garnet | test/Garnet.test.cluster/RedirectTests/BaseCommand.cs | {
"start": 49419,
"end": 50490
} | internal class ____ : BaseCommand
{
public override bool IsArrayCommand => true;
public override bool ArrayResponse => true;
public override string Command => nameof(LMPOP);
public override string[] GetSingleSlotRequest()
{
var ssk = GetSingleSlotKeys;
... | LMPOP |
csharp | unoplatform__uno | src/Uno.UWP/Devices/Midi/Internal/MidiMessageValidators.cs | {
"start": 83,
"end": 1038
} | internal static class ____
{
internal static void VerifyMessageLength(byte[] messageData, int expectedLength, MidiMessageType type)
{
if (messageData is null)
{
throw new ArgumentNullException(nameof(messageData));
}
if (messageData.Length != expectedLength)
{
throw new ArgumentException(
... | MidiMessageValidators |
csharp | unoplatform__uno | src/Uno.UWP/Generated/3.0.0.0/Windows.UI.Input.Spatial/SpatialInteractionSource.cs | {
"start": 299,
"end": 7472
} | public partial class ____
{
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
internal SpatialInteractionSource()
{
}
#endif
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
[global::Uno.NotImplemented(... | SpatialInteractionSource |
csharp | unoplatform__uno | src/Uno.UI/UI/Xaml/Automation/Peers/AutomationNotificationKind.cs | {
"start": 152,
"end": 892
} | public enum ____
{
/// <summary>
/// The current element container has had something added to it that should be presented to the user.
/// </summary>
ItemAdded = 0,
/// <summary>
/// The current element has had something removed from inside it that should be presented to the user.
/// </summary>
ItemRemoved = ... | AutomationNotificationKind |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.