public static TimeZoneProtocol[] ConvertCollection(FCTimeZoneCollection timeZones)
        {
            TimeZoneProtocol[] protoTimeZones = new TimeZoneProtocol[timeZones.Count];

            for(int i = 0; i < timeZones.Count; i++)
            {
                protoTimeZones[i] = new TimeZoneProtocol( timeZones[i] );
            }

            return protoTimeZones;
        }
        public static TimeZoneProtocol[] ConvertCollection(FCTimeZoneCollection timeZones)
        {
            TimeZoneProtocol[] protoTimeZones = new TimeZoneProtocol[timeZones.Count];

            for (int i = 0; i < timeZones.Count; i++)
            {
                protoTimeZones[i] = new TimeZoneProtocol(timeZones[i]);
            }

            return(protoTimeZones);
        }
        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 );
        }
예제 #4
0
        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);
        }