public static T DownloadObject <T>(this IFileTransferClient client, string alias) { client.DownloadFile(alias); using (var streamReader = new StreamReader(client.LocalStore.OpenRead(alias))) { return(XmlProvider.Read <T>(streamReader)); } }
public DesignerForm() { InitializeComponent(); _propertyGrid.SelectedObject = ToSettings( XmlProvider.Read <ExplorerBarInfoSurrogate>( new StringReader(Resources.LunaExplorerBarTheme) ) ); _propertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(propertyGrid1_PropertyValueChanged); ApplySettingsToExplorerBar(); }
public T GetUploadedObject <T>(string alias) { using (var streamReader = new StreamReader(LocalStore.OpenRead(alias))) { return(XmlProvider.Read <T>(streamReader)); } }