private void Implement(IInterfaceImplementer parent, Operation operation, bool mustExplicit) { if (parent == null || operation == null) { return; } Operation defined = parent.GetDefinedOperation(operation); if (!operation.Language.SupportsExplicitImplementation) { mustExplicit = false; } if (defined == null) { Operation implemented = parent.Implement(operation, mustExplicit); AddOperationToList(implemented); checkAddMethod(implemented); } else if (defined.Type != operation.Type) { Operation implemented = parent.Implement(operation, true); AddOperationToList(implemented); checkAddMethod(implemented); } }
private void toolImplementList_Click(object sender, EventArgs e) { IInterfaceImplementer type = Shape.CompositeType as IInterfaceImplementer; if (type != null) { using (ImplementDialog dialog = new ImplementDialog()) { if (dialog.ShowDialog(type) == DialogResult.OK) { foreach (Operation operation in dialog.GetSelectedOperations()) { Operation defined = type.GetDefinedOperation(operation); bool implementExplicitly = dialog.ImplementExplicitly && type.Language.SupportsExplicitImplementation; if (defined == null) { type.Implement(operation, implementExplicitly); } else if (defined.Type != operation.Type) { type.Implement(operation, true); } } } } } }
private void Implement(IInterfaceImplementer parent, Operation operation, bool mustExplicit) { var defined = parent.GetDefinedOperation(operation); if (!operation.Language.SupportsExplicitImplementation) { mustExplicit = false; } if (defined == null) { var implemented = parent.Implement(operation, mustExplicit); AddOperationToList(implemented); } else if (defined.Type != operation.Type) { var implemented = parent.Implement(operation, true); AddOperationToList(implemented); } }
private void Implement(IInterfaceImplementer parent, Operation operation, bool mustExplicit) { Operation defined = parent.GetDefinedOperation(operation); if (!operation.Language.SupportsExplicitImplementation) mustExplicit = false; if (defined == null) { Operation implemented = parent.Implement(operation, mustExplicit); AddOperationToList(implemented); } else if (defined.Type != operation.Type) { Operation implemented = parent.Implement(operation, true); AddOperationToList(implemented); } }