Ejemplo n.º 1
0
        public IContentFilteredTopic CreateContentFilteredTopic(
            string name,
            ITopic relatedTopic,
            string filterExpression,
            params string[] expressionParameters)
        {
            IContentFilteredTopic contentFilteredTopic = null;

            Topic related = relatedTopic as Topic;

            if (relatedTopic != null)
            {
                using (SequenceStringMarshaler marshaler = new SequenceStringMarshaler())
                {
                    if (marshaler.CopyIn(expressionParameters) == DDS.ReturnCode.Ok)
                    {
                        IntPtr gapiPtr = Gapi.DomainParticipant.create_contentfilteredtopic(
                            GapiPeer,
                            name,
                            related.GapiPeer,
                            filterExpression,
                            marshaler.GapiPtr);
                        if (gapiPtr != IntPtr.Zero)
                        {
                            contentFilteredTopic = new ContentFilteredTopic(gapiPtr);
                        }
                    }
                }
            }

            return(contentFilteredTopic);
        }
Ejemplo n.º 2
0
        public ReturnCode DeleteContentFilteredTopic(IContentFilteredTopic t)
        {
            ReturnCode result = ReturnCode.BadParameter;

            ContentFilteredTopic contentFilteredTopic = t as ContentFilteredTopic;

            if (contentFilteredTopic != null)
            {
                result = Gapi.DomainParticipant.delete_contentfilteredtopic(
                    GapiPeer,
                    contentFilteredTopic.GapiPeer);
            }

            return(result);
        }
Ejemplo n.º 3
0
        public IContentFilteredTopic CreateContentFilteredTopic(
                string name,
                ITopic relatedTopic,
                string filterExpression,
                params string[] expressionParameters)
        {
            IContentFilteredTopic contentFilteredTopic = null;

            Topic related = relatedTopic as Topic;
            if (relatedTopic != null)
            {
                using (SequenceStringMarshaler marshaler = new SequenceStringMarshaler())
                {
                    if (marshaler.CopyIn(expressionParameters) == DDS.ReturnCode.Ok)
                    {
                        IntPtr gapiPtr = Gapi.DomainParticipant.create_contentfilteredtopic(
                                GapiPeer,
                                name,
                                related.GapiPeer,
                                filterExpression,
                                marshaler.GapiPtr);
                        if (gapiPtr != IntPtr.Zero)
                        {
                            contentFilteredTopic = new ContentFilteredTopic(gapiPtr);
                        }
                    }

                }
            }

            return contentFilteredTopic;
        }