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 | GtkSharp__GtkSharp | Source/Samples/Sections/Widgets/SwitchSection.cs | {
"start": 221,
"end": 644
} | class ____ : ListSection
{
public SwitchSection()
{
AddItem(CreateSwitchButton());
}
public (string, Widget) CreateSwitchButton()
{
var btn = new Switch();
btn.ButtonReleaseEvent += (o, args) =>
ApplicationOutput.WriteLine... | SwitchSection |
csharp | DuendeSoftware__IdentityServer | bff/performance/Bff.Performance/TestClient.cs | {
"start": 248,
"end": 3930
} | public class ____(Uri baseAddress, CookieHandler cookies, HttpMessageHandler handler)
{
public HttpClient Client = new(handler)
{
BaseAddress = baseAddress
};
public void ClearCookies() => cookies.ClearCookies();
public static TestClient Create(Uri baseAddress, CookieContainer? cookies = n... | TestClient |
csharp | AvaloniaUI__Avalonia | src/Avalonia.X11/X11Structs.cs | {
"start": 38962,
"end": 39329
} | internal enum ____ {
InputHint = (1 << 0),
StateHint = (1 << 1),
IconPixmapHint = (1 << 2),
IconWindowHint = (1 << 3),
IconPositionHint = (1 << 4),
IconMaskHint = (1 << 5),
WindowGroupHint = (1 << 6),
AllHints = (InputHint | StateHint | IconPixmapHint | IconWindowHint | IconPositionHint |... | XWMHintsFlags |
csharp | microsoft__semantic-kernel | dotnet/src/InternalUtilities/planning/PlannerInstrumentation.cs | {
"start": 875,
"end": 1205
} | record ____ creation duration.</summary>
private static readonly Histogram<double> s_createPlanDuration = s_meter.CreateHistogram<double>(
name: "semantic_kernel.planning.create_plan.duration",
unit: "s",
description: "Duration time of plan creation.");
/// <summary><see cref="Histogra... | plan |
csharp | dotnet__aspire | tests/Aspire.Hosting.Tests/Eventing/DistributedApplicationBuilderEventingTests.cs | {
"start": 12771,
"end": 12843
} | public class ____ : IDistributedApplicationEvent
{
}
| DummyEvent |
csharp | unoplatform__uno | src/Uno.UWP/Generated/3.0.0.0/Windows.ApplicationModel.Chat/RcsTransportConfiguration.cs | {
"start": 304,
"end": 4657
} | public partial class ____
{
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
internal RcsTransportConfiguration()
{
}
#endif
#if __ANDROID__ || __IOS__ || __TVOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__
[global::Uno.NotImplemented... | RcsTransportConfiguration |
csharp | grpc__grpc-dotnet | examples/Container/Frontend/Balancer/BalancerConfiguration.cs | {
"start": 694,
"end": 1101
} | public class ____
{
public event EventHandler? Updated;
public LoadBalancerName LoadBalancerPolicyName { get; private set; } = LoadBalancerName.PickFirst;
public void Update(LoadBalancerName loadBalancerPolicyName)
{
LoadBalancerPolicyName = loadBalancerPolicyName;
... | BalancerConfiguration |
csharp | dotnet__aspire | tests/Aspire.Hosting.Tests/Dashboard/DashboardResourceTests.cs | {
"start": 28269,
"end": 28546
} | private sealed class ____ : IDashboardEndpointProvider
{
public Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
{
return Task.FromResult("http://localhost:5000");
}
}
}
| MockDashboardEndpointProvider |
csharp | microsoft__semantic-kernel | dotnet/src/InternalUtilities/src/Diagnostics/UnreachableException.cs | {
"start": 277,
"end": 452
} | class ____ is (sometimes) never instantiated.
/// <summary>
/// Exception thrown when the program executes an instruction that was thought to be unreachable.
/// </summary>
| that |
csharp | dotnet__efcore | test/EFCore.Specification.Tests/ModelBuilding/GiantModel.cs | {
"start": 244877,
"end": 245097
} | public class ____
{
public int Id { get; set; }
public RelatedEntity1127 ParentEntity { get; set; }
public IEnumerable<RelatedEntity1129> ChildEntities { get; set; }
}
| RelatedEntity1128 |
csharp | ShareX__ShareX | ShareX.HelpersLib/UpdateChecker/UpdateMessageBox.cs | {
"start": 1150,
"end": 4874
} | public partial class ____ : Form
{
public static bool IsOpen { get; private set; }
public bool ActivateWindow { get; private set; }
protected override bool ShowWithoutActivation => !ActivateWindow;
public UpdateMessageBox(UpdateChecker updateChecker, bool activateWindow = true)
... | UpdateMessageBox |
csharp | NSubstitute__NSubstitute | tests/NSubstitute.Acceptance.Specs/FormattingCallsWhenThrowingReceivedCallsExceptions.cs | {
"start": 5665,
"end": 6068
} | public class ____ : Context
{
protected int _ignored;
protected override void ExpectedCall()
{
_ignored = Sample.Received().AProperty;
}
[Test]
public void Should_list_expected_property_get()
{
ExceptionMessageContains(ExpectedCallMes... | When_checking_call_to_a_property_getter |
csharp | grpc__grpc-dotnet | test/Grpc.Net.Client.Tests/Balancer/SubchannelsLoadBalancerTests.cs | {
"start": 5477,
"end": 6099
} | class ____ : ISubchannelTransport
{
public void Dispose() { }
public DnsEndPoint? CurrentEndPoint { get; }
public TimeSpan? ConnectTimeout { get; }
public TransportStatus TransportStatus { get; }
public ValueTask<Stream> GetStreamAsync(DnsEndPoint endPoint, CancellationToken cancellationToken)
... | CustomSubchannelTransport |
csharp | dotnet__machinelearning | tools-local/Microsoft.ML.InternalCodeAnalyzer/NameAnalyzer.cs | {
"start": 478,
"end": 869
} | internal enum ____
{
UnderScoreCamelCased, // For example, _myPrivateField
CamelCased, // For example, myAwesomeParameter
PascalCased, // For example, AwesomeClass
IPascalCased, // For example, IEnumerableStuff
TPascalCased, // For example, ... | NameType |
csharp | AutoMapper__AutoMapper | src/UnitTests/MappingInheritance/IgnoreShouldBeInherited.cs | {
"start": 5573,
"end": 6210
} | class ____ : Bar { }
protected override MapperConfiguration CreateConfiguration() => new(c =>
{
c.CreateMap<object, Foo>().ForMember(d => d.FooText, o => o.Ignore()).ForMember(d => d.Text, o => o.MapFrom(s=>""));
c.CreateMap<Bar, Foo>().ForMember(d => d.FooText, o => o.MapFrom(s => s.FooText)).I... | Boo |
csharp | OrchardCMS__OrchardCore | src/OrchardCore.Modules/OrchardCore.Spatial/Indexing/GeoPointFieldIndexHandler.cs | {
"start": 104,
"end": 1005
} | public class ____ : ContentFieldIndexHandler<GeoPointField>
{
public override Task BuildIndexAsync(GeoPointField field, BuildFieldIndexContext context)
{
var options = context.Settings.ToOptions();
ContentItemDocumentIndex.GeoPoint value = null;
if (field.Longitude != null && field.Lati... | GeoPointFieldIndexHandler |
csharp | unoplatform__uno | src/Uno.UI/Controls/BindableImageView.Android.cs | {
"start": 17212,
"end": 17670
} | private class ____ : ScaleGestureDetector.SimpleOnScaleGestureListener
{
private BindableImageView _parent;
public ScaleListener(BindableImageView parent)
{
_parent = parent;
}
public override bool OnScaleBegin(ScaleGestureDetector detector)
{
_parent.OnScaleBegin();
return true;
}
... | ScaleListener |
csharp | dotnet__efcore | src/EFCore/Metadata/IConventionElementType.cs | {
"start": 373,
"end": 766
} | interface ____ used during model creation and allows the metadata to be modified.
/// Once the model is built, <see cref="IElementType" /> represents a read-only view of the same metadata.
/// </para>
/// <para>
/// See <see href="https://aka.ms/efcore-docs-conventions">Model building conventio... | is |
csharp | AvaloniaUI__Avalonia | src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs | {
"start": 83557,
"end": 83745
} | public enum ____
{
PROCESS_DPI_UNAWARE = 0,
PROCESS_SYSTEM_DPI_AWARE = 1,
PROCESS_PER_MONITOR_DPI_AWARE = 2
}
| PROCESS_DPI_AWARENESS |
csharp | grandnode__grandnode2 | src/Web/Grand.Web.Admin/Models/Catalog/SpecificationAttributeModel.cs | {
"start": 1084,
"end": 1625
} | public class ____ : BaseEntityModel
{
[GrandResourceDisplayName("Admin.Catalog.Attributes.SpecificationAttributes.UsedByProducts.Product")]
public string ProductName { get; set; }
[GrandResourceDisplayName("Admin.Catalog.Attributes.SpecificationAttributes.UsedByProducts.OptionName")]
... | UsedByProductModel |
csharp | dotnet__machinelearning | src/Microsoft.ML.TimeSeries/STL/Loess.cs | {
"start": 6111,
"end": 6297
} | class ____ used to store the parameters which are needed for lowess algorithm.
/// The name of these constansts are compliant with the original terms in paper.
/// </summary>
| is |
csharp | fluentassertions__fluentassertions | Tests/FluentAssertions.Equivalency.Specs/SelectionRulesSpecs.Including.cs | {
"start": 4540,
"end": 5810
} | public class ____
{
[UsedImplicitly]
public string Name { get; set; }
}
[Fact]
public void When_including_a_property_using_an_expression_it_should_evaluate_it_from_the_root()
{
// Arrange
var list1 = new List<CustomType>
... | CustomType |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/src/Types/Types/Descriptors/Configurations/TypeSystemConfiguration.cs | {
"start": 260,
"end": 5040
} | public abstract class ____ : ITypeSystemConfiguration
{
private List<TypeDependency>? _dependencies;
private List<ITypeSystemConfigurationTask>? _tasks;
private IFeatureCollection? _features;
/// <summary>
/// Gets or sets the name of the type system member.
/// </summary>
public virtual st... | TypeSystemConfiguration |
csharp | Humanizr__Humanizer | src/Humanizer/FluentDate/OnDate.Days.cs | {
"start": 59830,
"end": 65805
} | public class ____
{
/// <summary>
/// The nth day of November of the current year
/// </summary>
public static DateOnly The(int dayNumber)
=> new(DateTime.Now.Year, 11, dayNumber);
/// <summary>
/// The 1st day of November of the current year
/// ... | November |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/test/Types.Tests/Types/ObjectTypeTests.cs | {
"start": 64737,
"end": 64848
} | public static class ____
{
public static Book GetBook()
=> new Book();
}
| BookQuery |
csharp | dotnet__orleans | src/api/Orleans.Core/Orleans.Core.cs | {
"start": 56130,
"end": 56629
} | partial class ____
{
public const long RING_SIZE = 4294967296L;
public static IRingRange CreateFullRange() { throw null; }
public static IRingRange CreateRange(System.Collections.Generic.List<IRingRange> inRanges) { throw null; }
public static IRingRange CreateRange(uint begin, ui... | RangeFactory |
csharp | dotnet__orleans | src/api/Orleans.Transactions.TestKit.Base/Orleans.Transactions.TestKit.Base.cs | {
"start": 37334,
"end": 39305
} | public partial class ____ : Grain, ITransactionCoordinatorGrain, IGrainWithGuidKey, IGrain, Runtime.IAddressable
{
public System.Threading.Tasks.Task AddAndThrow(ITransactionTestGrain grain, int numberToAdd) { throw null; }
public System.Threading.Tasks.Task MultiGrainAdd(ITransactionCommitterTestG... | TransactionCoordinatorGrain |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore/Shell/Removing/ShellRemovalManager.cs | {
"start": 250,
"end": 7135
} | public class ____ : IShellRemovalManager
{
private readonly IShellHost _shellHost;
private readonly IShellContextFactory _shellContextFactory;
private readonly IEnumerable<IShellRemovingHandler> _shellRemovingHandlers;
protected readonly IStringLocalizer S;
private readonly ILogger _logger;
pub... | ShellRemovalManager |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack/Auth/FacebookAuthProvider.cs | {
"start": 379,
"end": 8962
} | public class ____ : OAuthProvider
{
public const string Name = "facebook";
public static string Realm = "https://graph.facebook.com/v3.2/";
public static string PreAuthUrl = "https://www.facebook.com/dialog/oauth";
public static string[] DefaultFields = { "id", "name", "first_name", "last_name", "email"... | FacebookAuthProvider |
csharp | Cysharp__ZLogger | src/ZLogger.Unity/Assets/Tests/FormatTest.cs | {
"start": 207,
"end": 10874
} | public class ____
{
[Fact]
public void FormatLogEntry_CustomMetadata()
{
using var ms = new MemoryStream();
var sourceCodeHash = Guid.NewGuid().ToString();
var loggerFactory = LoggerFactory.Create(x => x
.SetMinimumLevel(LogLevel.Debug)
.AddZLoggerStream(ms... | JsonFormatTest |
csharp | mongodb__mongo-csharp-driver | tests/MongoDB.Bson.Tests/Serialization/Serializers/BsonValueSerializerTests.cs | {
"start": 47183,
"end": 49939
} | public class ____
{
public TestClass() { }
public TestClass(BsonJavaScript value)
{
this.B = value;
this.V = value;
}
public BsonValue B { get; set; }
public BsonJavaScript V { get; set; }
}
... | TestClass |
csharp | exceptionless__Exceptionless | src/Exceptionless.Insulation/Configuration/YamlConfigurationFileParser.cs | {
"start": 133,
"end": 3277
} | internal class ____
{
private readonly Stack<string> _context = new();
private readonly IDictionary<string, string?> _data = new SortedDictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
private string? _currentPath;
public IDictionary<string, string?> Parse(Stream stream)
{
_d... | YamlConfigurationFileParser |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.Common.Tests/MockRestGatewayTests.cs | {
"start": 1498,
"end": 1609
} | public class ____ : IGet, IReturn<TestResponse>
{
public int Id { get; set; }
}
| TestGetRequest |
csharp | open-telemetry__opentelemetry-dotnet | test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/HttpRetryTestCase.cs | {
"start": 339,
"end": 2953
} | public class ____
#pragma warning restore CA1515 // Consider making public types internal
{
private readonly string testRunnerName;
private HttpRetryTestCase(string testRunnerName, HttpRetryAttempt[] retryAttempts, int expectedRetryAttempts = 1)
{
this.ExpectedRetryAttempts = expectedRetryAttempts;... | HttpRetryTestCase |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.Feeds.Abstractions/Models/FeedItem.cs | {
"start": 312,
"end": 576
} | public class ____<TItem> : FeedItem
{
private TItem _item;
public new TItem Item { get { return _item; } set { SetItem(value); } }
protected override void SetItem(object item)
{
_item = (TItem)item;
base.SetItem(item);
}
}
| FeedItem |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Diagnostics/Diagnostics/ViewModels/VisualTreeNode.cs | {
"start": 6845,
"end": 7202
} | private struct ____
{
public PopupRoot(Control root, string? customName = null)
{
Root = root;
CustomName = customName;
}
public Control Root { get; }
public string? CustomName { get; }
... | PopupRoot |
csharp | dotnet__maui | src/Controls/tests/TestCases.HostApp/Issues/Issue26498.cs | {
"start": 934,
"end": 2001
} | public class ____ : ContentPage
{
readonly ObservableCollection<string> _listOfStrings = new ObservableCollection<string>();
ListView _stringListView = new ListView();
public ListViewPage()
{
var stackLayout = new StackLayout();
var ClearListButton = new Button
{
Text = "Clear list",
Automati... | ListViewPage |
csharp | protobuf-net__protobuf-net | src/protobuf-net.Core/Serializers/EnumSerializer.cs | {
"start": 1315,
"end": 1653
} | enum ____ for the provided type, which much be a matching enum
/// </summary>
[MethodImpl(ProtoReader.HotPath)]
public static EnumSerializer<T> CreateInt64<T>()
where T : unmanaged
=> SerializerCache<EnumSerializerInt64<T>>.InstanceField;
/// <summary>
/... | serializer |
csharp | dotnet__efcore | test/EFCore.Specification.Tests/ModelBuilding/GiantModel.cs | {
"start": 116897,
"end": 117114
} | public class ____
{
public int Id { get; set; }
public RelatedEntity539 ParentEntity { get; set; }
public IEnumerable<RelatedEntity541> ChildEntities { get; set; }
}
| RelatedEntity540 |
csharp | AutoMapper__AutoMapper | src/IntegrationTests/BuiltInTypes/ProjectEnumerableOfIntToHashSet.cs | {
"start": 870,
"end": 1830
} | public class ____ : DropCreateDatabaseAlways<Context>
{
protected override void Seed(Context context)
{
context.Customers.Add(new Customer
{
FirstName = "Bob",
LastName = "Smith",
Items = new List<Item>(new[] { new Item(), new I... | DatabaseInitializer |
csharp | aspnetboilerplate__aspnetboilerplate | test/Abp.Tests/ObjectComparators/ObjectComparatorManager_Tests.cs | {
"start": 240,
"end": 1177
} | public class ____ : ObjectComparatorBase<string>
{
public const string EqualsCompareType = "EqualsCompareType";
public const string ReverseOfSecondIsEqualtoFirstCompareType = "ReverseOfSecondIsEqualtoFirst";
public override ImmutableList<string> CompareTypes { get; }
public MyTestS... | MyTestStringObjectComparator |
csharp | MiniProfiler__dotnet | src/MiniProfiler.Shared/Data/ProfiledDbCommand.cs | {
"start": 428,
"end": 13974
} | public partial class ____ : DbCommand
{
private DbCommand _command;
private DbConnection? _connection;
private DbTransaction? _transaction;
private IDbProfiler? _profiler;
/// <summary>
/// Whether to always wrap data readers, even if there isn't an active profiler o... | ProfiledDbCommand |
csharp | dotnet__efcore | test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.PropertyMapping.cs | {
"start": 3438,
"end": 3565
} | protected class ____
{
public string Name { get; set; } = "";
public int Value { get; set; }
}
}
| ComplexTag |
csharp | MonoGame__MonoGame | MonoGame.Framework/Graphics/States/DepthStencilState.cs | {
"start": 337,
"end": 17325
} | public partial class ____ : GraphicsResource
{
private readonly bool _defaultStateObject;
private bool _depthBufferEnable;
private bool _depthBufferWriteEnable;
private StencilOperation _counterClockwiseStencilDepthBufferFail;
private StencilOperation _counterClockwiseStenci... | DepthStencilState |
csharp | dotnetcore__FreeSql | Providers/FreeSql.Provider.Custom/Oracle/Curd/CustomOracleSelect.cs | {
"start": 20038,
"end": 20614
} | class ____ T8 : class
{
public OdbcOracleSelect(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, object dywhere) : base(orm, commonUtils, commonExpression, dywhere) { }
public override string ToSql(string field = null) => CustomOracleSelect<T1>.ToSqlStatic(_commonUtils, _com... | where |
csharp | CommunityToolkit__WindowsCommunityToolkit | Microsoft.Toolkit.Uwp.SampleApp/Common/AnalyticsVersionInfoExtensions.cs | {
"start": 2053,
"end": 2226
} | public enum ____
{
Desktop,
Holographic,
IoT,
Mobile,
SurfaceHub,
Tablet,
Xbox,
Other
}
} | DeviceFormFactor |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.Indexing.Core/Recipes/CreateOrUpdateIndexProfileStep.cs | {
"start": 307,
"end": 4613
} | public sealed class ____ : NamedRecipeStepHandler
{
public const string StepKey = "CreateOrUpdateIndexProfile";
private readonly IIndexProfileManager _indexProfileManager;
private readonly IServiceProvider _serviceProvider;
private readonly IndexingOptions _indexingOptions;
internal readonly IStri... | CreateOrUpdateIndexProfileStep |
csharp | ServiceStack__ServiceStack | ServiceStack.Stripe/src/ServiceStack.Stripe/StripeGateway.cs | {
"start": 557,
"end": 941
} | public class ____ : IPost, IReturn<StripeCharge>
{
public int Amount { get; set; }
public string Currency { get; set; }
public string Customer { get; set; }
public string Card { get; set; }
public string Description { get; set; }
public bool? Capture { get; set; }
public int? ApplicationFee ... | ChargeStripeCustomer |
csharp | getsentry__sentry-dotnet | src/Sentry/Integrations/AppDomainUnhandledExceptionIntegration.cs | {
"start": 84,
"end": 1479
} | internal class ____ : ISdkIntegration
{
private readonly IAppDomain _appDomain;
private IHub? _hub;
private SentryOptions? _options;
internal AppDomainUnhandledExceptionIntegration(IAppDomain? appDomain = null)
=> _appDomain = appDomain ?? AppDomainAdapter.Instance;
public void Register(IH... | AppDomainUnhandledExceptionIntegration |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack.Interfaces/Data/DataException.cs | {
"start": 181,
"end": 426
} | public class ____ : Exception
{
public DataException() { }
public DataException(string message) : base(message) { }
public DataException(string message, Exception innerException)
: base(message, innerException) { }
} | DataException |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.Mvc.Core/Utilities/ControllerTypeExtensions.cs | {
"start": 76,
"end": 626
} | public static class ____
{
public static string ControllerName(this Type controllerType)
{
if (!typeof(ControllerBase).IsAssignableFrom(controllerType))
{
throw new ArgumentException($"The specified type must inherit from '{nameof(ControllerBase)}'", nameof(controllerType));
... | ControllerTypeExtensions |
csharp | bitwarden__server | src/Core/Settings/GlobalSettings.cs | {
"start": 32458,
"end": 32574
} | public class ____ : IWebPushSettings
{
public string VapidPublicKey { get; set; }
}
| WebPushSettings |
csharp | dotnet__orleans | test/Grains/TestGrains/ConsumerEventCountingGrain.cs | {
"start": 126,
"end": 680
} | public class ____ : Grain, IConsumerEventCountingGrain
{
private int _numConsumedItems;
private readonly ILogger _logger;
private IAsyncObservable<int> _consumer;
private StreamSubscriptionHandle<int> _subscriptionHandle;
internal const string StreamNamespace = "HaloStreaming... | ConsumerEventCountingGrain |
csharp | CommunityToolkit__dotnet | tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservablePropertyAttribute.cs | {
"start": 48920,
"end": 49060
} | public partial class ____ : ObservableObject
{
[ObservableProperty]
private string? value;
}
| ModelWithValueProperty |
csharp | dotnet__maui | src/Core/tests/UnitTests/Layouts/AbsoluteLayoutManagerTests.cs | {
"start": 392,
"end": 15280
} | public class ____
{
IAbsoluteLayout CreateTestLayout()
{
var layout = Substitute.For<IAbsoluteLayout>();
layout.Height.Returns(Dimension.Unset);
layout.Width.Returns(Dimension.Unset);
layout.MinimumHeight.Returns(Dimension.Minimum);
layout.MinimumWidth.Returns(Dimension.Minimum);
layout.MaximumHe... | AbsoluteLayoutManagerTests |
csharp | mongodb__mongo-csharp-driver | tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Jira/CSharp3614Tests.cs | {
"start": 3213,
"end": 3562
} | public sealed class ____ : MongoCollectionFixture<Book>
{
protected override IEnumerable<Book> InitialData =>
[
new Book { Id = 1, PageCount = 1, Author = null },
new Book { Id = 2, PageCount = 2, Author = new Author { Id = 2, Name = "Two" } }
... | ClassFixture |
csharp | dotnet__efcore | src/EFCore/Metadata/Builders/ComplexCollectionBuilder`.cs | {
"start": 350,
"end": 777
} | class ____ returned from methods when using the <see cref="ModelBuilder" /> API
/// and it is not designed to be directly constructed in your application code.
/// </remarks>
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-modeling">Modeling entity types and relationships</see> for more information... | are |
csharp | GtkSharp__GtkSharp | Source/Libs/PangoSharp/FontMap.cs | {
"start": 903,
"end": 2387
} | public partial class ____ {
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
delegate void d_pango_font_map_list_families2(IntPtr raw, out IntPtr families, out int n_families);
static d_pango_font_map_list_families2 pango_font_map_list_families2 = FuncLoader.LoadFunction<d_pango_font_map_list_families2>(FuncLo... | FontMap |
csharp | unoplatform__uno | src/Uno.UWP/Storage/StorageFile.saf.Android.cs | {
"start": 343,
"end": 603
} | public partial class ____
{
public static StorageFile GetFromSafDocument(DocumentFile document) =>
new StorageFile(new SafFile(document));
public static StorageFile GetFromSafUri(Android.Net.Uri uri) =>
new StorageFile(new SafFile(uri));
| StorageFile |
csharp | FluentValidation__FluentValidation | src/FluentValidation.Tests/StringEnumValidatorTests.cs | {
"start": 3798,
"end": 3919
} | enum ____ can't be used with IsEnumName. (Parameter 'enumType')";
exception.Message.ShouldEqual(expectedMessage);
}
}
| and |
csharp | dotnet__aspnetcore | src/Middleware/OutputCaching/test/OutputCacheMiddlewareTests.cs | {
"start": 629,
"end": 800
} | public class ____ : OutputCacheMiddlewareTests
{
public override ITestOutputCacheStore GetStore() => new SimpleTestOutputCache();
}
| OutputCacheMiddlewareTests_SimpleStore |
csharp | pythonnet__pythonnet | src/testing/ReprTest.cs | {
"start": 2021,
"end": 2209
} | public class ____
{
public string __repr__(int i)
{
return "__repr__ implemention with input parameter!";
}
}
| Corge |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Concurrency/Scheduler.Services.cs | {
"start": 475,
"end": 4628
} | partial class ____
{
internal static Type[] Optimizations =
[
typeof(ISchedulerLongRunning),
typeof(IStopwatchProvider),
typeof(ISchedulerPeriodic)
/* update this list if new interface-based optimizations are added */
];
/// <summary>... | Scheduler |
csharp | npgsql__efcore.pg | test/EFCore.PG.FunctionalTests/Query/AdHocJsonQueryNpgsqlTest.cs | {
"start": 10858,
"end": 11001
} | public class ____
{
public int Id { get; set; }
public TypesJsonEntity JsonEntity { get; set; }
}
| TypesContainerEntity |
csharp | MassTransit__MassTransit | tests/MassTransit.RabbitMqTransport.Tests/Mandatory_Specs.cs | {
"start": 158,
"end": 515
} | public class ____ :
RabbitMqTestFixture
{
[Test]
public async Task Should_throw_an_exception()
{
Assert.That(async () => await Bus.Publish(new NoBindingPlease(), context => context.Mandatory = true), Throws.TypeOf<MessageReturnedException>());
}
| When_mandatory_is_specified_and_no_binding_exists |
csharp | dotnet__machinelearning | src/Microsoft.ML.AutoML/EstimatorExtensions/EstimatorExtensionCatalog.cs | {
"start": 693,
"end": 2287
} | internal class ____
{
private static readonly IDictionary<EstimatorName, Type> _namesToExtensionTypes = new
Dictionary<EstimatorName, Type>()
{
{ EstimatorName.ColumnConcatenating, typeof(ColumnConcatenatingExtension) },
{ EstimatorName.ColumnCopying, typeof(Colum... | EstimatorExtensionCatalog |
csharp | dotnet__maui | src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue2953.cs | {
"start": 1617,
"end": 1810
} | internal class ____ : ViewCell
{
public ItemCell()
{
var label = new Label { BackgroundColor = Colors.Aqua };
label.SetBinding(Label.TextProperty, ".");
View = label;
}
}
} | ItemCell |
csharp | nunit__nunit | src/NUnitFramework/testdata/TestFixtureData.cs | {
"start": 10157,
"end": 10282
} | public abstract class ____
{
[Test]
public void SomeTest()
{
}
}
| AbstractFixtureBase |
csharp | RicoSuter__NJsonSchema | src/NJsonSchema.CodeGeneration.CSharp.Tests/ObsoleteTests.cs | {
"start": 372,
"end": 577
} | public class ____
{
[Obsolete("Reason property is \"obsolete\"")]
public string Property { get; set; }
}
[Obsolete]
| ObsoletePropertyWithMessageTestClass |
csharp | dotnet__aspnetcore | src/Middleware/Diagnostics/src/ExceptionHandler/ExceptionHandlerExtensions.cs | {
"start": 575,
"end": 6454
} | public static class ____
{
/// <summary>
/// Adds a middleware to the pipeline that will catch exceptions, log them, and re-execute the request in an alternate pipeline.
/// The request will not be re-executed if the response has already started.
/// </summary>
/// <param name="app"></param>
///... | ExceptionHandlerExtensions |
csharp | AvaloniaUI__Avalonia | src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlAvaloniaPropertyHelper.cs | {
"start": 12137,
"end": 13560
} | class ____ : AvaloniaPropertyCustomSetter
{
public BindingSetter(
AvaloniaXamlIlWellKnownTypes types,
IXamlType declaringType,
IXamlField avaloniaProperty)
: base(types, declaringType, avaloniaProperty, false, [types.IBinding])
... | BindingSetter |
csharp | neuecc__MessagePack-CSharp | tests/MessagePack.Tests/DynamicObjectResolverTests.cs | {
"start": 28491,
"end": 28683
} | public class ____ : BaseClass
{
[DataMember]
public string Name { get; set; }
}
#if !UNITY_2018_3_OR_NEWER
[MessagePackObject]
| DerivedClass |
csharp | dotnet__extensions | src/Libraries/Microsoft.Extensions.DataIngestion/Processors/ClassificationEnricher.cs | {
"start": 508,
"end": 747
} | class ____ a chat-based language model to analyze the content of document chunks and assign a
/// single, most relevant classification label. The classification is performed using a predefined set of classes, with
/// an optional fallback | uses |
csharp | OrchardCMS__OrchardCore | test/OrchardCore.Tests/Localization/CultureScopeTests.cs | {
"start": 76,
"end": 1885
} | public class ____
{
[Fact]
public void CultureScopeSetsUICultureIfNotProvided()
{
// Arrange
var culture = "ar-YE";
// Act
using var cultureScope = CultureScope.Create(culture);
// Assert
Assert.Equal(culture, CultureInfo.CurrentCulture.Name);
Assert... | CultureScopeTests |
csharp | OrchardCMS__OrchardCore | src/OrchardCore.Modules/OrchardCore.Forms/GraphQL/LabelPartQueryObjectType.cs | {
"start": 92,
"end": 353
} | public class ____ : ObjectGraphType<LabelPart>
{
public LabelPartQueryObjectType()
{
Name = "LabelPart";
Field(x => x.For, nullable: true);
Field("value", context => context.ContentItem.DisplayText);
}
}
| LabelPartQueryObjectType |
csharp | dotnet__aspnetcore | src/Identity/Extensions.Core/src/PasswordHasherOptions.cs | {
"start": 290,
"end": 1368
} | public class ____
{
private static readonly RandomNumberGenerator _defaultRng = RandomNumberGenerator.Create(); // secure PRNG
/// <summary>
/// Gets or sets the compatibility mode used when hashing passwords. Defaults to 'ASP.NET Identity version 3'.
/// </summary>
/// <value>
/// The compatib... | PasswordHasherOptions |
csharp | dotnet__aspnetcore | src/Servers/Connections.Abstractions/src/BaseConnectionContext.cs | {
"start": 420,
"end": 2249
} | public abstract class ____ : IAsyncDisposable
{
/// <summary>
/// Gets or sets a unique identifier to represent this connection in trace logs.
/// </summary>
public abstract string ConnectionId { get; set; }
/// <summary>
/// Gets the collection of features provided by the server and middleware... | BaseConnectionContext |
csharp | neuecc__MessagePack-CSharp | src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters.cs | {
"start": 35760,
"end": 36613
} | struct ____ supported");
}
var length = reader.ReadArrayHeader();
var __x__ = default(int);
var __y__ = default(int);
for (int i = 0; i < length; i++)
{
var key = i;
switch (key)
{
... | not |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.WebHost.Endpoints.Tests/IntegrationTests/ErrorRestTests.cs | {
"start": 4498,
"end": 4602
} | public class ____ : IReturn<ActionError>
{
public string Id { get; set; }
}
| ActionError |
csharp | DapperLib__Dapper | tests/Dapper.Tests/SharedTypes/SomeType.cs | {
"start": 30,
"end": 140
} | public class ____
{
public int A { get; set; }
public string? B { get; set; }
}
}
| SomeType |
csharp | dotnet__extensions | test/Libraries/Microsoft.Extensions.DependencyInjection.AutoActivation.Tests/Helpers/AnotherFakeServiceCounter.cs | {
"start": 205,
"end": 314
} | public class ____ : IAnotherFakeServiceCounter
{
public int Counter { get; set; }
}
| AnotherFakeServiceCounter |
csharp | DuendeSoftware__IdentityServer | identity-server/src/IdentityServer/Constants.cs | {
"start": 216,
"end": 2159
} | internal static class ____
{
public const string IdentityServerName = "Duende.IdentityServer";
public const string IdentityServerAuthenticationType = IdentityServerName;
public const string ExternalAuthenticationMethod = "external";
public const string DefaultHashAlgorithm = "SHA256";
public static... | Constants |
csharp | mysql-net__MySqlConnector | src/MySqlConnector/Core/ServerSession.cs | {
"start": 77303,
"end": 86506
} | internal sealed class ____
{
public X509RevocationMode CertificateRevocationCheckMode { get; set; }
public X509CertificateCollection? ClientCertificates { get; set; }
public SslProtocols EnabledSslProtocols { get; set; }
public string? TargetHost { get; set; }
}
#endif
// Some servers are exposed through a ... | SslClientAuthenticationOptions |
csharp | fluentassertions__fluentassertions | Tests/FluentAssertions.Equivalency.Specs/NestedPropertiesSpecs.cs | {
"start": 4843,
"end": 5204
} | public class ____
{
public StringContainer(string mainValue, string subValue = null)
{
MainValue = mainValue;
SubValues = [new StringSubContainer { SubValue = subValue }];
}
public string MainValue { get; set; }
public IList<StringSubContainer> SubVa... | StringContainer |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.Indexing.Abstractions/DocumentIndex.cs | {
"start": 185,
"end": 2416
} | public class ____
{
public string Id { get; private set; }
public DocumentIndex(string id)
{
ArgumentException.ThrowIfNullOrEmpty(id);
Id = id;
}
public List<DocumentIndexEntry> Entries { get; } = [];
public void Set(string name, string value, DocumentIndexOptions options)
... | DocumentIndex |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack.Server/CrudUtils.cs | {
"start": 13808,
"end": 13981
} | public class ____
{
public string? Schema { get; set; }
public string? NamedConnection { get; set; }
public List<TableSchema> Tables { get; set; } = [];
}
| DbSchema |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Base/PropertyStore/EffectiveValue`1.cs | {
"start": 506,
"end": 11106
} | internal sealed class ____<T> : EffectiveValue
{
private readonly StyledPropertyMetadata<T> _metadata;
private T? _baseValue;
private readonly UncommonFields? _uncommon;
public EffectiveValue(
AvaloniaObject owner,
StyledProperty<T> property,
Effe... | EffectiveValue |
csharp | dotnet__aspire | src/Components/Common/ManagedIdentityTokenCredentialHelpers.cs | {
"start": 236,
"end": 5645
} | internal static class ____
{
private const string AzureDatabaseForPostgresSqlScope = "https://ossrdbms-aad.database.windows.net/.default";
private const string AzureManagementScope = "https://management.azure.com/.default";
private static readonly TokenRequestContext s_databaseForPostgresSqlTokenRequestCon... | ManagedIdentityTokenCredentialHelpers |
csharp | microsoft__semantic-kernel | dotnet/src/SemanticKernel.Abstractions/KernelBuilder.cs | {
"start": 231,
"end": 1589
} | internal sealed class ____ : IKernelBuilder, IKernelBuilderPlugins
{
/// <summary>The collection of services to be available through the <see cref="Kernel"/>.</summary>
private IServiceCollection? _services;
/// <summary>Initializes a new instance of the <see cref="KernelBuilder"/>.</summary>
public Ke... | KernelBuilder |
csharp | icsharpcode__ILSpy | ILSpy.AddIn.Shared/Guids.cs | {
"start": 86,
"end": 499
} | static class ____
{
#if VS2022
public const string guidILSpyAddInPkgString = "ebf12ca7-a1fd-4aee-a894-4a0c5682fc2f";
#else
public const string guidILSpyAddInPkgString = "a9120dbe-164a-4891-842f-fb7829273838";
#endif
public const string guidILSpyAddInCmdSetString = "85ddb8ca-a842-4b1c-ba1a-94141fdf19d0";
publi... | GuidList |
csharp | dotnet__aspire | src/Aspire.Hosting/PublisherDistributedApplicationBuilderExtensions.cs | {
"start": 346,
"end": 2164
} | internal static class ____
{
/// <summary>
/// Adds a publisher to the distributed application for use by the Aspire CLI.
/// </summary>
/// <typeparam name="TPublisher">The type of the publisher.</typeparam>
/// <typeparam name="TPublisherOptions">The type of the publisher.</typeparam>
/// <par... | PublisherDistributedApplicationBuilderExtensions |
csharp | dotnet__orleans | src/api/Orleans.Core/Orleans.Core.cs | {
"start": 79738,
"end": 81334
} | partial class ____ : global::Orleans.Serialization.Codecs.IFieldCodec<Invokable_IMembershipTable_GrainReference_B1A52D2B>, global::Orleans.Serialization.Codecs.IFieldCodec
{
public Codec_Invokable_IMembershipTable_GrainReference_B1A52D2B(global::Orleans.Serialization.Serializers.ICodecProvider codecProvide... | Codec_Invokable_IMembershipTable_GrainReference_B1A52D2B |
csharp | fluentassertions__fluentassertions | Tests/FluentAssertions.Specs/Primitives/DateTimeOffsetAssertionSpecs.cs | {
"start": 774,
"end": 1327
} | public class ____
{
[Fact]
public void Should_throw_a_helpful_error_when_accidentally_using_equals()
{
// Arrange
DateTimeOffset someDateTimeOffset = new(2022, 9, 25, 13, 48, 42, 0, TimeSpan.Zero);
// Act
var action = () => someDateTimeOffset.... | Miscellaneous |
csharp | dotnet__aspire | tests/ConfigurationSchemaGenerator.Tests/GeneratorTests.cs | {
"start": 17775,
"end": 18179
} | public sealed class ____
{
public TreeOfString TestProperty1 { get; } = new();
public IDictionary<string, TreeOfString> TestProperty2 { get; } = new Dictionary<string, TreeOfString>(StringComparer.OrdinalIgnoreCase);
}
[DebuggerDisplay("{ToString(),nq... | TestSettings |
csharp | unoplatform__uno | src/Uno.UI/UI/Input/WinRT/PointerPointProperties.cs | {
"start": 463,
"end": 9227
} | private static class ____
{
// Buttons // Note: Buttons must be first flags for the HasMultipleButtonsPressed to work
public const int LeftButton = 1; // This has to be the first one, as it's the most common
public const int MiddleButton = 1 << 1;
public const int RightButton = 1 << 2;
public const int... | Mask |
csharp | microsoft__PowerToys | src/settings-ui/Settings.UI/ViewModels/MouseWithoutBordersViewModel.cs | {
"start": 38004,
"end": 43427
} | private enum ____
{
Disable = 0,
Enable = 1,
Ctrl = 2,
Shift = 3,
}
private EasyMouseOption _easyMouseOptionIndex;
public int EasyMouseOptionIndex
{
get
{
return (int)_easyMouseOptionIndex;
... | EasyMouseOption |
csharp | protobuf-net__protobuf-net | src/Examples/InheritanceExtensible.cs | {
"start": 11440,
"end": 11717
} | public abstract class ____ : Extensible
{
[ProtoMember(1)]
public int Id { get; set; }
}
[ProtoContract]
[ProtoInclude(10, typeof(SomeLeafType))]
[CompatibilityLevel(CompatibilityLevel.Level300)]
| SomeBaseType |
csharp | mongodb__mongo-csharp-driver | src/MongoDB.Bson/IO/WrappingBsonWriter.cs | {
"start": 671,
"end": 807
} | class ____ an IBsonWriter that wraps another IBsonWriter.
/// </summary>
/// <seealso cref="MongoDB.Bson.IO.IBsonWriter" />
| for |
csharp | grandnode__grandnode2 | src/Core/Grand.SharedKernel/Extensions/LanguageSchema.cs | {
"start": 43,
"end": 855
} | public static class ____
{
public const string SchemaXsd = @"
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name='Language'>
<xs:complexType>
<xs:sequence>
<xs:element name='Resource' maxOccurs='unbounded'>
<xs:complexType>
... | LanguageSchema |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/src/Execution.Abstractions/Execution/IRequestExecutor.cs | {
"start": 234,
"end": 2356
} | public interface ____ : IFeatureProvider
{
/// <summary>
/// Gets an <see cref="ulong"/> representing the version of the executor.
/// When a schema is updated and a new executor is created, the version is incremented.
/// </summary>
ulong Version { get; }
/// <summary>
/// Gets the schema ... | IRequestExecutor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.