GetDistributionListInformation() 개인적인 메소드

Loads distribution list information from an external file.
private GetDistributionListInformation ( string filePath ) : DistributionList
filePath string Path to file.
리턴 Hummingbird.Models.DistributionList
예제 #1
0
        private void BtnOpenDlFile_OnClick(object sender, RoutedEventArgs e)
        {
            var openFileDialog = new OpenFileDialog { Filter = "XML DL Files (*.xmldl) | *.xmldl" };
            var result = openFileDialog.ShowDialog();

            if (result != true) return;

            var path = openFileDialog.FileName;
            TxtPath.Text = path;

            var fileOperator = new FileSystemOperator();

            DlGroupMigrationViewModel.Instance.BulkAddDistributionList =
                fileOperator.GetDistributionListInformation(path);

            // DL Owner is not required to also be a member of the DL, but group owners should also be members.
            string owner = DlGroupMigrationViewModel.Instance.BulkAddDistributionList.Owner;
            if (!string.IsNullOrWhiteSpace(owner))
            {
                DlGroupMigrationViewModel.Instance.BulkAddDistributionList.Members.Add(owner);
            }
        }
        private void BtnOpenDlFile_OnClick(object sender, RoutedEventArgs e)
        {
            var openFileDialog = new OpenFileDialog { Filter = "XML DL Files (*.xmldl) | *.xmldl"};
            var result = openFileDialog.ShowDialog();

            if (result != true) return;

            var path = openFileDialog.FileName;
            TxtPath.Text = path;

            var fileOperator = new FileSystemOperator();

            DlGroupMigrationViewModel.Instance.CurrentlyActiveDl = fileOperator.GetDistributionListInformation(path);
            this.aliasOfSelectedDl = DlGroupMigrationViewModel.Instance.CurrentlyActiveDl.Name;
            DlGroupMigrationViewModel.Instance.CurrentlyActiveDl.Members.Add(
                DlGroupMigrationViewModel.Instance.CurrentlyActiveDl.Owner);
        }