Ejemplo n.º 1
0
        /// <summary> Broadcasts a message, prefixing wrapped lines. </summary>
        /// <param name="source"> List of players who will receive the message. </param>
        /// <param name="prefix"> Prefix to prepend to prepend to each line after the 1st,
        /// if any line-wrapping occurs. Does NOT get prepended to first line. </param>
        /// <param name="message"> String/message to send. </param>
        /// <returns> Number of players who received the message. </returns>
        public static int MessagePrefixed([NotNull] this IEnumerable <Player> source, [NotNull] string prefix, [NotNull] string message, [Optional] MessageType?type)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (prefix == null)
            {
                throw new ArgumentNullException("prefix");
            }
            if (message == null)
            {
                throw new ArgumentNullException("message");
            }
            if (type == null)
            {
                type = 0;
            }
            int i = 0;

            if (!MessageTypeUtil.Enabled() || message.Length >= 64)
            {
                type = MessageType.Chat;
            }
            foreach (Player player in source)
            {
                foreach (Packet packet in LineWrapper.WrapPrefixed(prefix, message, player.SupportsFullCP437, type.Value))
                {
                    player.Send(packet);
                    i++;
                }
            }
            return(i);
        }
Ejemplo n.º 2
0
        /// <summary> Broadcasts a message. </summary>
        /// <param name="source"> List of players who will receive the message. </param>
        /// <param name="except"> Player to exclude from the recepient list. </param>
        /// <param name="message"> String/message to send. </param>
        /// <returns> Number of players who received the message. </returns>
        public static int Message([NotNull] this IEnumerable <Player> source,
                                  [CanBeNull] Player except,
                                  MessageType type,
                                  [NotNull] string message)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (message == null)
            {
                throw new ArgumentNullException("message");
            }
            if (!MessageTypeUtil.Enabled() || message.Length >= 64)
            {
                type = MessageType.Chat;
            }
            int i = 0;

            foreach (Player player in source)
            {
                foreach (Packet packet in LineWrapper.Wrap(message, player.SupportsFullCP437, type))
                {
                    if (player == except)
                    {
                        continue;
                    }
                    player.Send(packet);
                    i++;
                }
            }
            return(i);
        }
Ejemplo n.º 3
0
        public void MultipleWrite()
        {
            var @out        = new AppendableStringBuilder();
            var lineWrapper = new LineWrapper(@out, "  ", 10);

            lineWrapper.Append("ab");
            lineWrapper.WrappingSpace(1);
            lineWrapper.Append("cd");
            lineWrapper.WrappingSpace(1);
            lineWrapper.Append("ef");
            lineWrapper.WrappingSpace(1);
            lineWrapper.Append("gh");
            lineWrapper.WrappingSpace(1);
            lineWrapper.Append("ij");
            lineWrapper.WrappingSpace(1);
            lineWrapper.Append("kl");
            lineWrapper.WrappingSpace(1);
            lineWrapper.Append("mn");
            lineWrapper.WrappingSpace(1);
            lineWrapper.Append("op");
            lineWrapper.WrappingSpace(1);
            lineWrapper.Append("qr");
            lineWrapper.Close();
            Assert.AreEqual("ab cd ef\n  gh ij kl\n  mn op qr", @out.ToString());
        }
Ejemplo n.º 4
0
 public void SSSTTT()
 {
     var    lines      = LineWrapper.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE);
     var    wrappers   = lines.Select(w => w.ToWrapper(Constants.DataObjectMap));
     var    myWrappers = wrappers.Where(w => w is BirthRegistrationInformationType).Select(w => w as BirthRegistrationInformationType).ToArray();
     var    withText   = myWrappers.Where(w => !string.IsNullOrEmpty(w.AdditionalBirthRegistrationText)).ToArray();
     var    noText     = myWrappers.Where(w => string.IsNullOrEmpty(w.AdditionalBirthRegistrationText)).ToArray();
     object o          = "";
 }
Ejemplo n.º 5
0
        public void OverlyLongLinesWithoutLeadingSpace()
        {
            var @out        = new AppendableStringBuilder();
            var lineWrapper = new LineWrapper(@out, "  ", 10);

            lineWrapper.Append("abcdefghijkl");
            lineWrapper.Close();
            Assert.AreEqual("abcdefghijkl", @out.ToString());
        }
