コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BetterStorageExplorer.Ui.ViewModels.StorageAccountViewModel"/> class
        /// </summary>
        /// <param name="storageAccount">StorageAccountAdapter</param>
        public StorageAccountViewModel(StorageAccountAdapter storageAccount)
        {
            if (storageAccount == null)
                throw new ArgumentNullException(nameof(storageAccount));

            _storageAccount = storageAccount;
        }
コード例 #2
0
        private static StorageAccountAdapter CreateAccount(XmlNode node)
        {
            String name = node.Attributes.GetStringAttribute("name");
            String key = node.Attributes.GetStringAttribute("key");

            if (String.IsNullOrWhiteSpace(name) || String.IsNullOrWhiteSpace(key))
                return null;

            StorageAccountAdapter adapter = new StorageAccountAdapter(
                name,
                key,
                node.Attributes.GetBooleanAttribute("useHttps", true));

            return adapter;
        }