CmisSync.SetupSubRepoSelectController.OutlineItemExpanded C# (CSharp) Method

OutlineItemExpanded() public method

public OutlineItemExpanded ( NSNotification notification ) : void
notification NSNotification
return void
        void OutlineItemExpanded(NSNotification notification) {
            InvokeOnMainThread(delegate {
                NSCmisTree cmis = notification.UserInfo["NSObject"] as NSCmisTree;
                if (cmis == null) {
                    Console.WriteLine("ItemExpanded Error");
                    return;
                }

                NSCmisTree cmisRoot = cmis;
                while (cmisRoot.Parent != null) {
                    cmisRoot = cmisRoot.Parent;
                }

                RootFolder root = this.Repositories.Find(x => x.Name.Equals(cmisRoot.Name));
                if (root == null) {
                    Console.WriteLine("ItemExpanded find root Error");
                    return;
                }

                Node node = cmis.GetNode(root);
                if (node == null) {
                    Console.WriteLine("ItemExpanded find node Error");
                    return;
                }

                this.Loader[root.Id].Load(node);
            });
        }