Esempio n. 1
0
        /// <summary>
        /// Initialize
        /// </summary>
        /// <param name="properties">Initialization parameters</param>
        public override void Initialize(IArgument[] properties)
        {
            System.Collections.Hashtable hashtable = new Hashtable();
            for (int i = 0; i < properties.Length; i++)
            {
                hashtable.Add(properties[i].Key, properties[i].Value);
            }

            const string SendExtendedEventInfoConstStr = "SendExtendedEventInfo";

            if (hashtable.Contains(SendExtendedEventInfoConstStr))
            {
                string SendExtendedEventInfoStr = (string)hashtable[SendExtendedEventInfoConstStr];
                if (SendExtendedEventInfoStr == "true")
                {
                    sendExtendedEventInfo = true;
                }
            }

            SetEngineApiAccess();
            this._engineWasAssigned = true;
            _engineApiAccess.Initialize(hashtable);

            if (!_engineWasAssigned)
            {
                throw new System.Exception("The Initialize method in the SmartWrapper cannot be invoked before the EngineApiAccess is assigned");
            }

            _initializeWasInvoked = true;
        }
Esempio n. 2
0
        /// <summary>
        /// Initialize
        /// </summary>
        /// <param name="properties">Initialization parameters</param>
        public override void Initialize(IArgument[] properties)
        {
            System.Collections.Hashtable hashtable = new Hashtable();
            for (int i = 0; i < properties.Length; i++)
            {
                hashtable.Add(properties[i].Key, properties[i].Value);
            }

            SetEngineApiAccess();
            this._engineWasAssigned = true;
            _engineApiAccess.Initialize(hashtable);

            if (!_engineWasAssigned)
            {
                throw new System.Exception("The Initialize method in the SmartWrapper cannot be invoked before the EngineApiAccess is assigned");
            }

            _initializeWasInvoked = true;
        }