Esempio n. 1
0
        public static string ComputeName(SharedRendererReferenceKey slotKey)
        {
            var name       = string.Concat(slotKey.Path.Path.Where(x => x.Type != GraphNodePath.ElementType.Target).Select(x => x.ToString()));
            var memberNode = slotKey.Path.RootNode as IMemberNode;

            if (memberNode != null)
            {
                name = memberNode.Name + name;
            }
            return(name.TrimStart('.'));
        }
Esempio n. 2
0
 public SharedRendererOutputSlotViewModel(GraphicsCompositorBlockViewModel block, string name, SharedRendererReferenceKey slotKey)
     : base(block, name)
 {
     this.slotKey = slotKey;
     Accessor     = slotKey.Path.GetAccessor();
     if (Accessor.Index != NodeIndex.Empty)
     {
         ((IObjectNode)Accessor.Node).ItemChanged += ItemChanged;
     }
     else
     {
         ((IMemberNode)Accessor.Node).ValueChanged += ValueChanged;
     }
 }