Пример #1
0
        public void AddCompilerGeneratedDefinition(TNamedTypeSymbol container, Cci.IPropertyDefinition property)
        {
            Debug.Assert(property != null);

            CompilerGeneratedDefinitions defs = GetCacheOfCompilerGeneratedDefinitions(container);

            if (defs.Properties == null)
            {
                Interlocked.CompareExchange(ref defs.Properties, new ConcurrentQueue <Cci.IPropertyDefinition>(), null);
            }

            defs.Properties.Enqueue(property);
        }
Пример #2
0
        internal override bool TryGetPropertyHandle(
            Cci.IPropertyDefinition def,
            out PropertyDefinitionHandle handle
            )
        {
            if (_mapToMetadata.MapDefinition(def)?.GetInternalSymbol() is PEPropertySymbol other)
            {
                handle = other.Handle;
                return(true);
            }

            handle = default;
            return(false);
        }
Пример #3
0
        internal override bool TryGetPropertyHandle(Cci.IPropertyDefinition def, out PropertyDefinitionHandle handle)
        {
            var other = this.mapToMetadata.MapDefinition(def) as PEPropertySymbol;

            if ((object)other != null)
            {
                handle = other.Handle;
                return(true);
            }
            else
            {
                handle = default(PropertyDefinitionHandle);
                return(false);
            }
        }
Пример #4
0
 internal abstract bool TryGetPropertyHandle(Cci.IPropertyDefinition def, out PropertyDefinitionHandle handle);