public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { var systemName = controllerContext.GetAgentSystemName(); var metadata = _resolvers.GetAgentMetadata(systemName); var partName = controllerContext.GetPartName(); var descriptiveName = controllerContext.GetRouteValue<string>("descriptiveName"); IPartCollection partCollection; if (string.IsNullOrEmpty(partName)) { partCollection = metadata.GetPartCollectionByDescriptiveName(descriptiveName); } else { partCollection = metadata.GetPartCollectionContainingPartName(partName); } if (partCollection == null) { throw new PartCollectionNotFoundException(); } return partCollection; }
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { var systemName = controllerContext.GetAgentSystemName(); var partName = controllerContext.GetPartName(); var metadata = _resolvers.GetAgentMetadata(systemName); var agentPartMetadata = metadata.GetPartByTypeName(partName); if (agentPartMetadata == null) { throw new TypeMetadataNotFoundException(); } return agentPartMetadata; }
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { var systemName = controllerContext.GetAgentSystemName(); return _resolvers.GetAgentMetadata(systemName); }