public static QuoteStatusRequest MakeQuoteStatusRequestIncNestedGroup() { var msg = new QuoteStatusRequest(); msg.Symbol = new Symbol("ABCDE"); var legsGroup = new QuoteStatusRequest.NoLegsGroup(); legsGroup.LegSymbol = new LegSymbol("BCDEG"); legsGroup.LegSymbolSfx = new LegSymbolSfx("PQRS"); var legSecAltId = new QuoteStatusRequest.NoLegsGroup.NoLegSecurityAltIDGroup(); legSecAltId.LegSecurityAltIDSource = new LegSecurityAltIDSource("QUERTYU"); legsGroup.AddGroup(legSecAltId); legSecAltId.LegSecurityAltIDSource = new LegSecurityAltIDSource("ASDFGHJ"); legsGroup.AddGroup(legSecAltId); msg.AddGroup(legsGroup); // groups are cloned before being mutated legsGroup.LegSymbol = new LegSymbol("CDEFG"); legsGroup.LegSymbolSfx = new LegSymbolSfx("QRST"); legSecAltId.LegSecurityAltIDSource = new LegSecurityAltIDSource("ZXCVBNM"); legsGroup.AddGroup(legSecAltId); msg.AddGroup(legsGroup); legsGroup.LegSymbol = new LegSymbol("DEFGH"); legsGroup.LegSymbolSfx = new LegSymbolSfx("RSTU"); legSecAltId.LegSecurityAltIDSource = new LegSecurityAltIDSource("POIUYTR"); legsGroup.AddGroup(legSecAltId); msg.AddGroup(legsGroup); return(msg); }
public static QuoteStatusRequest MakeQuoteStatusRequestIncGroup() { var msg = new QuoteStatusRequest(); msg.Symbol = new Symbol("ABCDE"); var legsGroup = new QuoteStatusRequest.NoLegsGroup(); legsGroup.LegSymbol = new LegSymbol("BCDEG"); legsGroup.LegSymbolSfx = new LegSymbolSfx("PQRS"); msg.AddGroup(legsGroup); // legsGroup is cloned before being mutated legsGroup.LegSymbol = new LegSymbol("CDEFG"); legsGroup.LegSymbolSfx = new LegSymbolSfx("QRST"); msg.AddGroup(legsGroup); legsGroup.LegSymbol = new LegSymbol("DEFGH"); legsGroup.LegSymbolSfx = new LegSymbolSfx("RSTU"); msg.AddGroup(legsGroup); return(msg); }