/// <inheritdoc/> public void HandleModalDialog(PageObjectContext context) { ArgumentUtility.CheckNotNull("context", context); context.Window.AcceptModalDialogFixed(context.Browser); }
public ConstructorEmitter CreateConstructor(ArgumentReference[] arguments) { ArgumentUtility.CheckNotNull("arguments", arguments); return(InnerEmitter.CreateConstructor(arguments)); }
// does not create the property's methods public CustomPropertyEmitter CreatePublicInterfacePropertyImplementation(PropertyInfo interfaceProperty) { ArgumentUtility.CheckNotNull("interfaceProperty", interfaceProperty); return(CreatePropertyOverrideOrInterfaceImplementation(interfaceProperty, true)); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { ArgumentUtility.CheckNotNull("visitor", visitor); return(this); }
public SkipResultOperator(Expression count) { ArgumentUtility.CheckNotNull("count", count); Count = count; }
protected QueryAdapterBase(IQuery query) { ArgumentUtility.CheckNotNull("query", query); _query = query; }
public static string GetVfpCode(Field field) { ArgumentUtility.CheckNotNull("field", field); return(string.Format("{0} {1} {2} ", field.Name, GetFieldType(field), GetNull(field))); }
public static IQuery GetIncrementRevisionQuery(IRevisionKey revisionKey) { ArgumentUtility.CheckNotNull("revisionKey", revisionKey); var storageProviderDefinition = GetStorageProviderDefinition(); var sqlDialect = storageProviderDefinition.Factory.CreateSqlDialect(storageProviderDefinition); const string incrementrevision = "IncrementRevision"; string revisionTable = GetRevisionTableIdentifier(sqlDialect); string revisionValueColumn = GetRevisionValueColumnIdentifier(sqlDialect); string revisionValueParameter = sqlDialect.GetParameterName("value"); string revisionGlobalKeyParameter = sqlDialect.GetParameterName("globalKey"); string revisionLocalKeyParameter = sqlDialect.GetParameterName("localKey"); var parameters = new QueryParameterCollection(); var statement = new StringBuilder(); statement.Append("BEGIN TRANSACTION " + incrementrevision); statement.Append(sqlDialect.StatementDelimiter); statement.AppendLine(); statement.Append("IF EXISTS (SELECT 0 FROM "); statement.Append(revisionTable); statement.Append(" WHERE ("); AppendKeyClause(statement, parameters, revisionKey, sqlDialect); statement.Append(")"); statement.Append(")"); statement.AppendLine(); statement.Append("UPDATE "); statement.Append(revisionTable); statement.Append(" SET "); statement.Append(revisionValueColumn); statement.Append(" = "); statement.Append(revisionValueParameter); statement.Append(" WHERE ("); AppendKeyClause(statement, parameters, revisionKey, sqlDialect); statement.Append(")"); statement.AppendLine(); statement.Append("ELSE"); statement.AppendLine(); statement.Append("INSERT INTO "); statement.Append(revisionTable); statement.Append("("); statement.Append(GetRevisionGlobalKeyColumnIdentifier(sqlDialect)); statement.Append(","); statement.Append(GetRevisionLocalKeyColumnIdentifier(sqlDialect)); statement.Append(","); statement.Append(revisionValueColumn); statement.Append(") VALUES ("); statement.Append(parameters[revisionGlobalKeyParameter].Name); statement.Append(","); statement.Append(parameters[revisionLocalKeyParameter].Name); statement.Append(","); statement.Append(revisionValueParameter); statement.Append(")"); statement.Append(sqlDialect.StatementDelimiter); statement.AppendLine(); statement.Append("COMMIT TRANSACTION " + incrementrevision); statement.Append(sqlDialect.StatementDelimiter); statement.AppendLine(); parameters.Add(revisionValueParameter, Guid.NewGuid()); return(QueryFactory.CreateQuery( new QueryDefinition( typeof(Revision) + "." + MethodBase.GetCurrentMethod().Name, storageProviderDefinition, statement.ToString(), QueryType.Scalar), parameters)); }
/// <summary> /// Transforms all the expressions in this clause and its child objects via the given <paramref name="transformation"/> delegate. /// </summary> /// <param name="transformation">The transformation object. This delegate is called for each <see cref="Expression"/> within this /// clause, and those expressions will be replaced with what the delegate returns.</param> public virtual void TransformExpressions(Func <Expression, Expression> transformation) { ArgumentUtility.CheckNotNull("transformation", transformation); FromExpression = transformation(FromExpression); }
public bool IsTypeValid(Type type) { ArgumentUtility.CheckNotNull("type", type); return(_validTypes.Contains(type)); }
public VfpProvider(IDataTableFactory dataTableFactory) { ArgumentUtility.CheckNotNull("dataTableFactory", dataTableFactory); this._dataTableFactory = dataTableFactory; }
private void Orderings_ItemAdded(object sender, ObservableCollectionChangedEventArgs <Ordering> e) { ArgumentUtility.CheckNotNull("e", e); ArgumentUtility.CheckNotNull("e.Item", e.Item); }
protected override IEnumerable <IPropertyValidator> GetValidators(PropertyInfo property) { ArgumentUtility.CheckNotNull("property", property); return(new[] { new NotNullValidator() }); }
public bool ContainsMapping(IQuerySource querySource) { ArgumentUtility.CheckNotNull("querySource", querySource); return(_lookup.ContainsKey(querySource)); }
public InfrastructureResourceUrlFactory(IResourceUrlFactory resourceUrlFactory) { ArgumentUtility.CheckNotNull("resourceUrlFactory", resourceUrlFactory); _resourceUrlFactory = resourceUrlFactory; }
public IEnumerable <IQueryResultRow> ExecuteCustomQuery(IQuery query) { ArgumentUtility.CheckNotNull("query", query); return(_parentTransactionContext.ExecuteCustomQuery(query)); }
public NonIntroducedAttribute(Type nonIntroducedType) { _nonIntroducedType = ArgumentUtility.CheckNotNull("nonIntroducedType", nonIntroducedType); }
public virtual object ExecuteScalarQuery(IQuery query) { ArgumentUtility.CheckNotNull("query", query); return(_parentTransactionContext.ExecuteScalarQuery(query)); }
/// <summary> /// Renders a command control as link with an icon, a text or both. /// </summary> /// <param name="renderingContext">The <see cref="BocColumnRenderingContext{BocColumnDefinition}"/>.</param> /// <param name="originalRowIndex">The zero-based index of the current row in <see cref="IBocList"/></param> /// <param name="businessObject">The <see cref="IBusinessObject"/> associated with the current row.</param> /// <param name="command">The <see cref="Remotion.ObjectBinding.Web.UI.Controls.BocList.RowEditModeCommand"/> that is issued /// when the control is clicked. Must not be <see langword="null" />.</param> /// <param name="alternateText">The <see cref="Remotion.ObjectBinding.Web.UI.Controls.BocList.ResourceIdentifier"/> /// specifying which resource to load as alternate text to the icon.</param> /// <param name="icon">The icon to render; must not be <see langword="null"/>. /// To skip the icon, set <see cref="IconInfo.Url"/> to <see langword="null" />.</param> /// <param name="text">The text to render after the icon. May be <see langword="null"/>, in which case no text is rendered.</param> protected virtual void RenderCommandControl( BocColumnRenderingContext <BocRowEditModeColumnDefinition> renderingContext, int originalRowIndex, IBusinessObject businessObject, BocList.RowEditModeCommand command, BocList.ResourceIdentifier alternateText, IconInfo icon, string text) { ArgumentUtility.CheckNotNull("renderingContext", renderingContext); ArgumentUtility.CheckNotNull("businessObject", businessObject); ArgumentUtility.CheckNotNull("icon", icon); string argument = renderingContext.Control.GetRowEditCommandArgument(new BocListRow(originalRowIndex, businessObject), command); string postBackEvent = renderingContext.Control.Page.ClientScript.GetPostBackEventReference(renderingContext.Control, argument) + ";"; var commandItemID = "Column_" + renderingContext.ColumnIndex + "_RowEditCommand_" + command + "_Row_" + originalRowIndex; Command c; if (!renderingContext.Control.IsReadOnly && renderingContext.Control.HasClientScript) { c = new Command(CommandType.Event) { EventCommand = new Command.EventCommandInfo() } } ; else { c = new Command(CommandType.None); } c.ItemID = commandItemID; c.OwnerControl = renderingContext.Control; c.RenderBegin(renderingContext.Writer, RenderingFeatures, postBackEvent, new string[0], c_onCommandClickScript, null); bool hasIcon = icon.HasRenderingInformation; bool hasText = !string.IsNullOrEmpty(text); if (hasIcon && hasText) { icon.Render(renderingContext.Writer, renderingContext.Control); renderingContext.Writer.Write(c_whiteSpace); } else if (hasIcon) { bool hasAlternateText = !string.IsNullOrEmpty(icon.AlternateText); if (!hasAlternateText) { icon.AlternateText = renderingContext.Control.GetResourceManager().GetString(alternateText); } icon.Render(renderingContext.Writer, renderingContext.Control); } if (hasText) { renderingContext.Writer.Write(text); // Do not HTML encode. } c.RenderEnd(renderingContext.Writer); }
public SubPersistenceStrategy(IParentTransactionContext parentTransactionContext) { ArgumentUtility.CheckNotNull("parentTransactionContext", parentTransactionContext); _parentTransactionContext = parentTransactionContext; }
public void AddResultOperator(ResultOperatorBase resultOperator) { ArgumentUtility.CheckNotNull("resultOperator", resultOperator); _resultOperators.Add(resultOperator); }
public virtual ObjectID CreateNewObjectID(ClassDefinition classDefinition) { ArgumentUtility.CheckNotNull("classDefinition", classDefinition); return(_parentTransactionContext.CreateNewObjectID(classDefinition)); }
public ExceptExpressionNode(MethodCallExpressionParseInfo parseInfo, Expression source2) : base(parseInfo, null, null) { ArgumentUtility.CheckNotNull("source2", source2); Source2 = source2; }
public DomainObject GetEnlistedDomainObject(ObjectID objectID) { ArgumentUtility.CheckNotNull("objectID", objectID); return(_enlistedObjects.GetValueOrDefault(objectID)); }
public override void TransformExpressions(Func <Expression, Expression> transformation) { ArgumentUtility.CheckNotNull("transformation", transformation); Count = transformation(Count); }
public bool IsEnlisted(DomainObject domainObject) { ArgumentUtility.CheckNotNull("domainObject", domainObject); return(GetEnlistedDomainObject(domainObject.ID) == domainObject); }
/// <inheritdoc /> public IMethodEmitter CreatePublicInterfaceMethodImplementation(MethodInfo interfaceMethod) { ArgumentUtility.CheckNotNull("interfaceMethod", interfaceMethod); return(CreateMethodOverrideOrInterfaceImplementation(interfaceMethod, true, MethodAttributes.NewSlot | MethodAttributes.Public)); }
public FetchManyExpressionNode(MethodCallExpressionParseInfo parseInfo, LambdaExpression relatedObjectSelector) : base(parseInfo, ArgumentUtility.CheckNotNull("relatedObjectSelector", relatedObjectSelector)) { }
// does not create the event's methods public CustomEventEmitter CreateEventOverride(EventInfo baseEvent) { ArgumentUtility.CheckNotNull("baseEvent", baseEvent); return(CreateEventOverrideOrInterfaceImplementation(baseEvent, true)); }
void IFlattenedSerializable.SerializeIntoFlatStructure(FlattenedSerializationInfo info) { ArgumentUtility.CheckNotNull("info", info); }