Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pcap-Net
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Pcap-Net
Commits
78b7976d
Commit
78b7976d
authored
Jan 14, 2012
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DNS.
Code coverage 92.72%
parent
57590253
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
71 deletions
+1
-71
ListSegment.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/ListSegment.cs
+1
-71
No files found.
PcapDotNet/src/PcapDotNet.Packets/Dns/ListSegment.cs
View file @
78b7976d
...
@@ -5,7 +5,7 @@ using System.Linq;
...
@@ -5,7 +5,7 @@ using System.Linq;
namespace
PcapDotNet.Packets.Dns
namespace
PcapDotNet.Packets.Dns
{
{
public
class
ListSegment
<
T
>
:
IList
<
T
>
internal
class
ListSegment
<
T
>
:
IEnumerable
<
T
>
{
{
public
ListSegment
(
IList
<
T
>
data
,
int
startIndex
,
int
count
)
public
ListSegment
(
IList
<
T
>
data
,
int
startIndex
,
int
count
)
{
{
...
@@ -30,68 +30,8 @@ namespace PcapDotNet.Packets.Dns
...
@@ -30,68 +30,8 @@ namespace PcapDotNet.Packets.Dns
return
GetEnumerator
();
return
GetEnumerator
();
}
}
public
void
Add
(
T
item
)
{
throw
new
NotSupportedException
(
"ListSegment<T> is read-only"
);
}
public
void
Clear
()
{
throw
new
NotSupportedException
(
"ListSegment<T> is read-only"
);
}
public
bool
Contains
(
T
item
)
{
return
Enumerable
.
Contains
(
this
,
item
);
}
public
void
CopyTo
(
T
[]
array
,
int
arrayIndex
)
{
foreach
(
T
value
in
this
)
array
[
arrayIndex
++]
=
value
;
}
public
bool
Remove
(
T
item
)
{
throw
new
NotSupportedException
(
"ListSegment<T> is read-only"
);
}
public
int
Count
{
get
;
private
set
;
}
public
int
Count
{
get
;
private
set
;
}
public
bool
IsReadOnly
{
get
{
return
true
;
}
}
public
int
IndexOf
(
T
item
)
{
if
(
ReferenceEquals
(
item
,
null
))
{
for
(
int
i
=
0
;
i
!=
Count
;
++
i
)
{
if
(
ReferenceEquals
(
this
[
i
],
null
))
return
i
;
}
return
-
1
;
}
for
(
int
i
=
0
;
i
!=
Count
;
++
i
)
{
if
(
item
.
Equals
(
this
[
i
]))
return
i
;
}
return
-
1
;
}
public
void
Insert
(
int
index
,
T
item
)
{
throw
new
NotSupportedException
(
"ListSegment<T> is read-only"
);
}
public
void
RemoveAt
(
int
index
)
{
throw
new
NotSupportedException
(
"ListSegment<T> is read-only"
);
}
public
T
this
[
int
index
]
public
T
this
[
int
index
]
{
{
...
@@ -99,16 +39,6 @@ namespace PcapDotNet.Packets.Dns
...
@@ -99,16 +39,6 @@ namespace PcapDotNet.Packets.Dns
set
{
throw
new
NotSupportedException
(
"ListSegment<T> is read-only"
);
}
set
{
throw
new
NotSupportedException
(
"ListSegment<T> is read-only"
);
}
}
}
public
ListSegment
<
T
>
SubSegment
(
int
startIndex
,
int
count
)
{
return
new
ListSegment
<
T
>(
_data
,
_startIndex
+
startIndex
,
count
);
}
public
ListSegment
<
T
>
SubSegment
(
int
startIndex
)
{
return
SubSegment
(
startIndex
,
Count
-
startIndex
);
}
private
readonly
IList
<
T
>
_data
;
private
readonly
IList
<
T
>
_data
;
private
readonly
int
_startIndex
;
private
readonly
int
_startIndex
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment