public TotemSetIndexBinder(TotemContext /*!*/ context, CallInfo callInfo) : base(callInfo) { Assert.NotNull(context); _context = context; }
public TotemGetMemberBinder(TotemContext /*!*/ context, string name) : base(name, false) { Assert.NotNull(context); _context = context; }
public CommandValidator(TotemContext dbContext) { RuleFor(m => m.Description).NotEmpty(); RuleFor(m => m.ContractString).NotEmpty().StringMustBeValidContract(); RuleFor(m => m.VersionNumber).NotEmpty().Must(BeAValidVersion).WithMessage("'Version Number' must follow semantic version system."); RuleFor(m => m).MustAsync((m, cancellationToken) => ValidationExtensions.IsUniqueContract(m.Id, m.VersionNumber, dbContext, cancellationToken)) .WithMessage(m => $"Contract Id '{m.Id}' with Version '{m.VersionNumber}' already exist."); }
public TotemObject(TotemType/*!*/ type) { Assert.NotNull(type); Debug.Assert(type.Handles(GetType())); _type = type; _context = type.Context; }
public static Expression Convert(TotemContext state, Type type, ConversionResultKind kind, Expression target) { return DynamicExpression.Dynamic( state.Convert(type, kind), type, target ); }
public TotemConversionBinder(TotemContext/*!*/ context, Type/*!*/ type, ConversionResultKind resultKind, bool retObj) : base(retObj ? typeof(object) : type, resultKind == ConversionResultKind.ExplicitCast || resultKind == ConversionResultKind.ExplicitTry) { Assert.NotNull(context); _context = context; _kind = resultKind; _retObject = retObj; _type = type; }
public CommandValidator(TotemContext dbContext) { RuleFor(m => m.ModifiedContract.Id).NotEmpty().WithName("Id"); RuleFor(m => m.ModifiedContract.Description).NotEmpty().WithName("Description"); RuleFor(m => m.ModifiedContract.ContractString).NotEmpty().StringMustBeValidContract(); RuleFor(m => m.ModifiedContract.VersionNumber).NotEmpty().WithName("Version Number").Must(BeAValidVersion).WithMessage("'Version Number' must follow semantic version system."); RuleFor(m => m).MustAsync((m, cancellationToken) => ValidationExtensions.IsUniqueContract(m.ModifiedContract.Id, m.ModifiedContract.VersionNumber, dbContext, cancellationToken)) .WithMessage(m => $"Version {m.ModifiedContract.VersionNumber} is already in use by another contract.") .When(x => x.ModifiedContract.Id == x.InitialContract.Id && x.ModifiedContract.VersionNumber != x.InitialContract.VersionNumber); }
public static DynamicMetaObjectBinder BinaryOperationBinder(TotemContext state, TotemOperationKind operatorName) { ExpressionType? et = GetExpressionTypeFromBinaryOperator(operatorName); if (et == null) { return state.Operation( operatorName ); } return state.BinaryOperation(et.Value); }
//private LightThrowBinder _lightThrowBinder; public TotemInvokeBinder(TotemContext/*!*/ context, CallInfo/*!*/ info) : base(info) { _context = context; }
public SingleMethodInvokeBinder(TotemContext context, string name, CallInfo callInfo) : base(name, false, callInfo) { _context = context; }
public Handler(TotemContext dbContext) { _dbContext = dbContext; }
public QueryHandler(TotemContext db) { _db = db; }
public SplatBinder(TotemContext/*!*/ context) { ContractUtils.RequiresNotNull(context, "context"); _context = context; }
public static DynamicMetaObjectBinder UnaryOperationBinder(TotemContext state, ExpressionType operatorName) { return state.UnaryOperation(operatorName); }
/*!*/ public static DynamicMetaObjectBinder InvokeSplat(TotemContext state) { return new SplatBinder(state); }
internal TotemTracebackListener(TotemContext context) { _totemContext = context; }
public ContractsController(TotemContext context, IMediator mediator) { _context = context; _mediator = mediator; }
public QueryHandler(TotemContext dbContext, IMapper mapper) { _dbContext = dbContext; _mapper = mapper; }
public CommandHandler(TotemContext db) { _db = db; }
public TotemUnaryOperationBinder(TotemContext/*!*/ context, ExpressionType operation) : base(operation) { _context = context; }
public TotemConversionBinder(TotemContext/*!*/ context, Type/*!*/ type, ConversionResultKind resultKind) : this(context, type, resultKind, false) { }
public QueryHandler(TotemContext db, IMapper mapper) { _db = db; _mapper = mapper; }
public CommandHandler(TotemContext db, IMapper mapper) { _db = db; _mapper = mapper; }
public CompatibilityInvokeBinder(TotemContext context, CallInfo callInfo) : base(callInfo) { _context = context; }
public static async Task <bool> IsUniqueContract(Guid?contractId, string versionNumber, TotemContext dbContext, CancellationToken cancellationToken) { var isDuplicateContract = await dbContext.Contract.AnyAsync(x => x.Id == contractId && x.VersionNumber == versionNumber, cancellationToken); return(!isDuplicateContract); }
public TotemBinder(TotemContext totemContext, CodeContext context) { ContractUtils.RequiresNotNull(totemContext, "totemContext"); _context = totemContext; }
public CommandHandler(TotemContext db, IMapper mapper, TesterService testerService) { _db = db; _mapper = mapper; _testerService = testerService; }
public TotemOperationBinder(TotemContext context, TotemOperationKind operation) { _context = context; _operation = operation; }