示例#1
0
 private void _addAttributes(ConstructorInfo constructorInfo)
 {
     foreach (ParameterInfo parameterInfo in constructorInfo.GetParameters())
     {
         ReferencedTypes.Add(new DllTypeParameter(parameterInfo));
     }
 }
示例#2
0
 private void _addParameters(MethodInfo repMethodInfo)
 {
     foreach (ParameterInfo parameterInfo in repMethodInfo.GetParameters())
     {
         ReferencedTypes.Add(new DllTypeParameter(parameterInfo));
     }
 }
示例#3
0
 private void _addFieldType(FieldInfo repFieldInfo)
 {
     if (!DllTypeManager.RememberedTypesDictionary.ContainsKey(repFieldInfo.FieldType.GUID))
     {
         DllTypeManager.RememberedTypesDictionary.Add(repFieldInfo.FieldType.GUID, new DllTypeClass(repFieldInfo.FieldType));
     }
     ReferencedTypes.Add(DllTypeManager.RememberedTypesDictionary[repFieldInfo.FieldType.GUID]);
 }
示例#4
0
 private void _addParameterType(ParameterInfo repParameterInfo)
 {
     if (!DllTypeManager.RememberedTypesDictionary.ContainsKey(repParameterInfo.ParameterType.GUID))
     {
         DllTypeManager.RememberedTypesDictionary.Add(repParameterInfo.ParameterType.GUID, new DllTypeClass(repParameterInfo.GetType()));
     }
     ReferencedTypes.Add(DllTypeManager.RememberedTypesDictionary[repParameterInfo.ParameterType.GUID]);
 }
示例#5
0
 private void _addPropertyType(PropertyInfo propertyInfo)
 {
     if (!DllTypeManager.RememberedTypesDictionary.ContainsKey(propertyInfo.PropertyType.GUID))
     {
         DllTypeManager.RememberedTypesDictionary.Add(propertyInfo.PropertyType.GUID, new DllTypeClass(propertyInfo.PropertyType));
     }
     ReferencedTypes.Add(DllTypeManager.RememberedTypesDictionary[propertyInfo.PropertyType.GUID]);
 }
示例#6
0
 private void _addReturnType(ParameterInfo repParameterInfo, bool doShallow)
 {
     if (!DllTypeManager.RememberedTypesDictionary.ContainsKey(repParameterInfo.ParameterType.GUID))
     {
         if (doShallow)
         {
             return;
         }
         DllTypeManager.RememberedTypesDictionary.Add(repParameterInfo.ParameterType.GUID, new DllTypeClass(repParameterInfo.ParameterType));
     }
     ReferencedTypes.Add(DllTypeManager.RememberedTypesDictionary[repParameterInfo.ParameterType.GUID]);
 }
示例#7
0
        void AddTypeToCheckProps(Type parentType, Type type)
        {
            var newRef = new TypeInformation()
            {
                Type = type
            };

            newRef.ReferencesIn.Add(parentType);
            if (parentType != null)
            {
                ReferencedTypes[parentType].ReferencesOut.Add(type);
            }
            ReferencedTypes.Add(type, newRef);
            PendingPropTypes.Enqueue(type);
        }
示例#8
0
        private void AddTypeReference(ITypeReference type, IExpression expr)
        {
            Contract.Requires(type != null);
            Contract.Requires(expr != null);
            Contract.Ensures(ReferencedTypes.ContainsKey(expr));
            Contract.Ensures(ReferencedTypes[expr] == type);

            if (!ReferencedTypes.ContainsKey(expr))
            {
                ReferencedTypes.Add(expr, type);
            }
            else
            {
                Contract.Assume(ReferencedTypes[expr] == type);
            }
        }
示例#9
0
 private void _addReturnType(MethodInfo repMethodInfo)
 {
     ReferencedTypes.Add(new DllTypeReturn(repMethodInfo.ReturnParameter));
 }
示例#10
0
 public void AddReferencedType(Type type)
 {
     ReferencedTypes.Add(type);
 }