Exemplo n.º 1
0
 public static TypeInfo GetTypeInfo(this Type type, Domain domain)
 {
     return(domain.Model.Types[type]);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes key generator instance in the specified <paramref name="ownerDomain" />.
 /// Only keys that have specified <paramref name="keyTupleDescriptor" /> will be requested.
 /// </summary>
 /// <param name="ownerDomain">Domain to use.</param>
 /// <param name="keyTupleDescriptor">Tuple descriptor of requested keys.</param>
 public abstract void Initialize(Domain ownerDomain, TupleDescriptor keyTupleDescriptor);
Exemplo n.º 3
0
 public static TypeInfo GetTypeInfo(this Type type)
 {
     return(GetTypeInfo(type, Domain.Demand()));
 }
Exemplo n.º 4
0
 internal static Key Create(Domain domain, string nodeId, TypeInfo type, TypeReferenceAccuracy accuracy, object[] values)
 {
     return(KeyFactory.Materialize(domain, nodeId, type, accuracy, values));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Creates <see cref="Key"/> instance
 /// for the specified <see cref="Entity"/> <paramref name="type"/>,
 /// with specified <paramref name="values"/> and <paramref name="accuracy"/>.
 /// </summary>
 /// <param name="domain">Domain to use.</param>
 /// <param name="type">Entity type.</param>
 /// <param name="accuracy">Key accuracy.</param>
 /// <param name="values">Key values.</param>
 /// <returns>A newly created or existing <see cref="Key"/> instance.</returns>
 public static Key Create([NotNull] Domain domain, [NotNull] Type type, TypeReferenceAccuracy accuracy, [NotNull] params object[] values)
 {
     return(Create(domain, WellKnown.DefaultNodeId, type, accuracy, values));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Creates <see cref="Key"/> instance
 /// for the specified <see cref="Entity"/> type <typeparamref name="T"/>
 /// and with specified <paramref name="values"/>.
 /// </summary>
 /// <typeparam name="T">Type of <see cref="Entity"/> descendant to get <see cref="Key"/> for.</typeparam>
 /// <param name="domain">Domain to use.</param>
 /// <param name="values">Key values.</param>
 /// <returns>A newly created or existing <see cref="Key"/> instance.</returns>
 public static Key Create <T>([NotNull] Domain domain, [NotNull] params object[] values)
     where T : IEntity
 {
     return(Create(domain, WellKnown.DefaultNodeId, typeof(T), TypeReferenceAccuracy.BaseType, values));
 }
Exemplo n.º 7
0
 internal static Key Create(Domain domain, string nodeId, TypeInfo type, TypeReferenceAccuracy accuracy, Tuple value)
 {
     return(KeyFactory.Materialize(domain, nodeId, type, value, accuracy, false, null));
 }
Exemplo n.º 8
0
 /// <summary>
 /// Creates <see cref="Key"/> instance
 /// for the specified <see cref="Entity"/> <paramref name="type"/>
 /// and with specified <paramref name="value"/>.
 /// </summary>
 /// <param name="domain">Domain to use.</param>
 /// <param name="type">Entity type.</param>
 /// <param name="value">Key value.</param>
 /// <returns>A newly created or existing <see cref="Key"/> instance.</returns>
 public static Key Create([NotNull] Domain domain, [NotNull] Type type, [NotNull] Tuple value)
 {
     return(Create(domain, WellKnown.DefaultNodeId, type, TypeReferenceAccuracy.BaseType, value));
 }