internal static EnvDTE.CodeModel Create( CodeModelState state, EnvDTE.Project parent, ProjectId projectId ) { var rootCodeModel = new RootCodeModel(state, parent, projectId); return((EnvDTE.CodeModel)ComAggregate.CreateAggregatedObject(rootCodeModel)); }
public EnvDTE.CodeModel GetOrCreateRootCodeModel(EnvDTE.Project parent) { if (_zombied) { Debug.Fail("Cannot access root code model after code model was shutdown!"); throw Exceptions.ThrowEUnexpected(); } _rootCodeModel ??= RootCodeModel.Create(State, parent, _projectId); return(_rootCodeModel); }
public EnvDTE.CodeModel GetOrCreateRootCodeModel(EnvDTE.Project parent) { if (this.IsZombied) { Debug.Fail("Cannot access root code model after code model was shutdown!"); throw Exceptions.ThrowEUnexpected(); } if (_rootCodeModel == null) { _rootCodeModel = RootCodeModel.Create(_state, parent, _project.Id); } return(_rootCodeModel); }