internal MessageMarketSubscriptionStarted(Subscription sub)
            : base(new Name("SubscriptionStarted"), sub.CorrelationID, null)
        {
            this._correlationId = sub.CorrelationID;
            this._topicName = sub.Security;

            { //deal with bad fields
                List<string> badFields = new List<string>(sub.Fields.Count);
                for (int i = sub.Fields.Count - 1; i >= 0; i--)
                {
                    if (Types.Rules.IsBadField(sub.Fields[i]))
                    {
                        badFields.Add(sub.Fields[i]);
                        sub.Fields.RemoveAt(i);
                    }
                }

                if (badFields.Count == 0)
                    this._exceptionsNull = new ElementMarketNull("exceptions");
                else
                    this._exceptionsBadFields = new ElementMarketExceptionsArray(badFields);
            }
        }
 internal ElementMarketSubscriptionStarted(MessageMarketSubscriptionStarted arg)
 {
     this._exceptions = (ElementMarketNull)arg.Elements.First();
 }
Exemplo n.º 3
0
 internal ElementMarketSubscriptionStarted(MessageMarketSubscriptionStarted arg)
 {
     this._exceptions = (ElementMarketNull)arg.Elements.First();
 }
 internal MessageMarketSubscriptionStarted(Subscription sub) : base(new Name("SubscriptionStarted"), sub.CorrelationID, null)
 {
     this._correlationId = sub.CorrelationID;
     this._topicName     = sub.Security;
     this._exceptions    = new ElementMarketNull("exceptions");
 }