Ejemplo n.º 6
0
 string CleanupColors(string value)
 {
     // Although ClassiCube in classic mode supports invalid colours,
     //  the original vanilla client crashes with invalid colour codes
     // Since it's impossible to identify which client is being used,
     //  just remove the ampersands to be on the safe side
     //  when text colours extension is not supported
     return(LineWrapper.CleanupColors(value, hasTextColors, hasTextColors));
 }
Ejemplo n.º 7
0
            public void ToWrapper_ShortString_PaddedCorrectly(
                [Values(10, 20, 87)] int length)
            {
                var line = new LineWrapper("222dok;o");

                MyLengthWrapper.Len = length;
                var ret = line.ToWrapper(MyLengthWrapper.GetMyLengthWrapperMap("222"));

                Assert.AreEqual(length, ret.Contents.Length);
            }
Ejemplo n.º 8
0
            public void Constructor_Parse_CorrectEnd()
            {
                var lines    = LineWrapper.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE);
                var wrappers = lines.Select(l => l.ToWrapper(Constants.DataObjectMap).Contents).ToArray();
                var newText  = string.Join("", wrappers);

                var parseResult = new ExtractParseResult(newText, Constants.DataObjectMap);
                var extract     = parseResult.ToExtract();

                Assert.AreEqual(lines.Last().Contents, extract.EndRecord);
            }
Ejemplo n.º 9
0
        public void ToWrapper()
        {
            //var txt = System.IO.File.ReadAllText(@"C:\Magenta Workspace\PART\Doc\Data Providers\CPR Direct\Test data\U12170-P opgavenr 110901 ADRNVN FE");
            //var txt = System.IO.File.ReadAllText(@"C:\Magenta Workspace\PART\Source\CprBroker\CPRDirect.Tests\Resources\Test\PNR_0909610028.txt", Constants.DefaultEncoding);
            var txt   = Properties.Resources.PNR_0909610028;
            var lines = LineWrapper.ParseBatch(txt);

            var line = lines.Where(l => l.Code == "017" && l.PNR == this.GetPNR()).First();
            var w    = line.ToWrapper(Constants.DataObjectMap);
            var ss   = "";
        }
 public void TestLines()
 {
     var lines      = LineWrapper.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE);
     var wrappers   = lines.Select(w => w.ToWrapper(Constants.DataObjectMap));
     var myWrappers = wrappers.Where(w => w is CurrentNameInformationType).Select(w => w as CurrentNameInformationType);
     var first      = myWrappers.Select(w => w.FirstNameMarker).Distinct().ToArray();
     var middle     = myWrappers.Select(w => w.MiddleNameMarker).Distinct().ToArray();
     var last       = myWrappers.Select(w => w.LastNameMarker).Distinct().ToArray();
     var allText    = myWrappers.Select(w => w.Contents).ToArray();
     var found      = myWrappers.Where(w => w.MiddleNameMarker == '*').First();
 }
Ejemplo n.º 11
0
        public void NospaceWrapMax()
        {
            var @out        = new AppendableStringBuilder();
            var lineWrapper = new LineWrapper(@out, "  ", 10);

            lineWrapper.Append("abcde");
            lineWrapper.ZeroWidthSpace(2);
            lineWrapper.Append("fghijk");
            lineWrapper.Close();
            Assert.AreEqual("abcde\n    fghijk", @out.ToString());
        }
Ejemplo n.º 12
0
        public void NoWrap()
        {
            var @out        = new AppendableStringBuilder();
            var lineWrapper = new LineWrapper(@out, "  ", 10);

            lineWrapper.Append("abcde");
            lineWrapper.WrappingSpace(2);
            lineWrapper.Append("fghi");
            lineWrapper.Close();
            Assert.AreEqual("abcde fghi", @out.ToString());
        }
