Example #1
0
 public void ReplaceInterface(Implementation implementation, Classifier newInterface) => 
     _interfaceImplementations.ReplaceInterface(implementation, newInterface);
Example #2
0
        public void AddInterfaceImplementation(Classifier newInterface,MessageSystem messageSystem = null)
        {
            // ensure that only one interface is created after this method was executed
            // used to ensure a previous issue was fixed (two implementations were created instead of one)
            Ensures(InterfaceImplementations.Count == OldValue(InterfaceImplementations.Count + 1));

            var newImplementation = new Implementation(this, newInterface);
            InterfaceImplementations.AddInterfaceToList(newImplementation);
            messageSystem?.PublishCreated(InterfaceImplementations, newImplementation);
        }