private void MergeTypeExtension( ICompletionContext context, INamedTypeExtensionMerger extension, INamedType type) { if (extension.Kind != type.Kind) { // TODO : resources throw new SchemaException(SchemaErrorBuilder.New() .SetMessage("Cannot merge type!") .SetTypeSystemObject((ITypeSystemObject)type) .Build()); } extension.Merge(context, type); }
private static void MergeTypeExtension( ICompletionContext context, INamedTypeExtensionMerger extension, INamedType type) { if (extension.Kind != type.Kind) { throw new SchemaException(SchemaErrorBuilder.New() .SetMessage(string.Format( CultureInfo.InvariantCulture, TypeResources.TypeInitializer_Merge_KindDoesNotMatch, type.Name)) .SetTypeSystemObject((ITypeSystemObject)type) .Build()); } extension.Merge(context, type); }