Ejemplo n.º 13
0
        public void wrapEmbeddedNewlines_ZeroWidth()
        {
            var @out        = new AppendableStringBuilder();
            var lineWrapper = new LineWrapper(@out, "  ", 10);

            lineWrapper.Append("abcde");
            lineWrapper.ZeroWidthSpace(2);
            lineWrapper.Append("fghijk\nlmn");
            lineWrapper.Append("opqrstuvwxy");
            lineWrapper.Close();
            Assert.AreEqual("abcde\n    fghijk\nlmnopqrstuvwxy", @out.ToString());
        }
Ejemplo n.º 14
0
        public void NoWrapEmbeddedNewlines()
        {
            var @out        = new AppendableStringBuilder();
            var lineWrapper = new LineWrapper(@out, "  ", 10);

            lineWrapper.Append("abcde");
            lineWrapper.WrappingSpace(2);
            lineWrapper.Append("fghi\njklmn");
            lineWrapper.Append("opqrstuvwxy");
            lineWrapper.Close();
            Assert.AreEqual("abcde fghi\njklmnopqrstuvwxy", @out.ToString());
        }
Ejemplo n.º 15
0
        public void FencepostZeroWidth()
        {
            var @out        = new AppendableStringBuilder();
            var lineWrapper = new LineWrapper(@out, "  ", 10);

            lineWrapper.Append("abcde");
            lineWrapper.Append("fghij");
            lineWrapper.ZeroWidthSpace(2);
            lineWrapper.Append("k");
            lineWrapper.Append("lmnop");
            lineWrapper.Close();
            Assert.AreEqual("abcdefghij\n    klmnop", @out.ToString());
        }
Ejemplo n.º 16
0
        public void WrapMultipleNewlines()
        {
            var @out        = new AppendableStringBuilder();
            var lineWrapper = new LineWrapper(@out, "  ", 10);

            lineWrapper.Append("abcde");
            lineWrapper.WrappingSpace(2);
            lineWrapper.Append("fghi\nklmnopq\nrs");
            lineWrapper.WrappingSpace(2);
            lineWrapper.Append("tuvwxyz1");
            lineWrapper.Close();
            Assert.AreEqual("abcde fghi\nklmnopq\nrs\n    tuvwxyz1", @out.ToString());
        }
        /// <summary>
        /// Sends a message to the player
        /// </summary>
        public void SendMessage(string message)
        {
            ByteBuffer buffer = new ByteBuffer(Opcodes.Message);

            foreach (string line in LineWrapper.WrapLines(message))
            {
                buffer.SetPosition(1);
                buffer.WriteByte(0);
                buffer.WriteString(line, UseCP437 ? Server.CP437 : Encoding.ASCII);
                SendRaw(buffer.Data);
                buffer.SetPosition(0);
            }
        }
Ejemplo n.º 18
0
        static string ToIRCColors(string input)
        {
            input = Colors.Escape(input);
            input = LineWrapper.CleanupColors(input, true, false);

            StringBuilder sb = new StringBuilder(input);

            for (int i = 0; i < ircColors.Length; i++)
            {
                sb.Replace(ircReplacements[i], ircColors[i]);
            }
            return(sb.ToString());
        }
Ejemplo n.º 19
0
            public void Constructor_Parse_CorrectCount()
            {
                var lines = LineWrapper.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE);

                var wrappers = lines.Select(l => l.ToWrapper(Constants.DataObjectMap).Contents).ToArray();
                var newText  = string.Join("", wrappers);

                var parseResult  = new ExtractParseResult(newText, Constants.DataObjectMap);
                var extract      = parseResult.ToExtract();
                var extractItems = parseResult.ToExtractItems(extract.ExtractId, Constants.DataObjectMap, Constants.RelationshipMap, Constants.MultiRelationshipMap);

                Assert.AreEqual(lines.Length - 2, extractItems.Count);
            }
