當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。