예제 #1
0
        public static string GetDataSourceName(DocumentNode dataSourceNode)
        {
            string str = (string)null;

            if (dataSourceNode != null)
            {
                DocumentCompositeNode parent = dataSourceNode.Parent;
                if (parent != null && PlatformTypes.DictionaryEntry.IsAssignableFrom((ITypeId)parent.Type))
                {
                    DocumentNode resourceEntryKey = DocumentNodeHelper.GetResourceEntryKey(parent);
                    if (resourceEntryKey != null)
                    {
                        str = DocumentPrimitiveNode.GetValueAsString(resourceEntryKey);
                    }
                }
                if (string.IsNullOrEmpty(str))
                {
                    str = dataSourceNode.Type.Name + (object)" " + (string)(object)dataSourceNode.GetHashCode();
                }
            }
            return(str ?? string.Empty);
        }
예제 #2
0
 public static DocumentNode GetResourceEntryKey(DocumentCompositeNode entryNode)
 {
     return(DocumentNodeHelper.GetResourceEntryKey(entryNode));
 }