Example #1
0
 /// <summary>
 /// Gets the specified part of the element, if any.
 /// </summary>
 public ServicePart?GetPart(ServicePartKind kind) => m_parts.FirstOrDefault(x => x.Kind == kind);
Example #2
0
 /// <summary>
 /// Creates an instance.
 /// </summary>
 public ServicePart(ServicePartKind kind, ServiceDefinitionPosition position, ServiceDefinitionPosition endPosition = null)
 {
     Kind        = kind;
     Position    = position;
     EndPosition = endPosition ?? position;
 }
Example #3
0
 public ServicePart GetPart <T>(ServicePartKind kind, Positioned <T> positioned) => new ServicePart(kind, GetPosition(positioned.Position), GetPosition(positioned.Position.WithNextIndex(positioned.Length)));