public ActualParam(Text.Span p, Expression param, Flags flags) : base(p) { Debug.Assert(param != null); _expression = param; _flags = flags; }
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; }
public Handler() { SupportedArguments = new List<string>(); SupportedComplexArguments = new Dictionary<string, string>(); HandlerInvoker = new HandlerInvoker(); Flags = new Flags(); }
/// <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; }
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); //} }
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; }
internal override bool GetFlag(Flags fl) { switch(fl) { case Flags.DoRequest: return true; } return false; }
CMTime (Flags f, int timescale) { Value = 0; TimeScale = timescale; TimeEpoch = 0; TimeFlags = f; }
/// <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; }
CMTime (Flags f) { Value = 0; TimeScale = 0; TimeEpoch = 0; TimeFlags = f; }
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); }
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; } }
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())); } } }
public CMTime (long value, int timescale, long epoch) { Value = value; TimeScale = timescale; TimeFlags = Flags.Valid; TimeEpoch = epoch; }
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(); }
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(); } } } }
void SetFlags(Flags flags, bool set) { if (set) _flags |= flags; else _flags &= ~flags; }
/// <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); }
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; }
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; }
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; }
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); }
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); }
public override void ReadExtras(byte[] buffer) { Format = DataFormat.String; Flags = new Flags { Compression = Compression.None, DataFormat = Format, TypeCode = TypeCode.String }; }
/// <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); }
/// <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); }
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); }
/// <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>(); }
protected UIElement() { EnsureClassHandlers(); _flags = Flags.NeverMeasured | Flags.NeverArranged | Flags.Enabled; _visibility = Visibility.Visible; _verticalAlignment = VerticalAlignment.Stretch; _horizontalAlignment = HorizontalAlignment.Stretch; }
// 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; }
// Should never be used except by the below method private Uri(Flags flags, UriParser?uriParser, string uri) { _flags = flags; _syntax = uriParser !; _string = uri; }
// // 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); }