예제 #1
0
        public void ReapplyAllCachedContextProperties(ContextInstructionTypeEnum promotion)
        {
            FetchCachedContext();

            foreach (KeyValuePair <string, object> kp in cacheItems)
            {
                string[] contextPropertyType = kp.Key.Split('#');

                string propertyName      = string.Empty;
                string propertyNamespace = string.Empty;

                if (contextPropertyType.Length == 2)
                {
                    propertyNamespace = contextPropertyType[0];
                    propertyName      = contextPropertyType[1];
                }
                else
                {
                    propertyName = contextPropertyType[0];
                }

                SetContextPropertyPipelineInstruction instruction = new SetContextPropertyPipelineInstruction(propertyName, propertyNamespace, kp.Value, promotion);
                base.AddInstruction(instruction);
            }
        }
예제 #2
0
 public SetContextPropertyPipelineInstruction(string propertyName, string propertyNamespace, object value, ContextInstructionTypeEnum promotion)
 {
     this.propertyName      = propertyName;
     this.propertyNamespace = propertyNamespace;
     this.promotion         = promotion;
     this.value             = value;
 }
예제 #3
0
 public SetContextPropertyFromSSOConfigPipelineInstruction(string propertyName, string propertyNamespace, ContextInstructionTypeEnum promotion, string _SSOApplication, string _SSOKey, TypeEnum type)
 {
     this.propertyName      = propertyName;
     this.propertyNamespace = propertyNamespace;
     this.promotion         = promotion;
     this._SSOApplication   = _SSOApplication;
     this._SSOKey           = _SSOKey;
     this.type = type;
 }
예제 #4
0
 public SetContextPropertyPipelineInstruction(string propertyName, string propertyNamespace, object value, ContextInstructionTypeEnum promotion, TypeEnum type)
 {
     this.propertyName      = propertyName;
     this.propertyNamespace = propertyNamespace;
     this.promotion         = promotion;
     this.value             = value;
     this.castRequired      = true;
     this.type = type;
 }
예제 #5
0
 /// <summary>
 /// Instantiate an XPathInstruction
 /// </summary>
 /// <param name="_XPathQuery">The XPath query that is to be executed</param>
 /// <param name="promotion">Whether to write or promote the result</param>
 /// <param name="_XPathResultType">Whether the resulting nodes value, name, or namespace should be considered the result</param>
 /// <param name="propertyName">The name of the context property which will be affected</param>
 /// <param name="propertyNamespace">The namespace of the context property which will be affected</param>
 /// <param name="type">The type that the value should be cast to</param>
 /// <param name="exceptionIfNotFound"></param>
 public XPathInstruction(string _XPathQuery, ContextInstructionTypeEnum promotion, XPathResultTypeEnum _XPathResultType, string propertyName, string propertyNamespace, TypeEnum type, bool exceptionIfNotFound)
 {
     this._XPathQuery       = _XPathQuery;
     this.promotion         = promotion;
     this._XPathResultType  = _XPathResultType;
     this.propertyName      = propertyName;
     this.propertyNamespace = propertyNamespace;
     this.type = type;
     this.exceptionIfNotFound = exceptionIfNotFound;
 }
예제 #6
0
        public void ReapplyCachedContextProperty(string propertyName, string propertyNamespace, ContextInstructionTypeEnum promotion, CacheFailureEnum failureAction)
        {
            object property;

            FetchCachedContext();
            bool propertyFound = cacheItems.TryGetValue(string.Format("{0}#{1}", propertyNamespace, propertyName), out property);

            if (!propertyFound)
            {
                if (failureAction == CacheFailureEnum.RaiseAnException)
                {
                    Exception exc = new Exception(String.Format("Unable to get cached context property {0}#{1}.", propertyNamespace, propertyName));
                    base.SetException(exc);
                }
                else if (failureAction == CacheFailureEnum.IgnoreAndCarryOn)
                {
                    // Take no action
                }
            }
            else
            {
                SetContextPropertyPipelineInstruction instruction = new SetContextPropertyPipelineInstruction(propertyName, propertyNamespace, property, promotion);
                base.AddInstruction(instruction);
            }
        }
예제 #7
0
        public void SetBREPipelineFrameworkContextProperty(BPFEnum propertyName, object value, ContextInstructionTypeEnum promotion, TypeEnum type)
        {
            Instruction instruction = new Instruction(propertyName.ToString(), value, promotion, type);

            base.AddInstruction(instruction);
        }
예제 #8
0
 /// <summary>
 /// Setup an Instruction that will either promote or write a specified value to a context property within the HTTP namespace
 /// </summary>
 /// <param name="property">The name of the context property</param>
 /// <param name="value">The value to be written/promoted to the context</param>
 /// <param name="promotion">Whether to write or promote the context property</param>
 /// <param name="type">The type to cast the value to</param>
 public void SetHTTPContextProperty(BizTalkHTTPPropertySchemaEnum property, object value, ContextInstructionTypeEnum promotion, TypeEnum type)
 {
     SetCustomContextProperty(property.ToString(), ContextPropertyNamespaces._HTTPPropertyNamespace, value, promotion, type);
 }
