예제 #1
0
 internal static ObjectElement CreateObject(TranslatableElement fieldName, string className)
 {
     return(new ObjectElement {
         Type = Types.Object,
         Name = fieldName,
         ClassName = className
     });
 }
예제 #2
0
        internal ObjectElement ExploreObject(TranslatableElement fieldName, object obj)
        {
            // Create the element then replace its Name
            var element = ExploreObject("", obj);

            element.Name = fieldName;
            return(element);
        }
예제 #3
0
 internal static ObjectElement CreateField(TranslatableElement fieldName, string className, object value)
 {
     return(new ObjectElement {
         Type = Types.Field,
         Name = fieldName,
         ClassName = className,
         Value = value
     });
 }
예제 #4
0
 internal static ObjectElement CreateException(TranslatableElement message, string className, string[] stackTrace)
 {
     System.Diagnostics.Debug.Assert(stackTrace != null, "Argument 'stackTrace' is not specified");
     return(new ObjectElement {
         Type = Types.Exception,
         StackTrace = stackTrace,
         Value = message,
         ClassName = className
     });
 }
예제 #5
0
 public SerializableTranslatable(TranslatableElement translatable)
 {
     Key = translatable.TextKey;
     if (translatable.Parameters != null)
     {
         Parameters = new SerializablePrimitive[translatable.Parameters.Length];
         for (int i = 0; i < Parameters.Length; ++i)
         {
             Parameters[i] = new SerializablePrimitive(translatable.Parameters[i]);
         }
     }
 }
예제 #6
0
        public Manager AddData(TranslatableElement key, object value)
        {
            System.Diagnostics.Debug.Assert(Tree != null, "The property 'Tree' is not supposed to be null");

            // Insert a new field right before the exception list
            var explorer = new ObjectExplorer();
            var element  = explorer.ExploreObject(key, value);

            Tree.Children.Insert(GetFirstExceptionIndex(), element);

            return(this);
        }
예제 #7
0
            public TranslatableElement CreateTranslatableElement()
            {
                var translatable = new TranslatableElement {
                    TextKey = Key
                };

                if (Parameters != null)
                {
                    var parameters = new object[Parameters.Length];
                    for (int i = 0; i < Parameters.Length; ++i)
                    {
                        parameters[i] = Parameters[i].Value;
                    }
                    translatable.Parameters = parameters;
                }
                return(translatable);
            }
예제 #8
0
 public TranslatableElement CreateTranslatableElement()
 {
     var translatable = new TranslatableElement{ TextKey = Key };
     if( Parameters != null )
     {
         var parameters = new object[ Parameters.Length ];
         for( int i=0; i<Parameters.Length; ++i )
             parameters[ i ] = Parameters[ i ].Value;
         translatable.Parameters = parameters;
     }
     return translatable;
 }
예제 #9
0
 public SerializableTranslatable(TranslatableElement translatable)
 {
     Key = translatable.TextKey;
     if( translatable.Parameters != null )
     {
         Parameters = new SerializablePrimitive[ translatable.Parameters.Length ];
         for( int i=0; i<Parameters.Length; ++i )
             Parameters[ i ] = new SerializablePrimitive( translatable.Parameters[i] );
     }
 }
예제 #10
0
 internal ObjectElement ExploreObject(TranslatableElement fieldName, object obj)
 {
     // Create the element then replace its Name
     var element = ExploreObject( "", obj );
     element.Name = fieldName;
     return element;
 }
예제 #11
0
 public BaseException(TranslatableElement message)
     : base(message.TextKey)
 {
     Init( message );
 }
예제 #12
0
 internal static ObjectElement CreateField(TranslatableElement fieldName, string className, object value)
 {
     return new ObjectElement {
         Type = Types.Field,
         Name = fieldName,
         ClassName = className,
         Value = value };
 }
예제 #13
0
 public BaseException(TranslatableElement message) : base(message.TextKey)
 {
     Init(message);
 }
예제 #14
0
 public BaseException(TranslatableElement message, Exception innerException)
     : base(message.TextKey, innerException)
 {
     Init( message );
 }
예제 #15
0
 public BaseException(TranslatableElement message, Exception innerException) : base(message.TextKey, innerException)
 {
     Init(message);
 }
예제 #16
0
 internal static ObjectElement CreateException(TranslatableElement message, string className, string[] stackTrace)
 {
     System.Diagnostics.Debug.Assert( stackTrace != null, "Argument 'stackTrace' is not specified" );
     return new ObjectElement {
         Type = Types.Exception,
         StackTrace = stackTrace,
         Value = message,
         ClassName = className };
 }
예제 #17
0
 private void Init(TranslatableElement message)
 {
     ObjectData          = new Dictionary <string, object>();
     TranslatableMessage = message;
 }
예제 #18
0
 internal static ObjectElement CreateObject(TranslatableElement fieldName, string className)
 {
     return new ObjectElement {
         Type = Types.Object,
         Name = fieldName,
         ClassName = className };
 }
예제 #19
0
 private void Init(TranslatableElement message)
 {
     ObjectData = new Dictionary<string,object>();
     TranslatableMessage = message;
 }