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


C# System.Flags类代码示例

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


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

示例1: ActualParam

        public ActualParam(Text.Span p, Expression param, Flags flags)
			: base(p)
		{
			Debug.Assert(param != null);
			_expression = param;
            _flags = flags;
		}
开发者ID:dw4dev,项目名称:Phalanger,代码行数:7,代码来源:CallSignature.cs

示例2: MapCallInfo

 	public MapCallInfo( Type targetType, Type[] genericTypes, Flags bindingFlags, MemberTypes memberTypes, string name, Type[] parameterTypes, MemberInfo memberInfo, bool isReadOperation, Type sourceType, MemberTypes sourceMemberTypes, MemberTypes targetMemberTypes, string[] names ) : base( targetType, genericTypes, bindingFlags, memberTypes, name, parameterTypes, memberInfo, isReadOperation )
 	{
 		SourceType = sourceType;
 		SourceMemberTypes = sourceMemberTypes;
 		TargetMemberTypes = targetMemberTypes;
 		Names = names;
 	}
开发者ID:dlemstra,项目名称:GraphicsMagick.NET,代码行数:7,代码来源:MapCallInfo.cs

示例3: Handler

 public Handler()
 {
     SupportedArguments = new List<string>();
     SupportedComplexArguments = new Dictionary<string, string>();
     HandlerInvoker = new HandlerInvoker();
     Flags = new Flags();
 }
开发者ID:olegd,项目名称:ArgumentsParser,代码行数:7,代码来源:Handler.cs

