Code Red > .NET

ApplicationServices.Application VS ApplicationServices.Core.Application

(1/2) > >>

Going through some of my older code :
I'm finding I have various Alias declarations for AcadApp :-

--- Code - C#: ---using AcadApp = Autodesk.AutoCAD.ApplicationServices.Core.Application;and

--- Code - C#: ---using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;
I have a preference for the  ApplicationServices.Core.Application simply because it's the base class for ApplicationServices.Application
. . . but I'm wondering if it really makes a difference either way.

Has anyone done any research on this, or have a reasoned opinion ??


I would tend to use :

--- Code - C#: ---using AcAp = Autodesk.AutoCAD.ApplicationServices.Application;because the Autodesk.AutoCAD.ApplicationServices.Core.Application class does not expose some methods I commonly use such as ShowModal.Dialog which warrants an alias to avoid confusion with System.Windows.Forms.Application.
I don't think using ApplicationServices.Application where one could use ApplicationServices.Core.Application has any real impact on code execution.

But we can also use two aliases:

--- Code - C#: ---using AcAp = Autodesk.AutoCAD.ApplicationServices.Application;using AcCoreAp = Autodesk.AutoCAD.ApplicationServices.Core.Application;

Hi Gilles,
Sitting outside in the sunshine this afternoon I decided to go not us the Core.Application.
As you say, I too think the impact either way will be minimal.

I'll save my worrying for important things.

beck's bolero:
I concur
I also dropped coding this morning to go out in the sunshine. Went to Singapore’s botanic garden

Well, if you write code that is generally intent to be shared by possible core console/Forge (now, called Platform), you may want to make sure you only use ...Core.Application, because you do not use acmgd.dll in plugins for core console/Forge.


[0] Message Index

[#] Next page

Go to full version