public void SetUp() { _instance = Builder <PlanReceiptOrder> .CreateNew() .WithConstructor(() => new PlanReceiptOrder(100)) .With(x => x.PlanCertificates, Builder <PlanCertificate> .CreateListOfSize(1).Build()) .Build(); _instance.PlanCertificates[0].PlanReceiptOrder = _instance; _copyContext = new CopyContext <PlanReceiptOrder>(); _copyContext.SetSourceValue(_instance); }
public void Test2() { var pc = new PlanCertificate(); var pro = new PlanReceiptOrder(); var pa = new PlanReceiptOrderPersonalAccount(); //var openStateMachine = new StateMachine<PlanCertificateState, ITrigger>( // () => pc.State, // state => pc.State = state); // openStateMachine.Configure(PlanCertificateState.Close) // .Permit( // pro.WhenAnyValue(x => x.State) // .Where(state => state == PlanReceiptOrderState.Close) // .Select(_ => Unit.Default), // PlanCertificateState.Close) // .Permit( // pro.WhenAnyValue(x => x.State) // .Where(state => state == PlanReceiptOrderState.Confirm) // .Select(_ => Unit.Default), // PlanCertificateState.Confirm); }
public PlanReceiptOrderSetGroupState(PlanReceiptOrder planReceiptOrder, PersonalAccount personalAccount) { RnPlanReceiptOrder = planReceiptOrder.Rn; PersonalAccount = personalAccount.Numb; }
/// <summary> /// Initializes a new instance of the <see cref="PlanReceiptOrderSetState"/> class. /// </summary> /// <param name="planReceiptOrder"> /// The plan receipt order. /// </param> /// <param name="state"> /// The state. /// </param> public PlanReceiptOrderSetState(PlanReceiptOrder planReceiptOrder, PlanReceiptOrderState state) { RN = planReceiptOrder.Rn; State = state; }
public СonfirmStateFalling(PlanReceiptOrder entity, IRepositoryFactory repositoryFactory) : base(entity, repositoryFactory) { _repositoryFactory = repositoryFactory; }
protected СonfirmStateBase(PlanReceiptOrder entity, IRepositoryFactory repositoryFactory) : base(entity, repositoryFactory) { }
public NotСonfirmState(PlanReceiptOrder entity, IRepositoryFactory repositoryFactory) : base(entity, repositoryFactory) { }
public EntityBase(PlanReceiptOrder entity, IRepositoryFactory repositoryFactory) { Entity = entity; _repository = repositoryFactory.Create <PlanReceiptOrder>(); }
public CloseStateEmerge(PlanReceiptOrder entity, IRepositoryFactory repositoryFactory) : base(entity, repositoryFactory) { }