-
Notifications
You must be signed in to change notification settings - Fork 634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DYN-5816 locale splash screen #14118
Changes from 25 commits
18c74c4
2ebe836
9614f08
b265118
4766900
7194409
fe25ed1
f27f2de
49cfc60
4da1ea6
695628c
1fb48cb
db89a94
fb647ec
777f584
4c42d65
7dd7321
06bbbd4
1aefe4a
2ce8be4
d229f81
0b3902f
1f449e0
b63a8dd
2eab90c
9e1f6d9
b50b5e4
ff3862c
6fc2258
e81b146
9da3a1f
f4bafcd
7ed64f7
4dfdef4
7252051
1ddba71
84e111d
37620ba
1321eb7
8c3ee26
cc58ece
90e4a7f
1f0d671
e14ee63
fe980b9
4771ed4
33a5d63
e5e92ab
745a431
53d2218
2539d97
b630a38
06ea6c5
2caf714
c290e73
63e905a
87636bb
d10541a
549e3c2
162fe2c
d2f3731
5a22b9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,8 +48,15 @@ struct PathManagerParams | |
internal IPathResolver PathResolver { get; set; } | ||
} | ||
|
||
class PathManager : IPathManager | ||
public class PathManager : IPathManager | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to clarify that all of the public methods of this class (which were hidden before because the class was private) are now going to be exposed as public members of the class. Not sure if this was intended There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good point. @jesusalvino Does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @QilongTang I think keep it within the .Core namespace should be enough, I will take a look There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefer internal if possible! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guys this is the PR #14263 |
||
{ | ||
internal static Lazy<PathManager> | ||
lazy = | ||
new Lazy<PathManager> | ||
QilongTang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
(() => new PathManager(new PathManagerParams())); | ||
|
||
public static PathManager Instance { get { return lazy.Value; } } | ||
|
||
#region Class Private Data Members | ||
|
||
public const string PackagesDirectoryName = "packages"; | ||
|
@@ -70,7 +77,7 @@ class PathManager : IPathManager | |
private readonly int majorFileVersion; | ||
private readonly int minorFileVersion; | ||
private readonly string dynamoCoreDir; | ||
private readonly string hostApplicationDirectory; | ||
private string hostApplicationDirectory; | ||
QilongTang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
private readonly string userDataDir; | ||
private readonly string commonDataDir; | ||
|
||
|
@@ -86,10 +93,10 @@ class PathManager : IPathManager | |
private readonly List<string> rootDirectories; | ||
private readonly HashSet<string> nodeDirectories; | ||
private readonly HashSet<string> additionalResolutionPaths; | ||
private readonly HashSet<string> preloadedLibraries; | ||
QilongTang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
private HashSet<string> preloadedLibraries; | ||
private readonly HashSet<string> extensionsDirectories; | ||
private readonly HashSet<string> viewExtensionsDirectories; | ||
private readonly IPathResolver pathResolver; | ||
private IPathResolver pathResolver; | ||
|
||
#endregion | ||
|
||
|
@@ -274,6 +281,11 @@ public int MinorFileVersion | |
get { return minorFileVersion; } | ||
} | ||
|
||
public bool HasPathResolver | ||
QilongTang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
get { return pathResolver != null; } | ||
} | ||
|
||
public void AddResolutionPath(string path) | ||
{ | ||
if (string.IsNullOrEmpty(path)) | ||
|
@@ -346,6 +358,18 @@ public bool ResolveDocumentPath(ref string document) | |
|
||
#region Public Class Operational Methods | ||
|
||
/// <summary> | ||
/// Assigns an IPathResolver on demand with the same behavior as the Ctor. | ||
/// </summary> | ||
/// <param name="resolver"></param> | ||
internal void AssignIPathResolver(IPathResolver resolver) | ||
{ | ||
hostApplicationDirectory = string.Empty; | ||
QilongTang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
pathResolver = resolver; | ||
preloadedLibraries = new HashSet<string>(); | ||
QilongTang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
LoadPathsFromResolver(); | ||
} | ||
|
||
/// <summary> | ||
/// Constructs an instance of PathManager object. | ||
/// </summary> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested in DynamoRevit yet? These string.empty params later will cause certain folder property to be missing. For sandbox it is OK but for integration case, we get these from the integration code. Unless you meant to not reuse the same pathResolver later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QilongTang Works fine in Revit. Jesus has tested it.
@jesusalvino Can you expand why we are just initializing pathResolver with the empty arguments here? I see that you are setting the pathResolver correctly in DynamoModel constructor(Line 674)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this function not called by integrators, if not, then probably OK this way