1 // 2 // Copyright (c) 2010-2018 Antmicro 3 // 4 // This file is licensed under the MIT License. 5 // Full license text is available in 'licenses/MIT.txt'. 6 // 7 using System; 8 9 namespace Antmicro.Renode.PlatformDescription 10 { 11 public class ConversionResult 12 { ConversionResult(ConversionResultType resultType, ParsingError error, string message)13 public ConversionResult(ConversionResultType resultType, ParsingError error, string message) 14 { 15 ResultType = resultType; 16 Error = error; 17 Message = message; 18 } 19 20 public static ConversionResult Success 21 { 22 get 23 { 24 return new ConversionResult(ConversionResultType.ConversionSuccessful, default(ParsingError), default(string)); 25 } 26 } 27 28 public static ConversionResult ConversionNotApplied 29 { 30 get 31 { 32 return new ConversionResult(ConversionResultType.ConversionNotApplied, default(ParsingError), default(string)); 33 } 34 } 35 36 public ConversionResultType ResultType { get; private set; } 37 public ParsingError Error { get; private set; } 38 public string Message { get; private set; } 39 } 40 } 41