public InformationServiceQuery(InformationServiceContext context, string query, PropertyBag parameters)
            : base(context, query, parameters)
        {
            object[] attributes = type.GetCustomAttributes(typeof(InformationServiceEntityAttribute), false);

            if (attributes.Length > 0)
            {
                InformationServiceEntityAttribute entityAttribute = attributes[0] as InformationServiceEntityAttribute;
                parser = entityAttribute != null?ChooseResponseParser(entityAttribute.ParserType) : new ResponseParser <T>();
            }
            else
            {
                parser = new ResponseParser <T>();
            }
        }
예제 #2
0
        public InformationServiceQuery(InformationServiceContext context, string queryString, PropertyBag parameters)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
            if (queryString == null)
            {
                throw new ArgumentNullException(nameof(queryString));
            }

            this.context     = context;
            this.queryString = queryString;
            this.parameters  = parameters ?? new PropertyBag();

            if (context.Proxy != null)
            {
                operationContextScope = new OperationContextScope(context.Proxy.ClientChannel);
            }
        }
예제 #3
0
 public InformationServiceQuery(InformationServiceContext context, string queryString)
     : this(context, queryString, null)
 {
 }