예제 #1
0
 /// <summary>
 /// Saves the current component configuration into the property bag
 /// </summary>
 /// <param name="pb">Configuration property bag</param>
 /// <param name="fClearDirty">not used</param>
 /// <param name="fSaveAllProperties">not used</param>
 public virtual void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, bool fClearDirty, bool fSaveAllProperties)
 {
     WritePropertyBag(pb, "TargetCharSet", this.TargetCharSet.ToString());
     WritePropertyBag(pb, "FallbackChar", this.FallbackChar);
     WritePropertyBag(pb, "ExtraCharsToReplace", this.ExtraCharsToReplace);
     WritePropertyBag(pb, "Normalize", this.Normalize);
 }
        public override void Open(string uri, Microsoft.BizTalk.Component.Interop.IPropertyBag config, IPropertyBag bizTalkConfig, Microsoft.BizTalk.Component.Interop.IPropertyBag handlerPropertyBag, IBTTransportProxy transportProxy, string transportType, string propertyNamespace, ControlledTermination control)
        {
            try
            {
                this.properties = new SBQueueReceiveProperties(uri);

                XmlDocument locationConfigDom = ConfigProperties.ExtractConfigDom(config);
                this.properties.LocationConfiguration(locationConfigDom, false);

                //  this is our handle back to the EPM
                this.transportProxy = transportProxy;

                //  used to control whether the EPM can unload us
                this.control = control;

                this.uri               = uri;
                this.transportType     = transportType;
                this.propertyNamespace = propertyNamespace;
                this.messageFactory    = this.transportProxy.GetMessageFactory();

                Start();
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
            }
        }
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val = null;

            val = this.ReadPropertyBag(pb, "FileNameProperty");
            if ((val != null))
            {
                this._FileNameProperty = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "FileNamePropertyNamespace");
            if ((val != null))
            {
                this._FileNamePropertyNamespace = ((string)(val));
            }

            val = this.ReadPropertyBag(pb, "ArchivePath");
            if ((val != null))
            {
                this._ArchivePath = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "ArchiveFiles");
            if ((val != null))
            {
                this._ArchiveFiles = ((bool)(val));
            }
        }
예제 #4
0
 /// <summary>
 /// Saves the current component configuration into the property bag
 /// </summary>
 /// <param name="pb">Configuration property bag</param>
 /// <param name="fClearDirty">not used</param>
 /// <param name="fSaveAllProperties">not used</param>
 public virtual void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, bool fClearDirty, bool fSaveAllProperties)
 {
     this.WritePropertyBag(pb, "XPathSourceFileName", this.XPathSourceFileName);
     this.WritePropertyBag(pb, "XslPath", this.XslPath);
     this.WritePropertyBag(pb, "EnableValidateNamespace", this.EnableValidateNamespace);
     this.WritePropertyBag(pb, "AllowPassThruTransmit", this.AllowPassThruTransmit);
 }
예제 #5
0
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val = null;

            val = this.ReadPropertyBag(pb, "XPathSourceFileName");
            if ((val != null))
            {
                this._XPathSourceFileName = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "XslPath");
            if ((val != null))
            {
                this._XslPath = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "EnableValidateNamespace");
            if ((val != null))
            {
                this._EnableValidateNamespace = ((bool)(val));
            }
            val = this.ReadPropertyBag(pb, "AllowPassThruTransmit");
            if ((val != null))
            {
                this._AllowPassThruTransmit = ((bool)(val));
            }
        }
