/// <inheritdoc/> public virtual void OnBeforeSerialize(KeyDataStore dataStore) { dataStore.SetData(k_HostingServiceContentRootKey, string.Join(";", HostingServiceContentRoots.ToArray())); dataStore.SetData(k_IsHostingServiceRunningKey, IsHostingServiceRunning); dataStore.SetData(k_DescriptiveNameKey, DescriptiveName); dataStore.SetData(k_InstanceIdKey, InstanceId); }
/// <inheritdoc/> public virtual void OnAfterDeserialize(KeyDataStore dataStore) { var contentRoots = dataStore.GetData(k_HostingServiceContentRootKey, string.Empty); HostingServiceContentRoots.AddRange(contentRoots.Split(';')); WasEnabled = dataStore.GetData(k_IsHostingServiceRunningKey, false); DescriptiveName = dataStore.GetDataString(k_DescriptiveNameKey, string.Empty); InstanceId = dataStore.GetData(k_InstanceIdKey, -1); }