public RepresentationInfo InfoFor(RepresentationObjectType objectType, string objectName)
        {
            var key = getKey(objectType, objectName);

            Start();
            return(_representationInfosCache[key] ?? new RepresentationInfo {
                DisplayName = objectName
            });
        }
        public RepresentationInfo InfoFor(RepresentationObjectType objectType, string objectName)
        {
            Start();
            string key = getKey(objectType, objectName);

            if (_representationInfosCache.Contains(key))
            {
                return(_representationInfosCache[key]);
            }

            return(new RepresentationInfo {
                DisplayName = objectName
            });
        }
 public string DisplayNameFor(RepresentationObjectType objectType, string objectName)
 {
     return(InfoFor(objectType, objectName).DisplayName);
 }
 public IEnumerable <RepresentationInfo> AllOfType(RepresentationObjectType objectType)
 {
     return(from reprInfo in All()
            where reprInfo.ObjectType == objectType
            select reprInfo);
 }
 private string getKey(RepresentationObjectType objectType, string objectName)
 {
     return(Enum.GetName(typeof(RepresentationObjectType), objectType) + ObjectPath.PATH_DELIMITER + objectName);
 }
 private string getKey(RepresentationObjectType objectType, string objectName) => $"{objectType}{ObjectPath.PATH_DELIMITER}{objectName}";
 public string DescriptionFor(RepresentationObjectType objectType, string objectName) => InfoFor(objectType, objectName).Description;
Exemplo n.º 8
0
 public PathElement PathElementFor(RepresentationObjectType objectType, string objectName) => InfoFor(objectType, objectName).ToPathElement();
 public string DescriptionFor(RepresentationObjectType objectType, string objectName)
 {
     return(objectName);
 }
 public RepresentationInfo InfoFor(RepresentationObjectType objectType, string objectName)
 {
     throw new NotSupportedException();
 }
 public IEnumerable <RepresentationInfo> AllOfType(RepresentationObjectType objectType)
 {
     throw new NotSupportedException();
 }