예제 #6
0
 /// <summary>
 /// Saves the current component configuration into the property bag
 /// </summary>
 /// <param name="pb">Configuration property bag</param>
 /// <param name="fClearDirty">not used</param>
 /// <param name="fSaveAllProperties">not used</param>
 public virtual void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, bool fClearDirty, bool fSaveAllProperties)
 {
     this.WritePropertyBag(pb, "UseColumnNamesFromFirstRow", this.UseColumnNamesFromFirstRow);
     this.WritePropertyBag(pb, "RootElementName", this.RootElementName);
     this.WritePropertyBag(pb, "RowElementName", this.RowElementName);
     this.WritePropertyBag(pb, "NamespaceName", this.NamespaceName);
 }
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val = null;

            val = this.ReadPropertyBag(pb, "senderId");
            if ((val != null))
            {
                this._senderId = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "propertyNameSpace");
            if ((val != null))
            {
                this._propertyNameSpace = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "receiverId");
            if ((val != null))
            {
                this._receiverId = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "senderIdQualifier");
            if ((val != null))
            {
                this._senderIdQualifier = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "receiverIdQualifier");
            if ((val != null))
            {
                this._receiverIdQualifier = ((string)(val));
            }
        }
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val = null;

            try
            {
                pb.Read("Enabled", out val, 0);
            }
            catch (System.ArgumentException)
            {
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Error reading propertybag: " + ex.Message);
            }

            if (val != null)
            {
                Enabled = (bool)val;
            }
            else
            {
                Enabled = true;
            }
        }
예제 #9
0
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val;

            val = this.ReadPropertyBag(pb, "UseColumnNamesFromFirstRow");
            if (val != null)
            {
                this.UseColumnNamesFromFirstRow = ((bool)(val));
            }
            val = this.ReadPropertyBag(pb, "RootElementName");
            if (val != null)
            {
                this.RootElementName = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "RowElementName");
            if (val != null)
            {
                this.RowElementName = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "NamespaceName");
            if (val != null)
            {
                this.NamespaceName = ((string)(val));
            }
        }
예제 #10
0
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val = null;

            val = this.ReadPropertyBag(pb, "FilePath");
            if ((val != null))
            {
                this._FilePath = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "Enabled");
            if ((val != null))
            {
                this._Enabled = ((bool)(val));
            }
            val = this.ReadPropertyBag(pb, "FileMask");
            if ((val != null))
            {
                this._FileMask = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "FileName");
            if ((val != null))
            {
                this._FileName = ((string)(val));
            }
            val = this.ReadPropertyBag(pb, "Overwrite");
            if ((val != null))
            {
                this._Overwrite = ((bool)(val));
            }
        }
 /// <summary>
 /// Saves the current component configuration into the property bag
 /// </summary>
 /// <param name="pb">Configuration property bag</param>
 /// <param name="fClearDirty">not used</param>
 /// <param name="fSaveAllProperties">not used</param>
 public virtual void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, bool fClearDirty, bool fSaveAllProperties)
 {
     this.WritePropertyBag(pb, "FileNameProperty", this.FileNameProperty);
     this.WritePropertyBag(pb, "FileNamePropertyNamespace", this.FileNamePropertyNamespace);
     this.WritePropertyBag(pb, "ArchivePath", this.ArchivePath);
     this.WritePropertyBag(pb, "ArchiveFiles", this.ArchiveFiles);
 }
예제 #12
0
        /// <summary>
        /// Loads configuration property for component.
        /// </summary>
        /// <param name="pb">Configuration property bag.</param>
        /// <param name="errlog">Error status (not used in this code).</param>
        void IPersistPropertyBag.Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, Int32 errlog)
        {
            string strEnvelopes = (string)propertyHelper.ReadPropertyBag(pb, "EnvelopeSpecNames");

            if (strEnvelopes != null && strEnvelopes.Length > 0)
            {
                string[] strEnvArray = strEnvelopes.Split('|');

                this.envelopeSpecNames.Clear();
                for (int lowerBound = strEnvArray.GetLowerBound(0); lowerBound <= strEnvArray.GetUpperBound(0); ++lowerBound)
                {
                    Schema schema = new Schema(strEnvArray[lowerBound]);
                    this.envelopeSpecNames.Add(schema);
                }
            }

            string strDocuments = (string)propertyHelper.ReadPropertyBag(pb, "DocumentSpecNames");

            if (strDocuments != null && strDocuments.Length > 0)
            {
                string[] strDocArray = strDocuments.Split('|');

                this.DocumentSpecNames.Clear();
                for (int lowerBound = strDocArray.GetLowerBound(0); lowerBound <= strDocArray.GetUpperBound(0); ++lowerBound)
                {
                    Schema schema = new Schema(strDocArray[lowerBound]);
                    this.DocumentSpecNames.Add(schema);
                }
            }

            this.RecoverableInterchangeProcessing = PropertyBagHelper.ReadPropertyBag <Boolean>(pb, "RecoverableInterchangeProcessing", this.RecoverableInterchangeProcessing);
            this.ValidateDocument = PropertyBagHelper.ReadPropertyBag <Boolean>(pb, "ValidateDocument", this.ValidateDocument);
        }
