Exemple #1
0
        static public string ReadText(this Nook item)
        {
            string text;

            item.TryReadText(out text);
            return(text);
        }
Exemple #2
0
        static public bool MoveTo(this Nook item, Nook dst_nook)
        {
            if (item.CopyTo(dst_nook))
            {
                item.Delete();
                return(true);
            }

            return(false);
        }
Exemple #3
0
        static public bool CopyTo(this Nook item, Nook dst_nook)
        {
            bool result = false;

            item.Read(delegate(Stream src_stream) {
                result = dst_nook.WriteFromStream(src_stream);
            });

            return(result);
        }
Exemple #4
0
        static public bool TryReadText(this Nook item, out string text)
        {
            string temp   = null;
            bool   result = item.Read(delegate(Stream stream) {
                temp = stream.ReadText();
            });

            text = temp;
            return(result);
        }
Exemple #5
0
        static public Nook GetChangeNook(this NookSystem item, string path, Nook src_nook)
        {
            Nook dst_nook = item.GetNook(path);

            if (src_nook != null && src_nook.IsPresent())
            {
                src_nook.MoveTo(dst_nook);
            }

            return(dst_nook);
        }
Exemple #6
0
 public Nook_Monitored(Nook n)
 {
     nook         = n;
     nook_monitor = nook.CreateNookMonitor();
 }
Exemple #7
0
 public NookMonitor(Nook n)
 {
     nook = n;
 }
Exemple #8
0
 static public NookMonitor CreateNookMonitor(this Nook item)
 {
     return(new NookMonitor(item));
 }
Exemple #9
0
 public Nook_Pair(Nook d, Nook s)
 {
     dominate_nook   = new Nook_Monitored(d);
     submissive_nook = new Nook_Monitored(s);
 }
Exemple #10
0
 static public bool WriteFromStream(this Nook item, Stream src_stream)
 {
     return(item.Write(delegate(Stream dst_stream) {
         dst_stream.WriteStream(src_stream);
     }));
 }
Exemple #11
0
 static public bool WriteEmpty(this Nook item)
 {
     return(item.Write(delegate(Stream stream) { }));
 }
Exemple #12
0
 static public bool WriteData(this Nook item, byte[] data)
 {
     return(item.Write(delegate(Stream stream) {
         stream.Write(data);
     }));
 }
Exemple #13
0
 static public bool WriteText(this Nook item, string text)
 {
     return(item.Write(delegate(Stream stream) {
         stream.WriteText(text);
     }));
 }
Exemple #14
0
 public Nook_Pair_Shadowed(Nook d, Nook s) : base(d, s)
 {
 }
Exemple #15
0
 public Nook_Pair_Linked(Nook d, Nook s) : base(d, s)
 {
 }
Exemple #16
0
 static public bool ReadIntoStream(this Nook item, Stream dst_stream)
 {
     return(item.Read(delegate(Stream src_stream) {
         dst_stream.WriteStream(src_stream);
     }));
 }