<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=6237_Programmering_II_%28Csharp%29_Agenda%2FController_class</id>
		<title>6237 Programmering II (Csharp) Agenda/Controller class - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=6237_Programmering_II_%28Csharp%29_Agenda%2FController_class"/>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Controller_class&amp;action=history"/>
		<updated>2026-06-10T23:32:47Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Controller_class&amp;diff=31064&amp;oldid=prev</id>
		<title>Orso: moved 6237 Programmering II Controller class to 6237 Programmering II (Csharp) Agenda/Controller class</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Controller_class&amp;diff=31064&amp;oldid=prev"/>
				<updated>2015-10-07T10:20:39Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/w/index.php/6237_Programmering_II_Controller_class&quot; class=&quot;mw-redirect&quot; title=&quot;6237 Programmering II Controller class&quot;&gt;6237 Programmering II Controller class&lt;/a&gt; to &lt;a href=&quot;/w/index.php/6237_Programmering_II_(Csharp)_Agenda/Controller_class&quot; title=&quot;6237 Programmering II (Csharp) Agenda/Controller class&quot;&gt;6237 Programmering II (Csharp) Agenda/Controller class&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:20, 7 October 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Orso</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Controller_class&amp;diff=30869&amp;oldid=prev</id>
		<title>Orso: /* Controller class */</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Controller_class&amp;diff=30869&amp;oldid=prev"/>
				<updated>2015-09-29T13:31:25Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Controller class&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 13:31, 29 September 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l43&quot; &gt;Line 43:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 43:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;6237 Programmering II&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Csharp&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Orso</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Controller_class&amp;diff=30638&amp;oldid=prev</id>
		<title>Orso: Created page with &quot;===Controller class===   I de løsninger vi indtil nu har arbejdet med har en stor del at koden ligget i Main. Det er i midlertid ikke den bedste løsning hvis det vi laver skal ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Controller_class&amp;diff=30638&amp;oldid=prev"/>
				<updated>2015-09-22T18:55:48Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;===Controller class===   I de løsninger vi indtil nu har arbejdet med har en stor del at koden ligget i Main. Det er i midlertid ikke den bedste løsning hvis det vi laver skal ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===Controller class===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I de løsninger vi indtil nu har arbejdet med har en stor del at koden ligget i Main. Det er i midlertid ikke den bedste løsning hvis det vi laver skal kunne genbruges.&amp;lt;br&amp;gt;&lt;br /&gt;
I stedet laver vi en kontroller klasse som indeholder de kan læse logfilen oprette listen af logs og søge i logs.&amp;lt;br&amp;gt;&lt;br /&gt;
Modellen ser således ud i UML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:6237 Programmering II ctrluml.png]]&lt;br /&gt;
&amp;lt;source lang=csharp&amp;gt;&lt;br /&gt;
class LogCtrl&lt;br /&gt;
{&lt;br /&gt;
	private List&amp;lt;Log&amp;gt; Logs;&lt;br /&gt;
	&lt;br /&gt;
	public void ReadLogFile(String fileName)&lt;br /&gt;
	{&lt;br /&gt;
		//Her skrives det kode fra main som læser logfilen&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	private void analyze(List&amp;lt;String&amp;gt; lines)&lt;br /&gt;
	{&lt;br /&gt;
		if (lines.Count &amp;lt; 2) return;&lt;br /&gt;
		String protocol = lines[1].Substring(67, 9);&lt;br /&gt;
		String source = lines[1].Substring(22, 23);&lt;br /&gt;
		String destination = lines[1].Substring(44, 23);&lt;br /&gt;
		Log log = new Log(source, destination, protocol);&lt;br /&gt;
		logs.Add(log);&lt;br /&gt;
		.....&lt;br /&gt;
		.....&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	public List&amp;lt;Log&amp;gt; FindLogs(String source, String destination, String protocol)&lt;br /&gt;
	{&lt;br /&gt;
		//Din søge kode&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
static void Main(string[] args)&lt;br /&gt;
{&lt;br /&gt;
	LogCtrl lCtrl = new LogCtrl();&lt;br /&gt;
	lCtrl.ReadLogFile(&amp;quot;logfile.txt&amp;quot;);&lt;br /&gt;
	List&amp;lt;Log&amp;gt; logLst = lCtrl.FindLogsByProtocol(&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;DNS&amp;quot;);&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Csharp]]&lt;/div&gt;</summary>
		<author><name>Orso</name></author>	</entry>

	</feed>