예제 #13
0
        /// <summary>
        /// Saves current component configuration into the property bag.
        /// </summary>
        /// <param name="pb">Configuration property bag.</param>
        /// <param name="fClearDirty">Not used.</param>
        /// <param name="fSaveAllProperties">Not used.</param>
        void IPersistPropertyBag.Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, bool fClearDirty, bool fSaveAllProperties)
        {
            string envelopeSpecNames = String.Empty;

            foreach (var item in this.EnvelopeSpecNames)
            {
                if (envelopeSpecNames == String.Empty)
                {
                    envelopeSpecNames = item.SchemaName;
                    continue;
                }

                envelopeSpecNames += String.Format("|{0}", item.SchemaName);
            }

            string documentSpecNames = String.Empty;

            foreach (var item in this.documentSpecNames)
            {
                if (documentSpecNames == String.Empty)
                {
                    documentSpecNames = item.SchemaName;
                    continue;
                }

                documentSpecNames += String.Format("|{0}", item.SchemaName);
            }
            PropertyBagHelper.WritePropertyBag(pb, "DocumentSpecNames", documentSpecNames);
            PropertyBagHelper.WritePropertyBag(pb, "EnvelopeSpecNames", envelopeSpecNames);
            PropertyBagHelper.WritePropertyBag(pb, "RecoverableInterchangeProcessing", this.RecoverableInterchangeProcessing);
            PropertyBagHelper.WritePropertyBag(pb, "ValidateDocument", this.ValidateDocument);
        }
예제 #14
0
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val = null;

            val = ReadPropertyBag(pb, "TargetCharSet");
            if (val != null)
            {
                this.TargetCharSet = (EdifactCharacterSet)Enum.Parse(typeof(EdifactCharacterSet), ReadPropertyBag(pb, "TargetCharSet") as string, true);
            }
            val = ReadPropertyBag(pb, "FallbackChar");
            if ((val != null))
            {
                if (val is char)
                {
                    this.FallbackChar = ((char)(val));
                }
                if (val is ushort)
                {
                    this.FallbackChar = Convert.ToChar(val);
                }
            }
            val = ReadPropertyBag(pb, "ExtraCharsToReplace");
            if ((val != null))
            {
                this.ExtraCharsToReplace = ((string)(val));
            }
            val = ReadPropertyBag(pb, "Normalize");
            if ((val != null))
            {
                this.Normalize = ((bool)(val));
            }
        }
