public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (OrgDisplayName.Length != 0)
            {
                hash ^= OrgDisplayName.GetHashCode();
            }
            if (orgPostalAddress_ != null)
            {
                hash ^= OrgPostalAddress.GetHashCode();
            }
            if (primaryContactInfo_ != null)
            {
                hash ^= PrimaryContactInfo.GetHashCode();
            }
            if (AlternateEmail.Length != 0)
            {
                hash ^= AlternateEmail.GetHashCode();
            }
            if (Domain.Length != 0)
            {
                hash ^= Domain.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (updateTime_ != null)
            {
                hash ^= UpdateTime.GetHashCode();
            }
            if (CloudIdentityId.Length != 0)
            {
                hash ^= CloudIdentityId.GetHashCode();
            }
            if (LanguageCode.Length != 0)
            {
                hash ^= LanguageCode.GetHashCode();
            }
            if (cloudIdentityInfo_ != null)
            {
                hash ^= CloudIdentityInfo.GetHashCode();
            }
            if (ChannelPartnerId.Length != 0)
            {
                hash ^= ChannelPartnerId.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        protected override void Execute(CodeActivityContext context)
        {
            // TODO: VALIDATE ENTITY OR THROW EXCEPTION


            Workflows.UserInteractions.Request.SendCorrespondenceRequest request = new UserInteractions.Request.SendCorrespondenceRequest(

                Entity.Get(context),

                RelatedEntity.Get(context),

                WorkflowManager.Get(context).Application.CorrespondenceGetIdByName(CorrespondenceName.Get(context)),


                AllowUserSelection.Get(context),

                AllowAlternateAddress.Get(context)

                );



            request.AllowCancel = AllowCancel.Get(context);

            request.Attention = Attention.Get(context);

            request.AllowEditRelatedEntity = AllowEditRelatedEntity.Get(context);

            request.AllowHistoricalSendDate = AllowHistoricalSendDate.Get(context);

            request.AllowFutureSendDate = AllowFutureSendDate.Get(context);

            request.AllowSendByFacsimile = AllowSendByFacsimile.Get(context);

            request.AllowSendByEmail = AllowSendByEmail.Get(context);

            request.AllowSendByInPerson = AllowSendByInPerson.Get(context);

            request.SendDate = SendDate.Get(context);

            request.AlternateAddress = AlternateAddress.Get(context);

            request.AlternateFaxNumber = AlternateFaxNumber.Get(context);

            request.AlternateEmail = AlternateEmail.Get(context);


            UserInteractionRequest.Set(context, request);

            return;
        }
Ejemplo n.º 3
0
        public void TestAlternateEmail()
        {
            UserProfile me = smartsheet.UserResources.GetCurrentUser();

            AlternateEmail altEmail1 = new AlternateEmail.AlternateEmailBuilder("*****@*****.**").Build();
            AlternateEmail altEmail2 = new AlternateEmail.AlternateEmailBuilder("*****@*****.**").Build();

            smartsheet.UserResources.AddAlternateEmail(me.Id.Value, new AlternateEmail[] { altEmail1, altEmail2 });

            PaginatedResult <AlternateEmail> altEmails = smartsheet.UserResources.ListAlternateEmails(me.Id.Value, null);

            Assert.IsTrue(altEmails.Data.Count >= 2);

            AlternateEmail altEmail = smartsheet.UserResources.GetAlternateEmail(me.Id.Value, altEmails.Data[0].Id.Value);

            Assert.AreEqual(altEmail.Email, "*****@*****.**");

            smartsheet.UserResources.DeleteAlternateEmail(me.Id.Value, altEmails.Data[0].Id.Value);
            smartsheet.UserResources.DeleteAlternateEmail(me.Id.Value, altEmails.Data[1].Id.Value);
        }