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); }
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); }
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); } }
internal abstract bool TryGetPropertyHandle(Cci.IPropertyDefinition def, out PropertyDefinitionHandle handle);