Ejemplo n.º 20
0
        public static void BulkImport()
        {
            CprBroker.Engine.BrokerContext.Initialize(CprBroker.Utilities.Constants.BaseApplicationToken.ToString(), "");
            int batchCount     = 1000;
            var personRepeates = 2;

            var data = Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE;

            var lines = new List <LineWrapper>(LineWrapper.ParseBatch(data));
            var start = lines.First();
            var end   = lines.Last();

            lines.RemoveAt(0);
            lines.RemoveAt(lines.Count - 1);

            var groupsByPerson = lines.GroupBy(l => l.PNR).ToArray();

            for (int iBatch = 0; iBatch < batchCount; iBatch++)
            {
                Console.WriteLine(string.Format("Creating batch <{0}> of <{1}>", iBatch + 1, batchCount));

                StringBuilder fullData = new StringBuilder(data.Length * personRepeates);
                fullData.AppendLine(start.Contents);


                for (int iPerson = 0; iPerson < groupsByPerson.Count(); iPerson++)
                {
                    var personLines = groupsByPerson[iPerson];
                    Console.WriteLine(string.Format("Inserting person<{0}> of <{1}>", iPerson + 1, groupsByPerson.Count()));

                    var personData = new List <LineWrapper>(personLines.ToArray());
                    var pnr        = personData[0].PNR;
                    for (int iRepeat = 0; iRepeat < personRepeates; iRepeat++)
                    {
                        Console.WriteLine(string.Format("Batch <{0}> of <{1}> ; person<{2}> of <{3}> repeat <{4}> of <{5}>", iBatch + 1, batchCount, iPerson + 1, groupsByPerson.Count(), iRepeat + 1, personRepeates));
                        var newPnr     = Utilities.RandomCprNumberString();
                        var personText = string.Join(Environment.NewLine, personData.Select(l => l.Contents).ToArray());
                        personText = personText.Replace(pnr, newPnr);
                        fullData.AppendLine(personText);
                    }
                }
                fullData.AppendLine(end.Contents);

                ExtractManager.ImportText(fullData.ToString());
            }
        }
Ejemplo n.º 21
0
            public void GetPerson_PersonNotExists_Null(
                [ValueSource(typeof(Utilities), "RandomCprNumberStrings5")] string cprNumber)
            {
                var lines       = LineWrapper.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE);
                var wrappers    = lines.Select(l => l.ToWrapper(Constants.DataObjectMap).Contents).ToArray();
                var newText     = string.Join("", wrappers);
                var parseResult = new ExtractParseResult(newText, Constants.DataObjectMap);

                var extract      = parseResult.ToExtract("", true, 0);
                var extractItems = parseResult.ToExtractItems(extract.ExtractId, Constants.DataObjectMap, Constants.RelationshipMap, Constants.MultiRelationshipMap);

                extract.ExtractItems.AddRange(extractItems);

                var person = Extract.GetPersonFromLatestExtract(cprNumber, extract.ExtractItems.AsQueryable(), Constants.DataObjectMap);

                Assert.Null(person);
            }
Ejemplo n.º 22
0
            public void Constructor_Parse_CorrectReconstruction()
            {
                var lines    = LineWrapper.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE);
                var wrappers = lines.Select(l => l.ToWrapper(Constants.DataObjectMap).Contents).ToArray();
                var newText  = string.Join("", wrappers);

                var parseResult  = new ExtractParseResult(newText, Constants.DataObjectMap);
                var extract      = parseResult.ToExtract();
                var extractItems = parseResult.ToExtractItems(extract.ExtractId, Constants.DataObjectMap, Constants.RelationshipMap, Constants.MultiRelationshipMap);
                var result       = extractItems.Select(i => i.Contents).ToList();

                result.Insert(0, extract.StartRecord);
                result.Add(extract.EndRecord);
                for (int i = 0; i < lines.Length; i++)
                {
                    Assert.AreEqual(wrappers[i], result[i]);
                }
            }
Ejemplo n.º 23
0
            public void GetPerson_PersonExists_Correct(
                [Range(1, 1098, 20)] int lineNumber)
            {
                var lines       = LineWrapper.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE);
                var wrappers    = lines.Select(l => l.ToWrapper(Constants.DataObjectMap).Contents).ToArray();
                var newText     = string.Join("", wrappers);
                var parseResult = new ExtractParseResult(newText, Constants.DataObjectMap);

                var extract      = parseResult.ToExtract("", true, 0);
                var extractItems = parseResult.ToExtractItems(extract.ExtractId, Constants.DataObjectMap, Constants.RelationshipMap, Constants.MultiRelationshipMap);

                extract.ExtractItems.AddRange(extractItems);

                var pnr    = lines[2].PNR;
                var person = Extract.GetPersonFromLatestExtract(pnr, extract.ExtractItems.AsQueryable(), Constants.DataObjectMap);

                Assert.NotNull(person);
                Assert.AreEqual(pnr, person.PersonInformation.PNR);
            }
