示例#1
0
        public static bool ApplyLookupList(
            FontMetrics fontMetrics,
            GPosTable table,
            Tag feature,
            LookupFlags lookupFlags,
            SequenceLookupRecord[] records,
            GlyphPositioningCollection collection,
            ushort index,
            int count)
        {
            bool hasChanged = false;
            SkippingGlyphIterator iterator = new(fontMetrics, collection, index, lookupFlags);

            foreach (SequenceLookupRecord lookupRecord in records)
            {
                ushort sequenceIndex = lookupRecord.SequenceIndex;
                ushort lookupIndex   = lookupRecord.LookupListIndex;
                iterator.Index = index;
                iterator.Increment(sequenceIndex);
                LookupTable lookup = table.LookupList.LookupTables[lookupIndex];
                hasChanged |= lookup.TryUpdatePosition(fontMetrics, table, collection, feature, iterator.Index, count - (iterator.Index - index));
            }

            return(hasChanged);
        }
示例#2
0
        public static bool ApplyLookupList(
            FontMetrics fontMetrics,
            GSubTable table,
            Tag feature,
            LookupFlags lookupFlags,
            SequenceLookupRecord[] records,
            GlyphSubstitutionCollection collection,
            ushort index,
            int count)
        {
            bool hasChanged = false;
            SkippingGlyphIterator iterator = new(fontMetrics, collection, index, lookupFlags);
            int currentCount = collection.Count;

            foreach (SequenceLookupRecord lookupRecord in records)
            {
                ushort sequenceIndex = lookupRecord.SequenceIndex;
                ushort lookupIndex   = lookupRecord.LookupListIndex;
                iterator.Index = index;
                iterator.Increment(sequenceIndex);
                GSub.LookupTable lookup = table.LookupList.LookupTables[lookupIndex];
                hasChanged |= lookup.TrySubstitution(fontMetrics, table, collection, feature, iterator.Index, count - (iterator.Index - index));

                // Account for substitutions changing the length of the collection.
                if (collection.Count != currentCount)
                {
                    count       -= currentCount - collection.Count;
                    currentCount = collection.Count;
                }
            }

            return(hasChanged);
        }
        /// <summary>
        /// Return an array of all System types available to the runtime matching the WorldSystemFilterFlags. By default,
        /// all systems available to the runtime is returned.
        /// </summary>
        public static IReadOnlyList <Type> GetSystems(WorldSystemFilterFlags filterFlags = WorldSystemFilterFlags.All, WorldSystemFilterFlags requiredFlags = WorldSystemFilterFlags.Default)
        {
            Assertions.Assert.IsTrue(requiredFlags > 0, "Must use a 'requiredFlags' greater than 0. If you want to get all systems with any flag, pass a filterFlag of WorldSystemFilterFlags.All");
            LookupFlags lookupFlags = new LookupFlags()
            {
                OptionalFlags = filterFlags, RequiredFlags = requiredFlags
            };

            if (s_SystemFilterTypeMap.TryGetValue(lookupFlags, out var systemTypes))
            {
                return(systemTypes);
            }

#if !UNITY_DOTSRUNTIME
            var filteredSystemTypes = new List <Type>();
            foreach (var systemType in GetTypesDerivedFrom(typeof(ComponentSystemBase)))
            {
                if (FilterSystemType(systemType, lookupFlags))
                {
                    filteredSystemTypes.Add(systemType);
                }
            }

            foreach (var unmanagedSystemType in GetTypesDerivedFrom(typeof(ISystemBase)))
            {
                if (!unmanagedSystemType.IsValueType)
                {
                    continue;
                }

                if (FilterSystemType(unmanagedSystemType, lookupFlags))
                {
                    filteredSystemTypes.Add(unmanagedSystemType);
                }
            }

            s_SystemFilterTypeMap[lookupFlags] = filteredSystemTypes;
            return(filteredSystemTypes);
#else
            Assertions.Assert.IsTrue(s_Initialized, "The TypeManager must be initialized before the TypeManager can be used.");
            var filteredSystemTypes = new List <Type>();
            if (lookupFlags.OptionalFlags == WorldSystemFilterFlags.All)
            {
                filteredSystemTypes = s_SystemTypes;
            }
            else
            {
                for (int i = 0; i < s_SystemTypes.Count; ++i)
                {
                    if (!IsSystemDisabledForCreation(s_SystemTypes[i]) && (s_SystemFilterFlagsList[i] & lookupFlags.OptionalFlags) >= lookupFlags.RequiredFlags)
                    {
                        filteredSystemTypes.Add(s_SystemTypes[i]);
                    }
                }
            }

            s_SystemFilterTypeMap[lookupFlags] = filteredSystemTypes;
            return(filteredSystemTypes);
#endif
        }