示例4: CacheEntry

		internal CacheEntry (Cache objManager, string strKey, object objItem,CacheDependency objDependency,
				CacheItemRemovedCallback eventRemove, DateTime dtExpires, TimeSpan tsSpan,
				long longMinHits, bool boolPublic, CacheItemPriority enumPriority )
		{
			if (boolPublic)
				_enumFlags |= Flags.Public;

			_strKey = strKey;
			_objItem = objItem;
			_objCache = objManager;
			_onRemoved += eventRemove;
			_enumPriority = enumPriority;
			_ticksExpires = dtExpires.ToUniversalTime ().Ticks;
			_ticksSlidingExpiration = tsSpan.Ticks;

			// If we have a sliding expiration it overrides the absolute expiration (MS behavior)
			// This is because sliding expiration causes the absolute expiration to be 
			// moved after each period, and the absolute expiration is the value used 
			// for all expiration calculations.
			if (tsSpan.Ticks != Cache.NoSlidingExpiration.Ticks)
				_ticksExpires = DateTime.UtcNow.AddTicks (_ticksSlidingExpiration).Ticks;
			
			_objDependency = objDependency;
			if (_objDependency != null)
				// Add the entry to the cache dependency handler (we support multiple entries per handler)
				_objDependency.Changed += new CacheDependencyChangedHandler (OnChanged); 

			_longMinHits = longMinHits;
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:29,代码来源:CacheEntry.cs

示例5: RenderModel

 public RenderModel(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.flags = (Flags)binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.padding0 = binaryReader.ReadBytes(4);
     this.importInfo = ReadImportinfo(binaryReader);
     this.compressionInfo = ReadCompressioninfo(binaryReader);
     this.regions = ReadRegions(binaryReader);
     this.sections = ReadSections(binaryReader);
     this.invalidSectionPairBits = ReadInvalidsectionpairbits(binaryReader);
     this.sectionGroups = ReadSectiongroups(binaryReader);
     this.l1SectionGroupIndexSuperLow = binaryReader.ReadByte();
     this.l2SectionGroupIndexLow = binaryReader.ReadByte();
     this.l3SectionGroupIndexMedium = binaryReader.ReadByte();
     this.l4SectionGroupIndexHigh = binaryReader.ReadByte();
     this.l5SectionGroupIndexSuperHigh = binaryReader.ReadByte();
     this.l6SectionGroupIndexHollywood = binaryReader.ReadByte();
     this.padding1 = binaryReader.ReadBytes(2);
     this.nodeListChecksum = binaryReader.ReadInt32();
     this.nodes = ReadNodes(binaryReader);
     this.nodeMapOLD = ReadNodemapold(binaryReader);
     this.markerGroups = ReadMarkergroups(binaryReader);
     this.materials = ReadMaterials(binaryReader);
     this.errors = ReadErrors(binaryReader);
     this.dontDrawOverCameraCosineAngleDontDrawFpModelWhenCameraThisAngleCosine11Sugg020Disables = binaryReader.ReadSingle();
     this.pRTInfo = ReadPrtinfo(binaryReader);
     this.sectionRenderLeaves = ReadSectionrenderleaves(binaryReader);
 }
开发者ID:jacksoncougar,项目名称:Moonfish-Editor,代码行数:29,代码来源:RenderModel.cs

示例6: Read

        public override void Read(hsStream s, hsResMgr mgr)
        {
            base.Read(s, mgr);

            fSynchFlags = (Flags)s.ReadInt();
            if (s.Version.IsPlasma21)
                fSynchFlags &= (Flags)~0x8;

            if (s.Version.IsPlasma21 && (((int)fSynchFlags & 0x06) != 0) ||
               (s.Version.IsPlasma20 && ExcludeStates)) {
                short count = s.ReadShort();
                for (short i = 0; i < count; i++)
                    fExcludeStates.Add((States)Enum.Parse(typeof(States), s.ReadStdString()));
            }

            //Plasma 2.1+ ends here...
            if (s.Version.IsPlasma21) {
                fSynchFlags = 0; // Synch Flags are pretty useless in Plasma21
                return;
            } else if (s.Version.IsPlasma20) {
                if (VolatileStates) {
                    short count = s.ReadShort();
                    for (short i = 0; i < count; i++)
                        fVolatileStates.Add((States)Enum.Parse(typeof(States), s.ReadStdString()));
                }
            }
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:27,代码来源:SynchedObject.cs

示例7: DG_BossSitChanges

        public DG_BossSitChanges(List<Impedance> list, Flags f)
        {
            InitializeComponent();

#if !SILVERLIGHT
            this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
            this.WindowState = System.Windows.WindowState.Normal;
            this.WindowStyle = System.Windows.WindowStyle.ToolWindow;
            this.SizeToContent = SizeToContent.Height;
#endif

            Flag = f;
            TheList = list;
            string s = "";
            switch (f)
            {
                case Flags.Stun: { s = "Stuns"; break; }
                case Flags.Move: { s = "Moves"; break; }
                case Flags.Fear: { s = "Fears"; break; }
                case Flags.Root: { s = "Roots"; break; }
                case Flags.Silence: { s = "Silences"; break; }
                default: { s = "Disarms"; break; } // Disarm
            }
            this.Title = ((string)(this.Title)).Replace("SitChanges", s);
            SetListBox();
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:26,代码来源:DG_BossSitChanges.xaml.cs

示例8: SecureCredential

 public SecureCredential(int version, X509Certificate certificate, Flags flags, SchProtocols protocols, EncryptionPolicy policy)
 {
     this.rootStore = this.phMappers = this.palgSupportedAlgs = this.certContextArray = IntPtr.Zero;
     this.cCreds = this.cMappers = this.cSupportedAlgs = 0;
     if (policy == EncryptionPolicy.RequireEncryption)
     {
         this.dwMinimumCipherStrength = 0;
         this.dwMaximumCipherStrength = 0;
     }
     else if (policy == EncryptionPolicy.AllowNoEncryption)
     {
         this.dwMinimumCipherStrength = -1;
         this.dwMaximumCipherStrength = 0;
     }
     else
     {
         if (policy != EncryptionPolicy.NoEncryption)
         {
             throw new ArgumentException(SR.GetString("net_invalid_enum", new object[] { "EncryptionPolicy" }), "policy");
         }
         this.dwMinimumCipherStrength = -1;
         this.dwMaximumCipherStrength = -1;
     }
     this.dwSessionLifespan = this.reserved = 0;
     this.version = version;
     this.dwFlags = flags;
     this.grbitEnabledProtocols = protocols;
     if (certificate != null)
     {
         this.certContextArray = certificate.Handle;
         this.cCreds = 1;
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:SecureCredential.cs

示例9: SVD

 /// <summary>
 /// the constructor that performs SVD
 /// </summary>
 /// <param name="src"></param>
 /// <param name="flags"></param>
 public SVD(InputArray src, Flags flags = 0)
 {
     if (src == null)
         throw new ArgumentNullException("src");
     src.ThrowIfDisposed();
     ptr = NativeMethods.core_SVD_new(src.CvPtr, (int)flags);
 }
开发者ID:CodeSang,项目名称:opencvsharp,代码行数:12,代码来源:SVD.cs

示例10: parse_args

		static void parse_args(string[] args)
		{
			for(int i=0; i<args.Length; i++)
			{
				if(args[i][0]=='-')
				{
					if(args[i]=="-h"||args[i]=="--help") help();
					else if((args[i][1]=='d')&&(args[i][2]=='=')) log_level=(Lib3dsLogLevel)int.Parse(args[i].Substring(3));
					else if(args[i][1]=='m') flags|=Flags.LIB3DSDUMP_MATERIALS;
					else if(args[i][1]=='t') flags|=Flags.LIB3DSDUMP_TRIMESHES;
					else if(args[i][1]=='i') flags|=Flags.LIB3DSDUMP_INSTANCES;
					else if(args[i][1]=='c') flags|=Flags.LIB3DSDUMP_CAMERAS;
					else if(args[i][1]=='l') flags|=Flags.LIB3DSDUMP_LIGHTS;
					else if(args[i][1]=='n') flags|=Flags.LIB3DSDUMP_NODES;
					else if(args[i][1]=='w'&&args[i][2]=='=') output=args[i].Substring(3);
					else help();
				}
				else
				{
					if(filename!=null) help(); // if filename is already given
					filename=args[i];
				}
			}

			if(filename==null) help();
		}
开发者ID:ChrisDenham,项目名称:lib3ds.net,代码行数:26,代码来源:Program.cs

示例11: CMTime

		public CMTime (long value, int timescale, long epoch)
		{
			Value = value;
			TimeScale = timescale;
			TimeFlags = Flags.Valid;
			TimeEpoch = epoch;
		}
开发者ID:Anomalous-Software,项目名称:maccore,代码行数:7,代码来源:CMTime.cs

示例12: SetData

 public void SetData(byte[] data, int index, int count)
 {
     using (MemoryStream stream = new MemoryStream(data, index, count, false))
     {
         using (ZipHelperStream stream2 = new ZipHelperStream(stream))
         {
             this._flags = (Flags) ((byte) stream2.ReadByte());
             if ((((byte) (this._flags & Flags.ModificationTime)) != 0) && (count >= 5))
             {
                 int seconds = stream2.ReadLEInt();
                 DateTime time = new DateTime(0x7b2, 1, 1, 0, 0, 0);
                 this._modificationTime = (time.ToUniversalTime() + new TimeSpan(0, 0, 0, seconds, 0)).ToLocalTime();
             }
             if (((byte) (this._flags & Flags.AccessTime)) != 0)
             {
                 int num2 = stream2.ReadLEInt();
                 DateTime time3 = new DateTime(0x7b2, 1, 1, 0, 0, 0);
                 this._lastAccessTime = (time3.ToUniversalTime() + new TimeSpan(0, 0, 0, num2, 0)).ToLocalTime();
             }
             if (((byte) (this._flags & Flags.CreateTime)) != 0)
             {
                 int num3 = stream2.ReadLEInt();
                 DateTime time5 = new DateTime(0x7b2, 1, 1, 0, 0, 0);
                 this._createTime = (time5.ToUniversalTime() + new TimeSpan(0, 0, 0, num3, 0)).ToLocalTime();
             }
         }
     }
 }
开发者ID:huaminglee,项目名称:myyyyshop,代码行数:28,代码来源:ExtendedUnixData.cs

示例13: GetFlag

 internal override bool GetFlag(Flags fl) {
   switch(fl) {
   case Flags.DoRequest:
     return true;
   }
   return false;
 }
开发者ID:giapdangle,项目名称:X13.Host,代码行数:7,代码来源:DS18B20.cs

示例14: SetFlags

 void SetFlags(Flags flags, bool set)
 {
   if (set)
     _flags |= flags;
   else
     _flags &= ~flags;
 }
开发者ID:reshadi2,项目名称:mcjs,代码行数:7,代码来源:Scope.cs

示例15: Frame

 /// <summary>
 /// Create a message and the internal buffer
 /// </summary>
 /// <param name="length"></param>
 public Frame(int length)
 {
     m_length = length;
     m_data = new byte[length];
     m_status = Status.GC;
     m_flags = Flags.None;
 }
开发者ID:somdoron,项目名称:NetMQ4,代码行数:11,代码来源:Frame.cs


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