예제 #9
0
        /// <summary>
        /// Setup an Instruction that will either promote or write a specified a value that is the result of an XPath Expression to a context property within any namespace
        /// </summary>
        /// <param name="propertyName">The name of the context property</param>
        /// <param name="propertyNamespace">The namespace of the context property</param>
        /// <param name="promotion">Whether to write or promote the context property</param>
        /// <param name="_XPathResultType">Whether the resulting node's value, name, or namspace should be treated as the result</param>
        /// <param name="_XPathQuery">The XPath Expression</param>
        /// <param name="type">The type to cast the value to</param>
        /// <param name="exceptionIfNotFound">Whether or not to thrown an exception if the XPath expression does not evaluate</param>
        public void SetContextPropertyFromXPathResult(string propertyName, string propertyNamespace, ContextInstructionTypeEnum promotion, XPathResultTypeEnum _XPathResultType, string _XPathQuery, TypeEnum type, bool exceptionIfNotFound)
        {
            if (setContextPropertyFromXPathResultPipelineInstruction == null)
            {
                setContextPropertyFromXPathResultPipelineInstruction = new SetContextPropertyFromXPathResultPipelineInstruction();
                base.AddInstruction(setContextPropertyFromXPathResultPipelineInstruction);
            }

            setContextPropertyFromXPathResultPipelineInstruction.AddXPathInstruction(new XPathInstruction(_XPathQuery, promotion, _XPathResultType, propertyName, propertyNamespace, type, exceptionIfNotFound));
        }
예제 #10
0
        /// <summary>
        /// Setup an Instruction that will either promote or write a specified value to a context property within any namespace
        /// </summary>
        /// <param name="propertyName">The name of the context property</param>
        /// <param name="propertyNamespace">The namespace of the context property</param>
        /// <param name="value">The value to be written/promoted to the context</param>
        /// <param name="promotion">Whether to write or promote the context property</param>
        /// <param name="type">The type to cast the value to</param>
        public void SetCustomContextProperty(string propertyName, string propertyNamespace, object value, ContextInstructionTypeEnum promotion, TypeEnum type)
        {
            SetContextPropertyPipelineInstruction instruction = new SetContextPropertyPipelineInstruction(propertyName, propertyNamespace, value, promotion, type);

            base.AddInstruction(instruction);
        }
예제 #11
0
        /// <summary>
        /// Setup an Instruction that will either promote or write a specified a value read in from the SSO Database to a context property within any namespace
        /// </summary>
        /// <param name="propertyName">The name of the context property</param>
        /// <param name="propertyNamespace">The namespace of the context property</param>
        /// <param name="promotion">Whether to write or promote the context property</param>
        /// <param name="_SSOApplication">The name of the SSO Application</param>
        /// <param name="_SSOKey">The name of the SSO Key in the key/value pair</param>
        /// <param name="type">The type to cast the value to</param>
        public void SetContextPropertyFromSSOConfig(string propertyName, string propertyNamespace, ContextInstructionTypeEnum promotion, string _SSOApplication, string _SSOKey, TypeEnum type)
        {
            SetContextPropertyFromSSOConfigPipelineInstruction instruction = new SetContextPropertyFromSSOConfigPipelineInstruction(propertyName, propertyNamespace, promotion, _SSOApplication, _SSOKey, type);

            base.AddInstruction(instruction);
        }
예제 #12
0
 public void SetESBItineraryPropertySchemasContextProperty(BizTalkESBItineraryPropertySchemaEnum property, object value, ContextInstructionTypeEnum promotion, TypeEnum type)
 {
     SetCustomContextProperty(property.ToString(), ContextPropertyNamespaces._ESBItineraryNamespace, value, promotion, type);
 }
예제 #13
0
 /// <summary>
 /// Setup an Instruction that will either promote or write a specified value to a context property within the Microsoft.BizTalk.XLANGs.BTXEngine namespace
 /// </summary>
 /// <param name="property">The name of the context property</param>
 /// <param name="value">The value to be written/promoted to the context</param>
 /// <param name="promotion">Whether to write or promote the context property</param>
 /// <param name="type">The type to cast the value to</param>
 public void SetXLANGsBTXEngineContextProperty(BizTalkXLANGSBTXEnginePropertySchemaEnum property, object value, ContextInstructionTypeEnum promotion, TypeEnum type)
 {
     SetCustomContextProperty(property.ToString(), ContextPropertyNamespaces._XLANGSPropertyNamespace, value, promotion, type);
 }
예제 #14
0
 /// <summary>
 /// Setup an Instruction that will either promote or write a specified value to a context property within the MessageTracking namespace
 /// </summary>
 /// <param name="property">The name of the context property</param>
 /// <param name="value">The value to be written/promoted to the context</param>
 /// <param name="promotion">Whether to write or promote the context property</param>
 /// <param name="type">The type to cast the value to</param>
 public void SetMessageTrackingContextProperty(BizTalkMessageTrackingPropertySchemaEnum property, object value, ContextInstructionTypeEnum promotion, TypeEnum type)
 {
     SetCustomContextProperty(property.ToString(), ContextPropertyNamespaces._MessageTrackingPropertyNamespace, value, promotion, type);
 }
예제 #15
0
 public Instruction(string propertyName, object value, ContextInstructionTypeEnum promotion, TypeEnum type)
 {
     this.propertyName = propertyName;
     this.promotion    = promotion;
     this.value        = value;
 }