--- /dev/null
+using System;
+
+namespace mutil {
+
+public interface MessageToolImpl{
+ void send(string message);
+}
+public class MessageTool : MessageToolImpl {
+ // strategy pattern
+ //private messageToolImpl MessageToolImpl = null;
+ public MessageToolImpl MessageToolImpl {private get; set;}
+
+ public void send(string message) {
+ if (MessageToolImpl == null) throw new System.Exception("set MessageToolImpl before sending a message.");
+ MessageToolImpl.send(message);
+ }
+ // singleton
+ static private MessageTool theInstance = null;
+
+ static public MessageTool getInstance() {
+ if (theInstance == null) theInstance = new MessageTool();
+ return theInstance;
+ }
+}
+
+public class ConsoleMessageTool : MessageToolImpl {
+ public void send(string message) {
+ Console.WriteLine(message);
+ }
+}
+
+} // namespace
\ No newline at end of file
--- /dev/null
+using System;
+
+namespace mutil {
+
+ public class ReturnCode {
+ public const int OK = 0;
+ public const int FileNotFound = 1;
+
+ int RC;
+ public ReturnCode(int RC) {
+ this.RC = RC;
+ }
+ override public string ToString() {
+ switch (this.RC) {
+ case OK : return "OK";
+ case FileNotFound: return "FileNotFound";
+ default: throw new System.Exception("Unknown RC: " + Convert.ToString(this.RC));
+ }
+ }
+ }
+}
\ No newline at end of file
-mdoc (0.2-%BUILD%) unstable; urgency=medium
+mdoc (0.2) unstable; urgency=medium
* better error messages
+ * new features in mutil.dll: Configuration
-- Michael Wagner <michael@wagnertech.de> Fri, 26 May 2023 16:54:48 +0100
-mdoc (0.1-%BUILD%) unstable; urgency=medium
+mdoc (0.1) unstable; urgency=medium
* C# port for mmailc
-- Michael Wagner <michael@wagnertech.de> Fri, 30 Dec 2022 16:54:48 +0100
set -e
pushd csharp/mDoc >/dev/null
- ln -s /usr/share/mbuild/makefile .
+ ln -sf /usr/share/mbuild/makefile .
echo "SOURCES=\\" >> make.pre
find . -name "*.cs" -exec echo " "{}" \\" >> make.pre \;
echo >> make.pre
popd >/dev/null
pushd csharp/mutil >/dev/null
- ln -s /usr/share/mbuild/makefile .
+ ln -sf /usr/share/mbuild/makefile .
echo "SOURCES=\\" >> make.pre
find . -name "*.cs" -exec echo " "{}" \\" >> make.pre \;
echo >> make.pre
popd >/dev/null
pushd csharp/mDocLib >/dev/null
- ln -s /usr/share/mbuild/makefile .
+ ln -sf /usr/share/mbuild/makefile .
echo "SOURCES=\\" >> make.pre
find . -name "*.cs" -exec echo " "{}" \\" >> make.pre \;
echo >> make.pre