public void InterfaceAnnotations() { AllJoyn.QStatus status = AllJoyn.QStatus.FAIL; AllJoyn.BusAttachment bus = null; bus = new AllJoyn.BusAttachment("InterfaceDescriptionTest", true); Assert.NotNull(bus); // create the interface AllJoyn.InterfaceDescription testIntf = null; status = bus.CreateInterface(INTERFACE_NAME, out testIntf); Assert.Equal(AllJoyn.QStatus.OK, status); Assert.NotNull(testIntf); status = testIntf.AddAnnotation("org.alljoyn.test.annotation.one", "here"); Assert.Equal(AllJoyn.QStatus.OK, status); status = testIntf.AddAnnotation("org.alljoyn.test.annotation.two", "lies"); Assert.Equal(AllJoyn.QStatus.OK, status); status = testIntf.AddAnnotation("org.alljoyn.test.annotation.three", "some"); Assert.Equal(AllJoyn.QStatus.OK, status); status = testIntf.AddAnnotation("org.alljoyn.test.annotation.four", "amazing"); Assert.Equal(AllJoyn.QStatus.OK, status); status = testIntf.AddAnnotation("org.alljoyn.test.annotation.five", "treasure"); Assert.Equal(AllJoyn.QStatus.OK, status); // activate the interface testIntf.Activate(); string value = ""; Assert.True(testIntf.GetAnnotation("org.alljoyn.test.annotation.one", ref value)); Assert.Equal("here", value); Dictionary <string, string> annotations = testIntf.GetAnnotations(); Assert.Equal(5, annotations.Count); Assert.True(annotations.TryGetValue("org.alljoyn.test.annotation.one", out value)); Assert.Equal("here", value); Assert.True(annotations.TryGetValue("org.alljoyn.test.annotation.two", out value)); Assert.Equal("lies", value); Assert.True(annotations.TryGetValue("org.alljoyn.test.annotation.three", out value)); Assert.Equal("some", value); Assert.True(annotations.TryGetValue("org.alljoyn.test.annotation.four", out value)); Assert.Equal("amazing", value); Assert.True(annotations.TryGetValue("org.alljoyn.test.annotation.five", out value)); Assert.Equal("treasure", value); bus.Dispose(); }