/// <summary>
        /// this method is called by SAF.Authentication is create an principal object
        /// for a given user and application name
        /// </summary>
        /// <param name="userid">user id</param>
        /// <param name="applicationName">application name</param>
        public ADPrincipal(SAFIdentity safIdentity)
        {
            identity = safIdentity;
            SAF.Configuration.ConfigurationManager cm = (SAF.Configuration.ConfigurationManager)System.Configuration.ConfigurationManager.GetSection("Framework");
            XmlNode providerData = cm.AuthenticationConfig.GetProviderConfigurationData(safIdentity.ApplicationName);

            //retrieve ADSI query string used to search for the given user.
            searchQuery = providerData.SelectSingleNode("ADDirectoryEntry").InnerText;
        }
Пример #2
0
        /// <summary>
        /// Constructor that retrieve the queue related information
        /// for MessageQueueConfiguration object
        /// </summary>
        /// <param name="queueName">the name of the queue</param>
        public MQSeries(string queueName)
        {
            cm = (SAF.Configuration.ConfigurationManager)System.Configuration.ConfigurationManager.GetSection("Framework");
            XmlNode queueInfo = cm.MessageQueueConfig.RetrieveQueueInformation("*[@name='" + queueName + "']");

            queueManager = queueInfo.SelectSingleNode("QueueManager").InnerText;
            QueueName    = queueInfo.SelectSingleNode("QueueName").InnerText;
            sleepTime    = Int32.Parse(queueInfo.SelectSingleNode("SleepTime").InnerText);
            queueSession = new MQSessionClass();
        }
Пример #3
0
 /// <summary>
 /// Private construtor, required for singleton design pattern.
 /// </summary>
 private Cache()
 {
     //retrieve setting from configuration file
     SAF.Configuration.ConfigurationManager cm = (SAF.Configuration.ConfigurationManager)System.Configuration.ConfigurationManager.GetSection("Framework");
     //load the cache strategy object
     cs = (ICacheStrategy)cm.CacheConfig.GetCacheStrategy();
     //create an Xml used as a map between  xml expression and object cached in the
     //physical storage.
     objectXmlMap = rootXml.CreateElement("Cache");
     //build the internal xml document.
     rootXml.AppendChild(objectXmlMap);
 }
Пример #4
0
        /// <summary>
        /// Constructor that retrieve the queue related information
        /// for MessageQueueConfiguration object
        /// </summary>
        /// <param name="queueName">name of the queue</param>
        public MSMQ(string queueName)
        {
            cm = (SAF.Configuration.ConfigurationManager)System.Configuration.ConfigurationManager.GetSection("Framework");
            XmlNode queueInfo = cm.MessageQueueConfig.RetrieveQueueInformation("*[@name='" + queueName + "']");

            formatName     = queueInfo.SelectSingleNode("FormatName").InnerText;
            sleepTime      = Int32.Parse(queueInfo.SelectSingleNode("SleepTime").InnerText);
            this.queueName = queueName;
            //supportedTypes is used to provide information to System.Messaging.MessageQueue
            //information on how to serialize and deserialize the object sent to and retrieved from
            //the queue.  The default data type is string type.
            supportedTypes.Add(typeof(System.String).ToString());
        }