Beispiel #1
0
 public static BackupData FromHostType(Jedzia.BackBock.DataAccess.DTO.BackupData source)
 {
     var local = new BackupData();
     local.DatasetGroup = source.DatasetGroup;
     local.DatasetName = source.DatasetName;
     if (source.BackupItem != null)
         local.BackupItem = source.BackupItem.Select(wld => BackupItemType.FromHostType(wld)).ToArray();
     return local;
 }
Beispiel #2
0
        public static BackupData FromHostType(Jedzia.BackBock.DataAccess.DTO.BackupData source)
        {
            var local = new BackupData();

            local.DatasetGroup = source.DatasetGroup;
            local.DatasetName  = source.DatasetName;
            if (source.BackupItem != null)
            {
                local.BackupItem = source.BackupItem.Select(wld => BackupItemType.FromHostType(wld)).ToArray();
            }
            return(local);
        }
Beispiel #3
0
        /// <summary>
        /// Generates the sample data.
        /// </summary>
        /// <returns>Design-Time sample data.</returns>
        public BackupData GenerateSampleData()
        {
            if (this.classData == null)
            {
                // Das ist Model Stuff
                string str;
                using (
                    Stream stream =
                        typeof(DesignDataProvider).Assembly.GetManifestResourceStream(
                            "Jedzia.BackBock.Data.Xml.SampleData.BackupData01.xml"))
                {
                    TextReader txr = new StreamReader(stream);
                    str = txr.ReadToEnd();
                }

                this.classData = BackupData.Deserialize(str);
            }

            return this.classData;
        }