コード例 #1
0
        private static ITypeSpec GetSpecificationFromObjectId(this INakedObjectsFramework framework, string[] asArray, out string[] restOfArray)
        {
            string    typeName = TypeNameUtils.DecodeTypeName(HttpUtility.UrlDecode(asArray.First()));
            ITypeSpec spec     = framework.MetamodelManager.GetSpecification(typeName);

            restOfArray = asArray.ToArray();
            return(spec);
        }
コード例 #2
0
        private IOid RestoreGenericOid(string[] encodedData)
        {
            string    typeName = TypeNameUtils.DecodeTypeName(HttpUtility.UrlDecode(encodedData.First()));
            ITypeSpec spec     = metamodel.GetSpecification(typeName);

            if (spec.IsCollection)
            {
                return(new CollectionMemento(this, nakedObjectManager, metamodel, encodedData));
            }

            if (spec.ContainsFacet <IViewModelFacet>())
            {
                return(new ViewModelOid(metamodel, encodedData));
            }

            return(spec.ContainsFacet <IComplexTypeFacet>() ? new AggregateOid(metamodel, encodedData) : null);
        }
コード例 #3
0
 private IdentifierImpl(IMetamodel metamodel, string className, string fieldName, string[] parameterNames, string[] parameterTypeNames, bool isField)
 {
     this.className = className;
     name           = fieldName;
     parameterTypes = parameterTypeNames;
     MemberParameterSpecifications = parameterTypes.Select(x => metamodel.GetSpecification(TypeNameUtils.DecodeTypeName(x))).ToArray();
     this.parameterNames           = parameterNames;
     this.isField = isField;
 }