Ejemplo n.º 1
0
        public ActualParam(Text.Span p, Expression param, Flags flags)
			: base(p)
		{
			Debug.Assert(param != null);
			_expression = param;
            _flags = flags;
		}
Ejemplo n.º 2
0
 	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;
 	}
Ejemplo n.º 3
0
 public Handler()
 {
     SupportedArguments = new List<string>();
     SupportedComplexArguments = new Dictionary<string, string>();
     HandlerInvoker = new HandlerInvoker();
     Flags = new Flags();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a message, <paramref name="data"/> is owned by the Message.
 /// </summary>
 /// <param name="data">data of the message, owned by the message after the allocation</param>
 /// <param name="length"></param>
 public Frame(byte[] data, int length)
 {
     m_length = length;
     m_data = data;
     m_status = Status.GC;
     m_flags = Flags.None;
 }
Ejemplo n.º 5
0
        public Column(Column c)
        {
            obj = SetObject(c.obj);
            nulltype = c.nulltype;
            Style = c.Style;
            flags = c.flags;
            IsIdentity = c.IsIdentity;
            ownerTable = c.ownerTable;
            Name = c.Name;
            //            Value = c.Value;

            //SetType = c.SetType;
            if (c.fKey != null)
            {
                fKey = new ForeignKey(c.fKey);
            }

            Name_in_language = c.Name_in_language;
            //Name_in_language = new ltext();

            //int iCount = c.Name_in_language.sText.Length;
            //for (int i = 0; i < iCount; i++)
            //{
            //    Name_in_language.sText(i) = c.Name_in_language.sText(i);
            //}
        }
Ejemplo n.º 6
0
		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;
		}
Ejemplo n.º 7
0
 internal override bool GetFlag(Flags fl) {
   switch(fl) {
   case Flags.DoRequest:
     return true;
   }
   return false;
 }
Ejemplo n.º 8
0
		CMTime (Flags f, int timescale)
		{
			Value = 0;
			TimeScale = timescale;
			TimeEpoch = 0;
			TimeFlags = f;
		}
Ejemplo n.º 9
0
 /// <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;
 }
Ejemplo n.º 10
0
		CMTime (Flags f)
		{
			Value = 0;
			TimeScale = 0;
			TimeEpoch = 0;
			TimeFlags = f;
		}
Ejemplo n.º 11
0
 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);
 }
Ejemplo n.º 12
0
        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();
        }
 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;
     }
 }
Ejemplo n.º 14
0
        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()));
                }
            }
        }
Ejemplo n.º 15
0
		public CMTime (long value, int timescale, long epoch)
		{
			Value = value;
			TimeScale = timescale;
			TimeFlags = Flags.Valid;
			TimeEpoch = epoch;
		}
Ejemplo n.º 16
0
		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();
		}
Ejemplo n.º 17
0
 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();
             }
         }
     }
 }
Ejemplo n.º 18
0
 void SetFlags(Flags flags, bool set)
 {
   if (set)
     _flags |= flags;
   else
     _flags &= ~flags;
 }
Ejemplo n.º 19
0
 /// <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);
 }
Ejemplo n.º 20
0
 public GameObject(int x, int y, int z, Flags flags, char visualChar, ConsoleColor color, string name)
 {
     this.coord = new Coordinate(x, y, z);
     this.flags = flags;
     this.visualChar = visualChar;
     this.color = color;
     this.name = name;
 }
Ejemplo n.º 21
0
		public IncDecEx(Position position, bool inc, bool post, VariableUse/*!*/ variable)
			: base(position)
		{
			this.variable = variable;

            if (inc) this.flags |= Flags.incrementation;
            if (post) this.flags |= Flags.post;
		}
Ejemplo n.º 22
0
		public IncDecEx(Text.Span span, bool inc, bool post, VariableUse/*!*/ variable)
			: base(span)
		{
			this.variable = variable;

            if (inc) this.flags |= Flags.incrementation;
            if (post) this.flags |= Flags.post;
		}
Ejemplo n.º 23
0
        public SftpOpenRequest(uint requestId, string fileName, Flags flags, SftpFileAttributes attributes, Action<SftpHandleResponse> handleAction, Action<SftpStatusResponse> statusAction)
            : base(requestId, statusAction)
        {
            this.Filename = fileName;
            this.Flags = flags;
            this.Attributes = attributes;

            this.SetAction(handleAction);
        }
Ejemplo n.º 24
0
 public Unit(int x, int y, Flags flags, char visualChar, ConsoleColor color, string name, UnitAttributes unitAttr)
     : base(x, y, flags, visualChar, color, name)
 {
     if (uniqueID == 0)
         this.uniqueID = UniqueIDGenerator();
     this.inventory = new Inventory(this.equipment = new Equipment(this));
     this.equipment.InventoryConnected = this.inventory;
     this.unitAttr = unitAttr;
     this.experience = new Experience(1.0f);
 }
