Exemplo n.º 1
0
        public void NotifyMessage(bool start, IMessage msg, bool client_site, bool async)
        {
            ArrayList properties = this._properties;

            if (start)
            {
                foreach (object obj in properties)
                {
                    DynamicPropertyCollection.DynamicPropertyReg dynamicPropertyReg = (DynamicPropertyCollection.DynamicPropertyReg)obj;
                    if (dynamicPropertyReg.Sink != null)
                    {
                        dynamicPropertyReg.Sink.ProcessMessageStart(msg, client_site, async);
                    }
                }
            }
            else
            {
                foreach (object obj2 in properties)
                {
                    DynamicPropertyCollection.DynamicPropertyReg dynamicPropertyReg2 = (DynamicPropertyCollection.DynamicPropertyReg)obj2;
                    if (dynamicPropertyReg2.Sink != null)
                    {
                        dynamicPropertyReg2.Sink.ProcessMessageFinish(msg, client_site, async);
                    }
                }
            }
        }
Exemplo n.º 2
0
        public bool RegisterDynamicProperty(IDynamicProperty prop)
        {
            bool result;

            lock (this)
            {
                if (this.FindProperty(prop.Name) != -1)
                {
                    throw new InvalidOperationException("Another property by this name already exists");
                }
                ArrayList arrayList = new ArrayList(this._properties);
                DynamicPropertyCollection.DynamicPropertyReg dynamicPropertyReg = new DynamicPropertyCollection.DynamicPropertyReg();
                dynamicPropertyReg.Property = prop;
                IContributeDynamicSink contributeDynamicSink = prop as IContributeDynamicSink;
                if (contributeDynamicSink != null)
                {
                    dynamicPropertyReg.Sink = contributeDynamicSink.GetDynamicSink();
                }
                arrayList.Add(dynamicPropertyReg);
                this._properties = arrayList;
                result           = true;
            }
            return(result);
        }