crashanalysercmd/Libraries/File Formats/Plugins/DExcPlugin/Descriptor/DExcDescriptor.cs
changeset 0 818e61de6cd1
equal deleted inserted replaced
-1:000000000000 0:818e61de6cd1
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 using System;
       
    18 using System.Text;
       
    19 using System.IO;
       
    20 using System.Reflection;
       
    21 using System.Collections.Generic;
       
    22 using CrashItemLib.PluginAPI;
       
    23 
       
    24 namespace DExcPlugin.Descriptor
       
    25 {
       
    26     internal class DExcDescriptor : CFFSourceAndConfidence
       
    27     {
       
    28         #region Constructors
       
    29         public DExcDescriptor( FileInfo aFile )
       
    30             : base( aFile )
       
    31 		{
       
    32             if ( StackFileExists )
       
    33             {
       
    34                 string stackFile = StackFileName;
       
    35                 base.AddAdditionalFile( new FileInfo( stackFile ) );
       
    36             }
       
    37         }
       
    38         #endregion
       
    39 
       
    40         #region From CISource
       
    41         public override Version ImplementorVersion
       
    42         {
       
    43             get
       
    44             {
       
    45                 Assembly assembly = Assembly.GetExecutingAssembly();
       
    46                 Version version = assembly.GetName().Version;
       
    47                 return version;
       
    48             }
       
    49         }
       
    50 
       
    51         public override string ImplementorName
       
    52         {
       
    53             get { return "D_EXC"; }
       
    54         }
       
    55         #endregion
       
    56 
       
    57         #region Constants
       
    58         public const string KFileExtensionStack = ".stk";
       
    59         #endregion
       
    60 
       
    61         #region Properties
       
    62         public string StackFileName
       
    63         {
       
    64             get
       
    65             {
       
    66                 string path = Path.GetDirectoryName( base.MasterFileName );
       
    67                 string fileName = Path.GetFileNameWithoutExtension( base.MasterFileName );
       
    68                 //
       
    69                 string ret = Path.Combine( path, fileName + KFileExtensionStack );
       
    70                 return ret;
       
    71             }
       
    72         }
       
    73 
       
    74         public bool StackFileExists
       
    75         {
       
    76             get
       
    77             {
       
    78                 string file = StackFileName;
       
    79                 return ( File.Exists( file ) );
       
    80             }
       
    81         }
       
    82 		#endregion
       
    83 
       
    84         #region Data members
       
    85 		#endregion
       
    86 	}
       
    87 }