Ejemplo n.º 25
0
 public override void ReadExtras(byte[] buffer)
 {
     Format = DataFormat.String;
     Flags = new Flags
     {
         Compression = Compression.None,
         DataFormat = Format,
         TypeCode = TypeCode.String
     };
 }
Ejemplo n.º 26
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="data"></param>
 /// <param name="mean"></param>
 /// <param name="flags"></param>
 /// <param name="maxComponents"></param>
 public PCA(InputArray data, InputArray mean, Flags flags, int maxComponents = 0)
 {
     if (data == null)
         throw new ArgumentNullException(nameof(data));
     if (mean == null)
         throw new ArgumentNullException(nameof(mean));
     data.ThrowIfDisposed();
     mean.ThrowIfDisposed();
     ptr = NativeMethods.core_PCA_new2(data.CvPtr, mean.CvPtr, (int)flags, maxComponents);
 }
Ejemplo n.º 27
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="data"></param>
 /// <param name="mean"></param>
 /// <param name="flags"></param>
 /// <param name="retainedVariance"></param>
 public PCA(InputArray data, InputArray mean, Flags flags, double retainedVariance)
 {
     if (data == null)
         throw new ArgumentNullException(nameof(data));
     if (mean == null)
         throw new ArgumentNullException(nameof(mean));
     data.ThrowIfDisposed();
     mean.ThrowIfDisposed();
     ptr = NativeMethods.core_PCA_new3(data.CvPtr, mean.CvPtr, (int)flags, retainedVariance);
 }
Ejemplo n.º 28
0
        public SftpOpenRequest(uint protocolVersion, uint requestId, string fileName, Encoding encoding, Flags flags, SftpFileAttributes attributes, Action<SftpHandleResponse> handleAction, Action<SftpStatusResponse> statusAction)
            : base(protocolVersion, requestId, statusAction)
        {
            this.Filename = fileName;
            this.Flags = flags;
            this.Attributes = attributes;
            this.Encoding = encoding;

            this.SetAction(handleAction);
        }
Ejemplo n.º 29
0
        /// <summary>
        /// Creates a new instance of the <see cref="Channel"/> class with the given channel name.
        /// </summary>
        /// <param name="name">The channel's name.</param>
        public Channel(string name, Flags channelModes = 0)
        {
            if (!IsChannel(name))
                throw new FormatException("Channel must start with '" + LocalChannelPrefix + "' (local) or '" + GlobalChannelPrefix + "' (network wide).");

            Name = name;
            Modes = channelModes;

            Messages = new List<Message>();
            Users = new List<User>();
        }
Ejemplo n.º 30
0
        protected UIElement()
        {
            EnsureClassHandlers();

            _flags = Flags.NeverMeasured | Flags.NeverArranged | Flags.Enabled;

            _visibility = Visibility.Visible;

            _verticalAlignment = VerticalAlignment.Stretch;
            _horizontalAlignment = HorizontalAlignment.Stretch;
        }
Ejemplo n.º 31
0
 // Should never be used except by the below method
 private Uri(Flags flags, UriParser uriParser, string uri)
 {
     m_Flags  = flags;
     m_Syntax = uriParser;
     m_String = uri;
 }
Ejemplo n.º 32
0
 // Should never be used except by the below method
 private Uri(Flags flags, UriParser?uriParser, string uri)
 {
     _flags  = flags;
     _syntax = uriParser !;
     _string = uri;
 }
