public void AddType(string nativeName, IGeneratedType type)
        {
            if (string.IsNullOrEmpty(nativeName))
            {
                throw new ArgumentOutOfRangeException(nameof(nativeName));
            }

            if (type == null)
            {
                throw new ArgumentOutOfRangeException(nativeName);
            }

            if (this.Types.Contains(type))
            {
                throw new InvalidOperationException();
            }

            if (this.NameMapping.ContainsValue(type.Name))
            {
                throw new InvalidOperationException();
            }

            if (this.NameMapping.ContainsKey(nativeName))
            {
                throw new InvalidOperationException();
            }

            this.Types.Add(type);
            this.NameMapping.Add(nativeName, type.Name);
        }
 public void RegisterNewType(ITypeDescription source, IGeneratedType generatedType)
 {
     typeDescritpions[source] = generatedType;
 }
Beispiel #3
0
 public MethodFrameArranger(IGeneratedMethod method, IGeneratedType type, IServiceVariableSource services) : this(method, type)
 {
     _services = services;
 }
Beispiel #4
0
 public MethodFrameArranger(IGeneratedMethod method, IGeneratedType type)
 {
     _method = method;
     _type   = type;
 }
 public void RegisterNewType(ITypeDescription source, IGeneratedType generatedType)
 {
     typeDescritpions[source] = generatedType;
 }