コード例 #1
0
        public static bool CredentialsAreEqual(IBlogCredentials c1, IBlogCredentials c2)
        {
            if (c1.Username != c2.Username)
            {
                return(false);
            }

            if (c1.Password != c2.Password)
            {
                return(false);
            }

            foreach (string customValue in c1.CustomValues)
            {
                string c1Value = c1.GetCustomValue(customValue);
                string c2Value = c2.GetCustomValue(customValue);

                if (c1Value != c2Value)
                {
                    return(false);
                }
            }

            // if we got this far then they are equal
            return(true);
        }
コード例 #2
0
        public static void Copy(IBlogCredentials sourceCredentials, IBlogCredentials destCredentials)
        {
            destCredentials.Clear();
            destCredentials.Username = sourceCredentials.Username;
            destCredentials.Password = sourceCredentials.Password;
            foreach (string customValue in sourceCredentials.CustomValues)
            {
                destCredentials.SetCustomValue(customValue, sourceCredentials.GetCustomValue(customValue));
            }

            destCredentials.Domain = sourceCredentials.Domain;
        }
コード例 #3
0
        public static bool CredentialsAreEqual(IBlogCredentials c1, IBlogCredentials c2)
        {
            if (c1.Username != c2.Username)
                return false;

            if (c1.Password != c2.Password)
                return false;

            foreach (string customValue in c1.CustomValues)
            {
                string c1Value = c1.GetCustomValue(customValue);
                string c2Value = c2.GetCustomValue(customValue);

                if (c1Value != c2Value)
                    return false;
            }

            // if we got this far then they are equal
            return true;
        }
コード例 #4
0
        public static void Copy(IBlogCredentials sourceCredentials, IBlogCredentials destCredentials)
        {
            destCredentials.Clear();
            destCredentials.Username = sourceCredentials.Username;
            destCredentials.Password = sourceCredentials.Password;
            foreach (string customValue in sourceCredentials.CustomValues)
                destCredentials.SetCustomValue(customValue, sourceCredentials.GetCustomValue(customValue));

            destCredentials.Domain = sourceCredentials.Domain;
        }