Exemplo n.º 1
0
        /// <summary>
        /// Handles the GetWheels test method.
        /// </summary>
        public Wheel[] OnGetWheels(OperationContext context, NodeSource target, Vehicle vehicle)
        {
            GenericEvent e = GenericEvent.Construct(Server, new NodeId(ObjectTypes.MaintenanceEventType, GetNamespaceIndex(Namespaces.Sample)));

            e.InitializeNewEvent();
            e.Message.Value = "Some unknown problem.";
            e.SetProperty(new QualifiedName(BrowseNames.MustCompleteByDate, GetNamespaceIndex(Namespaces.Sample)), new DateTime(1987, 2, 3));

            ReportEvent(e);

            return(vehicle.Wheels.ToArray());
        }