本文整理汇总了C#中ApplyTo类的典型用法代码示例。如果您正苦于以下问题:C# ApplyTo类的具体用法?C# ApplyTo怎么用?C# ApplyTo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplyTo类属于命名空间,在下文中一共展示了ApplyTo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetValueForCopy
public static string GetValueForCopy(ApplyTo.Copy applyTo)
{
switch (applyTo)
{
case ApplyTo.Copy.ResourceOnly:
return "0";
case ApplyTo.Copy.ResourceAndAncestors:
return "infinity";
default:
throw new InvalidEnumArgumentException("applyTo", (int)applyTo, typeof(ApplyTo.Copy));
}
}
示例2: GetValueForPropfind
public static string GetValueForPropfind(ApplyTo.Propfind applyTo)
{
switch (applyTo)
{
case ApplyTo.Propfind.ResourceOnly:
return "0";
case ApplyTo.Propfind.ResourceAndChildren:
return "1";
case ApplyTo.Propfind.ResourceAndAncestors:
return "infinity";
default:
throw new InvalidEnumArgumentException("applyTo", (int)applyTo, typeof(ApplyTo.Propfind));
}
}
示例3: RequiresAnyPermissionAttribute
/// <summary>Initializes a new instance of the NServiceKit.ServiceInterface.RequiresAnyPermissionAttribute class.</summary>
///
/// <param name="applyTo"> The apply to.</param>
/// <param name="permissions">A variable-length parameters list containing permissions.</param>
public RequiresAnyPermissionAttribute(ApplyTo applyTo, params string[] permissions)
{
this.RequiredPermissions = permissions.ToList();
this.ApplyTo = applyTo;
this.Priority = (int)RequestFilterPriority.RequiredPermission;
}
示例4: WebSudoRequiredAttribute
public WebSudoRequiredAttribute(ApplyTo applyTo)
{
this.ApplyTo = applyTo;
this.Priority = -79;
}
示例5: AuthenticateAttribute
public AuthenticateAttribute(ApplyTo applyTo)
{
this.ApplyTo = applyTo;
}
示例6: AuthenticateAttribute
public AuthenticateAttribute(ApplyTo applyTo, string provider)
: this(applyTo)
{
this.Provider = provider;
}
示例7: RequestFilterAttribute
/// <summary>
/// Creates a new <see cref="RequestFilterAttribute"/>
/// </summary>
/// <param name="applyTo">Defines when the filter should be executed</param>
public RequestFilterAttribute(ApplyTo applyTo)
{
ApplyTo = applyTo;
}
示例8: RequiredRoleAttribute
public RequiredRoleAttribute(ApplyTo applyTo, params string[] roles)
{
this.RequiredRoles = roles.ToList();
this.ApplyTo = applyTo;
}
示例9: AuthenticateAttribute
public AuthenticateAttribute(ApplyTo applyTo)
: base(applyTo)
{
}
示例10: RequiresAuthenticateAttribute
public RequiresAuthenticateAttribute(ApplyTo applyTo, string provider)
: this(applyTo) {}
示例11: Run
protected virtual object Run(RoutePriority request, ApplyTo method)
{
return request.AsTypeString();
}
示例12: PermissionAttribute
public PermissionAttribute(ApplyTo applyTo, params string[] permissions):base(applyTo, permissions)
{
}
示例13: HttpHeaderAttribute
/// <summary>
/// Initializes a new instance of the <see cref="HttpHeaderAttribute"/>
/// class that applies to the HTTP methods defined by the flag
/// <paramref name="apply_to"/> and uses the default authentication
/// challenge.
/// </summary>
/// <param name="apply_to">
/// A flag that indicates for which method this attribute should be applied.
/// </param>
public HttpHeaderAttribute(ApplyTo apply_to) : base(apply_to) {
Value = string.Empty;
}
示例14: ResponseFilterAttribute
/// <summary>
/// Creates a new <see cref="ResponseFilterAttribute"/>
/// </summary>
/// <param name="applyTo">Defines when the filter should be executed</param>
public ResponseFilterAttribute(ApplyTo applyTo)
{
ApplyTo = applyTo;
}
示例15: RequiredPermissionAttribute
public RequiredPermissionAttribute(ApplyTo applyTo, params string[] permissions)
{
this.RequiredPermissions = permissions.ToList();
this.ApplyTo = applyTo;
}