Example #1
0
 /// <summary>
 /// <para>Deserializes all properties stored in given <paramref name="serialized"/> string, then restores those of them registered with <see cref="IContextConfiguration.RegisterDistributedProperty{T}"/> in configuration to context.</para>
 /// <para>Input string is expected to be a result of <see cref="SerializeDistributedProperties"/> call elsewhere.</para>
 /// </summary>
 public static void RestoreDistributedProperties([NotNull] string serialized) =>
 FlowingContextRestorer.RestoreProperties(serialized, properties, configuration);
Example #2
0
 /// <summary>
 /// <para>Deserializes all globals stored in given <paramref name="serialized"/> string, then restores those of them registered with <see cref="IContextConfiguration.RegisterDistributedGlobal{T}"/> in configuration to context.</para>
 /// <para>Input string is expected to be a result of <see cref="SerializeDistributedGlobals"/> call elsewhere.</para>
 /// </summary>
 public static void RestoreDistributedGlobals([NotNull] string serialized) =>
 FlowingContextRestorer.RestoreGlobals(serialized, globals, configuration);