protected abstract Implement ( Operation operation, |
||
operation | Operation | |
newParent | ||
explicitly | bool | |
return | Operation |
/// <exception cref="ArgumentException"> /// The language of <paramref name="operation"/> does not equal. /// </exception> /// <exception cref="ArgumentNullException"> /// <paramref name="operation"/> is null. /// </exception> public Operation Implement(Operation operation, bool explicitly) { if (operation == null) { throw new ArgumentNullException("operation"); } if (operation.Language != this.Language) { throw new ArgumentException(Strings.GetString("error_languages_do_not_equal")); } if (!(operation.Parent is InterfaceType)) { throw new ArgumentException("The operation is not a member of an interface."); } if (explicitly && !operation.Language.SupportsExplicitImplementation) { throw new ArgumentException(Strings.GetString( "error_explicit_implementation"), "explicitly"); } Operation newOperation = Language.Implement(this, operation, explicitly); newOperation.Parent = this; AddOperation(newOperation); return(newOperation); }
/// <exception cref="ArgumentException"> /// The language of <paramref name="operation" /> does not equal. /// </exception> /// <exception cref="ArgumentNullException"> /// <paramref name="operation" /> is null. /// </exception> public Operation Implement(Operation operation, bool explicitly) { if (operation == null) { throw new ArgumentNullException("operation"); } if (operation.Language != Language) { throw new ArgumentException(Strings.ErrorLanguagesDoNotEqual); } if (!(operation.Parent is InterfaceType)) { throw new ArgumentException("The operation is not a member of an interface."); } if (explicitly && !operation.Language.SupportsExplicitImplementation) { throw new ArgumentException( Strings.ErrorExplicitImplementation, "explicitly"); } var newOperation = Language.Implement(operation, this, explicitly); newOperation.Parent = this; AddOperation(newOperation); return(newOperation); }