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 | ChilliCream__graphql-platform | src/HotChocolate/Core/src/Types.Abstractions/Types/IEnumTypeDefinition.cs | {
"start": 628,
"end": 907
} | public interface ____
: IOutputTypeDefinition
, IInputTypeDefinition
, ISyntaxNodeProvider<EnumTypeDefinitionNode>
{
/// <summary>
/// Gets all possible values if this type.
/// </summary>
IReadOnlyEnumValueCollection Values { get; }
}
| IEnumTypeDefinition |
csharp | simplcommerce__SimplCommerce | src/Modules/SimplCommerce.Module.Catalog/Data/ProductTemplateProductAttributeRepository.cs | {
"start": 315,
"end": 780
} | public class ____ : IProductTemplateProductAttributeRepository
{
private readonly DbContext dbContext;
public ProductTemplateProductAttributeRepository(SimplDbContext dbContext)
{
this.dbContext = dbContext;
}
public void Remove(ProductTemplateProductAttribute i... | ProductTemplateProductAttributeRepository |
csharp | AutoMapper__AutoMapper | src/IntegrationTests/Inheritance/ProjectToAbstractTypeWithInheritance.cs | {
"start": 870,
"end": 1074
} | public class ____
{
public int Id { get; set; }
public int StepId { get; set; }
public string Input { get; set; }
public virtual Step Step { get; set; }
}
| StepInput |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.WebHost.Endpoints.Tests/IntegrationTests/CachedMoviesService.cs | {
"start": 695,
"end": 881
} | public class ____ : IReturn<MoviesResponse>
{
[DataMember]
public string Genre { get; set; }
}
[Route("/cached-string/{Id}")]
| CachedMoviesWithTimeoutAndRedis |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.WebHost.Endpoints.Tests/Support/Services/FileUploadService.cs | {
"start": 652,
"end": 1402
} | public class ____ : IHasResponseStatus
{
[DataMember]
public string Name { get; set; }
[DataMember]
public string FileName { get; set; }
[DataMember]
public long ContentLength { get; set; }
[DataMember]
public string ContentType { get; set; }
... | FileUploadResponse |
csharp | nopSolutions__nopCommerce | src/Libraries/Nop.Data/Mapping/Builders/Catalog/CrossSellProductBuilder.cs | {
"start": 203,
"end": 548
} | public partial class ____ : NopEntityBuilder<CrossSellProduct>
{
#region Methods
/// <summary>
/// Apply entity configuration
/// </summary>
/// <param name="table">Create table expression builder</param>
public override void MapEntity(CreateTableExpressionBuilder table)
{
}
#endre... | CrossSellProductBuilder |
csharp | smartstore__Smartstore | src/Smartstore.Web/Models/Customers/CustomerDownloadableProductsModel.cs | {
"start": 241,
"end": 945
} | public partial class ____ : EntityModelBase
{
public Guid OrderItemGuid { get; set; }
public int OrderId { get; set; }
public int ProductId { get; set; }
public LocalizedValue<string> ProductName { get; set; }
public string ProductSeName { get; set; }
... | DownloadableProductsModel |
csharp | microsoft__PowerToys | src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.Bookmarks.UnitTests/BookmarkResolverTests.cs | {
"start": 531,
"end": 3930
} | public partial class ____
{
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
private static string _testDirPath;
private static string _userHomeDirPath;
private static string _testDi... | BookmarkResolverTests |
csharp | aspnetboilerplate__aspnetboilerplate | src/Abp.Dapper/Dapper-Extensions/Mapper/ReferenceProperty.cs | {
"start": 718,
"end": 2041
} | public class ____<T> : IReferenceProperty<T>
{
public Guid Identity { get; set; }
public Guid ParentIdentity { get; set; }
public string Name { get; }
public PropertyInfo PropertyInfo { get; }
public Type EntityType { get; }
public Comparator Comparator { get; private... | ReferenceProperty |
csharp | files-community__Files | src/Files.App/Helpers/Layout/AdaptiveLayoutHelpers.cs | {
"start": 3309,
"end": 3509
} | private enum ____
{
None, // Don't decide. Another function to decide can be called afterwards if available.
Detail, // Apply the layout Detail.
Grid, // Apply the layout Grid.
}
}
}
| Layouts |
csharp | neuecc__MessagePack-CSharp | src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Extension/UnsafeBlitFormatter.cs | {
"start": 5983,
"end": 6278
} | public class ____ : UnsafeBlitFormatterBase<Rect, ReverseEndianessHelperSimpleRepeat<float>>
{
protected override sbyte TypeCode
{
get
{
return ReservedExtensionTypeCodes.UnityRect;
}
}
}
| RectArrayBlitFormatter |
csharp | grandnode__grandnode2 | src/Web/Grand.Web.Admin/Services/ShipmentViewModelService.cs | {
"start": 712,
"end": 27281
} | public class ____ : IShipmentViewModelService
{
private readonly ICountryService _countryService;
private readonly IDateTimeService _dateTimeService;
private readonly IDownloadService _downloadService;
private readonly IMeasureService _measureService;
private readonly MeasureSettings _measureSetting... | ShipmentViewModelService |
csharp | dotnet__aspnetcore | src/Mvc/Mvc.Core/src/ModelBinding/Binders/ComplexTypeModelBinder.cs | {
"start": 20896,
"end": 25288
} | struct ____ the Linq's NewExpression
// compile fails to construct it.
var modelType = bindingContext.ModelType;
if (modelType.IsAbstract || modelType.GetConstructor(Type.EmptyTypes) == null)
{
// If the model is not a top-level object, we can't examine t... | as |
csharp | dotnet__reactive | Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Concurrency.cs | {
"start": 303,
"end": 1695
} | internal partial class ____
{
#region + ObserveOn +
public virtual IObservable<TSource> ObserveOn<TSource>(IObservable<TSource> source, IScheduler scheduler)
{
return Synchronization.ObserveOn(source, scheduler);
}
public virtual IObservable<TSource> ObserveOn<T... | QueryLanguage |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Controls.ColorPicker/ColorView/ColorView.Properties.cs | {
"start": 171,
"end": 19638
} | public partial class ____
{
/// <summary>
/// Defines the <see cref="Color"/> property.
/// </summary>
public static readonly StyledProperty<Color> ColorProperty =
AvaloniaProperty.Register<ColorView, Color>(
nameof(Color),
Colors.White,
... | ColorView |
csharp | dotnet__orleans | src/AWS/Orleans.Reminders.DynamoDB/Reminders/DynamoDBReminderTable.cs | {
"start": 16879,
"end": 19216
} | struct ____(Dictionary<string, AttributeValue> keys)
{
public override string ToString() => Utils.DictionaryToString(keys);
}
[LoggerMessage(
EventId = (int)ErrorCode.ReminderServiceBase,
Level = LogLevel.Warning,
Message = "Intermediate error re... | DictionaryLogRecord |
csharp | dotnet__orleans | src/api/Orleans.Transactions.TestKit.Base/Orleans.Transactions.TestKit.Base.cs | {
"start": 262395,
"end": 264558
} | partial class ____ : global::Orleans.Serialization.Codecs.IFieldCodec<global::Orleans.Transactions.TestKit.TransactionAttributionGrainExtensions.SuppressAttributionGrain>, global::Orleans.Serialization.Codecs.IFieldCodec, global::Orleans.Serialization.Serializers.IBaseCodec<global::Orleans.Transactions.TestKit.Transac... | Codec_SuppressAttributionGrain |
csharp | abpframework__abp | framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/ICurrentPrincipalAccessor.cs | {
"start": 83,
"end": 221
} | public interface ____
{
ClaimsPrincipal Principal { get; }
IDisposable Change(ClaimsPrincipal principal);
}
| ICurrentPrincipalAccessor |
csharp | duplicati__duplicati | Duplicati/Library/Common/IO/PosixFile.cs | {
"start": 10737,
"end": 14713
} | public struct ____
{
public readonly long UID;
public readonly long GID;
public readonly long Permissions;
public readonly string OwnerName;
public readonly string GroupName;
internal FileInfo(Mono.Unix.UnixFileSystemInfo fse)
... | FileInfo |
csharp | dotnet__aspnetcore | src/Shared/test/Shared.Tests/PropertyHelperTest.cs | {
"start": 22079,
"end": 22165
} | private class ____ : Point
{
public int Z { get; set; }
}
| ThreeDPoint |
csharp | protobuf-net__protobuf-net | src/protobuf-net.FSharp/FSharpSetSerializer.cs | {
"start": 1651,
"end": 1901
} | public static class ____
{
/// <summary>Create a map serializer that operates on FSharp Maps</summary>
public static RepeatedSerializer<FSharpSet<T>, T> Create<T>()
=> new FSharpSetSerializer<T>();
}
}
| FSharpSetFactory |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/CheckWeb/SwaggerTestService.cs | {
"start": 7163,
"end": 7656
} | public sealed class ____ : ApiResponseAttribute
{
private static int errCode = 402;
public CustomApiResponseAttribute()
: base(++errCode, Guid.NewGuid().ToString()) {}
}
[ApiResponse(400, "Code 1")]
[CustomApiResponse()]
[ApiResponse(402, "Code 2")]
[CustomApiRespon... | CustomApiResponseAttribute |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/NorthwindBlazor/Migrations/20240109034115_CreateIdentitySchema.Designer.cs | {
"start": 407,
"end": 10116
} | partial class ____
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.0");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =... | CreateIdentitySchema |
csharp | dotnet__machinelearning | src/Microsoft.ML.Data/Transforms/TypeConverting.cs | {
"start": 1713,
"end": 2709
} | internal static class ____
{
[TlcModule.EntryPoint(Name = "Transforms.ColumnTypeConverter", Desc = TypeConvertingTransformer.Summary, UserName = TypeConvertingTransformer.UserName, ShortName = TypeConvertingTransformer.ShortName)]
public static CommonOutputs.TransformOutput Convert(IHostEnvironment ... | TypeConversion |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack.Razor/Html/AntiXsrf/AntiForgeryToken.cs | {
"start": 364,
"end": 1589
} | internal sealed class ____
{
internal const int SecurityTokenBitLength = 128;
internal const int ClaimUidBitLength = 256;
private string _additionalData;
private BinaryBlob _securityToken;
private string _username;
public string AdditionalData
{
... | AntiForgeryToken |
csharp | nuke-build__nuke | source/Nuke.Build/ParameterAttribute.cs | {
"start": 3143,
"end": 3338
} | public class ____ : Attribute
{
public ParameterPrefixAttribute(string prefix)
{
Prefix = prefix.TrimEnd("Prefix");
}
public string Prefix { get; }
}
| ParameterPrefixAttribute |
csharp | dotnet__aspnetcore | src/Components/Endpoints/src/FormMapping/Factories/ComplexTypeConverterFactory.cs | {
"start": 485,
"end": 4261
} | internal class ____(FormDataMapperOptions options, ILoggerFactory loggerFactory) : IFormDataConverterFactory
{
internal FormDataMetadataFactory MetadataFactory { get; } = new FormDataMetadataFactory(options.Factories, loggerFactory);
[RequiresDynamicCode(FormMappingHelpers.RequiresDynamicCodeMessage)]
[Req... | ComplexTypeConverterFactory |
csharp | Cysharp__ZLogger | src/ZLogger/ZLoggerInterpolatedStringHandler.cs | {
"start": 15376,
"end": 17976
} | struct ____ : IEquatable<LiteralList>
{
readonly List<string?> literals;
public LiteralList(List<string?> literals)
{
this.literals = literals;
}
#if NET8_0_OR_GREATER
// literals are all const string, in .NET 8 it is allocated in N... | LiteralList |
csharp | duplicati__duplicati | Duplicati/Library/Snapshots/MacOS/MacOSPhotosNative.cs | {
"start": 9040,
"end": 10322
} | private struct ____
{
/// <summary>
/// The unique identifier of the asset
/// </summary>
internal IntPtr Identifier;
/// <summary>
/// The original file name
/// </summary>
internal IntPtr FileName;
/// <summary>
/// The Uniform Type I... | NativeAssetNative |
csharp | aspnetboilerplate__aspnetboilerplate | src/Abp/DynamicEntityProperties/Extensions/DynamicEntityPropertyManagerExtensions.cs | {
"start": 148,
"end": 4090
} | public static class ____
{
public static List<DynamicEntityProperty> GetAll<TEntity, TPrimaryKey>(this IDynamicEntityPropertyManager manager)
where TEntity : IEntity<TPrimaryKey>
{
return manager.GetAll(entityFullName: typeof(TEntity).FullName);
}
public stat... | DynamicEntityPropertyManagerExtensions |
csharp | OrchardCMS__OrchardCore | test/OrchardCore.Tests/Modules/OrchardCore.ContentFields/Settings/DisplayDriverTestHelper.cs | {
"start": 391,
"end": 2095
} | public class ____
{
public static ContentPartDefinition GetContentPartDefinition<TField>(Action<ContentPartFieldDefinitionBuilder> configuration)
{
return new ContentPartDefinitionBuilder()
.Named("SomeContentPart")
.WithField<TField>("SomeField", configuration)
.Buil... | DisplayDriverTestHelper |
csharp | CommunityToolkit__WindowsCommunityToolkit | Microsoft.Toolkit.Uwp.Input.GazeInteraction/LowpassFilter.cs | {
"start": 397,
"end": 967
} | internal class ____
{
public LowpassFilter()
{
Previous = new Point(0, 0);
}
public LowpassFilter(Point initial)
{
Previous = initial;
}
public Point Previous { get; set; }
public Point Update(Point point, Point alpha)
... | LowpassFilter |
csharp | louthy__language-ext | LanguageExt.Core/Monads/Alternative Monads/Fin/Extensions/Fin.Extensions.Map.cs | {
"start": 79,
"end": 1154
} | partial class ____
{
/// <summary>
/// Functor map operation
/// </summary>
/// <remarks>
/// Unwraps the value within the functor, passes it to the map function `f` provided, and
/// then takes the mapped value and wraps it back up into a new functor.
/// </remarks>
/// <param name="ma... | FinExtensions |
csharp | dotnet__orleans | src/api/Azure/Orleans.Streaming.EventHubs/Orleans.Streaming.EventHubs.cs | {
"start": 23992,
"end": 24304
} | public partial class ____
{
public Configuration.EventHubOptions Hub { get { throw null; } set { } }
public string Partition { get { throw null; } set { } }
public Configuration.EventHubReceiverOptions ReceiverOptions { get { throw null; } set { } }
}
| EventHubPartitionSettings |
csharp | grandnode__grandnode2 | src/Web/Grand.Web.Admin/Extensions/Mapping/ProductAttributeMappingMappingExtensions.cs | {
"start": 150,
"end": 850
} | public static class ____
{
public static ProductModel.ProductAttributeMappingModel ToModel(this ProductAttributeMapping entity)
{
return entity.MapTo<ProductAttributeMapping, ProductModel.ProductAttributeMappingModel>();
}
public static ProductAttributeMapping ToEntity(this ProductModel.Product... | ProductAttributeMappingMappingExtensions |
csharp | unoplatform__uno | src/Uno.UI/UI/Xaml/Data/CollectionViewGroup.cs | {
"start": 169,
"end": 739
} | internal class ____ : ICollectionViewGroup
{
private readonly BindingPath _bindingPath;
public CollectionViewGroup(object group, PropertyPath itemsPath)
{
Group = group;
if (itemsPath != null)
{
_bindingPath = new BindingPath(itemsPath.Path, null);
_bindingPath.DataContext = group;
GroupI... | CollectionViewGroup |
csharp | ardalis__Result | tests/Ardalis.Result.UnitTests/PagedResultConstructor.cs | {
"start": 142,
"end": 1145
} | public class ____
{
private readonly PagedInfo _pagedInfo = new PagedInfo(0, 10, 1, 3);
[Fact]
public void InitializesStronglyTypedStringValue()
{
string expectedString = "test string";
var result = new PagedResult<string>(_pagedInfo, expectedString);
Assert.Equal(expectedStrin... | PagedResultConstructor |
csharp | ServiceStack__ServiceStack | ServiceStack.OrmLite/src/ServiceStack.OrmLite.SqlServer/Converters/SqlServerJsonStringConverters.cs | {
"start": 95,
"end": 800
} | public class ____ : SqlServerStringConverter
{
// json string to object
public override object FromDbValue(Type fieldType, object value)
{
if (value is string raw && fieldType.HasAttributeCached<SqlJsonAttribute>())
return JsonSerializer.DeserializeFromString(raw, fieldType);
return base.FromDbValue(fieldTyp... | SqlServerJsonStringConverter |
csharp | dotnet__maui | src/Controls/tests/Xaml.UnitTests/Issues/Unreported006.xaml.cs | {
"start": 556,
"end": 819
} | class ____
{
[Test]
public void CanAssignGenericBP([Values] XamlInflator inflator)
{
var page = new Unreported006(inflator);
Assert.NotNull(page.GenericProperty);
Assert.That(page.GenericProperty, Is.TypeOf<Compatibility.StackLayout>());
}
}
} | Tests |
csharp | graphql-dotnet__graphql-dotnet | src/GraphQL.MicrosoftDI.Tests/ScopedExecutionStrategyTests.cs | {
"start": 1984,
"end": 2099
} | private class ____
{
public int Value([FromServices] Class1 class1) => class1.GetValue();
}
| Widget |
csharp | ChilliCream__graphql-platform | src/GreenDonut/src/GreenDonut.Data/Internal/ExpressionHelpers.cs | {
"start": 94,
"end": 5226
} | internal static class ____
{
public static Expression<Func<T, T>> Combine<T>(
Expression<Func<T, T>> first,
Expression<Func<T, T>> second)
{
var parameter = Expression.Parameter(typeof(T), "root");
var firstBody = ReplaceParameter(first.Body, first.Parameters[0], parameter);
... | ExpressionHelpers |
csharp | MassTransit__MassTransit | tests/MassTransit.Tests/MessageData/FileSystem_Specs.cs | {
"start": 202,
"end": 1612
} | public class ____
{
[Test]
public async Task Should_generate_the_folder_and_file()
{
MessageData<string> property = await _repository.PutString(new string('8', 10000));
MessageData<string> loaded = await _repository.GetString(property.Address);
await Asse... | Storing_message_data_on_the_file_system |
csharp | dotnet__aspire | src/Aspire.Hosting.Valkey/ValkeyResource.cs | {
"start": 351,
"end": 3797
} | public class ____(string name) : ContainerResource(name), IResourceWithConnectionString
{
internal const string PrimaryEndpointName = "tcp";
private EndpointReference? _primaryEndpoint;
/// <summary>
/// Initializes a new instance of the <see cref="ValkeyResource"/> class.
/// </summary>
/// <... | ValkeyResource |
csharp | abpframework__abp | framework/test/Volo.Abp.Json.Tests/Volo/Abp/Json/ExtensibleObject_Tests.cs | {
"start": 163,
"end": 2669
} | public class ____ : AbpJsonSystemTextJsonTestBase
{
private readonly IJsonSerializer _jsonSerializer;
public ExtensibleObject_Tests()
{
_jsonSerializer = GetRequiredService<IJsonSerializer>();
}
[Fact]
public void JsonConverter_Test()
{
var fooDto = new FooDto
{
... | ExtensibleObject_Tests |
csharp | dotnet__machinelearning | src/Microsoft.ML.EntryPoints/DataViewReference.cs | {
"start": 739,
"end": 1389
} | public sealed class ____
{
[TlcModule.Output(Desc = "The resulting data view", SortOrder = 1)]
public IDataView Data;
}
[TlcModule.EntryPoint(Name = "Data.DataViewReference", Desc = "Pass dataview from memory to experiment")]
public static Output ImportData(IHost... | Output |
csharp | smartstore__Smartstore | src/Smartstore/Engine/ILifetimeScopeAccessor.cs | {
"start": 51,
"end": 2402
} | public interface ____
{
/// <summary>
/// Gets or sets the current lifetime scope that services can be resolved from.
/// A new scope will be created when <c>HttpContext</c> is <c>null</c> or the current
/// thread's context state does not contain any scope instance. You should NEVER... | ILifetimeScopeAccessor |
csharp | Cysharp__UniTask | src/UniTask/Assets/Plugins/UniTask/Runtime/Triggers/MonoBehaviourMessagesTriggers.cs | {
"start": 70978,
"end": 72142
} | public sealed class ____ : AsyncTriggerBase<AsyncUnit>
{
void OnParticleTrigger()
{
RaiseEvent(AsyncUnit.Default);
}
public IAsyncOnParticleTriggerHandler GetOnParticleTriggerAsyncHandler()
{
return new AsyncTriggerHandler<AsyncUnit>(this, false);
... | AsyncParticleTriggerTrigger |
csharp | dotnet__maui | src/Templates/src/templates/maui-mobile/Pages/ManageMetaPage.xaml.cs | {
"start": 29,
"end": 189
} | public partial class ____ : ContentPage
{
public ManageMetaPage(ManageMetaPageModel model)
{
InitializeComponent();
BindingContext = model;
}
} | ManageMetaPage |
csharp | microsoft__PowerToys | src/modules/fancyzones/FancyZonesEditorCommon/Data/LayoutTemplates.cs | {
"start": 601,
"end": 912
} | public struct ____
{
public string Type { get; set; }
public bool ShowSpacing { get; set; }
public int Spacing { get; set; }
public int ZoneCount { get; set; }
public int SensitivityRadius { get; set; }
}
| TemplateLayoutWrapper |
csharp | EventStore__EventStore | src/KurrentDB.Core.XUnit.Tests/Metrics/RecentMaxTests.cs | {
"start": 314,
"end": 1613
} | public class ____ {
private readonly RecentMax<long> _sut;
private readonly FakeClock _clock = new();
public RecentMaxTests() {
_sut = new RecentMax<long>(expectedScrapeIntervalSeconds: 15);
}
[Fact]
public void record_now_returns_now() {
_clock.SecondsSinceEpoch = 500;
var now = Record(123);
Assert.Equ... | RecentMaxTests |
csharp | JamesNK__Newtonsoft.Json | Src/Newtonsoft.Json/Linq/JProperty.Async.cs | {
"start": 1361,
"end": 6379
} | public partial class ____
{
/// <summary>
/// Writes this token to a <see cref="JsonWriter"/> asynchronously.
/// </summary>
/// <param name="writer">A <see cref="JsonWriter"/> into which this method will write.</param>
/// <param name="cancellationToken">The token to monitor... | JProperty |
csharp | simplcommerce__SimplCommerce | src/Modules/SimplCommerce.Module.Orders/Areas/Orders/Controllers/OrderHistoryApiController.cs | {
"start": 376,
"end": 1341
} | public class ____ : Controller
{
private readonly IRepository<OrderHistory> _orderHistoryRepository;
public OrderHistoryApiController(IRepository<OrderHistory> orderHistoryRepository)
{
_orderHistoryRepository = orderHistoryRepository;
}
[HttpGet("api/orders/{or... | OrderHistoryApiController |
csharp | jellyfin__jellyfin | Jellyfin.Api/Helpers/AudioHelper.cs | {
"start": 586,
"end": 6848
} | public class ____
{
private readonly IUserManager _userManager;
private readonly ILibraryManager _libraryManager;
private readonly IMediaSourceManager _mediaSourceManager;
private readonly IServerConfigurationManager _serverConfigurationManager;
private readonly IMediaEncoder _mediaEncoder;
priv... | AudioHelper |
csharp | aspnetboilerplate__aspnetboilerplate | test/Abp.EntityFrameworkCore.Tests/Tests/Repository_Resolve_Tests.cs | {
"start": 317,
"end": 773
} | public class ____ : EntityFrameworkCoreModuleTestBase
{
[Fact]
public void Should_Resolve_Custom_Repository_If_Registered()
{
var postRepository = Resolve<IRepository<Post, Guid>>();
postRepository.GetAllList().Any().ShouldBeTrue();
Assert.Throws<Exception>(
() => postR... | Repository_Resolve_Tests |
csharp | ServiceStack__ServiceStack | ServiceStack.Redis/tests/ServiceStack.Redis.Tests/RedisPipelineTests.cs | {
"start": 150,
"end": 11633
} | public class ____
: RedisClientTestsBase
{
private const string Key = "pipemultitest";
private const string ListKey = "pipemultitest-list";
private const string SetKey = "pipemultitest-set";
private const string SortedSetKey = "pipemultitest-sortedset";
public overri... | RedisPipelineTests |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack.Common/VirtualPathUtils.cs | {
"start": 273,
"end": 3745
} | public static class ____
{
public static Stack<string> TokenizeVirtualPath(this string str, IVirtualPathProvider pathProvider)
{
if (pathProvider == null)
throw new ArgumentNullException(nameof(pathProvider));
return TokenizeVirtualPath(str, pathProvider.VirtualPathSeparator);
}... | VirtualPathUtils |
csharp | dotnet__orleans | test/DefaultCluster.Tests/Migration/MigrationTests.cs | {
"start": 17379,
"end": 17590
} | public interface ____ : IGrainWithIntegerKey
{
ValueTask SetState(int state);
ValueTask<int> GetState();
ValueTask<GrainAddress> GetGrainAddress();
}
| IMigrationTestGrain_GrainOfT |
csharp | microsoft__FASTER | cs/src/core/Epochs/EpochProtectedVersionScheme.cs | {
"start": 8587,
"end": 9037
} | public enum ____
{
/// <summary>
/// execution successful
/// </summary>
OK,
/// <summary>
/// execution unsuccessful but may be retried
/// </summary>
RETRY,
/// <summary>
/// execution failed and should not be retried
/// </su... | StateMachineExecutionStatus |
csharp | ShareX__ShareX | ShareX.UploadersLib/CustomUploader/Functions/CustomUploaderFunctionInputBox.cs | {
"start": 1186,
"end": 1914
} | internal class ____ : CustomUploaderFunction
{
public override string Name { get; } = "inputbox";
public override string[] Aliases { get; } = new string[] { "prompt" };
public override string Call(ShareXCustomUploaderSyntaxParser parser, string[] parameters)
{
string ti... | CustomUploaderFunctionInputBox |
csharp | EventStore__EventStore | src/KurrentDB.Core/ExclusiveDbLock.cs | {
"start": 355,
"end": 1899
} | public class ____ : IDisposable {
private static readonly ILogger Log = Serilog.Log.ForContext<ExclusiveDbLock>();
public readonly string MutexName;
public bool IsAcquired => _acquired;
private Mutex _dbMutex;
private bool _acquired;
public ExclusiveDbLock(string dbPath) {
Ensure.NotNullOrEmpty(dbPath, "dbP... | ExclusiveDbLock |
csharp | graphql-dotnet__graphql-dotnet | src/GraphQL.Tests/Types/InputObjectGraphTypeTests.cs | {
"start": 3904,
"end": 6038
} | public class ____ : InputObjectGraphType<MyInput3>
{
public MyInput3Type()
{
Field(x => x.Name);
}
public override void Initialize(ISchema schema) { }
}
[Fact]
public async Task input_parser_works()
{
// demonstrates having a StringGraphType fiel... | MyInput3Type |
csharp | SixLabors__ImageSharp | tests/ImageSharp.Tests/Processing/Convolution/KernelSamplingMapTest.cs | {
"start": 237,
"end": 11722
} | public class ____
{
[Fact]
public void KernalSamplingMap_Kernel5Image7x7RepeatBorder()
{
Size kernelSize = new(5, 5);
Rectangle bounds = new(0, 0, 7, 7);
BorderWrappingMode mode = BorderWrappingMode.Repeat;
int[] expected =
[
0, 0, 0, 1, 2,
0, ... | KernelSamplingMapTest |
csharp | NLog__NLog | src/NLog/Internal/DictionaryEntryEnumerable.cs | {
"start": 2628,
"end": 3536
} |
struct ____ : IEnumerator<DictionaryEntry>
{
private readonly IDictionaryEnumerator _entryEnumerator;
public DictionaryEntry Current => _entryEnumerator.Entry;
public DictionaryEntryEnumerator(IDictionary? dictionary)
{
_entryEnumera... | DictionaryEntryEnumerator |
csharp | exceptionless__Exceptionless | src/Exceptionless.Core/Models/UsageInfo.cs | {
"start": 290,
"end": 510
} | public record ____
{
public DateTime Date { get; init; }
public int Total { get; set; }
public int Blocked { get; set; }
public int Discarded { get; set; }
public int TooBig { get; set; }
}
| UsageHourInfo |
csharp | microsoft__garnet | test/Garnet.test.cluster/RedirectTests/BaseCommand.cs | {
"start": 55987,
"end": 56587
} | internal class ____ : BaseCommand
{
public override bool IsArrayCommand => false;
public override bool ArrayResponse => false;
public override string Command => nameof(LINSERT);
public override string[] GetSingleSlotRequest()
{
var ssk = GetSingleSlotKeys;
... | LINSERT |
csharp | microsoft__FASTER | cs/test/CompletePendingTests.cs | {
"start": 13048,
"end": 13744
} | record
____ firstValue = 0; // same as key
var keyStruct = new KeyStruct { kfield1 = firstValue, kfield2 = firstValue * valueMult };
var valueStruct = new ValueStruct { vfield1 = firstValue, vfield2 = firstValue * valueMult };
session.Upsert(ref keyStruct, ref valueStruc... | var |
csharp | dotnet__extensions | src/Libraries/Microsoft.Extensions.AI.AzureAIInference/AzureAIInferenceChatClient.cs | {
"start": 875,
"end": 1892
} | internal sealed class ____ : IChatClient
{
/// <summary>Gets the JSON schema transform cache conforming to OpenAI restrictions per https://platform.openai.com/docs/guides/structured-outputs?api-mode=responses#supported-schemas.</summary>
private static AIJsonSchemaTransformCache SchemaTransformCache { get; } = ... | AzureAIInferenceChatClient |
csharp | microsoft__semantic-kernel | dotnet/samples/Concepts/Memory/VectorStore_DynamicDataModel_Interop.cs | {
"start": 862,
"end": 2355
} | public class ____(ITestOutputHelper output, VectorStoreQdrantContainerFixture qdrantFixture) : BaseTest(output), IClassFixture<VectorStoreQdrantContainerFixture>
{
private static readonly JsonSerializerOptions s_indentedSerializerOptions = new() { WriteIndented = true };
private static readonly VectorStoreColl... | VectorStore_DynamicDataModel_Interop |
csharp | pythonnet__pythonnet | src/testing/arraytest.cs | {
"start": 1951,
"end": 2130
} | public class ____
{
public long[] items;
public Int64ArrayTest()
{
items = new long[5] { 0, 1, 2, 3, 4 };
}
}
| Int64ArrayTest |
csharp | aspnetboilerplate__aspnetboilerplate | src/Abp/Application/Services/Dto/IHasLongTotalCount.cs | {
"start": 185,
"end": 351
} | public interface ____
{
/// <summary>
/// Total count of Items.
/// </summary>
long TotalCount { get; set; }
}
} | IHasLongTotalCount |
csharp | ChilliCream__graphql-platform | src/HotChocolate/Core/test/Types.Tests/Configuration/SchemaTypeResolverTests.cs | {
"start": 4716,
"end": 4819
} | public class ____(string baz)
{
public string Baz { get; } = baz;
}
public readonly | Bar |
csharp | dotnetcore__FreeSql | FreeSql.Tests/FreeSql.Tests/Firebird/Curd/FirebirdUpdateTest.cs | {
"start": 302,
"end": 680
} | class ____
{
[Column(IsIdentity = true, IsPrimary = true)]
public int Id { get; set; }
public int? Clicks { get; set; }
public TestTypeInfo Type { get; set; }
public string Title { get; set; }
public DateTime CreateTime { get; set; }
... | Topic |
csharp | EventStore__EventStore | src/SchemaRegistry/KurrentDB.SchemaRegistry.Tests/Modules/Schemas/Validators/RegisterSchemaRequestValidatorTests.cs | {
"start": 3367,
"end": 3593
} | public class ____ : TestCaseGenerator<string> {
// protected override IEnumerable<string> Data() {
// yield return "";
// yield return " ";
// }
// }
//
// | EmptySchemaNameTestCases |
csharp | StackExchange__StackExchange.Redis | tests/StackExchange.Redis.Tests/ConstraintsTests.cs | {
"start": 83,
"end": 1443
} | public class ____(ITestOutputHelper output, SharedConnectionFixture fixture) : TestBase(output, fixture)
{
[Fact]
public void ValueEquals()
{
RedisValue x = 1, y = "1";
Assert.True(x.Equals(y), "equals");
Assert.True(x == y, "operator");
}
[Fact]
public async Task TestMa... | ConstraintsTests |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Base/Media/TextFormatting/Unicode/Script.cs | {
"start": 54,
"end": 4425
} | public enum ____
{
Unknown, //Zzzz
Common, //Zyyy
Inherited, //Zinh
Adlam, //Adlm
CaucasianAlbanian, //Aghb
Ahom, //Ahom
Arabic, //Arab
ImperialAramaic, //Armi
Armenian, //Armn
Avestan, //Avst
Balinese, //Bali
Bamum, //B... | Script |
csharp | AutoMapper__AutoMapper | src/UnitTests/ReverseMapping.cs | {
"start": 204,
"end": 540
} | class ____
{
public Guid Id { get; set; }
}
protected override MapperConfiguration CreateConfiguration() => new(c=>
c.CreateMap<Destination, Source>().ForMember(src => src.Id, opt => opt.MapFrom(_ => Guid.Empty)).ReverseMap());
[Fact]
public void Validate() => AssertConfigurationIsVa... | Destination |
csharp | dotnet__efcore | test/EFCore.Tests/Metadata/Internal/EntityTypeTest.cs | {
"start": 144518,
"end": 145483
} | private class ____ : BaseType
{
public static readonly PropertyInfo IdProperty = typeof(Order).GetProperty(nameof(Id));
public static readonly PropertyInfo CustomerProperty = typeof(Order).GetProperty(nameof(Customer));
public static readonly PropertyInfo CustomerIdProperty = typeof(Order).G... | Order |
csharp | grandnode__grandnode2 | src/Modules/Grand.Module.Api/DTOs/Catalog/CategoryDTO.cs | {
"start": 75,
"end": 1244
} | public class ____ : BaseApiEntityModel
{
public string Name { get; set; }
public string Description { get; set; }
public string BottomDescription { get; set; }
public string CategoryLayoutId { get; set; }
public string MetaKeywords { get; set; }
public string MetaDescription { get; set; }
pu... | CategoryDto |
csharp | bitwarden__server | src/Infrastructure.EntityFramework/AdminConsole/Models/OrganizationIntegration.cs | {
"start": 250,
"end": 487
} | public class ____ : Profile
{
public OrganizationIntegrationMapperProfile()
{
CreateMap<Core.AdminConsole.Entities.OrganizationIntegration, OrganizationIntegration>().ReverseMap();
}
}
| OrganizationIntegrationMapperProfile |
csharp | EventStore__EventStore | src/KurrentDB.Core/LogV2/LogV2StreamExistenceFilterInitializer.cs | {
"start": 1066,
"end": 1115
} | record ____ initialized
/// on startup next time.
| is |
csharp | OrchardCMS__OrchardCore | src/OrchardCore/OrchardCore.Data/Migration/AutomaticDataMigrations.cs | {
"start": 339,
"end": 1620
} | public sealed class ____ : ModularTenantEvents
{
private readonly ShellSettings _shellSettings;
private readonly ILogger _logger;
private readonly IServiceProvider _serviceProvider;
/// <summary>
/// Creates a new instance of the <see cref="AutomaticDataMigrations"/>.
/// </summary>
/// <pa... | AutomaticDataMigrations |
csharp | AvaloniaUI__Avalonia | src/Avalonia.Base/Media/Effects/DropShadowEffect.cs | {
"start": 1212,
"end": 2174
} | public sealed class ____ : DropShadowEffectBase, IDropShadowEffect, IMutableEffect
{
public static readonly StyledProperty<double> OffsetXProperty = AvaloniaProperty.Register<DropShadowEffect, double>(
nameof(OffsetX), 3.5355);
public double OffsetX
{
get => GetValue(OffsetXProperty);
... | DropShadowEffect |
csharp | ServiceStack__ServiceStack | ServiceStack/tests/ServiceStack.OpenApi.Tests/Services/NativeTypesTestService.cs | {
"start": 53,
"end": 5579
} | public class ____ : Service
{
public object Any(Hello request)
{
return new HelloResponse
{
Result = "Hello, {0}{1}!".Fmt(
request.Title != null ? request.Title + ". " : "",
request.Name)
};
}
... | NativeTypesTestService |
csharp | restsharp__RestSharp | src/RestSharp.Serializers.Xml/DeserializeAsAttribute.cs | {
"start": 740,
"end": 925
} | class ____ property names and values are deserialized by XmlAttributeDeserializer
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = false)]
| and |
csharp | microsoft__garnet | playground/ClusterStress/ReqGenUtilsCluster.cs | {
"start": 141,
"end": 15028
} | partial class ____
{
static readonly bool invalidateHLL = false;
private bool WriteHeader(byte[] headerData, ref byte* curr, byte* vend)
{
byte* save = curr;
if (curr + headerData.Length >= vend)
return false;
for (int i = 0; i < headerDa... | ReqGen |
csharp | microsoft__semantic-kernel | dotnet/src/SemanticKernel.Core/Data/TextSearchStore/TextSearchStoreSourceRetrievalRequest.cs | {
"start": 284,
"end": 1115
} | public sealed class ____
{
/// <summary>
/// Initializes a new instance of the <see cref="TextSearchStoreSourceRetrievalRequest"/> class.
/// </summary>
/// <param name="sourceId">The source ID of the document to retrieve.</param>
/// <param name="sourceLink">The source link of the document to retri... | TextSearchStoreSourceRetrievalRequest |
csharp | dotnet__aspnetcore | src/Mvc/Mvc.Api.Analyzers/test/TestFiles/ApiConventionAnalyzerIntegrationTest/NoDiagnosticsAreReturned_ForReturnStatementsInLambdas.cs | {
"start": 323,
"end": 1082
} | public class ____ : ControllerBase
{
[ProducesResponseType(typeof(string), 200)]
[ProducesResponseType(typeof(string), 404)]
public IActionResult Put(int id, object model)
{
Func<IActionResult> someLambda = () =>
{
if (id < -1)
... | NoDiagnosticsAreReturned_ForReturnStatementsInLambdas |
csharp | duplicati__duplicati | Duplicati/Library/Backend/File/Win32.cs | {
"start": 2270,
"end": 2459
} | private enum ____ : int
{
RESOURCETYPE_ANY,
RESOURCETYPE_DISK,
RESOURCETYPE_PRINT,
RESOURCETYPE_RESERVED
};
| ResourceType |
csharp | grandnode__grandnode2 | src/Tests/Grand.Business.Common.Tests/Services/Stores/StoreServiceTests.cs | {
"start": 309,
"end": 4494
} | public class ____
{
private Mock<ICacheBase> _cacheMock;
private Mock<IMediator> _mediatorMock;
private Mock<IRepository<Store>> _repository;
private StoreService _service;
[TestInitialize]
public void Init()
{
_cacheMock = new Mock<ICacheBase>();
_mediatorMock = new Mock<IM... | StoreServiceTests |
csharp | bitwarden__server | test/Infrastructure.IntegrationTest/AdminConsole/Repositories/CollectionRepository/CollectionRepositoryCreateTests.cs | {
"start": 233,
"end": 4273
} | public class ____
{
[DatabaseTheory, DatabaseData]
public async Task CreateAsync_WithAccess_Works(
IUserRepository userRepository,
IOrganizationRepository organizationRepository,
IOrganizationUserRepository organizationUserRepository,
IGroupRepository groupRepository,
ICo... | CollectionRepositoryCreateTests |
csharp | ShareX__ShareX | ShareX.MediaLib/DirectShowDevices.cs | {
"start": 1085,
"end": 1255
} | public class ____
{
public List<string> VideoDevices = new List<string>();
public List<string> AudioDevices = new List<string>();
}
} | DirectShowDevices |
csharp | MassTransit__MassTransit | src/Persistence/MassTransit.RedisIntegration/Exceptions/RedisSagaConcurrencyException.cs | {
"start": 67,
"end": 604
} | public class ____ :
ConcurrencyException
{
public RedisSagaConcurrencyException(string message, Type sagaType, Guid correlationId)
: base(message, sagaType, correlationId)
{
}
public RedisSagaConcurrencyException(string message, Type sagaType, Guid correlationId,... | RedisSagaConcurrencyException |
csharp | ServiceStack__ServiceStack | ServiceStack/src/ServiceStack.Common/Script/Blocks/WithScriptBlock.cs | {
"start": 331,
"end": 1093
} | public class ____ : ScriptBlock
{
public override string Name => "with";
public override async Task WriteAsync(ScriptScopeContext scope, PageBlockFragment block, CancellationToken token)
{
var result = await block.Argument.GetJsExpressionAndEvaluateAsync(scope,
ifNone: () => throw new N... | WithScriptBlock |
csharp | cake-build__cake | src/Cake.Common/Build/GoCD/GoCDInfo.cs | {
"start": 302,
"end": 389
} | class ____ to provide information about the Go.CD environment.
/// </summary>
| used |
csharp | reactiveui__Akavache | src/Akavache.Tests/SecurityUtilitiesTests.cs | {
"start": 496,
"end": 10374
} | public class ____
{
/// <summary>
/// Tests that ValidateCacheName rejects path traversal attempts.
/// </summary>
[Test]
public void ValidateCacheName_ShouldRejectPathTraversalAttempts()
{
var pathTraversalAttempts = new[]
{
"test/../other",
"test\\..\\ot... | SecurityUtilitiesTests |
csharp | dotnet__reactive | Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Utilities.cs | {
"start": 323,
"end": 1437
} | internal static class ____
{
public static async ValueTask AddRangeAsync<T>(this List<T> list, IAsyncEnumerable<T> collection, CancellationToken cancellationToken)
{
if (collection is IEnumerable<T> enumerable)
{
list.AddRange(enumerable);
retu... | Utilities |
csharp | dotnet__aspnetcore | src/Mvc/Mvc.Core/test/EmptyResultTests.cs | {
"start": 301,
"end": 818
} | public class ____
{
[Fact]
public void EmptyResult_ExecuteResult_IsANoOp()
{
// Arrange
var emptyResult = new EmptyResult();
var httpContext = new Mock<HttpContext>(MockBehavior.Strict);
var routeData = new RouteData();
var actionDescriptor = new ActionDescriptor();
... | EmptyResultTests |
csharp | ChilliCream__graphql-platform | src/Nitro/CommandLine/src/CommandLine.Cloud/Generated/ApiClient.Client.cs | {
"start": 930143,
"end": 931734
} | public partial class ____ : global::System.IEquatable<ShowClientCommandQuery_Node_FusionConfigurationDeployment>, IShowClientCommandQuery_Node_FusionConfigurationDeployment
{
public ShowClientCommandQuery_Node_FusionConfigurationDeployment()
{
}
public virtual global::System.Boolean... | ShowClientCommandQuery_Node_FusionConfigurationDeployment |
csharp | dotnetcore__CAP | src/DotNetCore.CAP/Internal/ISnowflakeId.Default.cs | {
"start": 308,
"end": 3810
} | public class ____ : ISnowflakeId
{
/// <summary>
/// Start time 2010-11-04 09:42:54
/// </summary>
public const long Twepoch = 1288834974657L;
/// <summary>
/// The number of bits occupied by workerId
/// </summary>
private const int WorkerIdBits = 10;
/// <summary>
/// The num... | SnowflakeId |
csharp | dotnet__aspnetcore | src/Http/Routing/src/Constraints/RegexErrorStubRouteConstraint.cs | {
"start": 394,
"end": 1112
} | internal sealed class ____ : IRouteConstraint, IParameterPolicy
#endif
{
public RegexErrorStubRouteConstraint(string _)
{
throw new InvalidOperationException(Resources.RegexRouteContraint_NotConfigured);
}
#if !COMPONENTS
bool IRouteConstraint.Match(HttpContext? httpContext, IRouter? route, str... | RegexErrorStubRouteConstraint |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.