예제 #1
0
        public override Filter Create()
        {
            SqlFilter sqlFilter = new SqlFilter(this.SqlExpression);

            foreach (KeyValuePair <string, object> parameter in this.Parameters)
            {
                sqlFilter.Parameters[parameter.Key] = PropertyReference.GetValue <object>(parameter.Value);
            }
            return(sqlFilter);
        }
예제 #2
0
        private static void CreateCRMSubrscription(NamespaceManager namespaceManager)
        {
            SubscriptionDescription subscr = null;

            try
            {
                Microsoft.ServiceBus.Messaging.SqlFilter dashboardFilter = new Microsoft.ServiceBus.Messaging.SqlFilter($"{Constants.Properties.Category} = '{Constants.Category.CRMCategory}'");
                subscr = namespaceManager.CreateSubscription(Connections.TopicName, Constants.Subscriptions.CRMSubscription, dashboardFilter);
            }
            catch (Exception)
            { }

            //return subscr;
        }
예제 #3
0
        internal override void UpdateForVersion(ApiVersion version, Filter existingFilter = null)
        {
            PropertyDictionary propertyDictionaries;
            SqlFilter          sqlFilter = existingFilter as SqlFilter;

            base.UpdateForVersion(version, existingFilter);
            if (version < ApiVersion.Two)
            {
                if (sqlFilter == null)
                {
                    propertyDictionaries = null;
                }
                else
                {
                    propertyDictionaries = sqlFilter.parameters;
                }
                this.parameters = propertyDictionaries;
            }
        }