public static StateProvinceProtocol[] ConvertCollection(StateCollection states) { StateProvinceProtocol[] protoStates = new StateProvinceProtocol[states.Count]; for(int i = 0; i < states.Count; i++ ) { protoStates[i] = new StateProvinceProtocol( states[i] ); } return protoStates; }
public static StateProvinceProtocol[] ConvertCollection(StateCollection states) { StateProvinceProtocol[] protoStates = new StateProvinceProtocol[states.Count]; for (int i = 0; i < states.Count; i++) { protoStates[i] = new StateProvinceProtocol(states[i]); } return(protoStates); }
public CountryProtocol(Country country) { if( country.DefaultState != null ) this.DefaultState = new StateProvinceProtocol( country.DefaultState ); this.Name = country.Name; if( country.DefaultTimeZone != null ) this.DefaultTimeZone = new TimeZoneProtocol( country.DefaultTimeZone ); this.Code = country.Code; this.IsDefault = country.IsDefault; this.ObjectID = country.ObjectID; this.States = StateProvinceProtocol.ConvertCollection( country.States ); this.TimeZones = TimeZoneProtocol.ConvertCollection( country.TimeZones ); }
public CountryProtocol(Country country) { if (country.DefaultState != null) { this.DefaultState = new StateProvinceProtocol(country.DefaultState); } this.Name = country.Name; if (country.DefaultTimeZone != null) { this.DefaultTimeZone = new TimeZoneProtocol(country.DefaultTimeZone); } this.Code = country.Code; this.IsDefault = country.IsDefault; this.ObjectID = country.ObjectID; this.States = StateProvinceProtocol.ConvertCollection(country.States); this.TimeZones = TimeZoneProtocol.ConvertCollection(country.TimeZones); }