Deserialize() public méthode

public Deserialize ( ) : ConnectionTreeModel
Résultat mRemoteNG.Tree.ConnectionTreeModel
        public void Import(string filePath, ContainerInfo destinationContainer)
        {
            var dataProvider = new FileDataProvider(filePath);
            var fileContent = dataProvider.Load();

            var deserializer = new RemoteDesktopConnectionManagerDeserializer(fileContent);
            var connectionTreeModel = deserializer.Deserialize();

            var importedRootNode = connectionTreeModel.RootNodes.First();
            if (importedRootNode == null) return;
            var childrenToAdd = importedRootNode.Children.ToArray();
            destinationContainer.AddChildRange(childrenToAdd);
        }
 public void OnetimeSetup()
 {
     _connectionFileContents = Resources.test_rdcman_v2_2_schema1;
     _deserializer = new RemoteDesktopConnectionManagerDeserializer(_connectionFileContents);
     _connectionTreeModel = _deserializer.Deserialize();
 }
 public void ExceptionThrownOnUnsupportedVersion()
 {
     var badFileContents = Resources.test_rdcman_badVersionNumber;
     var deserializer = new RemoteDesktopConnectionManagerDeserializer(badFileContents);
     Assert.That(() => deserializer.Deserialize(), Throws.TypeOf<FileFormatException>());
 }
 public void ExceptionThrownOnBadSchemaVersion()
 {
     var badFileContents = Resources.test_rdcman_v2_2_badschemaversion;
     var deserializer = new RemoteDesktopConnectionManagerDeserializer(badFileContents);
     Assert.That(() => deserializer.Deserialize(), Throws.TypeOf<FileFormatException>());
 }