private InitializeFromTypeAndPath ( ModelType rootType, string path, ModelProperty &sourceProperty ) : bool | ||
rootType | ModelType | The root type name, which is required for instance paths |
path | string | The source path, which is either an instance path or a static path |
sourceProperty | ModelProperty | |
Résultat | bool |
/// <summary> /// Attempts to create a new <see cref="ModelSource"/> for the specified root type and path. /// </summary> /// <param name="rootType">The root type name, which is required for instance paths</param> /// <param name="path">The source path, which is either an instance path or a static path</param> /// <returns>True if the source was created, otherwise false</returns> public static bool TryGetSource(ModelType rootType, string path, out ModelSource source, out ModelProperty sourceProperty) { source = new ModelSource(); if (source.InitializeFromTypeAndPath(rootType, path, out sourceProperty)) { return(true); } else { source = null; return(false); } }
/// <summary> /// Attempts to create a new <see cref="ModelSource"/> for the specified root type and path. /// </summary> /// <param name="rootType">The root type name, which is required for instance paths</param> /// <param name="path">The source path, which is either an instance path or a static path</param> /// <returns>True if the source was created, otherwise false</returns> public static bool TryGetSource(ModelType rootType, string path, out ModelSource source, out ModelProperty sourceProperty) { source = new ModelSource(); if (source.InitializeFromTypeAndPath(rootType, path, out sourceProperty)) return true; else { source = null; return false; } }