예제 #15
0
 /// <summary>
 /// Saves the current component configuration into the property bag
 /// </summary>
 /// <param name="pb">Configuration property bag</param>
 /// <param name="fClearDirty">not used</param>
 /// <param name="fSaveAllProperties">not used</param>
 public virtual void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, bool fClearDirty, bool fSaveAllProperties)
 {
     this.WritePropertyBag(pb, "FilePath", this.FilePath);
     this.WritePropertyBag(pb, "Enabled", this.Enabled);
     this.WritePropertyBag(pb, "FileMask", this.FileMask);
     this.WritePropertyBag(pb, "FileName", this.FileName);
     this.WritePropertyBag(pb, "Overwrite", this.Overwrite);
 }
 /// <summary>
 /// Saves the current component configuration into the property bag
 /// </summary>
 /// <param name="pb">Configuration property bag</param>
 /// <param name="fClearDirty">not used</param>
 /// <param name="fSaveAllProperties">not used</param>
 public virtual void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, bool fClearDirty, bool fSaveAllProperties)
 {
     this.WritePropertyBag(pb, "senderId", this.senderId);
     this.WritePropertyBag(pb, "propertyNameSpace", this.propertyNameSpace);
     this.WritePropertyBag(pb, "receiverId", this.receiverId);
     this.WritePropertyBag(pb, "senderIdQualifier", this.senderIdQualifier);
     this.WritePropertyBag(pb, "receiverIdQualifier", this.receiverIdQualifier);
 }
        /// <summary>
        /// Saves the current component configuration into the property bag.
        /// </summary>
        /// <param name="pb">Configuration property bag.</param>
        /// <param name="fClearDirty">Not used.</param>
        /// <param name="fSaveAllProperties">Not used.</param>
        public void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, Boolean fClearDirty, Boolean fSaveAllProperties)
        {
            object val = PropertyName;

            WritePropertyBag(pb, "PropertyName", val);

            val = PropertySchema;
            WritePropertyBag(pb, "PropertySchema", val);
        }
        /// <summary>
        /// Saves the current component configuration into the property bag
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="fClearDirty">not used</param>
        /// <param name="fSaveAllProperties">not used</param>
        public virtual void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, bool fClearDirty, bool fSaveAllProperties)
        {
            object val = (object)Enabled;

            WritePropertyBag(pb, "Enabled", val);

            val = (object)BufferSizeBytes;
            WritePropertyBag(pb, "BufferSizeBytes", val);
        }
예제 #19
0
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            var val = ReadPropertyBag(pb, "XPath");

            if (val != null)
            {
                XPath = (string)val;
            }
        }
예제 #20
0
        public void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, Int32 errlog)
        {
            string val = (string)ReadPropertyBag(pb, "XsltFilePath");

            if (val != null)
            {
                xsltPath = val;
            }
        }
예제 #21
0
        /// <summary>
        /// Saves the current component configuration into the property bag.
        /// </summary>
        /// <param name="pb">Configuration property bag.</param>
        /// <param name="fClearDirty">Not used.</param>
        /// <param name="fSaveAllProperties">Not used.</param>
        public void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, Boolean fClearDirty, Boolean fSaveAllProperties)
        {
            object val = (object)appendData;

            WritePropertyBag(pb, "AppendData", val);

            val = (object)prependData;
            WritePropertyBag(pb, "PrependData", val);
        }
예제 #22
0
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val = null;

            val = this.ReadPropertyBag(pb, "MessageTypeStrIgnore");
            if ((val != null))
            {
                this._MessageTypeStrIgnore = ((string)(val));
            }
        }
예제 #23
0
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val = null;

            //val = this.ReadPropertyBag(pb, "AppendedValue");
            if ((val != null))
            {
                //this._AppendedValue = ((string)(val));
            }
        }
예제 #24
0
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val = null;

            val = this.ReadPropertyBag(pb, "GroupingElement");
            if ((val != null))
            {
                this._GroupingElement = ((int)(val));
            }
        }
        /// <summary>
        /// Loads configuration properties for the component
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="errlog">Error status</param>
        public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
        {
            object val = null;

            val = this.ReadPropertyBag(pb, "SOAPHeaderName");
            if ((val != null))
            {
                this._SOAPHeaderName = ((string)(val));
            }
        }