Ejemplo n.º 24
0
        public static int Message([NotNull] this IEnumerable <Player> source,
                                  [NotNull] string message,
                                  [Optional] MessageType?type,
                                  [NotNull] params object[] formatArgs)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (message == null)
            {
                throw new ArgumentNullException("message");
            }
            if (formatArgs == null)
            {
                throw new ArgumentNullException("formatArgs");
            }
            if (type == null)
            {
                type = 0;
            }
            if (!MessageTypeUtil.Enabled() || message.Length >= 64)
            {
                type = MessageType.Chat;
            }
            if (!Enum.IsDefined(typeof(MessageType), type))
            {
                throw new InvalidEnumArgumentException(nameof(type), (int)type, typeof(MessageType));
            }

            int i = 0;

            foreach (Player player in source)
            {
                foreach (Packet packet in LineWrapper.Wrap(string.Format(message, formatArgs), player.SupportsFullCP437, type.Value))
                {
                    player.Send(packet);
                    i++;
                }
            }
            return(i);
        }
Ejemplo n.º 25
0
        public void SendChat(string message)
        {
            List <string> lines = LineWrapper.Wordwrap(message, hasEmoteFix);

            // Need to combine chat line packets into one Send call, so that
            // multi-line messages from multiple threads don't interleave
            for (int i = 0; i < lines.Count;)
            {
                // Send buffer max size is 4096 bytes
                // Divide by 66 (size of chat packet) gives ~62 lines
                int    count = Math.Min(62, lines.Count - i);
                byte[] data  = new byte[count * 66];

                for (int j = 0; j < count; i++, j++)
                {
                    Packet.WriteMessage(lines[i], 0, player.hasCP437, data, j * 66);
                }
                Send(data);
            }
        }
Ejemplo n.º 26
0
        public void SSS()
        {
            var persons = IndividualResponseType.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE);
            var ordered = persons.OrderByDescending(p =>
            {
                var ret = 0;
                ret    += p.HistoricalCivilStatus.Count;
                ret    += p.HistoricalName != null ? 1 : 0;
                return(ret);
            });
            var allLines = LineWrapper.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE)
                           .Where(l => l.IntCode > 0 && l.IntCode < 99)
                           .GroupBy(l => l.PNR)
                           .Select(p => new { Lines = p.OrderBy(l => l.IntCode).Select(l => l.Contents).ToArray(), History = p.ToArray().Where(l => l.IntCode >= 22 && l.IntCode <= 30).Count() })
                           .OrderByDescending(p => p.History)
                           .ToArray();

            var mostHistory = allLines.First();
            var o           = "";
        }
Ejemplo n.º 27
0
        static Utilities()
        {
            var all = IndividualResponseType.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE);

            PNRs = all.Select(p => p.PersonInformation.PNR).OrderBy(p => p).ToArray();


            var lines = new List <LineWrapper>(LineWrapper.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE));

            StartLine = lines.First();
            EndLine   = lines.Last();
            lines.Remove(StartLine);
            lines.Remove(EndLine);

            var groups = lines.GroupBy(l => l.PNR).ToArray();

            PersonLineWrappers = groups.ToDictionary(g => g.Key, g => g.ToArray());

            var extract = new Extract()
            {
                ExtractId = Guid.NewGuid(), ExtractDate = DateTime.Now, StartRecord = StartLine.Contents, EndRecord = EndLine.Contents, Filename = "", ImportDate = DateTime.Now, Ready = true, ProcessedLines = lines.Count
            };
            var allItems = new List <ExtractItem>();

            PersonExtractItems = groups.ToDictionary(
                g => g.Key,
                g =>
            {
                var items = g.ToArray()
                            .Select(l => l.ToExtractItem(extract.ExtractId, Constants.DataObjectMap, Constants.RelationshipMap, Constants.MultiRelationshipMap))
                            .ToArray();
                extract.ExtractItems.AddRange(items);
                allItems.AddRange(items);
                return(items);
            }
                );
            AllExtractItems = allItems.ToArray();
        }
