public NamespaceTreeSource(IReadOnlyNamespaceTree tree) : this() { // Create this empty instance then we clone the data to this instance CopyTo(tree, this);
/// <summary> /// Clones the read only namespace tree to a new created tree for modification. /// </summary> /// <param name="tree">The tree to be copied</param> /// <returns>A new copied tree</returns> public static INamespaceTree Clone(this IReadOnlyNamespaceTree tree) => new NamespaceTreeSource(tree);
public static IBinaryNamespaceDiscovery CreateBinaryDiscovery(this IReadOnlyNamespaceTree tree) { }
static BinarySerializerOptions() { DefaultNamespaces = SetupDefaultNamespaces(); Default = new BinarySerializerOptions(CircularReferenceMode.DetectAndThrow, DefaultNamespaces.CreateBinaryDiscovery()); Performance = new BinarySerializerOptions(CircularReferenceMode.NeverDetect, DefaultNamespaces.CreateBinaryDiscovery()); }