예제 #1
0
 public MBeanInfo GetMBeanInfo()
 {
     return(MBean.Info <SampleDynamicMBean>("Sample dynamic MBean")
            .WithAttributes(
                MBean.WritableAttribute("Attribute", "Sample attribute").TypedAs(TabularType),
                MBean.WritableAttribute("NestedTableAttribute", "Nested Table Attribute").TypedAs(NestedTabularType)
                )
            .AndNothingElse()());
 }
예제 #2
0
 public MBeanInfo GetMBeanInfo()
 {
     return(MBean.Info <SampleDynamicMBean>("Sample dynamic MBean")
            .WithAttributes(
                MBean.WritableAttribute("Tabular", "Sample tabular attribute").TypedAs(_tabularType),
                MBean.WritableAttribute("Array", "Sample array attribute").TypedAs(_arrayType),
                MBean.WritableAttribute("Composite", "Sample composite attribute").TypedAs(_rowType)
                )
            .AndNothingElse()());
 }
예제 #3
0
        public OpenDynamic()
        {
            _tabularType = Tabular.Type("Table", "Table")
                           .WithIndexColumn("ID", "UniqueID").TypedAs(SimpleType.Integer)
                           .WithColumn("Name", "Name").TypedAs(SimpleType.String);

            _tabularValue = new TabularDataSupport(_tabularType);

            _outerTabularType = Tabular.Type("Outer table", "Outer table")
                                .WithIndexColumn("ID", "Unique ID").TypedAs(SimpleType.Integer)
                                .WithColumn("Value", "Tabular value").TypedAs(
                Tabular.Type("Inner table", "Inner table")
                .WithIndexColumn("ID", "Unique ID").TypedAs(SimpleType.Integer)
                .WithColumn("Name", "Name").TypedAs(SimpleType.String)
                .WithColumn("CompositeValue", "Composite Value").TypedAs(
                    Composite.Type("Composite value", "Composite value")
                    .WithItem("Item1", "Item 2").TypedAs(SimpleType.Integer)
                    .WithItem("Item2", "Item 2").TypedAs(SimpleType.Boolean)
                    .WithItem("Item3", "Item 3").TypedAs(
                        Composite.Type("Nested", "Nested composite")
                        .WithItem("NestedItem1", "NestedItem1").TypedAs(SimpleType.String)
                        .WithItem("NestedItem2", "NestedItem2").TypedAs(SimpleType.Double))));

            _nestedTabularValue = new TabularDataSupport(_outerTabularType);

            _beanInfoGetter = MBean.Info <OpenDynamic>("Sample dynamic MBean")
                              .WithAttributes(
                MBean.WritableAttribute("Attribute", "Sample attribute").TypedAs(TabularType),
                MBean.WritableAttribute("NestedTableAttribute", "Nested Table Attribute").TypedAs(NestedTabularType)
                )
                              .WithOperations(
                MBean.MutatorOperation("DoSomething", "Does somthing").WithParameters(
                    MBean.Parameter("First", "First parameter").TypedAs(SimpleType.Double),
                    MBean.Parameter("Second", "Second parameter").TypedAs(TabularType)
                    ).Returning(SimpleType.Void)
                )
                              .AndNothingElse();
        }