Beispiel #1
0
 public ServiceRegistData(RegistData data)
 {
     this.RegistData = data;
     if (!string.IsNullOrWhiteSpace(data.ServiceInfc))
     {
         this.ServiceInfc = Type.GetType(data.ServiceInfc, false, true);
     }
     if (!string.IsNullOrWhiteSpace(data.ServiceImpl))
     {
         this.ServiceImpl = Type.GetType(data.ServiceImpl, false, true);
     }
     if (!string.IsNullOrWhiteSpace(data.ServiceHandler))
     {
         this.ServiceHandler = Type.GetType(data.ServiceHandler, false, true);
     }
     if (this.ServiceInfc != null)
     {
         this.RegistData.ServiceInfc = this.ServiceInfc.FullName();
     }
     if (this.ServiceImpl != null)
     {
         this.RegistData.ServiceImpl = this.ServiceImpl.FullName();
     }
     if (this.ServiceHandler != null)
     {
         this.RegistData.ServiceHandler = this.ServiceHandler.FullName();
     }
 }
        private RegistData getRegistData(string serviceIntfc, string methodName)
        {
            if (this.Port < 1000)
            {
                return(null);
            }
            if (string.IsNullOrWhiteSpace(serviceIntfc))
            {
                return(null);
            }
            var impl   = getImpl(serviceIntfc);
            var result = new RegistData()
            {
                Address       = "127.0.0.1",
                Port          = this.Port,
                ServiceInfc   = serviceIntfc,
                ServiceImpl   = impl,
                ServiceMethod = methodName,
            };

            return(result);
        }