Ejemplo n.º 33
0
        //
        // Internal stuff
        //

        // Returns false if OriginalString value
        // (1) is not correctly escaped as per URI spec excluding intl UNC name case
        // (2) or is an absolute Uri that represents implicit file Uri "c:\dir\file"
        // (3) or is an absolute Uri that misses a slash before path "file://c:/dir/file"
        // (4) or contains unescaped backslashes even if they will be treated
        //     as forward slashes like http:\\host/path\file or file:\\\c:\path
        //
        internal unsafe bool InternalIsWellFormedOriginalString()
        {
            if (UserDrivenParsing)
            {
                throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, this.GetType()));

                fixed(char *str = _string)
                {
                    ushort idx = 0;

                    //
                    // For a relative Uri we only care about escaping and backslashes
                    //
                    if (!IsAbsoluteUri)
                    {
                        // my:scheme/path?query is not well formed because the colon is ambiguous
                        if (CheckForColonInFirstPathSegment(_string))
                        {
                            return(false);
                        }
                        return((CheckCanonical(str, ref idx, (ushort)_string.Length, c_EOL)
                                & (Check.BackslashInPath | Check.EscapedCanonical)) == Check.EscapedCanonical);
                    }

                    //
                    // (2) or is an absolute Uri that represents implicit file Uri "c:\dir\file"
                    //
                    if (IsImplicitFile)
                    {
                        return(false);
                    }

                    //This will get all the offsets, a Host name will be checked separately below
                    EnsureParseRemaining();

                    Flags nonCanonical = (_flags & (Flags.E_CannotDisplayCanonical | Flags.IriCanonical));

                    // Cleanup canonical IRI from nonCanonical
                    if ((nonCanonical & (Flags.UserIriCanonical | Flags.PathIriCanonical | Flags.QueryIriCanonical | Flags.FragmentIriCanonical)) != 0)
                    {
                        if ((nonCanonical & (Flags.E_UserNotCanonical | Flags.UserIriCanonical)) == (Flags.E_UserNotCanonical | Flags.UserIriCanonical))
                        {
                            nonCanonical = nonCanonical & ~(Flags.E_UserNotCanonical | Flags.UserIriCanonical);
                        }

                        if ((nonCanonical & (Flags.E_PathNotCanonical | Flags.PathIriCanonical)) == (Flags.E_PathNotCanonical | Flags.PathIriCanonical))
                        {
                            nonCanonical = nonCanonical & ~(Flags.E_PathNotCanonical | Flags.PathIriCanonical);
                        }

                        if ((nonCanonical & (Flags.E_QueryNotCanonical | Flags.QueryIriCanonical)) == (Flags.E_QueryNotCanonical | Flags.QueryIriCanonical))
                        {
                            nonCanonical = nonCanonical & ~(Flags.E_QueryNotCanonical | Flags.QueryIriCanonical);
                        }

                        if ((nonCanonical & (Flags.E_FragmentNotCanonical | Flags.FragmentIriCanonical)) == (Flags.E_FragmentNotCanonical | Flags.FragmentIriCanonical))
                        {
                            nonCanonical = nonCanonical & ~(Flags.E_FragmentNotCanonical | Flags.FragmentIriCanonical);
                        }
                    }

                    // User, Path, Query or Fragment may have some non escaped characters
                    if (((nonCanonical & Flags.E_CannotDisplayCanonical & (Flags.E_UserNotCanonical | Flags.E_PathNotCanonical |
                                                                           Flags.E_QueryNotCanonical | Flags.E_FragmentNotCanonical)) != Flags.Zero))
                    {
                        return(false);
                    }

                    // checking on scheme:\\ or file:////
                    if (InFact(Flags.AuthorityFound))
                    {
                        idx = (ushort)(_info.Offset.Scheme + _syntax.SchemeName.Length + 2);
                        if (idx >= _info.Offset.User || _string[idx - 1] == '\\' || _string[idx] == '\\')
                        {
                            return(false);
                        }

                        if (InFact(Flags.UncPath | Flags.DosPath))
                        {
                            while (++idx < _info.Offset.User && (_string[idx] == '/' || _string[idx] == '\\'))
                            {
                                return(false);
                            }
                        }
                    }


                    // (3) or is an absolute Uri that misses a slash before path "file://c:/dir/file"
                    // Note that for this check to be more general we assert that if Path is non empty and if it requires a first slash
                    // (which looks absent) then the method has to fail.
                    // Today it's only possible for a Dos like path, i.e. file://c:/bla would fail below check.
                    if (InFact(Flags.FirstSlashAbsent) && _info.Offset.Query > _info.Offset.Path)
                    {
                        return(false);
                    }

                    // (4) or contains unescaped backslashes even if they will be treated
                    //     as forward slashes like http:\\host/path\file or file:\\\c:\path
                    // Note we do not check for Flags.ShouldBeCompressed i.e. allow // /./ and alike as valid
                    if (InFact(Flags.BackslashInPath))
                    {
                        return(false);
                    }

                    // Capturing a rare case like file:///c|/dir
                    if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
                    {
                        return(false);
                    }

                    //
                    // May need some real CPU processing to answer the request
                    //
                    //
                    // Check escaping for authority
                    //
                    // IPv6 hosts cannot be properly validated by CheckCannonical
                    if ((_flags & Flags.CanonicalDnsHost) == 0 && HostType != Flags.IPv6HostType)
                    {
                        idx = _info.Offset.User;
                        Check result = CheckCanonical(str, ref idx, (ushort)_info.Offset.Path, '/');
                        if (((result & (Check.ReservedFound | Check.BackslashInPath | Check.EscapedCanonical))
                             != Check.EscapedCanonical) &&
                            (!_iriParsing || (_iriParsing &&
                                              ((result & (Check.DisplayCanonical | Check.FoundNonAscii | Check.NotIriCanonical))
                                               != (Check.DisplayCanonical | Check.FoundNonAscii)))))
                        {
                            return(false);
                        }
                    }

                    // Want to ensure there are slashes after the scheme
                    if ((_flags & (Flags.SchemeNotCanonical | Flags.AuthorityFound))
                        == (Flags.SchemeNotCanonical | Flags.AuthorityFound))
                    {
                        idx = (ushort)_syntax.SchemeName.Length;
                        while (str[idx++] != ':')
                        {
                            ;
                        }
                        if (idx + 1 >= _string.Length || str[idx] != '/' || str[idx + 1] != '/')
                        {
                            return(false);
                        }
                    }
                }

                //
                // May be scheme, host, port or path need some canonicalization but still the uri string is found to be a
                // "well formed" one
                //
                return(true);
        }