예제 #1
0
        public override object this[string name, int index]
        {
            get
            {
                ReferenceElementSecurityDataArray elm = (ReferenceElementSecurityDataArray)this[name]; //checks name

                int elmIndex = 0;
                foreach (var item in elm.Elements)
                {
                    if (elmIndex == index)
                    {
                        return(item);
                    }
                    elmIndex++;
                }

                return(base[name, index]);
            }
        }
        public override object this[string name, int index]
        {
            get
            {
                ReferenceElementSecurityDataArray secArray = (ReferenceElementSecurityDataArray)this[name]; //parent class checks the name

                int itemCount = 0;
                foreach (var item in secArray.Elements)
                {
                    if (itemCount == index)
                    {
                        return(item);
                    }

                    itemCount++;
                }

                return(base[name, index]);
            }
        }
 internal ReferenceMessage(CorrelationID corr, Dictionary <string, Dictionary <string, object> > fieldData) : base(new Name("ReferenceDataResponse"), corr, null)
 {
     this._securities = new ReferenceElementSecurityDataArray(fieldData);
 }
 internal ReferenceElementSecurityDataArray(ReferenceElementSecurityDataArray arg) //copy constructor
 {
     this._securities = new List <Element>(arg._securities);
 }
예제 #5
0
 internal ReferenceElement(ReferenceMessage arg)
 {
     this._securities = new ReferenceElementSecurityDataArray((ReferenceElementSecurityDataArray)arg.Elements.First());
 }