Home | History | Annotate | Download | only in Reflection

Lines Matching refs:descriptor

93             T descriptor = result as T;
94 if (descriptor != null)
96 return descriptor;
104 descriptor = result as T;
105 if (descriptor != null)
107 return descriptor;
153 internal void AddSymbol(IDescriptor descriptor)
155 ValidateSymbolName(descriptor);
156 String fullName = descriptor.FullName;
163 if (descriptor.File == old.File)
179 throw new DescriptorValidationException(descriptor, message);
181 descriptorsByName[fullName] = descriptor;
188 /// Verifies that the descriptor's name is valid (i.e. it contains
191 /// <param name="descriptor"></param>
192 private static void ValidateSymbolName(IDescriptor descriptor)
194 if (descriptor.Name == "")
196 throw new DescriptorValidationException(descriptor, "Missing name.");
198 if (!ValidationRegex.IsMatch(descriptor.Name))
200 throw new DescriptorValidationException(descriptor,
201 "\"" + descriptor.Name + "\" is not a valid identifier.");
206 /// Returns the field with the given number in the given descriptor,
257 /// Looks up a descriptor by name, relative to some other descriptor.
260 /// matching descriptor.
339 private readonly IDescriptor descriptor;
341 internal DescriptorIntPair(IDescriptor descriptor, int number)
344 this.descriptor = descriptor;
349 return descriptor == other.descriptor
364 return descriptor.GetHashCode()*((1 << 16) - 1) + number;