Beispiel #1
0
        private static string GetApplicationVersion()
        {
            if (!String.IsNullOrEmpty(Instance().ApplicationVersion))
            {
                return(Instance().ApplicationVersion);
            }

            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo($@"{scaleUnit.ServiceVolume}\AOSService\PackagesLocalDirectory\ApplicationSuite\bin\Microsoft.Dynamics.AX.DemandPlanning.Azure.dll");

            Instance().ApplicationVersion = versionInfo.FileVersion;

            return(Instance().ApplicationVersion);
        }
 private ScaleUnitContext(string scaleUnitId)
 {
     this.scaleUnitId = scaleUnitId;
     instance         = this;
 }
 public void Dispose()
 {
     instance = null;
 }