/// <summary> /// Add a new type info to the type library /// </summary> /// <param name="typeInfo"></param> public void AddTypeInfo(MockTypeInfo typeInfo) { _containedTypeInfos.Add(typeInfo); typeInfo.ContainingTypeLib = this; typeInfo.IndexInContainingTypeLib = _containedTypeInfos.Count - 1; typeInfo.SetFaultInjector(_faultInjector); }
/// <summary> /// Adds a new function signature to the list of this type's implemented functions /// </summary> /// <param name="implementedType"></param> public void DefinesFunction(MockTypeInfo[] parameters, MockTypeInfo returnType) { _typeAttributes.cFuncs++; _definedFunctions.Add(new FuncInfo(parameters, returnType)); }
/// <summary> /// Adds implementedType to the list of this type's implemented interfaces /// </summary> /// <param name="implementedType"></param> public void ImplementsInterface(MockTypeInfo implementedType) { _typeAttributes.cImplTypes++; _implementedTypes.Add(implementedType); }