Beispiel #1
0
 /// <summary>
 /// 赋予被授权者所有的权限
 /// <see href="Model.Tag.GrantAccount"/>
 /// </summary>
 /// <param name="grantAccount"></param>
 public void SetXCosReadWrite(GrantAccount grantAccount)
 {
     if (grantAccount != null)
     {
         SetRequestHeader(CosRequestHeaderKey.X_COS_GRANT_FULL_CONTROL, grantAccount.GetGrantAccounts());
     }
 }
Beispiel #2
0
 /// <summary>
 /// 赋予被授权者读的权限
 /// <see href="Model.Tag.GrantAccount"/>
 /// </summary>
 /// <param name="grantAccount"></param>
 public void SetXCosGrantRead(GrantAccount grantAccount)
 {
     if (grantAccount != null)
     {
         SetRequestHeader(CosRequestHeaderKey.X_COS_GRANT_READ, grantAccount.GetGrantAccounts());
     }
 }
 public void setXCosGrantWrite(GrantAccount grantAccount)
 {
     if (grantAccount != null)
     {
         SetRequestHeader(CosRequestHeaderKey.X_COS_GRANT_WRITE, grantAccount.GetGrantAccounts());
     }
 }
Beispiel #4
0
        public static void testGrantAccount()
        {
            GrantAccount grantAccount = new GrantAccount();

            grantAccount.AddGrantAccount("1131975903", "1131975903");
            grantAccount.AddGrantAccount("333", "555");
            grantAccount.AddGrantAccount("666", "777");
            Console.WriteLine(grantAccount.GetGrantAccounts());
        }
Beispiel #5
0
        public void GetGrantAccountsTest()
        {
            GrantAccount target   = new GrantAccount(); // TODO: Initialize to an appropriate value
            string       expected = string.Empty;       // TODO: Initialize to an appropriate value
            string       actual;

            actual = target.GetGrantAccounts();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }