C# 클래스 TrackChanges.Command

상속: IExternalCommand
파일 보기 프로젝트 열기: pix3lot/Slackit

공개 프로퍼티들

프로퍼티 타입 설명
_start_state string>.Dictionary

공개 메소드들

메소드 설명
ElementDescription ( Document doc, int element_id ) : string
ElementDescription ( Element e ) : string

Return a string describing the given element: .NET type name, category name, family and symbol name for a family instance, element id and element name.

Execute ( ExternalCommandData commandData, string &message, ElementSet elements ) : System.Result
GetElementState ( Element e ) : string

Return a string representing the given element state. This is the information you wish to track. It is up to you to ensure that all data you are interested in really is included in this snapshot. In this case, we ignore all elements that do not have a valid bounding box.

GetSnapshot ( IEnumerable a ) : string>.Dictionary

Return a dictionary mapping element id values to hash codes of the element state strings. This represents a snapshot of the current database state.

GetTrackedElements ( Document doc ) : IEnumerable

Retrieve all elements to track. It is up to you to decide which elements are of interest to you.

ReportDifferences ( Document doc, string>.Dictionary start_state, string>.Dictionary end_state ) : string

Compare the start and end states and report the differences found. In this implementation, we just store a hash code of the element state. If you choose to store the full string representation, you can use that for comparison, and then report exactly what changed and the original values as well.

비공개 메소드들

메소드 설명
GetBytes ( string str ) : byte[]

Convert a string to a byte array.

메소드 상세

ElementDescription() 공개 정적인 메소드

public static ElementDescription ( Document doc, int element_id ) : string
doc Document
element_id int
리턴 string

ElementDescription() 공개 정적인 메소드

Return a string describing the given element: .NET type name, category name, family and symbol name for a family instance, element id and element name.
public static ElementDescription ( Element e ) : string
e Element
리턴 string

Execute() 공개 메소드

public Execute ( ExternalCommandData commandData, string &message, ElementSet elements ) : System.Result
commandData ExternalCommandData
message string
elements ElementSet
리턴 System.Result

GetElementState() 공개 정적인 메소드

Return a string representing the given element state. This is the information you wish to track. It is up to you to ensure that all data you are interested in really is included in this snapshot. In this case, we ignore all elements that do not have a valid bounding box.
public static GetElementState ( Element e ) : string
e Element
리턴 string

GetSnapshot() 공개 정적인 메소드

Return a dictionary mapping element id values to hash codes of the element state strings. This represents a snapshot of the current database state.
public static GetSnapshot ( IEnumerable a ) : string>.Dictionary
a IEnumerable
리턴 string>.Dictionary

GetTrackedElements() 공개 정적인 메소드

Retrieve all elements to track. It is up to you to decide which elements are of interest to you.
public static GetTrackedElements ( Document doc ) : IEnumerable
doc Document
리턴 IEnumerable

ReportDifferences() 공개 정적인 메소드

Compare the start and end states and report the differences found. In this implementation, we just store a hash code of the element state. If you choose to store the full string representation, you can use that for comparison, and then report exactly what changed and the original values as well.
public static ReportDifferences ( Document doc, string>.Dictionary start_state, string>.Dictionary end_state ) : string
doc Document
start_state string>.Dictionary
end_state string>.Dictionary
리턴 string

프로퍼티 상세

_start_state 공개적으로 정적으로 프로퍼티

Current snapshot of database state. You could also store the entire element state strings here, not just their hash code, to report their complete original and modified values.
public static Dictionary _start_state
리턴 string>.Dictionary