예제 #1
0
 public DirectiveDefinition(object customDirective, ITypeReference typeReference)
 {
     CustomDirective = customDirective ??
                       throw new ArgumentNullException(nameof(customDirective));
     TypeReference = typeReference ??
                     throw new ArgumentNullException(nameof(typeReference));
     Reference = new ClrTypeDirectiveReference(customDirective.GetType());
 }
 public DirectiveDefinition(object customDirective)
 {
     CustomDirective = customDirective
                       ?? throw new ArgumentNullException(nameof(customDirective));
     Reference = new ClrTypeDirectiveReference(
         customDirective.GetType());
     TypeReference = Descriptors.TypeReference.Create(
         customDirective.GetType(),
         TypeContext.None);
 }