Exemple #1
0
 /// <summary>
 /// Creates a new member binding index, with given parameters.
 /// </summary>
 /// <param name="parameters">The index parameters sequence.</param>
 public StonBindingIndex(IEnumerable <IStonEntity> parameters)
 {
     if (parameters == null)
     {
         throw new ArgumentNullException("parameters");
     }
     Parameters = parameters.Select(p => StonEntity.Copy(p)).ToList();
 }
Exemple #2
0
 /// <summary>
 /// Creates a new construction of a complex value, given sequences of positional parameters and named parameters.
 /// </summary>
 /// <param name="positionalParameters">The sequence of positional construction parameters.</param>
 /// <param name="namedParameters">The sequence of named construction parameters.</param>
 public StonConstruction(IEnumerable <IStonEntity> positionalParameters, IEnumerable <KeyValuePair <string, IStonEntity> > namedParameters)
 {
     PositionalParameters = positionalParameters?.Select(p => StonEntity.Copy(p)).ToList() ?? Enumerable.Empty <IStonEntity>();
     NamedParameters      = namedParameters?.Select(kvp => new KeyValuePair <string, IStonEntity>(kvp.Key, StonEntity.Copy(kvp.Value))).ToList() ?? Enumerable.Empty <KeyValuePair <string, IStonEntity> >();
 }
Exemple #3
0
 /// <summary>
 /// Creates a new member initialization of a complex value, given a sequence of member bindings.
 /// </summary>
 /// <param name="memberBindings">The sequence of member bindings.</param>
 public StonMemberInit(IEnumerable <KeyValuePair <IStonBindingKey, IStonEntity> > memberBindings)
 {
     MemberBindings = memberBindings?.Select(kvp => new KeyValuePair <IStonBindingKey, IStonEntity>(StonBindingKey.Copy(kvp.Key), StonEntity.Copy(kvp.Value))).ToList() ?? new List <KeyValuePair <IStonBindingKey, IStonEntity> >();
 }
 /// <summary>
 /// Creates a new collection initialization of a complex value, given a sequence of elements.
 /// </summary>
 /// <param name="elements">The sequence of elements.</param>
 public StonCollectionInit(IEnumerable <IStonEntity> elements)
 {
     Elements = elements?.Select(e => StonEntity.Copy(e)).ToList() ?? Enumerable.Empty <IStonEntity>();
 }