C# 클래스 ICSharpCode.AvalonEdit.Utils.ExtensionMethods

파일 보기 프로젝트 열기: VE-2016/VE-2016

공개 메소드들

메소드 설명
AddRange ( ICollection collection, IEnumerable elements ) : void
CoerceValue ( double value, double minimum, double maximum ) : double

Forces the value to stay between mininum and maximum.

CoerceValue ( int value, int minimum, int maximum ) : int

Forces the value to stay between mininum and maximum.

CreateTypeface ( FrameworkElement fe ) : Typeface

Creates typeface from the framework element.

GetAttributeOrNull ( XmlElement element, string attributeName ) : string

Gets the value of the attribute, or null if the attribute does not exist.

GetBoolAttribute ( XmlElement element, string attributeName ) : bool?

Gets the value of the attribute as boolean, or null if the attribute does not exist.

GetBoolAttribute ( XmlReader reader, string attributeName ) : bool?

Gets the value of the attribute as boolean, or null if the attribute does not exist.

IsClose ( Size d1, Size d2 ) : bool

Returns true if the doubles are close (difference smaller than 0.01).

IsClose ( Vector d1, Vector d2 ) : bool

Returns true if the doubles are close (difference smaller than 0.01).

IsClose ( double d1, double d2 ) : bool

Returns true if the doubles are close (difference smaller than 0.01).

Sequence ( value ) : IEnumerable

Creates an IEnumerable with a single value.

ToSystemDrawing ( Point p ) : System.Drawing.Point
ToWpf ( System.Drawing.Point p ) : Point
ToWpf ( System.Drawing.Rectangle rect ) : Rect
ToWpf ( System.Drawing.Size s ) : Size
TransformFromDevice ( Point point, Visual visual ) : Point
TransformFromDevice ( Rect rect, Visual visual ) : Rect
TransformFromDevice ( Size size, Visual visual ) : Size
TransformToDevice ( Point point, Visual visual ) : Point
TransformToDevice ( Rect rect, Visual visual ) : Rect
TransformToDevice ( Size size, Visual visual ) : Size
VisualAncestorsAndSelf ( DependencyObject obj ) : IEnumerable

비공개 메소드들

메소드 설명
CheckIsFrozen ( Freezable f ) : void
Log ( bool condition, string format ) : void

메소드 상세

AddRange() 공개 정적인 메소드

public static AddRange ( ICollection collection, IEnumerable elements ) : void
collection ICollection
elements IEnumerable
리턴 void

CoerceValue() 공개 정적인 메소드

Forces the value to stay between mininum and maximum.
public static CoerceValue ( double value, double minimum, double maximum ) : double
value double
minimum double
maximum double
리턴 double

CoerceValue() 공개 정적인 메소드

Forces the value to stay between mininum and maximum.
public static CoerceValue ( int value, int minimum, int maximum ) : int
value int
minimum int
maximum int
리턴 int

CreateTypeface() 공개 정적인 메소드

Creates typeface from the framework element.
public static CreateTypeface ( FrameworkElement fe ) : Typeface
fe FrameworkElement
리턴 Typeface

GetAttributeOrNull() 공개 정적인 메소드

Gets the value of the attribute, or null if the attribute does not exist.
public static GetAttributeOrNull ( XmlElement element, string attributeName ) : string
element XmlElement
attributeName string
리턴 string

GetBoolAttribute() 공개 정적인 메소드

Gets the value of the attribute as boolean, or null if the attribute does not exist.
public static GetBoolAttribute ( XmlElement element, string attributeName ) : bool?
element XmlElement
attributeName string
리턴 bool?

GetBoolAttribute() 공개 정적인 메소드

Gets the value of the attribute as boolean, or null if the attribute does not exist.
public static GetBoolAttribute ( XmlReader reader, string attributeName ) : bool?
reader XmlReader
attributeName string
리턴 bool?

IsClose() 공개 정적인 메소드

Returns true if the doubles are close (difference smaller than 0.01).
public static IsClose ( Size d1, Size d2 ) : bool
d1 Size
d2 Size
리턴 bool

IsClose() 공개 정적인 메소드

Returns true if the doubles are close (difference smaller than 0.01).
public static IsClose ( Vector d1, Vector d2 ) : bool
d1 Vector
d2 Vector
리턴 bool

IsClose() 공개 정적인 메소드

Returns true if the doubles are close (difference smaller than 0.01).
public static IsClose ( double d1, double d2 ) : bool
d1 double
d2 double
리턴 bool

Sequence() 공개 정적인 메소드

Creates an IEnumerable with a single value.
public static Sequence ( value ) : IEnumerable
리턴 IEnumerable

ToSystemDrawing() 공개 정적인 메소드

public static ToSystemDrawing ( Point p ) : System.Drawing.Point
p Point
리턴 System.Drawing.Point

ToWpf() 공개 정적인 메소드

public static ToWpf ( System.Drawing.Point p ) : Point
p System.Drawing.Point
리턴 Point

ToWpf() 공개 정적인 메소드

public static ToWpf ( System.Drawing.Rectangle rect ) : Rect
rect System.Drawing.Rectangle
리턴 Rect

ToWpf() 공개 정적인 메소드

public static ToWpf ( System.Drawing.Size s ) : Size
s System.Drawing.Size
리턴 Size

TransformFromDevice() 공개 정적인 메소드

public static TransformFromDevice ( Point point, Visual visual ) : Point
point Point
visual Visual
리턴 Point

TransformFromDevice() 공개 정적인 메소드

public static TransformFromDevice ( Rect rect, Visual visual ) : Rect
rect Rect
visual Visual
리턴 Rect

TransformFromDevice() 공개 정적인 메소드

public static TransformFromDevice ( Size size, Visual visual ) : Size
size Size
visual Visual
리턴 Size

TransformToDevice() 공개 정적인 메소드

public static TransformToDevice ( Point point, Visual visual ) : Point
point Point
visual Visual
리턴 Point

TransformToDevice() 공개 정적인 메소드

public static TransformToDevice ( Rect rect, Visual visual ) : Rect
rect Rect
visual Visual
리턴 Rect

TransformToDevice() 공개 정적인 메소드

public static TransformToDevice ( Size size, Visual visual ) : Size
size Size
visual Visual
리턴 Size

VisualAncestorsAndSelf() 공개 정적인 메소드

public static VisualAncestorsAndSelf ( DependencyObject obj ) : IEnumerable
obj DependencyObject
리턴 IEnumerable