Ejemplo n.º 28
0
        public static void Split()
        {
            var enc = Encoding.GetEncoding(1252);

            var txt = "";

            txt = Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE;
            //txt = System.IO.File.ReadAllText(@"C:\Magenta Workspace\PART\Doc\Data Providers\CPR Direct\Test data\U12170-P opgavenr 110901 ADRNVN FE", enc);
            var dataLines   = LineWrapper.ParseBatch(txt);
            var allWrappers = dataLines.ToList();

            var startRecord = allWrappers.Where(lw => lw.Code == "000").First();
            var endRecord   = allWrappers.Where(lw => lw.Code == "999").First();

            allWrappers.Remove(startRecord);
            allWrappers.Remove(endRecord);

            var groupedWrapers = allWrappers
                                 .Where(w => w != null)
                                 .GroupBy(w => w.PNR)
                                 .ToList();

            foreach (var individualWrappersGrouping in groupedWrapers)
            {
                var individualLines = individualWrappersGrouping.ToList();
                var pnr             = individualWrappersGrouping.First().PNR;
                var myLines         = new List <LineWrapper>(individualWrappersGrouping);
                myLines.Insert(0, startRecord);
                myLines.Add(endRecord);
                var txtLines = myLines.Select(lw => lw.Contents);
                System.IO.File.WriteAllLines(
                    string.Format(@"..\..\Resources\PNR_{0}.txt", pnr),
                    txtLines.ToArray(),
                    enc
                    );
            }
        }
Ejemplo n.º 29
0
            public void SSS()
            {
                var all = LineWrapper.ParseBatch(Properties.Resources.U12170_P_opgavenr_110901_ADRNVN_FE);
                var map = new Dictionary <string, Type>();

                map["026"] = typeof(HistoricalNameType);

                var rel = all
                          .Where(l => l.Code == "026")
                          .Select(l => l.ToWrapper(map) as HistoricalNameType)
                          .OrderBy(l => l.NameStartDate)
                          .GroupBy(l => l.PNR)
                          .Select(g => g.OrderBy(l => l.NameStartDate).First())
                          .GroupBy(p =>
                {
                    var key = "";
                    if (!p.NameStartDate.HasValue)
                    {
                        return("Null");
                    }

                    var date = PartInterface.Strings.PersonNumberToDate(p.PNR).Value;
                    if (p.NameStartDate.Value.Date == date)
                    {
                        return("Same Day");
                    }
                    if ((date - p.NameStartDate.Value).TotalDays < 30)
                    {
                        return("Month or less");
                    }
                    return("More than month");
                })
                          .Select(g => new { Text = g.Key, Data = g.ToArray() })
                          .ToArray();
                var oo = "";
            }
Ejemplo n.º 30
0
 public static void Message( [NotNull] this IEnumerable<Player> source,
     [CanBeNull] Player except, bool sentToConsole,
     [NotNull] string message, [NotNull] params object[] formatArgs)
 {
     if( source == null ) throw new ArgumentNullException( "source" );
     if( message == null ) throw new ArgumentNullException( "message" );
     if( formatArgs == null ) throw new ArgumentNullException( "formatArgs" );
     if( formatArgs.Length > 0 ) {
         message = String.Format( message, formatArgs );
     }
     Packet[] packets = new LineWrapper( "&E" + message ).ToArray();
     foreach( Player player in source ) {
         if( player == except ) continue;
         for( int i = 0; i < packets.Length; i++ ) {
             player.Send( packets[i] );
         }
     }
     if( except != Player.Console && sentToConsole ) {
         Logger.Log( message );
     }
 }
Ejemplo n.º 31
0
            public void ToWrapper_KeyOnly_Null()
            {
                var ret = new LineWrapper("222").ToWrapper(new Dictionary <string, Type>());

                Assert.Null(ret);
            }