clean up
This commit is contained in:
Родитель
ca63903599
Коммит
58bfe799ff
|
@ -30,13 +30,14 @@ module Mac =
|
|||
| true, v -> Some v
|
||||
| false, _ -> None
|
||||
|
||||
let outletMapping tryLookup outlet = maybe {
|
||||
let! prop = outlet |> tryGetAttribute "property"
|
||||
let! dest = outlet |> tryGetAttribute "destination"
|
||||
let! (destElement : XElement) = tryLookup dest.Value
|
||||
let elementName = destElement.Name.LocalName
|
||||
return {Property=prop.Value; ElementName=elementName } }
|
||||
|
||||
let outletMapping (tryLookup: string -> XElement option) outlet =
|
||||
maybe {
|
||||
let! prop = outlet |> tryGetAttribute "property"
|
||||
let! dest = outlet |> tryGetAttribute "destination"
|
||||
let! destElement = tryLookup dest.Value
|
||||
let elementName = destElement.Name.LocalName
|
||||
return {Property=prop.Value; ElementName=elementName } }
|
||||
|
||||
let actionMapping tryLookup action = maybe {
|
||||
let! selector = action |> tryGetAttribute "selector"
|
||||
//<button> <connections> <action/> </connections> </button>
|
||||
|
|
|
@ -43,7 +43,6 @@ module ProvidedTypes =
|
|||
|
||||
let field = ProvidedField( fieldName, typ)
|
||||
field.SetFieldAttributes FieldAttributes.Private
|
||||
|
||||
|
||||
let property = ProvidedProperty(propertyName, typ, defaultArg parameters [])
|
||||
property.GetterCode <- fun args -> Expr.FieldGet(args.[0], field)
|
||||
|
@ -69,9 +68,7 @@ module ProvidedTypes =
|
|||
module String =
|
||||
|
||||
let private test_null =
|
||||
function
|
||||
| null -> raise (ArgumentNullException "arg")
|
||||
| _ -> ()
|
||||
function null -> raise (ArgumentNullException "arg") | _ -> ()
|
||||
|
||||
let capitalize (s : string) =
|
||||
test_null s
|
||||
|
|
Загрузка…
Ссылка в новой задаче