src/Misc/EFTools/XmlCore/Model/ModelManager.cs
/// <summary>
///     Get the EFArtifact for a particular Uri or load it if it hasn't been loaded.
/// </summary>
/// <param name="uri"></param>
/// <param name="provider">This should alway be NULL except for our unit tests</param>
/// <remarks>virtual for testing</remarks>
Get the EFArtifact for a particular Uri or load it if it hasn't been loaded.
Get the EFArtifact for a particular Uri or load it if it hasn ' t been loaded .
internal virtual EFArtifact GetNewOrExistingArtifact(Uri uri, XmlModelProvider xmlModelProvider)
        {
            lock (this)
            {
                var result = GetArtifact(uri);
                if (result == null)
                {
                    var artifacts = Load(uri, xmlModelProvider);
                    if (artifacts != null)
                    {
                        result = artifacts.Where(a => a.Uri == uri).FirstOrDefault();
                    }
                }
                return result;
            }
        }
internal virtual EFArtifact GetNewOrExistingArtifact ( Uri uri , XmlModelProvider xmlModelProvider ) { lock ( this ) { var result = GetArtifact ( uri ) ; if ( result == null ) { var artifacts = Load ( uri , xmlModelProvider ) ; if ( artifacts != null ) { result = artifacts . Where ( a => a . Uri == uri ) . FirstOrDefault ( ) ; } } return result ; } }
Get the EFArtifact for a particular Uri or load it if it hasn't been loaded.
Get the EFArtifact for a particular Uri or load it if it hasn ' t been loaded .
// Loading an artifact might cause related artifacts to be automatically loaded.
uri
Uri
None
xmlModelProvider
XmlModelProvider
<not_specific>
provider
<not_specific>
This should alway be NULL except for our unit tests
This should alway be NULL except for our unit tests
remarks
virtual for testing
virtual for testing