Esempio n. 1
0
        internal static void DeleteObject(SsbEnum sType, object smoObj)
        {
            switch (sType)
            {
            case SsbEnum.Database:
                Database db = null;
                if (smoObj.GetType() == typeof(SSBIDatabase))
                {
                    db = ((SSBIDatabase)smoObj).DataBase;
                }
                else if (smoObj.GetType() == typeof(Database))
                {
                    db = (Database)smoObj;
                }

                db.Drop();
                break;

            case SsbEnum.MessageType:
                MessageType mt = (MessageType)smoObj;
                mt.Drop();
                break;

            case SsbEnum.Contract:
                ServiceContract sc = (ServiceContract)smoObj;
                sc.Drop();
                break;

            case SsbEnum.Queu:
                ServiceQueue sq = (ServiceQueue)smoObj;
                sq.Drop();
                break;

            case SsbEnum.Service:
                BrokerService bs = (BrokerService)smoObj;
                bs.Drop();
                break;

            case SsbEnum.Route:
                ServiceRoute sr = (ServiceRoute)smoObj;
                sr.Drop();
                break;

            case SsbEnum.RemoteBinding:
                RemoteServiceBinding rsb = (RemoteServiceBinding)smoObj;
                rsb.Drop();
                break;

            case SsbEnum.Conversation:
                SSBIConversation cnv = (SSBIConversation)smoObj;
                smo.EndConversation(cnv);
                break;

            case SsbEnum.EndPoint:
                Endpoint ep = (Endpoint)smoObj;
                ep.Drop();
                break;

            case SsbEnum.Certificate:
                Certificate cert = (Certificate)smoObj;
                cert.Drop();
                break;
            }
        }