예제 #26
0
        /// <summary>
        /// Loads configuration property for component.
        /// </summary>
        /// <param name="pb">Configuration property bag.</param>
        /// <param name="errlog">Error status (not used in this code).</param>
        public void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag propertyBag, Int32 errlog)
        {
            object val = null;

            val = ReadPropertyBag(propertyBag, "Enabled");
            if ((val != null))
            {
                this._Enabled = ((bool)(val));
            }
            val = ReadPropertyBag(propertyBag, "ClientId");
            if ((val != null))
            {
                this._ClientId = ((string)(val));
            }
            val = ReadPropertyBag(propertyBag, "MessageTypeId");
            if ((val != null))
            {
                this._MessageTypeId = ((string)(val));
            }
            val = ReadPropertyBag(propertyBag, "StorageAccountName");
            if ((val != null))
            {
                this._StorageAccountName = ((string)(val));
            }
            val = ReadPropertyBag(propertyBag, "StorageAccountKey");
            if ((val != null))
            {
                this._StorageAccountKey = ((string)(val));
            }
            val = ReadPropertyBag(propertyBag, "KeyVaultClientId");
            if ((val != null))
            {
                this._KeyVaultClientId = ((string)(val));
            }
            val = ReadPropertyBag(propertyBag, "KeyVaultClientSecret");
            if ((val != null))
            {
                this._KeyVaultClientSecret = ((string)(val));
            }
            val = ReadPropertyBag(propertyBag, "KeyVaultSecretSufix");
            if ((val != null))
            {
                this._KeyVaultSecretSufix = ((string)(val));
            }
            val = ReadPropertyBag(propertyBag, "StorageOutboundContainer");
            if ((val != null))
            {
                this._StorageOutboundContainer = ((string)(val));
            }
            val = ReadPropertyBag(propertyBag, "StorageOutboundFileName");
            if ((val != null))
            {
                this._StorageOutboundFileName = ((string)(val));
            }
        }
 /// <summary>
 /// Writes property values into a property bag.
 /// </summary>
 /// <param name="pb">Property bag.</param>
 /// <param name="propName">Name of property.</param>
 /// <param name="val">Value of property.</param>
 private static void WritePropertyBag(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, string propName, object val)
 {
     try
     {
         pb.Write(propName, ref val);
     }
     catch (Exception ex)
     {
         throw new ApplicationException(ex.Message);
     }
 }
예제 #28
0
 private void WritePropertyBag(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, string propName, object val)
 {
     try
     {
         pb.Write(propName, ref val);
     }
     catch (Exception e)
     {
         throw new InvalidProgramException(e.Message);
     }
 }
        /// <summary>
        /// Saves the current component configuration into the property bag.
        /// </summary>
        /// <param name="pb">Configuration property bag.</param>
        /// <param name="fClearDirty">Not used.</param>
        /// <param name="fSaveAllProperties">Not used.</param>
        public void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, Boolean fClearDirty, Boolean fSaveAllProperties)
        {
            object val = (object)title;

            WritePropertyBag(pb, "Title", val);

            val = (object)subject;
            WritePropertyBag(pb, "Subject", val);

            val = (object)password;
            WritePropertyBag(pb, "Password", val);
        }
        /// <summary>
        /// Saves the current component configuration into the property bag
        /// </summary>
        /// <param name="pb">Configuration property bag</param>
        /// <param name="fClearDirty">not used</param>
        /// <param name="fSaveAllProperties">not used</param>
        public virtual void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, bool fClearDirty, bool fSaveAllProperties)
        {
            this.WritePropertyBag(pb, "ConnectionString", this.ConnectionString);
            this.WritePropertyBag(pb, "TempDropFolderLocation", this.TempDropFolderLocation);
            this.WritePropertyBag(pb, "SqlStatement", this.SqlStatement);
            this.WritePropertyBag(pb, "DeleteTempMessages", this.DeleteTempMessages);
            this.WritePropertyBag(pb, "TypeToProcess", this.TypeToProcess);
            this.WritePropertyBag(pb, "RootNodeName", this.RootNodeName);

            this.WritePropertyBag(pb, "NameSpace", this.NameSpace);
            this.WritePropertyBag(pb, "DataNodeName", this.DataNodeName);
            this.WritePropertyBag(pb, "Filter", this.Filter);
        }