protected override IConfigurable PrepareDataObject() { HotmailSubscriptionProxy hotmailSubscriptionProxy = base.PrepareDataObject() as HotmailSubscriptionProxy; if (this.accountSettings != null) { DeltaSyncAggregationSubscription deltaSyncAggregationSubscription = hotmailSubscriptionProxy.Subscription as DeltaSyncAggregationSubscription; DeltaSyncAutoProvision.UpdateSubscriptionSettings(this.accountSettings, ref deltaSyncAggregationSubscription); } return(hotmailSubscriptionProxy); }
protected override void StampChangesOn(IConfigurable dataObject) { TaskLogger.LogEnter(); base.StampChangesOn(dataObject); HotmailSubscriptionProxy hotmailSubscriptionProxy = dataObject as HotmailSubscriptionProxy; DeltaSyncAggregationSubscription deltaSyncAggregationSubscription = hotmailSubscriptionProxy.Subscription as DeltaSyncAggregationSubscription; if (this.accountSettings != null) { DeltaSyncAutoProvision.UpdateSubscriptionSettings(this.accountSettings, ref deltaSyncAggregationSubscription); } TaskLogger.LogExit(); }
protected override void ValidateWithDataObject(IConfigurable dataObject) { base.ValidateWithDataObject(dataObject); if (this.Password != null) { DeltaSyncUserAccount account = DeltaSyncUserAccount.CreateDeltaSyncUserForTrustedPartnerAuthWithPassword(((HotmailSubscriptionProxy)dataObject).EmailAddress.ToString(), SyncUtilities.SecureStringToString(this.Password)); LocalizedException exception; if (!DeltaSyncAutoProvision.ValidateUserHotmailAccount(account, CommonLoggingHelper.SyncLogSession, out this.accountSettings, out exception)) { base.WriteDebugInfoAndError(exception, ErrorCategory.InvalidArgument, null); } } base.WriteDebugInfo(); }
protected override void InternalBeginProcessing() { TaskLogger.LogEnter(); base.InternalBeginProcessing(); DeltaSyncUserAccount deltaSyncUserAccount = DeltaSyncUserAccount.CreateDeltaSyncUserForTrustedPartnerAuthWithPassword(this.EmailAddress.ToString(), SyncUtilities.SecureStringToString(this.Password)); LocalizedException exception; if (!DeltaSyncAutoProvision.ValidateUserHotmailAccount(deltaSyncUserAccount, CommonLoggingHelper.SyncLogSession, out this.accountSettings, out exception)) { base.WriteDebugInfoAndError(exception, ErrorCategory.InvalidArgument, null); } this.DataObject.SetLiveAccountPuid(deltaSyncUserAccount.AuthToken.PUID); base.WriteDebugInfo(); TaskLogger.LogExit(); }