Esempio n. 1
0
 private static void SetMaterializedValueCore(ODataAnnotatable annotatableObject, object materializedValue)
 {
     MaterializerPropertyValue annotation = new MaterializerPropertyValue {
         Value = materializedValue
     };
     annotatableObject.SetAnnotation<MaterializerPropertyValue>(annotation);
 }
Esempio n. 2
0
        private static void SetMaterializedValueCore(ODataAnnotatable annotatableObject, object materializedValue)
        {
            MaterializerPropertyValue annotation = new MaterializerPropertyValue {
                Value = materializedValue
            };

            annotatableObject.SetAnnotation <MaterializerPropertyValue>(annotation);
        }
Esempio n. 3
0
        /// <summary>
        /// Sets the value of the CustomState for the specified annotatable.
        /// </summary>
        /// <param name="annotatable">The annotatable instance to set the CustomState for.</param>
        /// <param name="value">The value of the CustomState to set, will overwrite any existing value.</param>
        internal static void SetCustomState(this ODataAnnotatable annotatable, object value)
        {
            DebugUtils.CheckNoExternalCallers();
            Debug.Assert(annotatable != null, "annotatable != null");

            CustomStateAnnotation annotation = annotatable.GetAnnotation <CustomStateAnnotation>();

            if (annotation == null)
            {
                annotation = new CustomStateAnnotation();
            }

            annotation.Value = value;
            annotatable.SetAnnotation(annotation);
        }