123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
-
- using System;
- namespace Aliyun.OSS
- {
-
-
-
- public class Grant {
-
-
-
- public IGrantee Grantee { get; private set; }
-
-
-
- public Permission Permission { get; private set; }
-
-
-
-
-
- public Grant(IGrantee grantee, Permission permission)
- {
- if (grantee == null)
- throw new ArgumentNullException("grantee");
- Grantee = grantee;
- Permission = permission;
- }
-
-
-
-
-
- public override bool Equals(Object obj)
- {
- var g = obj as Grant;
- if (g == null)
- return false;
- return Grantee.Identifier== g.Grantee.Identifier &&
- Permission == g.Permission;
- }
-
-
-
-
- public override int GetHashCode()
- {
- return (Grantee.Identifier + ":" + Permission).GetHashCode();
- }
- }
- }
|