示例#4
0
    /// <inheritdoc />
    public bool AnyEntitiesIntersecting(MapId mapId, Box2 box, LookupFlags flags = LookupFlags.IncludeAnchored)
    {
        var found      = false;
        var enumerator = GetLookupsIntersecting(mapId, box);

        while (enumerator.MoveNext(out var lookup))
        {
            var offsetBox = EntityManager.GetComponent <TransformComponent>(lookup.Owner).InvWorldMatrix.TransformBox(box);

            lookup.Tree.QueryAabb(ref found, (ref bool found, in EntityUid ent) =>
            {
                if (EntityManager.Deleted(ent))
                {
                    return(true);
                }

                found = true;
                return(false);
            }, offsetBox, (flags & LookupFlags.Approximate) != 0x0);
        }

        if (!found)
        {
            foreach (var _ in GetAnchored(mapId, box, flags))
            {
                return(true);
            }
        }

        return(found);
    }
 public void Reset(ushort index, LookupFlags lookupFlags)
 {
     this.Index              = index;
     this.ignoreMarks        = (lookupFlags & LookupFlags.IgnoreMarks) != 0;
     this.ignoreBaseGlypghs  = (lookupFlags & LookupFlags.IgnoreBaseGlypghs) != 0;
     this.ignoreLigatures    = (lookupFlags & LookupFlags.IgnoreLigatures) != 0;
     this.markAttachmentType = 0; // TODO: Lookup HarfBuzz
 }
 public ServiceTypeBrowser(Client client, int iface, Protocol proto, string domain, LookupFlags flags)
 {
     this.client = client;
     this.iface  = iface;
     this.proto  = proto;
     this.domain = domain;
     this.flags  = flags;
     cb          = OnServiceTypeBrowserCallback;
 }
 public AddressResolver(Client client, int iface, Protocol proto, IPAddress address, LookupFlags flags)
 {
     this.client  = client;
     this.iface   = iface;
     this.proto   = proto;
     this.address = address;
     this.flags   = flags;
     cb           = OnAddressResolverCallback;
 }
 private LookupType8Format1SubTable(
     CoverageTable coverageTable,
     ChainedSequenceRuleSetTable[] seqRuleSetTables,
     LookupFlags lookupFlags)
     : base(lookupFlags)
 {
     this.coverageTable    = coverageTable;
     this.seqRuleSetTables = seqRuleSetTables;
 }
 public ServiceTypeBrowser(Client client, int iface, Protocol proto, string domain, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.domain = domain;
     this.flags = flags;
     cb = OnServiceTypeBrowserCallback;
 }
 public AddressResolver(Client client, int iface, Protocol proto, IPAddress address, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.address = address;
     this.flags = flags;
     cb = OnAddressResolverCallback;
 }
        public static LookupSubTable Load(BigEndianBinaryReader reader, long offset, LookupFlags lookupFlags)
        {
            reader.Seek(offset, SeekOrigin.Begin);
            ushort format = reader.ReadUInt16();

            return(format switch
            {
                1 => LookupType4Format1SubTable.Load(reader, offset, lookupFlags),
                _ => throw new InvalidFontFileException($"Invalid MarkBasePos table format {format}, only format '1' is supported.")
            });
        public static LookupSubTable Load(BigEndianBinaryReader reader, long offset, LookupFlags lookupFlags)
        {
            reader.Seek(offset, SeekOrigin.Begin);
            ushort substFormat = reader.ReadUInt16();

            return(substFormat switch
            {
                1 => LookupType2Format1SubTable.Load(reader, offset, lookupFlags),
                _ => throw new InvalidFontFileException($"Invalid value for 'substFormat' {substFormat}. Should be '1'."),
            });
示例#13
0
        ///////////////////////////////////////////////////////////////////////

        public override ReturnCode GetIExecute(
            ICallFrame frame,
            EngineFlags engineFlags,
            string name,
            ArgumentList arguments,
            LookupFlags lookupFlags,
            ref bool ambiguous,
            ref long token,
            ref IExecute execute,
            ref Result error
            )
        {
            if (!Engine.HasGlobalOnly(engineFlags))
            {
                IResolve resolve = null;
                string   tail    = null;

                INamespace @namespace = GetNamespaceForIExecute(
                    frame, name, ref resolve, ref tail, ref error);

                if (@namespace != null)
                {
                    if (resolve != null)
                    {
                        return(resolve.GetIExecute(
                                   frame, engineFlags, tail, arguments, lookupFlags,
                                   ref ambiguous, ref token, ref execute, ref error));
                    }
                    else
                    {
                        Interpreter interpreter = base.Interpreter;

                        if (!NamespaceOps.IsGlobal(interpreter, @namespace))
                        {
                            string qualifiedName =
                                NamespaceOps.MakeQualifiedName(
                                    interpreter, @namespace, name);

                            if (base.GetIExecute(frame,
                                                 engineFlags | EngineFlags.ExactMatch,
                                                 qualifiedName, arguments, lookupFlags,
                                                 ref ambiguous, ref token, ref execute,
                                                 ref error) == ReturnCode.Ok)
                            {
                                return(ReturnCode.Ok);
                            }
                        }
                    }
                }
            }

            return(base.GetIExecute(
                       frame, engineFlags, name, arguments, lookupFlags,
                       ref ambiguous, ref token, ref execute, ref error));
        }
示例#14
0
        public bool IsGlyphIgnored(ushort glyphId, LookupFlags lookupFlags)
        {
            var glyphClass = this.GlyphIdToGlyphClassMapping(glyphId);

            // UseMarkFilteringSet is not supported
            return
                (((lookupFlags & LookupFlags.IgnoreBaseGlyphs) > 0 && glyphClass == GlyphClass.Base) ||
                 ((lookupFlags & LookupFlags.IgnoreMarks) > 0 && glyphClass == GlyphClass.Mark) ||
                 ((lookupFlags & LookupFlags.IgnoreLigatures) > 0 && glyphClass == GlyphClass.Ligature) ||
                 ((lookupFlags & LookupFlags.MarkAttachmentTypeMask) > 0 && this.GlyphIdToMarkAttachClassIdMapping(glyphId) != (uint)(lookupFlags & LookupFlags.MarkAttachmentTypeMask) >> 16));
        }
 private LookupTable(
     ushort lookupType,
     LookupFlags lookupFlags,
     ushort markFilteringSet,
     LookupSubTable[] lookupSubTables)
 {
     this.LookupType       = lookupType;
     this.LookupFlags      = lookupFlags;
     this.MarkFilteringSet = markFilteringSet;
     this.LookupSubTables  = lookupSubTables;
 }
 public HostNameResolver(Client client, int iface, Protocol proto, string hostname,
                          Protocol aproto, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.hostname = hostname;
     this.aproto = aproto;
     this.flags = flags;
     cb = OnHostNameResolverCallback;
 }
示例#17
0
 public DomainBrowser(Client client, int iface, Protocol proto, string domain,
                      DomainBrowserType btype, LookupFlags flags)
 {
     this.client = client;
     this.iface  = iface;
     this.proto  = proto;
     this.domain = domain;
     this.btype  = btype;
     this.flags  = flags;
     cb          = OnDomainBrowserCallback;
 }
示例#18
0
 public LookupType7Format2SubTable(
     CoverageTable coverageTable,
     ClassDefinitionTable classDefinitionTable,
     ClassSequenceRuleSetTable[] sequenceRuleSetTables,
     LookupFlags lookupFlags)
     : base(lookupFlags)
 {
     this.coverageTable         = coverageTable;
     this.classDefinitionTable  = classDefinitionTable;
     this.sequenceRuleSetTables = sequenceRuleSetTables;
 }
 public HostNameResolver(Client client, int iface, Protocol proto, string hostname,
                         Protocol aproto, LookupFlags flags)
 {
     this.client   = client;
     this.iface    = iface;
     this.proto    = proto;
     this.hostname = hostname;
     this.aproto   = aproto;
     this.flags    = flags;
     cb            = OnHostNameResolverCallback;
 }
示例#20
0
 public RecordBrowser(Client client, int iface, Protocol proto, string name, RecordClass clazz,
                      RecordType type, LookupFlags flags)
 {
     this.client = client;
     this.iface  = iface;
     this.proto  = proto;
     this.name   = name;
     this.clazz  = clazz;
     this.type   = type;
     this.flags  = flags;
     cb          = OnRecordBrowserCallback;
 }
 public LookupType4Format1SubTable(
     CoverageTable markCoverage,
     CoverageTable baseCoverage,
     MarkArrayTable markArrayTable,
     BaseArrayTable baseArrayTable,
     LookupFlags lookupFlags)
     : base(lookupFlags)
 {
     this.markCoverage   = markCoverage;
     this.baseCoverage   = baseCoverage;
     this.markArrayTable = markArrayTable;
     this.baseArrayTable = baseArrayTable;
 }
 public LookupType6Format1SubTable(
     CoverageTable mark1Coverage,
     CoverageTable mark2Coverage,
     MarkArrayTable mark1ArrayTable,
     Mark2ArrayTable mark2ArrayTable,
     LookupFlags lookupFlags)
     : base(lookupFlags)
 {
     this.mark1Coverage   = mark1Coverage;
     this.mark2Coverage   = mark2Coverage;
     this.mark1ArrayTable = mark1ArrayTable;
     this.mark2ArrayTable = mark2ArrayTable;
 }
 private LookupType8Format3SubTable(
     SequenceLookupRecord[] seqLookupRecords,
     CoverageTable[] backtrackCoverageTables,
     CoverageTable[] inputCoverageTables,
     CoverageTable[] lookaheadCoverageTables,
     LookupFlags lookupFlags)
     : base(lookupFlags)
 {
     this.seqLookupRecords        = seqLookupRecords;
     this.backtrackCoverageTables = backtrackCoverageTables;
     this.inputCoverageTables     = inputCoverageTables;
     this.lookaheadCoverageTables = lookaheadCoverageTables;
 }
示例#24
0
 public LookupType5Format1SubTable(
     CoverageTable markCoverage,
     CoverageTable ligatureCoverage,
     MarkArrayTable markArrayTable,
     LigatureArrayTable ligatureArrayTable,
     LookupFlags lookupFlags)
     : base(lookupFlags)
 {
     this.markCoverage       = markCoverage;
     this.ligatureCoverage   = ligatureCoverage;
     this.markArrayTable     = markArrayTable;
     this.ligatureArrayTable = ligatureArrayTable;
 }
示例#25
0
 public ServiceResolver(Client client, int iface, Protocol proto, string name,
                        string type, string domain, Protocol aproto, LookupFlags flags)
 {
     this.client = client;
     this.iface  = iface;
     this.proto  = proto;
     this.name   = name;
     this.type   = type;
     this.domain = domain;
     this.aproto = aproto;
     this.flags  = flags;
     cb          = OnServiceResolverCallback;
 }
 public ServiceResolver(Client client, int iface, Protocol proto, string name,
                         string type, string domain, Protocol aproto, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.name = name;
     this.type = type;
     this.domain = domain;
     this.aproto = aproto;
     this.flags = flags;
     cb = OnServiceResolverCallback;
 }
示例#27
0
        ///////////////////////////////////////////////////////////////////////

        public override ReturnCode GetIExecute(
            ICallFrame frame,
            EngineFlags engineFlags,
            string name,
            ArgumentList arguments, /* NOT USED */
            LookupFlags lookupFlags,
            ref bool ambiguous,
            ref long token,
            ref IExecute execute,
            ref Result error
            )
        {
            Interpreter interpreter = base.Interpreter;

            if (interpreter != null)
            {
                //
                // NOTE: Lookup the command or procedure to execute.  We
                //       use inexact (unique prefix) matching here unless
                //       we are forbidden from doing so; in that case, we
                //       use exact matching.
                //
                if (Engine.HasExactMatch(engineFlags))
                {
                    return(interpreter.GetAnyIExecute(
                               frame, engineFlags | EngineFlags.GetHidden,
                               name, lookupFlags, ref token, ref execute,
                               ref error));
                }
                else
                {
                    //
                    // NOTE: Include hidden commands in the resolution
                    //       phase here because the policy decisions about
                    //       whether or not to execute them are not made
                    //       here.
                    //
                    return(interpreter.MatchAnyIExecute(
                               frame, engineFlags | EngineFlags.MatchHidden,
                               name, lookupFlags, ref ambiguous, ref token,
                               ref execute, ref error));
                }
            }
            else
            {
                error = "invalid interpreter";
            }

            return(ReturnCode.Error);
        }
示例#28
0
        private static LookupFlags GetLookupFlags(LookupResultFlags rflags)
        {
            LookupFlags ret = LookupFlags.None;

            if ((rflags & LookupResultFlags.Multicast) > 0)
            {
                ret |= LookupFlags.UseMulticast;
            }
            if ((rflags & LookupResultFlags.WideArea) > 0)
            {
                ret |= LookupFlags.UseWideArea;
            }

            return(ret);
        }
 private LookupType8Format2SubTable(
     ChainedClassSequenceRuleSetTable[] sequenceRuleSetTables,
     ClassDefinitionTable backtrackClassDefinitionTable,
     ClassDefinitionTable inputClassDefinitionTable,
     ClassDefinitionTable lookaheadClassDefinitionTable,
     CoverageTable coverageTable,
     LookupFlags lookupFlags)
     : base(lookupFlags)
 {
     this.sequenceRuleSetTables         = sequenceRuleSetTables;
     this.backtrackClassDefinitionTable = backtrackClassDefinitionTable;
     this.inputClassDefinitionTable     = inputClassDefinitionTable;
     this.lookaheadClassDefinitionTable = lookaheadClassDefinitionTable;
     this.coverageTable = coverageTable;
 }
示例#30
0
        ///////////////////////////////////////////////////////////////////////

        public static bool HasFlags(
            LookupFlags flags,
            LookupFlags hasFlags,
            bool all
            )
        {
            if (all)
            {
                return((flags & hasFlags) == hasFlags);
            }
            else
            {
                return((flags & hasFlags) != LookupFlags.None);
            }
        }
示例#31
0
文件: Default.cs 项目: jdruin/F5Eagle
        ///////////////////////////////////////////////////////////////////////

        public virtual ReturnCode GetIExecute(
            ICallFrame frame,
            EngineFlags engineFlags,
            string name,
            ArgumentList arguments,
            LookupFlags lookupFlags,
            ref bool ambiguous,
            ref long token,
            ref IExecute execute,
            ref Result error
            )
        {
            error = "not implemented";
            return(ReturnCode.Error);
        }
示例#32
0
        public IEnumerable <ushort> GetGlyphIdsByLookupFlags(GlyphTypeface typeface, LookupFlags lookupFlags)
        {
            var glyphClasses      = this.GetGlyphClasses(typeface);
            var markAttachClasses = this.GetMarkAttachClassIds(typeface);

            return
                (from glyphWithClass in glyphClasses
                 let currentGlyphId = glyphWithClass.Key
                                      let currentGlyphClass = glyphWithClass.Value
                                                              where
                                                              !((lookupFlags & LookupFlags.IgnoreBaseGlyphs) != 0 && currentGlyphClass == GlyphClass.Base) &&
                                                              !((lookupFlags & LookupFlags.IgnoreLigatures) != 0 && currentGlyphClass == GlyphClass.Ligature) &&
                                                              !((lookupFlags & LookupFlags.IgnoreMarks) != 0 && currentGlyphClass == GlyphClass.Mark) &&
                                                              !((lookupFlags & LookupFlags.MarkAttachmentTypeMask) != 0 && (ushort)(lookupFlags & LookupFlags.MarkAttachmentTypeMask) == markAttachClasses[currentGlyphId])
                                                              select currentGlyphId);
        }
示例#33
0
 private IEnumerable <EntityUid> GetAnchored(MapId mapId, Box2 worldAABB, LookupFlags flags)
 {
     if ((flags & LookupFlags.IncludeAnchored) == 0x0)
     {
         yield break;
     }
     foreach (var grid in _mapManager.FindGridsIntersecting(mapId, worldAABB))
     {
         foreach (var uid in grid.GetAnchoredEntities(worldAABB))
         {
             if (!EntityManager.EntityExists(uid))
             {
                 continue;
             }
             yield return(uid);
         }
     }
 }
        public static LookupTable Load(BigEndianBinaryReader reader, long offset)
        {
            // +----------+--------------------------------+-------------------------------------------------------------+
            // | Type     | Name                           | Description                                                 |
            // +==========+================================+=============================================================+
            // | uint16   | lookupType                     | Different enumerations for GSUB and GPOS.                   |
            // +----------+--------------------------------+-------------------------------------------------------------+
            // | uint16   | lookupFlag                     | Lookup qualifiers .                                         |
            // +----------+--------------------------------+-------------------------------------------------------------+
            // | uint16   | subTableCount                  | Number of subtables for this lookup.                        |
            // +----------+--------------------------------+-------------------------------------------------------------+
            // | Offset16 | subtableOffsets[subTableCount] | Array of offsets to lookup subtables, from beginning of     |
            // |          |                                | Lookup table.                                               |
            // +----------+--------------------------------+-------------------------------------------------------------+
            // | uint16   | markFilteringSet               | Index (base 0) into GDEF mark glyph sets structure.         |
            // |          |                                | This field is only present if the USE_MARK_FILTERING_SET    |
            // |          |                                | lookup flag is set.                                         |
            // +----------+--------------------------------+-------------------------------------------------------------+
            reader.Seek(offset, SeekOrigin.Begin);

            ushort      lookupType    = reader.ReadUInt16();
            LookupFlags lookupFlags   = reader.ReadUInt16 <LookupFlags>();
            ushort      subTableCount = reader.ReadUInt16();

            using Buffer <ushort> subTableOffsetsBuffer = new(subTableCount);
            Span <ushort> subTableOffsets = subTableOffsetsBuffer.GetSpan();

            reader.ReadUInt16Array(subTableOffsets);

            // The fifth bit indicates the presence of a MarkFilteringSet field in the Lookup table.
            ushort markFilteringSet = ((lookupFlags & LookupFlags.UseMarkFilteringSet) != 0)
                ? reader.ReadUInt16()
                : (ushort)0;

            var lookupSubTables = new LookupSubTable[subTableCount];

            for (int i = 0; i < lookupSubTables.Length; i++)
            {
                lookupSubTables[i] = LoadLookupSubTable(lookupType, lookupFlags, reader, offset + subTableOffsets[i]);
            }

            return(new LookupTable(lookupType, lookupFlags, markFilteringSet, lookupSubTables));
        }
示例#35
0
 protected virtual ServiceEntry LookupLazily(Type type, LookupFlags flags)
 {
     using (RWLock.AsReader(_lock))
       {
     List<ServiceEntry> matches = new List<ServiceEntry>();
     foreach (Type key in _registrationOrder)
     {
       ServiceEntry entry = _map[key];
       if (type.IsAssignableFrom(entry.ImplementationType))
       {
     matches.Add(entry);
       }
     }
     return Select(matches, flags, type.ToString());
       }
 }
 private static extern IntPtr avahi_address_resolver_new(IntPtr client, int iface, Protocol proto,
                                                          IntPtr address, LookupFlags flags,
                                                          AddressResolverCallback cb,
                                                          IntPtr userdata);
示例#37
0
 private static extern IntPtr avahi_domain_browser_new (IntPtr client, int iface, int proto,
                                                        byte[] domain, int btype, LookupFlags flags,
                                                        DomainBrowserCallback cb,
                                                        IntPtr userdata);
 private static extern IntPtr avahi_service_resolver_new(IntPtr client, int iface, Protocol proto,
                                                          byte[] name, byte[] type, byte[] domain,
                                                          Protocol aproto, LookupFlags flags,
                                                          ServiceResolverCallback cb,
                                                          IntPtr userdata);
示例#39
0
 public ServiceEntry Lookup(Type type, LookupFlags flags)
 {
     return LookupLazily(type, flags);
 }
示例#40
0
 private static extern IntPtr avahi_host_name_resolver_new (IntPtr client, int iface, Protocol proto,
                                                            byte[] hostname, Protocol aproto, LookupFlags flags,
                                                            HostNameResolverCallback cb, IntPtr userdata);
示例#41
0
 public ResolutionServices(IContainerServices containerServices, IOverrideLookup overrideLookup, LookupFlags flags)
 {
     _containerServices = containerServices;
       _flags = flags;
       _overrideLookup = overrideLookup;
 }
示例#42
0
 private static extern IntPtr avahi_record_browser_new (IntPtr client, int iface, Protocol proto,
                                                        byte[] name, ushort clazz, ushort type,
                                                        LookupFlags flags, RecordBrowserCallback cb,
                                                        IntPtr userdata);
示例#43
0
 public RecordBrowser (Client client, int iface, Protocol proto, string name, RecordClass clazz,
                       RecordType type, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.name = name;
     this.clazz = clazz;
     this.type = type;
     this.flags = flags;
     cb = OnRecordBrowserCallback;
 }
 public static extern int WSALookupServiceBegin(
     WSAQUERYSET qsRestrictions,
     LookupFlags dwControlFlags,
     ref IntPtr lphLookup);
示例#45
0
 private static extern int BthNsLookupServiceNext(
     int hLookup,
     LookupFlags dwFlags,
     ref int lpdwBufferLength,
     byte[] pResults);
 public static extern int WSALookupServiceNext(
     IntPtr hLookup,
     LookupFlags dwControlFlags,
     ref int lpdwBufferLength,
     byte[] pqsResults);
示例#47
0
 public static extern int WSALookupServiceBegin(ref WSAQUERYSET pQuerySet, LookupFlags dwFlags, out int lphLookup);
示例#48
0
 private static ServiceEntry Select(IList<ServiceEntry> matches, LookupFlags flags, string beingLookedUp)
 {
     if (matches.Count == 1)
       {
     return matches[0];
       }
       if (matches.Count > 1 && (flags & LookupFlags.ThrowIfAmbiguous) == LookupFlags.ThrowIfAmbiguous)
       {
     throw new AmbiguousServicesException(beingLookedUp);
       }
       return null;
 }
示例#49
0
 private static extern IntPtr avahi_service_type_browser_new (IntPtr client, int iface, int proto,
                                                              byte[] domain, LookupFlags flags,
                                                              ServiceTypeBrowserCallback cb,
                                                              IntPtr userdata);
示例#50
0
 public IResolutionServices CreateResolutionServices(IOverrideLookup overrides, LookupFlags flags)
 {
     return new ResolutionServices(this, overrides, flags);
 }
示例#51
0
 public DomainBrowser (Client client, int iface, Protocol proto, string domain,
                       DomainBrowserType btype, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.domain = domain;
     this.btype = btype;
     this.flags = flags;
     cb = OnDomainBrowserCallback;
 }
示例#52
0
 private static extern int BthNsLookupServiceBegin(
     byte[] pQuerySet,
     LookupFlags dwFlags,
     ref int lphLookup);
示例#53
0
 public static extern int WSALookupServiceNext(int hLookup, LookupFlags dwFlags, ref int lpdwBufferLength, byte[] pResults);