protected virtual void ValidateSpecialMethodModel(CompositeValidationResult result, CompositeModel compositeModel, SpecialMethodModel methodModel) { if (methodModel.NativeInfo.IsGenericMethodDefinition) { result.StructureValidationErrors.Add(ValidationErrorFactory.NewStructureError("Special methods can not be generic method definitions.", compositeModel, methodModel)); } else { var declType = methodModel.NativeInfo.DeclaringType; var genName = Qi4CSGeneratedAssemblyAttribute.GetGeneratedAssemblyName(declType.GetAssembly()); if ((methodModel.NativeInfo.IsAssembly || methodModel.NativeInfo.IsFamilyAndAssembly) && !IsTypeVisible(declType, genName)) { result.StructureValidationErrors.Add(ValidationErrorFactory.NewStructureError("The type " + declType + " is not visible. Consider either making it public, or internal with combination of applying " + typeof(InternalsVisibleToAttribute) + " with argument " + typeof(Qi4CSGeneratedAssemblyAttribute) + ".ASSEMBLY_NAME to the assembly.", compositeModel, methodModel)); } foreach (var pModel in methodModel.Parameters) { this.ValidateParameter(result, compositeModel, pModel); } } }
public SpecialMethodModelMutable(SpecialMethodModelState state, SpecialMethodModelImmutable immutable) : base(state, immutable) { this._state = state; this._immutable = immutable; }