public static async Task WriteDisabledServicesAsync(V1DisabledServices input) { if (input == null) { throw new ArgumentNullException("input"); } var file = await ApplicationData.Current.LocalFolder.CreateFileAsync(V1DisabledServicesFileName, CreationCollisionOption.OpenIfExists); await FileIO.WriteTextAsync(file, input.ToXml()); }
public static bool TryCreateFromXml(string xml, out V1DisabledServices output) { output = default(V1DisabledServices); if (xml == null) { throw new ArgumentNullException("xml"); } V1DisabledServices temp; if (!SerializationHelper.TryCreateFromXml<V1DisabledServices>(Serializer, xml, out temp)) { return false; } output = temp; return true; }
public static bool TryCreateFromXml(string xml, out V1DisabledServices output) { output = default(V1DisabledServices); if (xml == null) { throw new ArgumentNullException("xml"); } V1DisabledServices temp; if (!SerializationHelper.TryCreateFromXml <V1DisabledServices>(Serializer, xml, out temp)) { return(false); } output = temp; return(true); }
private async void OnPredefinedServiceSelectionIsEnabledChanged(object sender, IsEnabledChangedEventArgs e) { var disabledServices = new V1DisabledServices(); disabledServices.Guids.AddRange(m_predefinedServiceSelections.Where(x => !x.IsEnabled).Select(x => x.Service.Guid)); await NetworkServiceConfigurator.WriteDisabledServicesAsync(disabledServices); }