当前位置: 首页>>代码示例>>C#>>正文


C# SecurityAction类代码示例

本文整理汇总了C#中SecurityAction的典型用法代码示例。如果您正苦于以下问题:C# SecurityAction类的具体用法?C# SecurityAction怎么用?C# SecurityAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SecurityAction类属于命名空间,在下文中一共展示了SecurityAction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateControl

		// LinkDemand

		public override object CreateControl (SecurityAction action, AspNetHostingPermissionLevel level)
		{
			// no public ctor is available but we know that it's properties don't have any restrictions
			MethodInfo mi = this.Type.GetProperty ("AcceptTypes").GetGetMethod ();
			Assert.IsNotNull (mi, "get_AcceptTypes");
			return mi.Invoke (response.Cache.VaryByHeaders, null);
		}
开发者ID:nobled,项目名称:mono,代码行数:9,代码来源:HttpCacheVaryByHeadersCas.cs

示例2: CreateControl

		// LinkDemand

		public override object CreateControl (SecurityAction action, AspNetHostingPermissionLevel level)
		{
			// static class 2.0 / no public ctor before (1.x)
			MethodInfo mi = this.Type.GetMethod ("EnumToString");
			Assert.IsNotNull (mi, "EnumToString");
			return mi.Invoke (null, new object[2] { typeof(SecurityAction), SecurityAction.Demand });
		}
开发者ID:nobled,项目名称:mono,代码行数:9,代码来源:PropertyConverterCas.cs

示例3: CreateControl

		// LinkDemand

		public override object CreateControl (SecurityAction action, AspNetHostingPermissionLevel level)
		{
			// no public ctor but we know the properties aren't protected
			MethodInfo mi = this.Type.GetProperty ("Visible").GetGetMethod ();
			Assert.IsNotNull (mi, "Visible");
			return mi.Invoke (pager_style, null);
		}
开发者ID:nobled,项目名称:mono,代码行数:9,代码来源:DataGridPagerStyleCas.cs

示例4: ServiceControllerPermissionAttribute

		public ServiceControllerPermissionAttribute (SecurityAction action)
			: base (action)
		{
			machine_name = ResourcePermissionBase.Local;
			service_name = ResourcePermissionBase.Any;
			permission_access = ServiceControllerPermissionAccess.Browse;
		}
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:ServiceControllerPermissionAttribute.cs

示例5: CreateControl

		// LinkDemand

		public override object CreateControl (SecurityAction action, AspNetHostingPermissionLevel level)
		{
			ConstructorInfo ci = this.Type.GetConstructor (new Type[7] { typeof (string), typeof (string),
				typeof (int), typeof (string), typeof (string), typeof (string), typeof (BuildMethod) });
			Assert.IsNotNull (ci, ".ctor(2xstring,int,3xstring,BuildMethod)");
			return ci.Invoke (new object[7] { null, null, null, null, null, null, null });
		}
开发者ID:nobled,项目名称:mono,代码行数:9,代码来源:StaticPartialCachingControlCas.cs

示例6: PerformanceCounterPermissionAttribute

	// Constructors.
	public PerformanceCounterPermissionAttribute(SecurityAction action)
			: base(action)
			{
				machineName = ".";
				categoryName = "*";
				permissionAccess = PerformanceCounterPermissionAccess.Browse;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:8,代码来源:PerformanceCounterPermissionAttribute.cs

示例7: CreateControlStringCtor

		private object CreateControlStringCtor (SecurityAction action, AspNetHostingPermissionLevel level)
		{
			// not public empty (default) ctor - at least not before 2.0
			ConstructorInfo ci = this.Type.GetConstructor (new Type[1] { typeof (string) });
			Assert.IsNotNull (ci, ".ctor(string)");
			return ci.Invoke (new object[1] { tempFile });
		}
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:CacheDependencyCas.cs

示例8: HostProtectionAttribute

 public HostProtectionAttribute( SecurityAction action )
     : base( action ) 
 { 
     if (action != SecurityAction.LinkDemand)
         throw new ArgumentException(Environment.GetResourceString("Argument_InvalidFlag")); 
     Contract.EndContractBlock();
 }
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:7,代码来源:HostProtectionPermission.cs

示例9: CreateControl

		public override object CreateControl (SecurityAction action, AspNetHostingPermissionLevel level)
		{
			if ((level != AspNetHostingPermissionLevel.None) && (action == SecurityAction.PermitOnly))
				return UnmanagedCreateControl (action, level);
			else
				return base.CreateControl (action, level);
		}
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:CacheCas.cs

示例10: AddDeclarativeSecurity

 public void AddDeclarativeSecurity(SecurityAction action, PermissionSet pset)
 {
     lock (this.SyncRoot)
     {
         this.AddDeclarativeSecurityNoLock(action, pset);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:TypeBuilder.cs

示例11: CreateControl

		// LinkDemand

		public override object CreateControl (SecurityAction action, AspNetHostingPermissionLevel level)
		{
			// no public ctor is available but we know the Count property isn't protected
			MethodInfo mi = this.Type.GetProperty ("Count").GetGetMethod ();
			Assert.IsNotNull (mi, "Count");
			return mi.Invoke (css, null);
		}
开发者ID:nobled,项目名称:mono,代码行数:9,代码来源:CssStyleCollectionCas.cs

示例12: PerformanceCounterPermissionAttribute

		public PerformanceCounterPermissionAttribute (SecurityAction action) 
			: base (action)
		{
			categoryName = ResourcePermissionBase.Any;
			machineName = ResourcePermissionBase.Local;
			permissionAccess = PerformanceCounterPermissionAccess.Write;
		}
开发者ID:Xipas,项目名称:Symplified.Auth,代码行数:7,代码来源:PerformanceCounterPermissionAttribute.cs

示例13: CreateControl

		// LinkDemand

		public override object CreateControl (SecurityAction action, AspNetHostingPermissionLevel level)
		{
			// there are no public ctor so we're taking a method that we know isn't protected
			// (by a Demand) and call it thru reflection so any linkdemand (on the class) will
			// be promoted to a Demand
			MethodInfo mi = this.Type.GetProperty ("AllKeys").GetGetMethod ();
			return mi.Invoke (appstate, null);
		}
开发者ID:nobled,项目名称:mono,代码行数:10,代码来源:HttpApplicationStateCas.cs

示例14: Action

		public Action (SecurityAction action)
		{
			this.action = action;
			this.TextView = new TextView ();
			this.TextView.Editable = false;
			this.Expander = new Expander (action.ToString ());
			this.Expander.Add (this.TextView);
		}
开发者ID:transformersprimeabcxyz,项目名称:cecil-old,代码行数:8,代码来源:DeclarativeSecurityVisualizer.cs

示例15: HostProtectionAttribute

		public HostProtectionAttribute (SecurityAction action)
			: base (action) 
		{
			if (action != SecurityAction.LinkDemand) {
				string msg = String.Format (Locale.GetText ("Only {0} is accepted."), SecurityAction.LinkDemand);
				throw new ArgumentException (msg, "action");
			}
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:8,代码来源:HostProtectionAttribute.cs


注:本文中的SecurityAction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。