Exemplo n.º 1
0
            /// <summary>
            /// Creates a new ServiceObject.
            /// </summary>
            /// <param name="service">The service object that is used to invoke methods on</param>
            /// <param name="serviceAttribute">MDSService attribute of service object's class</param>
            public ServiceObject(MDSService service, MDSServiceAttribute serviceAttribute)
            {
                Service          = service;
                ServiceAttribute = serviceAttribute;

                _serviceClassName = service.GetType().Name;

                //Find all methods
                _methods = new SortedList <string, bool>();
                foreach (var methodInfo in Service.GetType().GetMethods())
                {
                    var attributes = methodInfo.GetCustomAttributes(typeof(MDSServiceMethodAttribute), true);
                    _methods.Add(methodInfo.Name, attributes.Length > 0);
                }
            }
Exemplo n.º 2
0
            /// <summary>
            /// Creates a new ServiceObject.
            /// </summary>
            /// <param name="service">The service object that is used to invoke methods on</param>
            /// <param name="serviceAttribute">MDSService attribute of service object's class</param>
            public ServiceObject(MDSService service, MDSServiceAttribute serviceAttribute)
            {
                Service = service;
                ServiceAttribute = serviceAttribute;

                _serviceClassName = service.GetType().Name;

                //Find all methods
                _methods = new SortedList<string, bool>();
                foreach (var methodInfo in Service.GetType().GetMethods())
                {
                    var attributes = methodInfo.GetCustomAttributes(typeof(MDSServiceMethodAttribute), true);
                    _methods.Add(methodInfo.Name, attributes.Length > 0);
                }
            }