/*******************************************/
        /**** Constructors                      ****/
        /*******************************************/

        public CallerValueList() : base()
        {
            Name        = Caller.Name;
            NickName    = Caller.Name;
            Description = Caller.Description;
            Category    = "BHoM";
            SubCategory = Caller.Category;
            ListItems.Clear();

            m_Accessor = new DataAccessor_GH(new List <IGH_Param>());
            Caller.SetDataAccessor(m_Accessor);

            Caller.Modified += (sender, e) => UpdateFromSelectedItem();
        }
Exemple #2
0
        /*******************************************/
        /**** Constructors                      ****/
        /*******************************************/

        public CallerComponent() : base()
        {
            NewInstanceGuid(System.Guid.Empty);
            PostConstructor();  // Explicitly calling PostConstructor() since it is not called in the parameterless constructor overload base()
            NewInstanceGuid();

            Name        = Caller.Name;
            NickName    = Caller.Name;
            Description = Caller.Description;
            Category    = "BHoM";
            SubCategory = Caller.Category;



            Accessor = new DataAccessor_GH(Params.Input, IsValidPrincipalParameterIndex ? PrincipalParameterIndex : -1);
            Caller.SetDataAccessor(Accessor);

            // Listening to events from the Caller
            Caller.Modified        += OnCallerModified;
            Caller.SolutionExpired += (sender, e) => ExpireSolution(true);

            // Listening to events from GH component
            Params.ParameterChanged += OnGHParamChanged;
        }