public void TestExposure() { GH_Exposure expected = GH_Exposure.tertiary; GH_Exposure actual = TestGraphDataGhHelper.TestObject.Exposure; Assert.Equal(expected, actual); }
public void TestExposure() { GH_Exposure expected = GH_Exposure.secondary; GH_Exposure actual = TestUnorderedListGhHelper.TestObject.Exposure; Assert.Equal(expected, actual); }
///// <summary> ///// Constructor. Call this from the default constructor of all subclasses, passing in the required information. ///// </summary> ///// <param name="commandName">The command name of the action that this component invokes</param> ///// <param name="name">The name of this component. Keep it simple, single words are best.</param> ///// <param name="nickname">The abbreviation of this component. Keep it short, 1-5 characters are best</param> ///// <param name="description">The description of this component. Be succinct but clear. You can supply whole sentances.</param> ///// <param name="category">The category of this component. Controls which tab components will end up in.</param> ///// <param name="subCategory">The subcategory for this component. Controls which group the component will be in.</param> //protected NewtBaseComponent(string commandName, string name, string nickname, string description, // string subCategory, string category = CategoryName) // : base() //{ // CommandName = commandName; // Host.EnsureInitialisation(); // ActionType = Core.Instance.Actions.GetActionDefinition(CommandName); // Name = name; // NickName = nickname; // Description = description; // Category = category; // SubCategory = subCategory; // PostConstructor(); //} /// <summary> /// Constructor. Call this from the default constructor of all subclasses, passing in the required information. /// </summary> /// <param name="commandName">The command name of the action that this component invokes</param> /// <param name="name">The name of this component. Keep it simple, single words are best.</param> /// <param name="nickname">The abbreviation of this component. Keep it short, 1-5 characters are best</param> /// <param name="category">The category of this component. Controls which tab components will end up in.</param> /// <param name="subCategory">The subcategory for this component. Controls which group the component will be in.</param> protected SalamanderBaseComponent(string commandName, string name, string nickname, string subCategory, GH_Exposure exposure = GH_Exposure.primary, string category = CategoryName) : base() { CommandName = commandName; Host.EnsureInitialisation(true); ActionType = Core.Instance.Actions.GetActionDefinition(CommandName); if (ActionType == null) { throw new Exception("Command '" + CommandName + "' has not been found. The plugin that contains it may not have been successfully loaded."); } var attributes = ActionAttribute.ExtractFrom(ActionType); Name = name; NickName = nickname; Description = attributes.Description.CapitaliseFirst(); Category = category; SubCategory = subCategory; _Exposure = exposure; if (attributes.PreviewLayerType != null) { PreviewLayer = Activator.CreateInstance(attributes.PreviewLayerType) as DisplayLayer; } PostConstructor(); }
public void TestExposure() { GH_Exposure expected = GH_Exposure.secondary; GH_Exposure actual = TestFlowchartStartNodeGhHelper.TestObject.Exposure; Assert.Equal(expected, actual); }
public void TestExposure() { GH_Exposure expected = GH_Exposure.secondary; GH_Exposure actual = TestGraphElementsGhHelper.TestObject.Exposure; Assert.Equal(expected, actual); }
public void TestExposure() { GH_Exposure expected = GH_Exposure.quarternary; GH_Exposure actual = TestPointDataGhHelper.TestObject.Exposure; Assert.Equal(expected, actual); }
internal PythonInstantiatorProxy(IGH_DocumentObject obj, object pythonType, dynamic operations, string location) { _operations = operations; _pythonType = pythonType; _location = string.Empty; _description = new GH_InstanceDescription(obj); Guid = obj.ComponentGuid; _icon = obj.Icon_24x24; _exposure = obj.Exposure; _obsolete = obj.Obsolete; _compliant = true; if (obj is IGH_ActiveObject) { IGH_ActiveObject actobj = (IGH_ActiveObject)obj; if (!actobj.SDKCompliancy(RhinoApp.ExeVersion, RhinoApp.ExeServiceRelease)) { this._compliant = false; } } Type = obj.GetType(); this.LibraryGuid = GH_Convert.StringToGuid(location); this._location = location; if (this._location.Length > 0) { this._location = this._location.Replace("file:///", string.Empty); this._location = this._location.Replace("/", Convert.ToString(Path.DirectorySeparatorChar)); } }
public void TestExposure() { GH_Exposure expected = GH_Exposure.tertiary; GH_Exposure actual = TestDynamicMathBlockGhHelper.TestObject.Exposure; Assert.Equal(expected, actual); }
public ExposureAttribute(GH_Exposure value) => Exposure = value;