src/Misc/EFTools/EntityDesign/VisualStudio/EFModelErrorTaskNavigator.cs
// <summary>
//     Loads document in an temporary model manager to see if it is designer safe.
// </summary>
Loads document in an temporary model manager to see if it is designer safe.
Loads document in an temporary model manager to see if it is designer safe .
private static bool IsUnloadedDocumentDesignerSafe(Uri uri)
        {
            Debug.Assert(uri != null, "uri is null");
            using (var tempModelManager = new EntityDesignModelManager(new EFArtifactFactory(), new VSArtifactSetFactory()))
            {
                using (var xmlModelProvider = new StandaloneXmlModelProvider(PackageManager.Package))
                {
                    var artifact = tempModelManager.GetNewOrExistingArtifact(uri, xmlModelProvider);
                    Debug.Assert(artifact != null, "failed to get the artifact to determine if it is designer-safe");
                    if (artifact == null)
                    {
                        return true;
                    }
                    artifact.DetermineIfArtifactIsDesignerSafe();
                    return artifact.IsDesignerSafe;
                }
            }
        }
private static bool IsUnloadedDocumentDesignerSafe ( Uri uri ) { Debug . Assert ( uri != null , " " ) ; using ( var tempModelManager = new EntityDesignModelManager ( new EFArtifactFactory ( ) , new VSArtifactSetFactory ( ) ) ) { using ( var xmlModelProvider = new StandaloneXmlModelProvider ( PackageManager . Package ) ) { var artifact = tempModelManager . GetNewOrExistingArtifact ( uri , xmlModelProvider ) ; Debug . Assert ( artifact != null , " " ) ; if ( artifact == null ) { return true ; } artifact . DetermineIfArtifactIsDesignerSafe ( ) ; return artifact . IsDesignerSafe ; } } }
Loads document in an temporary model manager to see if it is designer safe.
Loads document in an temporary model manager to see if it is designer safe .
uri
Uri