Opc.Ua.Profiles.NormalizeUri C# (CSharp) Method

NormalizeUri() public static method

Converts the URI to a URI that can be used for comparison.
public static NormalizeUri ( string profileUri ) : string
profileUri string The profile URI.
return string
        public static string NormalizeUri(string profileUri)
        {
            if (System.String.IsNullOrEmpty(profileUri))
            {
                return profileUri;
            }

            return profileUri;
        }
    }

Usage Example

コード例 #1
0
        /// <summary>
        /// Loads a collection of endpoints from a stream.
        /// </summary>
        public static ConfiguredEndpointCollection Load(Stream istrm)
        {
            try
            {
                DataContractSerializer       serializer = new DataContractSerializer(typeof(ConfiguredEndpointCollection));
                ConfiguredEndpointCollection endpoints  = serializer.ReadObject(istrm) as ConfiguredEndpointCollection;

                if (endpoints != null)
                {
                    foreach (ConfiguredEndpoint endpoint in endpoints)
                    {
                        if (endpoint.Description != null)
                        {
                            endpoint.Description.TransportProfileUri = Profiles.NormalizeUri(endpoint.Description.TransportProfileUri);
                        }
                    }
                }

                return(endpoints);
            }
            catch (Exception e)
            {
                Utils.Trace(e, "Unexpected error loading ConfiguredEnpoints.");
                throw e;
            }
        }
All Usage Examples Of Opc.Ua.Profiles::NormalizeUri