public override int GetHashCode()
        {
            var hashCode = 1804216262;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + Age.GetHashCode();
            hashCode = hashCode * -1521134295 + IsFirst.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <List <Lap> > .Default.GetHashCode(Laps);

            return(hashCode);
        }
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine("          Id :                " + Id.ToString());
            sb.AppendLine("          Name :              " + Name);
            sb.AppendLine("          IsFirst :           " + IsFirst.ToString());
            sb.AppendLine("          IsLast :            " + IsLast.ToString());
            if (HasChildLanes)
            {
                sb.AppendLine("          ChildLaneIds :  " + string.Join(",", ChildLaneIds));
            }
            return(sb.ToString());
        }
Exemplo n.º 3
0
        protected override void Execute(CodeActivityContext context)
        {
            var wfContext = context.GetExtension <IWorkflowContext>();

            var id = wfContext.PrimaryEntityId;

            var servicefactory = context.GetExtension <IOrganizationServiceFactory>();

            var service = servicefactory.CreateOrganizationService(null);

            AgreementService agreementService = new AgreementService(service);

            IsFirst.Set(context, agreementService.IsAgreementHaveNoAnyInvoice(id));
            IsAnyInvoiceWhithFactEqTrue.Set(context, agreementService.IsAgreementHaveAnyInvoiceWhithFactEqTrue(id));
            IsAnyInvoiceWhithTypeEqManually.Set(context, agreementService.IsAgreementHaveAnyInvoiceWhithTypeEqManually(id));
        }