protected override MemberName WithDeclaringTypeOverride(TypeName declaringType) { if (declaringType.IsTypeSpecification) { var git = declaringType as GenericInstanceTypeName; if (git != null) { declaringType = git.ElementType; } else { throw DotNetFailure.NotSupportedBySpecifications(); } } var result = new DefaultTypeName(_name, (DefaultTypeName)declaringType); CopyGenericsTo(result); return(result); }
public TypeName GetNestedType(string name) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (name.Length == 0) { throw Failure.EmptyString(nameof(name)); } if (IsTypeSpecification && !IsGenericType) { throw DotNetFailure.NotSupportedBySpecifications(); } TypeName tn; if (!TypeName.TryParse(name, TypeNameParseOptions.AssumeGenericParameters, out tn)) { throw Failure.NotParsable(nameof(name), typeof(TypeName)); } return(GetNestedType(tn)); }
public sealed override MethodName WithName(string name) { throw DotNetFailure.NotSupportedBySpecifications(); }
internal override MethodName WithGenericParameters(GenericParameterName[] parameters) { throw DotNetFailure.NotSupportedBySpecifications(); }
public override MethodName WithReturnParameter(TypeName returnType, IEnumerable <TypeName> requiredModifiers, IEnumerable <TypeName> optionalModifiers) { throw DotNetFailure.NotSupportedBySpecifications(); }
protected override MemberName WithDeclaringTypeOverride(TypeName declaringType) { throw DotNetFailure.NotSupportedBySpecifications(); }