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(); }
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(); }