当前位置: 首页>>代码示例>>C#>>正文


C# IGraph.GetUriNode方法代码示例

本文整理汇总了C#中IGraph.GetUriNode方法的典型用法代码示例。如果您正苦于以下问题:C# IGraph.GetUriNode方法的具体用法?C# IGraph.GetUriNode怎么用?C# IGraph.GetUriNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IGraph的用法示例。


在下文中一共展示了IGraph.GetUriNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetConfigurationObject

        public static object GetConfigurationObject(IGraph configurationGraph, string id)
        {
#if PORTABLE
            // Bug in portable class library - if id is a fragment identifier the URI is not combined correctly
            Uri targetUri = id.StartsWith("#") ? new Uri(configurationGraph.BaseUri + id) : new Uri(configurationGraph.BaseUri, id);
#else
            var targetUri = new Uri(configurationGraph.BaseUri, id);
#endif
            var configNode = configurationGraph.GetUriNode(targetUri);
            return configNode == null ? null : ConfigurationLoader.LoadObject(configurationGraph, configNode);
        }
开发者ID:GTuritto,项目名称:BrightstarDB,代码行数:11,代码来源:DotNetRdfConfigurationHelper.cs

示例2: FindObject

        /// <summary>
        /// Finds whether there is any Handler Configuration for a wildcard path that the current request path matches
        /// </summary>
        /// <param name="g">Configuration Graph</param>
        /// <param name="requestUri">Request URI</param>
        /// <param name="matchedPath">The resulting matched path</param>
        /// <returns></returns>
        public static INode FindObject(IGraph g, Uri requestUri, out String matchedPath)
        {
            int pathSegments = requestUri.Segments.Length;
            for (int s = pathSegments; s > -1; s--)
            {
                String path = String.Join(String.Empty, requestUri.Segments, 0, s) + "*";
                String objUri = "dotnetrdf:" + path;
                INode temp = g.GetUriNode(UriFactory.Create(objUri));
                if (temp != null)
                {
                    matchedPath = path;
                    return temp;
                }
            }

            matchedPath = null;
            return null;
        }
开发者ID:jmahmud,项目名称:RDFer,代码行数:25,代码来源:WebConfigurationLoader.cs

示例3: GetConfigurationObject

 public static object GetConfigurationObject(IGraph configurationGraph, string id)
 {
     var configNode = configurationGraph.GetUriNode(new Uri(configurationGraph.BaseUri, id));
     return configNode == null ? null : ConfigurationLoader.LoadObject(configurationGraph, configNode);
 }
开发者ID:kowalot,项目名称:BrightstarDB,代码行数:5,代码来源:DotNetRdfConfigurationHelper.cs


注:本文中的IGraph.GetUriNode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。