Esempio n. 1
0
 private static ISafeString GetSut(ITextService textService = null,
                                   IFactory <ISafeString> safeStringFactory = null,
                                   ISafeStringToStringMarshaler marshaler   = null)
 {
     return(new SafeString(
                textService ?? Stubs.Get <ITextService>(),
                safeStringFactory ?? Stubs.GetFactory <ISafeString>(),
                Stubs.GetFactory <ISafeBytes>(),
                marshaler ?? Stubs.Get <ISafeStringToStringMarshaler>()));
 }
Esempio n. 2
0
 internal SafeString(
     ITextService textService,
     IFactory <ISafeString> safeStringFactory,
     IFactory <ISafeBytes> safeBytesFactory,
     ISafeStringToStringMarshaler marshaler)
 {
     _textService       = textService ?? throw new ArgumentNullException(nameof(textService));
     _safeStringFactory = safeStringFactory ?? throw new ArgumentNullException(nameof(safeStringFactory));
     _safeBytesFactory  = safeBytesFactory ?? throw new ArgumentNullException(nameof(safeBytesFactory));
     _marshaler         = marshaler ?? throw new ArgumentNullException(nameof(marshaler));
     _charBytesList     = new List <ISafeBytes>();
 }