12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
-
- using System;
- namespace Aliyun.OSS
- {
-
-
-
- public sealed class GroupGrantee : IGrantee
- {
- private readonly string _identifier;
-
-
-
-
-
-
- public string Identifier
- {
- get { return _identifier; }
- set { throw new NotSupportedException(); }
- }
- private static readonly GroupGrantee _allUsers =
- new GroupGrantee("http://oss.service.aliyun.com/acl/group/ALL_USERS");
-
-
-
-
- public static GroupGrantee AllUsers
- {
- get { return _allUsers; }
- }
-
-
-
-
- private GroupGrantee(string identifier)
- {
- _identifier = identifier;
- }
-
-
-
-
-
- public override bool Equals(object obj)
- {
- var grantee = obj as GroupGrantee;
- if (grantee == null)
- return false;
- return grantee.Identifier == Identifier;
- }
-
-
-
-
- public override int GetHashCode()
- {
- return ("[GroupGrantee ID=" + Identifier + "]").GetHashCode();
- }
- }
- }
|