Skip to content

PortData

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.WebApp/Client/app/models/shared/files-port.model.ts (line 2)

Part of: Pams

PortData represents file-port data shared by the client application. Its clone() method creates a separate PortData instance for workflows that need to copy port state before editing or passing it to another component.

Methods

MethodSignatureReturns
cloneclone(init: Partial<PortData>)void

Properties

PropertyType
IsOpenedboolean
ClientSerialnumber
ExcuteFileSideboolean
RefrenceTypeIDnumber
RefrenceIDnumber

Diagram

mermaid
graph LR
  Source[PortData instance] --> Clone[clone()]
  Clone --> Copy[New PortData instance]
  Copy --> Consumer[Component or service]

Usage

ts
import { PortData } from 'app/models/shared/files-port.model';

function preparePortUpdate(port: PortData): PortData {
  const editablePort = port.clone();

  // Update editablePort without changing the original port.
  return editablePort;
}

AI Coding Instructions

  • Call clone() before modifying port data that may also be referenced by another component or service.
  • Keep changes to PortData fields compatible with the copy behavior in clone().
  • When adding a new property to PortData, update clone() so copied instances retain that property.
  • Pass PortData instances through the shared file-port model layer rather than duplicating port-shaped objects locally.

Relationships

  • IMPORTS → File

Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (1)

  • FilesPortServicePams/Web/Pams.WebApp/Client/app/services/shared/files-port-service.service.ts:1

Was this page helpful?

Download as PDF