public ClaimTypeAttribute(ClaimTypeTargetEnum target) { if (target == ClaimTypeTargetEnum.BuiltIn || target == ClaimTypeTargetEnum.EnumCollection) { throw new Exception(); //todo exception required ClaimType } Target = target; }
public ClaimTypeAttribute(string claimType, ClaimTypeTargetEnum target = ClaimTypeTargetEnum.BuiltIn) { if (string.IsNullOrEmpty(claimType)) { throw new Exception(); //todo exception } if (target == ClaimTypeTargetEnum.Collection || target == ClaimTypeTargetEnum.Complex) { throw new Exception(); //todo exception } ClaimType = claimType; Target = target; }
public ClaimTypeAttribute() { Target = ClaimTypeTargetEnum.Complex; }