text
stringlengths
9
39.2M
dir
stringlengths
26
295
lang
stringclasses
185 values
created_date
timestamp[us]
updated_date
timestamp[us]
repo_name
stringlengths
1
97
repo_full_name
stringlengths
7
106
star
int64
1k
183k
len_tokens
int64
1
13.8M
```xml /* * This software is released under MIT license. * The full license information can be found in LICENSE in the root directory of this project. */ import { renderIcon } from '../icon.renderer.js'; import { IconShapeTuple } from '../interfaces/icon.interfaces.js'; const icon = { outline: '<path d="M29.5,7h-19A1.5,1.5,0,0,0,9,8.5v24A1.5,1.5,0,0,0,10.5,34h19A1.5,1.5,0,0,0,31,32.5V8.5A1.5,1.5,0,0,0,29.5,7ZM29,32H11V9H29Z"/><path d="M26,3.5A1.5,1.5,0,0,0,24.5,2H5.5A1.5,1.5,0,0,0,4,3.5v24A1.5,1.5,0,0,0,5.5,29H6V4H26Z"/>', solid: '<path d="M27,3.56A1.56,1.56,0,0,0,25.43,2H5.57A1.56,1.56,0,0,0,4,3.56V28.44A1.56,1.56,0,0,0,5.57,30h.52V4.07H27Z"/><rect x="8" y="6" width="23" height="28" rx="1.5" ry="1.5"/>', }; export const copyIconName = 'copy'; export const copyIcon: IconShapeTuple = [copyIconName, renderIcon(icon)]; ```
/content/code_sandbox/packages/core/src/icon/shapes/copy.ts
xml
2016-09-29T17:24:17
2024-08-11T17:06:15
clarity
vmware-archive/clarity
6,431
411
```xml <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="path_to_url"> <ItemDefinitionGroup> <ClCompile> <AdditionalIncludeDirectories>$(SolutionDir)lib\3rdParty\dlib\include\dlib\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> <Link> <AdditionalLibraryDirectories>$(SolutionDir)lib\3rdParty\dlib\lib\$(PlatformTarget)\v140\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalDependencies>dlib.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> <PreBuildEvent /> </ItemDefinitionGroup> </Project> ```
/content/code_sandbox/lib/3rdParty/dlib/dlib.props
xml
2016-03-05T20:08:49
2024-08-16T11:30:08
OpenFace
TadasBaltrusaitis/OpenFace
6,799
155
```xml import {MikroOrmRegistry} from "../services/MikroOrmRegistry.js"; import {Inject} from "@tsed/di"; /** * Get the ORM for the given context name. * @param {String} contextName */ export const Orm = (contextName?: string): PropertyDecorator => Inject(MikroOrmRegistry, (registry: MikroOrmRegistry) => registry.get(contextName)) as PropertyDecorator; ```
/content/code_sandbox/packages/orm/mikro-orm/src/decorators/orm.ts
xml
2016-02-21T18:38:47
2024-08-14T21:19:48
tsed
tsedio/tsed
2,817
91
```xml <UserControl x:Class="Aurora.Settings.Control_LayerList" xmlns="path_to_url" xmlns:x="path_to_url" xmlns:mc="path_to_url" xmlns:d="path_to_url" xmlns:Controls="clr-namespace:Aurora.Controls" xmlns:Utils="clr-namespace:Aurora.Utils" xmlns:Win="System.Windows" mc:Ignorable="d" d:DesignHeight="150" d:DesignWidth="200" GotFocus="UserControl_GotFocus"> <UserControl.Resources> <ResourceDictionary> <Utils:TextCharacterLimitConv x:Key="TextCharacterLimitConv" MaxLength="24"/> <Utils:IsNullToBooleanConverter x:Key="NullToBoolConv" ReturnValWhenNull="False" /> </ResourceDictionary> </UserControl.Resources> <Grid> <Border Background="#A5000000" CornerRadius="8" /> <Border Background="#54A8A8A8" CornerRadius="8" VerticalAlignment="Top" Height="25"> <TextBlock TextWrapping="Wrap" Text="{Binding ListTitle}" VerticalAlignment="Top" Margin="10,3,10,0"/> </Border> <StackPanel Orientation="Horizontal" Margin="0,30" VerticalAlignment="Top" HorizontalAlignment="Right" Height="24"> <Button ToolTip="Add a new layer" Margin="2,0" Click="AddButton_Click"> <DockPanel Margin="2,0"> <Image Source="/Aurora;component/Resources/Layers_Add.png" Width="18" Height="18"/> <TextBlock>Add</TextBlock> </DockPanel> </Button> <Button ToolTip="Copy the selected layer (Ctrl + C)" Margin="2,0" Click="CopyButton_Click"> <Image Source="/Aurora;component/Resources/Layers_Copy.png" Margin="2,0" Width="18" Height="18"/> </Button> <Button ToolTip="Paste layer from clipboard (Ctrl + V)" Margin="2,0" Click="PasteButton_Click"> <Image Source="/Aurora;component/Resources/Layers_Paste.png" Margin="2,0" Width="18" Height="18"/> </Button> <Button ToolTip="Remove selected layer (Del)" Margin="2,0" IsEnabled="{Binding Path=SelectedLayer, Converter={StaticResource NullToBoolConv}}" Click="DeleteButton_Click"> <Image Source="/Aurora;component/Resources/Layers_Remove.png" Margin="2,0" Width="18" Height="18" /> </Button> </StackPanel> <DockPanel Margin="0,59,0,0"> <Grid Height="23" VerticalAlignment="Top" DockPanel.Dock="Top" Visibility="{Binding DayNightCheckboxesVisiblity}"> <RadioButton GroupName="TimeSelection" HorizontalAlignment="Left" VerticalAlignment="Top" ToolTip="Daytime" IsChecked="True" Checked="CollectionSelection_Checked"> <Grid> <Image Source="/Aurora;component/Resources/Daytime_Icon.png" HorizontalAlignment="Left" Margin="0,0,0,0" /> <TextBlock Margin="23,0,-3,0">Daytime</TextBlock> </Grid> </RadioButton> <RadioButton x:Name="showSecondaryCollection" GroupName="TimeSelection" HorizontalAlignment="Left" Margin="91,0,0,0" VerticalAlignment="Top" ToolTip="Nighttime" Checked="CollectionSelection_Checked"> <Grid> <Image Source="/Aurora;component/Resources/Nighttime_Icon.png" HorizontalAlignment="Left" Margin="0,0,0,0" /> <TextBlock Margin="20,0,0,0">Nighttime</TextBlock> </Grid> </RadioButton> </Grid> <Controls:ReorderableListBox x:Name="lstLayers" ItemsSource="{Binding ActiveLayerCollection}" SelectedItem="{Binding Path=SelectedLayer, Mode=TwoWay}" DragElementTag="Dragger" SelectionMode="Single" DockPanel.Dock="Bottom" ScrollViewer.HorizontalScrollBarVisibility="Disabled" KeyDown="ReorderableListBox_KeyDown"> <ListBox.ItemTemplate> <HierarchicalDataTemplate> <DockPanel HorizontalAlignment="Stretch" Width="192" > <CheckBox IsChecked="{Binding Path=Enabled, Mode=TwoWay}" /> <Image Source="/Aurora;component/Resources/Layers_Drag.png" Tag="Dragger" Cursor="SizeNS" Width="16" Height="16" DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="0,0,5,0" ToolTip="Drag to rearrange layers"/> <TextBlock Text="{Binding Path=Name, Converter={StaticResource ResourceKey=TextCharacterLimitConv}}"/> </DockPanel> </HierarchicalDataTemplate> </ListBox.ItemTemplate> </Controls:ReorderableListBox> </DockPanel> </Grid> </UserControl> ```
/content/code_sandbox/Project-Aurora/Project-Aurora/Settings/Control_LayerList.xaml
xml
2016-04-04T05:18:18
2024-08-03T10:11:45
Aurora
antonpup/Aurora
1,824
1,089
```xml import { Injectable } from '@angular/core'; import { Action, Selector, State, StateContext } from '@ngxs/store'; import { AuthCurrentConsumerResponse } from 'app/model/authentication.model'; import { AuthentifiedUser, AuthSummary } from 'app/model/user.model'; import { AuthenticationService } from 'app/service/authentication/authentication.service'; import { throwError } from 'rxjs'; import { catchError, finalize, tap } from 'rxjs/operators'; import * as ActionAuthentication from './authentication.action'; export class AuthenticationStateModel { public error: any; public summary: AuthSummary; public user: AuthentifiedUser; public loading: boolean; } export function getInitialApplicationsState(): AuthenticationStateModel { return <AuthenticationStateModel>{}; } @State<AuthenticationStateModel>({ name: 'authentication', defaults: getInitialApplicationsState() }) @Injectable() export class AuthenticationState { constructor( private _authenticationService: AuthenticationService ) { } @Selector() static error(state: AuthenticationStateModel) { return state.error; } @Selector() static summary(state: AuthenticationStateModel) { return state.summary; } @Action(ActionAuthentication.FetchCurrentAuth) fetchCurrentAuth(ctx: StateContext<AuthenticationStateModel>) { ctx.patchState({ loading: true }); return this._authenticationService.getMe().pipe( finalize(() => { ctx.patchState({ loading: false }); }), tap((res: AuthCurrentConsumerResponse) => { let s = new AuthSummary(); s.user = res.user; s.consumer = res.consumer; s.session = res.session; s.driverManifest = res.driver_manifest; ctx.patchState({ summary: s, error: null }); }), catchError(err => { ctx.patchState({ summary: null, error: err }); return throwError(err); }) ); } @Action(ActionAuthentication.SignoutCurrentUser) signoutCurrentUser(ctx: StateContext<AuthenticationStateModel>) { ctx.patchState({ loading: true }); return this._authenticationService.signout().pipe( finalize(() => { ctx.patchState({ loading: false }); }), tap(_ => { ctx.patchState({ user: null, summary: null, error: null }); }), catchError(err => { ctx.patchState({ user: null, summary: null, error: err }); return throwError(err); }) ); } } ```
/content/code_sandbox/ui/src/app/store/authentication.state.ts
xml
2016-10-11T08:28:23
2024-08-16T01:55:31
cds
ovh/cds
4,535
530
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ // TypeScript Version: 4.1 /** * Interface describing `ssort2ins`. */ interface Routine { /** * Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using insertion sort. * * @param N - number of indexed elements * @param order - sort order * @param x - first input array * @param strideX - `x` stride length * @param y - second input array * @param strideY - `y` stride length * @returns first input array * * @example * var Float32Array = require( '@stdlib/array/float32' ); * * var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] ); * var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] ); * * ssort2ins( x.length, 1, x, 1, y, 1 ); * * console.log( x ); * // => <Float32Array>[ -4.0, -2.0, 1.0, 3.0 ] * * console.log( y ); * // => <Float32Array>[ 3.0, 1.0, 0.0, 2.0 ] */ ( N: number, order: number, x: Float32Array, strideX: number, y: Float32Array, strideY: number ): Float32Array; /** * Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using insertion sort and alternative indexing semantics. * * @param N - number of indexed elements * @param order - sort order * @param x - first input array * @param strideX - `x` stride length * @param offsetX - `x` starting index * @param y - second input array * @param strideY - `y` stride length * @param offsetY - `y` starting index * @returns first input array * * @example * var Float32Array = require( '@stdlib/array/float32' ); * * var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] ); * var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] ); * * ssort2ins.ndarray( x.length, 1, x, 1, 0, y, 1, 0 ); * * console.log( x ); * // => <Float32Array>[ -4.0, -2.0, 1.0, 3.0 ] * * console.log( y ); * // => <Float32Array>[ 3.0, 1.0, 0.0, 2.0 ] */ ndarray( N: number, order: number, x: Float32Array, strideX: number, offsetX: number, y: Float32Array, strideY: number, offsetY: number ): Float32Array; } /** * Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using insertion sort. * * @param N - number of indexed elements * @param order - sort order * @param x - first input array * @param strideX - `x` stride length * @param y - second input array * @param strideY - `y` stride length * @returns first input array * * @example * var Float32Array = require( '@stdlib/array/float32' ); * * var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] ); * var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] ); * * ssort2ins( x.length, 1, x, 1, y, 1 ); * * console.log( x ); * // => <Float32Array>[ -4.0, -2.0, 1.0, 3.0 ] * * console.log( y ); * // => <Float32Array>[ 3.0, 1.0, 0.0, 2.0 ] * * @example * var Float32Array = require( '@stdlib/array/float32' ); * * var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] ); * var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] ); * * ssort2ins.ndarray( x.length, 1, x, 1, 0, y, 1, 0 ); * * console.log( x ); * // => <Float32Array>[ -4.0, -2.0, 1.0, 3.0 ] * * console.log( y ); * // => <Float32Array>[ 3.0, 1.0, 0.0, 2.0 ] */ declare var ssort2ins: Routine; // EXPORTS // export = ssort2ins; ```
/content/code_sandbox/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
1,267
```xml // See LICENSE.txt for license information. import React, {useCallback, useMemo} from 'react'; import {LayoutAnimation, TouchableOpacity, View} from 'react-native'; import CompassIcon from '@components/compass_icon'; import {MAX_RESOLUTION} from '@constants/image'; import {removeShareExtensionFile} from '@share/state'; import {toFileInfo} from '@share/utils'; import {isImage, isVideo} from '@utils/file'; import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme'; import Info from './info'; import Thumbnail from './thumbnail'; import type {SharedItem} from '@mattermost/rnshare'; type Props = { file: SharedItem; maxFileSize: number; isSmall?: boolean; theme: Theme; }; const hitSlop = {top: 10, left: 10, right: 10, bottom: 10}; const layoutAnimConfig = { duration: 300, update: { type: LayoutAnimation.Types.easeInEaseOut, }, delete: { duration: 100, type: LayoutAnimation.Types.easeInEaseOut, property: LayoutAnimation.Properties.opacity, }, }; const getStyles = makeStyleSheetFromTheme((theme: Theme) => ({ remove: { backgroundColor: theme.centerChannelBg, borderRadius: 12, height: 24, position: 'absolute', right: -5, top: -7, width: 24, }, })); const Single = ({file, isSmall, maxFileSize, theme}: Props) => { const styles = getStyles(theme); const fileInfo = useMemo(() => toFileInfo(file), [file]); const contentMode = isSmall ? 'small' : 'large'; const type = useMemo(() => { if (isImage(fileInfo)) { return 'image'; } if (isVideo(fileInfo)) { return 'video'; } return undefined; }, [fileInfo]); const hasError = useMemo(() => { const size = file.size || 0; if (size > maxFileSize) { return true; } if (type === 'image' && file.height && file.width) { return (file.width * file.height) > MAX_RESOLUTION; } return false; }, [file, maxFileSize, type]); const onPress = useCallback(() => { LayoutAnimation.configureNext(layoutAnimConfig); removeShareExtensionFile(file); }, [file]); let attachment; if (type) { attachment = ( <Thumbnail contentMode={contentMode} file={file} hasError={hasError} theme={theme} type={type} /> ); } else { attachment = ( <Info contentMode={contentMode} file={fileInfo} hasError={hasError} theme={theme} /> ); } if (isSmall) { return ( <View> {attachment} <View style={styles.remove}> <TouchableOpacity hitSlop={hitSlop} onPress={onPress} > <CompassIcon name='close-circle' size={24} color={changeOpacity(theme.centerChannelColor, 0.56)} /> </TouchableOpacity> </View> </View> ); } return attachment; }; export default Single; ```
/content/code_sandbox/share_extension/components/content_view/attachments/single.tsx
xml
2016-10-07T16:52:32
2024-08-16T12:08:38
mattermost-mobile
mattermost/mattermost-mobile
2,155
726
```xml import React from 'react'; import { Actions, AttachmentStore, Message } from 'mailspring-exports'; import { AttachmentItem } from 'mailspring-component-kit'; export const AttachmentsArea: React.FunctionComponent<{ draft: Message }> = props => { const { files, headerMessageId } = props.draft; return ( <div className="attachments-area"> {files .filter(f => !f.contentId) .map(file => ( <AttachmentItem key={file.id} className="file-upload" draggable={false} filePath={AttachmentStore.pathForFile(file)} displayName={file.filename} fileIconName={`file-${file.displayExtension()}.png`} onRemoveAttachment={() => Actions.removeAttachment(headerMessageId, file)} /> ))} </div> ); }; ```
/content/code_sandbox/app/internal_packages/composer/lib/attachments-area.tsx
xml
2016-10-13T06:45:50
2024-08-16T18:14:37
Mailspring
Foundry376/Mailspring
15,331
176
```xml import { IndicatorInput, Indicator } from '../indicator/indicator'; export declare class PSARInput extends IndicatorInput { step: number; max: number; high: number[]; low: number[]; } export declare class PSAR extends Indicator { result: number[]; generator: IterableIterator<number | undefined>; constructor(input: PSARInput); static calculate: typeof psar; nextValue(input: PSARInput): number; } export declare function psar(input: PSARInput): number[]; ```
/content/code_sandbox/declarations/momentum/PSAR.d.ts
xml
2016-05-02T19:16:32
2024-08-15T14:25:09
technicalindicators
anandanand84/technicalindicators
2,137
108
```xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration type="com.atollic.hardwaredebug.launch.launchConfigurationType"> <stringAttribute key="com.atollic.hardwaredebug.launch.analyzeCommands" value="# Set flash parallelism mode to 32, 16, or 8 bit when using STM32 F2/F4 microcontrollers&#13;&#10;# Uncomment next line, 2=32 bit, 1=16 bit and 0=8 bit parallelism mode&#13;&#10;#monitor flash set_parallelism_mode 2&#13;&#10;&#13;&#10;# Load the program executable&#13;&#10;load&#13;&#10;&#13;&#10;# Reset to known state&#13;&#10;monitor reset&#13;&#10;&#13;&#10;# Start the executable.&#13;&#10;continue"/> <booleanAttribute key="com.atollic.hardwaredebug.launch.enable_swv" value="false"/> <intAttribute key="com.atollic.hardwaredebug.launch.formatVersion" value="2"/> <stringAttribute key="com.atollic.hardwaredebug.launch.initCommands" value=""/> <stringAttribute key="com.atollic.hardwaredebug.launch.ipAddress" value="localhost"/> <stringAttribute key="com.atollic.hardwaredebug.launch.jtagDevice" value="ST-LINK"/> <intAttribute key="com.atollic.hardwaredebug.launch.portNumber" value="61234"/> <stringAttribute key="com.atollic.hardwaredebug.launch.remoteCommand" value="target extended-remote"/> <stringAttribute key="com.atollic.hardwaredebug.launch.runCommands" value="# Set flash parallelism mode to 32, 16, or 8 bit when using STM32 F2/F4 microcontrollers&#13;&#10;# Uncomment next line, 2=32 bit, 1=16 bit and 0=8 bit parallelism mode&#13;&#10;#monitor flash set_parallelism_mode 2&#13;&#10;&#13;&#10;# Load the program executable&#13;&#10;load&#13;&#10;&#13;&#10;# Set a breakpoint at main().&#13;&#10;tbreak main&#13;&#10;&#13;&#10;# Reset to known state&#13;&#10;monitor reset&#13;&#10;&#13;&#10;# Run to the breakpoint.&#13;&#10;continue"/> <stringAttribute key="com.atollic.hardwaredebug.launch.serverParam" value="-p 61234 -l 1 -d"/> <booleanAttribute key="com.atollic.hardwaredebug.launch.startServer" value="true"/> <booleanAttribute key="com.atollic.hardwaredebug.launch.swd_mode" value="true"/> <stringAttribute key="com.atollic.hardwaredebug.launch.swv_port" value="61235"/> <stringAttribute key="com.atollic.hardwaredebug.launch.swv_trace_div" value="8"/> <stringAttribute key="com.atollic.hardwaredebug.launch.swv_trace_hclk" value="8000000"/> <booleanAttribute key="com.atollic.hardwaredebug.launch.swv_wait_for_sync" value="true"/> <booleanAttribute key="com.atollic.hardwaredebug.launch.useRemoteTarget" value="true"/> <stringAttribute key="com.atollic.hardwaredebug.launch.verifyCommands" value="# Set flash parallelism mode to 32, 16, or 8 bit when using STM32 F2/F4 microcontrollers&#13;&#10;# Uncomment next line, 2=32 bit, 1=16 bit and 0=8 bit parallelism mode&#13;&#10;#monitor flash set_parallelism_mode 2&#13;&#10;&#13;&#10;# Load the program executable&#13;&#10;load&#13;&#10;&#13;&#10;# Set a breakpoint at main().&#13;&#10;tbreak main&#13;&#10;&#13;&#10;# Reset to known state&#13;&#10;monitor reset&#13;&#10;&#13;&#10;# Run to the breakpoint.&#13;&#10;continue"/> <booleanAttribute key="com.atollic.hardwaredebug.stlink.enable_logging" value="false"/> <stringAttribute key="com.atollic.hardwaredebug.stlink.log_file" value="C:\VSS\BARRACUDA\INTRODUCTION PACKAGE\FIRMWARE\STM32_USB-FS-Device_Lib\Project\Audio_Speaker\TrueSTUDIO\STM3210E-EVAL\Debug\st-link_gdbserver_log.txt"/> <booleanAttribute key="com.atollic.hardwaredebug.stlink.verify_flash" value="false"/> <stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="${TOOLCHAIN_PATH}/arm-atollic-eabi-gdb"/> <stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="Standard (Windows)"/> <stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/> <booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/> <stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${TOOLCHAIN_PATH}/arm-atollic-eabi-gdb"/> <intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/> <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/> <stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList/&gt;"/> <stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/> <stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList/&gt;&#13;&#10;"/> <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/STM3210E-EVAL.elf"/> <stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="STM3210E-EVAL"/> <stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> <listEntry value="/STM3210E-EVAL"/> </listAttribute> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> <listEntry value="4"/> </listAttribute> </launchConfiguration> ```
/content/code_sandbox/libs/STM32_USB-FS-Device_Lib_V4.0.0/Projects/Audio_Speaker/TrueSTUDIO/STM3210E-EVAL/STM3210E-EVAL.elf.launch
xml
2016-08-10T15:31:26
2024-08-16T13:06:40
Avem
avem-labs/Avem
1,930
1,406
```xml /** * ARIA helper to concatenate attributes, returning undefined if all attributes * are undefined. (Empty strings are not a valid ARIA attribute value.) * * @param ariaAttributes - ARIA attributes to merge */ export function mergeAriaAttributeValues(...ariaAttributes: (string | undefined | false)[]): string | undefined { const mergedAttribute = ariaAttributes .filter((arg: string | undefined | false) => arg) .join(' ') .trim(); return mergedAttribute === '' ? undefined : mergedAttribute; } ```
/content/code_sandbox/packages/utilities/src/aria.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
114
```xml import React from 'react'; import EmailTemplate from '@erxes/ui-emailtemplates/src/components/EmailTemplate'; import { Button, ControlLabel, FormGroup, Label, ModalTrigger, Tip, __ } from '@erxes/ui/src'; import { Columns } from '@erxes/ui/src/styles/chooser'; import { Column } from '@erxes/ui/src/styles/main'; import { LabelContainer } from '../styles'; type Props = { result: any; action: any; }; class SendEmail extends React.Component<Props> { constructor(props) { super(props); } renderTemplate(action, result) { const { actionConfig } = action; return ( <FormGroup> <ControlLabel>{__('Email Template')}</ControlLabel> <EmailTemplate templateId={actionConfig?.templateId} template={{ content: result.customHtml }} onlyPreview /> </FormGroup> ); } renderEmails({ fromEmail, title, responses }) { const getLabelColor = response => { if (response?.messageId) { return 'success'; } if (response?.error) { return 'danger'; } return 'default'; }; const getLabelText = response => { if (response.error) { return typeof response?.error === 'object' ? JSON.stringify(response.error || {}) : `${response?.error}`; } if (response.messageId) { return 'Sent'; } return ''; }; return ( <li> <ul> <strong>{`From: `}</strong> {`${fromEmail || ''}`} </ul> <ul> <strong>{`Subject: `}</strong> {`${title || ''}`} </ul> <ul> <LabelContainer> <strong>{`To:`}</strong> {responses.map((response, i) => ( <> <Tip text={getLabelText(response)}> <Label key={i} lblStyle={getLabelColor(response)}> {response?.toEmail || ''} </Label> </Tip> </> ))} </LabelContainer> </ul> </li> ); } render() { const { action, result } = this.props; return ( <div> {this.renderTemplate(action, result)} <div>{this.renderEmails(result)}</div> </div> ); } } export default SendEmail; ```
/content/code_sandbox/packages/plugin-automations-ui/src/components/histories/components/SendEmail.tsx
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
533
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import dcusumkbn = require( './index' ); // TESTS // // The function returns a Float64Array... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn( x.length, 0.0, x, 1, y, 1 ); // $ExpectType Float64Array } // The compiler throws an error if the function is provided a first argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn( '10', 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( true, 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( false, 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( null, 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( undefined, 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( [], 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( {}, 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( ( x: number ): number => x, 0.0, x, 1, y, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a second argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn( x.length, '10', 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, true, 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, false, 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, null, 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, undefined, 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, [], 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, {}, 0.0, x, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, ( x: number ): number => x, 0.0, x, 1, y, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a third argument which is not a Float64Array... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn( x.length, 0.0, 10, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, '10', 1, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, true, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, false, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, null, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, undefined, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, [ '1' ], 1, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, {}, 1, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, ( x: number ): number => x, 1, y, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a fourth argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn( x.length, 0.0, x, '10', y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, true, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, false, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, null, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, undefined, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, [], y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, {}, y, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, ( x: number ): number => x, y, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a fifth argument which is not a Float64Array... { const x = new Float64Array( 10 ); dcusumkbn( x.length, 0.0, x, 1, 10, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, '10', 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, true, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, false, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, null, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, undefined, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, [ '1' ], 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, {}, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, ( x: number ): number => x, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a sixth argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn( x.length, 0.0, x, 1, y, '10' ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, y, true ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, y, false ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, y, null ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, y, undefined ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, y, [] ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, y, {} ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, y, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided an unsupported number of arguments... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn(); // $ExpectError dcusumkbn( x.length ); // $ExpectError dcusumkbn( x.length, 0.0 ); // $ExpectError dcusumkbn( x.length, 0.0, x ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1 ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, y ); // $ExpectError dcusumkbn( x.length, 0.0, x, 1, y, 1, 10 ); // $ExpectError } // Attached to main export is an `ndarray` method which returns a Float64Array... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectType Float64Array } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn.ndarray( '10', 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( true, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( false, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( null, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( undefined, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( [], 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( {}, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( ( x: number ): number => x, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a second argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn.ndarray( x.length, '10', 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, true, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, false, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, null, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, undefined, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, [], 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, {}, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, ( x: number ): number => x, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a third argument which is not a Float64Array... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn.ndarray( x.length, 0.0, 10, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, '10', 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, true, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, false, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, null, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, undefined, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, [ '1' ], 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, {}, 1, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, ( x: number ): number => x, 1, 0, y, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn.ndarray( x.length, 0.0, x, '10', 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, true, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, false, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, null, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, undefined, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, [], 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, {}, 0, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, ( x: number ): number => x, 0, y, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn.ndarray( x.length, 0.0, x, 1, '10', y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, true, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, false, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, null, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, undefined, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, [], y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, {}, y, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, ( x: number ): number => x, y, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a Float64Array... { const x = new Float64Array( 10 ); dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, 10, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, '10', 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, true, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, false, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, null, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, undefined, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, [ '1' ], 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, {}, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, '10', 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, true, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, false, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, null, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, undefined, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, [], 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, {}, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, ( x: number ): number => x, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1, '10' ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1, true ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1, false ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1, null ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1, undefined ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1, [] ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1, {} ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); dcusumkbn.ndarray(); // $ExpectError dcusumkbn.ndarray( x.length ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1 ); // $ExpectError dcusumkbn.ndarray( x.length, 0.0, x, 1, 0, y, 1, 0, 10 ); // $ExpectError } ```
/content/code_sandbox/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
5,209
```xml import { Card, Image } from '@fluentui/react-northstar'; import * as React from 'react'; const CardExamplePreview = () => ( <Card compact aria-roledescription="image card"> <Card.Preview fitted> <Image fluid src="path_to_url" /> </Card.Preview> </Card> ); export default CardExamplePreview; ```
/content/code_sandbox/packages/fluentui/docs/src/examples/components/Card/Slots/CardExamplePreview.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
80
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ // TypeScript Version: 4.1 /// <reference types="@stdlib/types"/> /** * If provided a value, returns an updated sum of absolute values; otherwise, returns the current sum of absolute values. * * @param x - value * @returns sum of absolute values */ type accumulator = ( x?: number ) => number | null; /** * Returns an accumulator function which incrementally computes a sum of absolute values, ignoring `NaN` values. * * @returns accumulator function * * @example * var accumulator = incrnansumabs(); * * var v = accumulator(); * // returns null * * v = accumulator( 2.0 ); * // returns 2.0 * * v = accumulator( -3.0 ); * // returns 5.0 * * v = accumulator( NaN ); * // returns 5.0 * * v = accumulator( -4.0 ); * // returns 9.0 * * v = accumulator(); * // returns 9.0 */ declare function incrnansumabs(): accumulator; // EXPORTS // export = incrnansumabs; ```
/content/code_sandbox/lib/node_modules/@stdlib/stats/incr/nansumabs/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
288
```xml import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Message } from "./message"; import { Channel, MessageWithMetadata, Messenger } from "./messenger"; describe("Messenger", () => { let messengerA: Messenger; let messengerB: Messenger; let handlerA: TestMessageHandler; let handlerB: TestMessageHandler; beforeEach(() => { // jest does not support MessageChannel window.MessageChannel = MockMessageChannel as any; Object.defineProperty(window, "location", { value: { origin: "path_to_url", }, writable: true, }); const channelPair = new TestChannelPair(); messengerA = new Messenger(channelPair.channelA); messengerB = new Messenger(channelPair.channelB); handlerA = new TestMessageHandler(); handlerB = new TestMessageHandler(); messengerA.handler = handlerA.handler; messengerB.handler = handlerB.handler; }); it("should deliver message to B when sending request from A", () => { const request = createRequest(); // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling. // eslint-disable-next-line @typescript-eslint/no-floating-promises messengerA.request(request); const received = handlerB.receive(); expect(received.length).toBe(1); expect(received[0].message).toMatchObject(request); }); it("should return response from B when sending request from A", async () => { const request = createRequest(); const response = createResponse(); const requestPromise = messengerA.request(request); const received = handlerB.receive(); received[0].respond(response); const returned = await requestPromise; expect(returned).toMatchObject(response); }); it("should throw error from B when sending request from A that fails", async () => { const request = createRequest(); const error = new Error("Test error"); const requestPromise = messengerA.request(request); const received = handlerB.receive(); received[0].reject(error); await expect(requestPromise).rejects.toThrow(); }); it("should deliver abort signal to B when requesting abort", () => { const abortController = new AbortController(); // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling. // eslint-disable-next-line @typescript-eslint/no-floating-promises messengerA.request(createRequest(), abortController.signal); abortController.abort(); const received = handlerB.receive(); expect(received[0].abortController.signal.aborted).toBe(true); }); describe("destroy", () => { beforeEach(() => { /** * In Jest's jsdom environment, there is an issue where event listeners are not * triggered upon dispatching an event. This is a workaround to mock the EventTarget */ window.EventTarget = MockEventTarget as any; }); it("should remove the message event listener", async () => { const channelPair = new TestChannelPair(); const addEventListenerSpy = jest.spyOn(channelPair.channelA, "addEventListener"); const removeEventListenerSpy = jest.spyOn(channelPair.channelA, "removeEventListener"); messengerA = new Messenger(channelPair.channelA); jest .spyOn(messengerA as any, "sendDisconnectCommand") .mockImplementation(() => Promise.resolve()); expect(addEventListenerSpy).toHaveBeenCalled(); await messengerA.destroy(); expect(removeEventListenerSpy).toHaveBeenCalled(); }); it("should dispatch the destroy event on messenger destruction", async () => { const request = createRequest(); // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling. // eslint-disable-next-line @typescript-eslint/no-floating-promises messengerA.request(request); const dispatchEventSpy = jest.spyOn((messengerA as any).onDestroy, "dispatchEvent"); // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling. // eslint-disable-next-line @typescript-eslint/no-floating-promises messengerA.destroy(); expect(dispatchEventSpy).toHaveBeenCalledWith(expect.any(Event)); }); it("should trigger onDestroyListener when the destroy event is dispatched", async () => { const request = createRequest(); // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling. // eslint-disable-next-line @typescript-eslint/no-floating-promises messengerA.request(request); const onDestroyListener = jest.fn(); (messengerA as any).onDestroy.addEventListener("destroy", onDestroyListener); // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling. // eslint-disable-next-line @typescript-eslint/no-floating-promises messengerA.destroy(); expect(onDestroyListener).toHaveBeenCalled(); const eventArg = onDestroyListener.mock.calls[0][0]; expect(eventArg).toBeInstanceOf(Event); expect(eventArg.type).toBe("destroy"); }); }); }); type TestMessage = MessageWithMetadata & { testId: string }; function createRequest(): TestMessage { return { testId: Utils.newGuid(), type: "TestRequest" } as any; } function createResponse(): TestMessage { return { testId: Utils.newGuid(), type: "TestResponse" } as any; } class TestChannelPair { readonly channelA: Channel; readonly channelB: Channel; constructor() { const broadcastChannel = new MockMessageChannel<MessageWithMetadata>(); this.channelA = { addEventListener: (listener) => (broadcastChannel.port1.onmessage = listener), removeEventListener: () => (broadcastChannel.port1.onmessage = null), postMessage: (message, port) => broadcastChannel.port1.postMessage(message, port), }; this.channelB = { addEventListener: (listener) => (broadcastChannel.port2.onmessage = listener), removeEventListener: () => (broadcastChannel.port1.onmessage = null), postMessage: (message, port) => broadcastChannel.port2.postMessage(message, port), }; } } class TestMessageHandler { readonly handler: ( message: TestMessage, abortController?: AbortController, ) => Promise<Message | undefined>; private receivedMessages: { message: TestMessage; respond: (response: TestMessage) => void; reject: (error: Error) => void; abortController?: AbortController; }[] = []; constructor() { this.handler = (message, abortController) => new Promise((resolve, reject) => { this.receivedMessages.push({ message, abortController, respond: (response) => resolve(response), reject: (error) => reject(error), }); }); } receive() { const received = this.receivedMessages; this.receivedMessages = []; return received; } } class MockMessageChannel<T> { port1 = new MockMessagePort<T>(); port2 = new MockMessagePort<T>(); constructor() { this.port1.remotePort = this.port2; this.port2.remotePort = this.port1; } } class MockMessagePort<T> { onmessage: ((ev: MessageEvent<T>) => any) | null; remotePort: MockMessagePort<T>; postMessage(message: T, port?: MessagePort) { this.remotePort.onmessage( new MessageEvent("message", { data: message, ports: port ? [port] : [], origin: "path_to_url", }), ); } close() { // Do nothing } } class MockEventTarget { listeners: Record<string, EventListener[]> = {}; addEventListener(type: string, callback: EventListener) { this.listeners[type] = this.listeners[type] || []; this.listeners[type].push(callback); } dispatchEvent(event: Event) { (this.listeners[event.type] || []).forEach((callback) => callback(event)); } removeEventListener(type: string, callback: EventListener) { this.listeners[type] = (this.listeners[type] || []).filter((listener) => listener !== callback); } } ```
/content/code_sandbox/apps/browser/src/autofill/fido2/content/messaging/messenger.spec.ts
xml
2016-03-09T23:14:01
2024-08-16T15:07:51
clients
bitwarden/clients
8,877
1,778
```xml import { getCurrentScope, spanToJSON, startSpanManual } from '@sentry/core'; import { ReactNativeTracing } from '../../src/js'; import { type TestClient, setupTestClient } from '../mocks/client'; describe('Tracing extensions', () => { let client: TestClient; beforeEach(() => { client = setupTestClient({ integrations: [new ReactNativeTracing()], }); }); test('transaction has default op', async () => { const transaction = startSpanManual({ name: 'parent' }, span => span); expect(spanToJSON(transaction!)).toEqual( expect.objectContaining({ op: 'default', }), ); }); test('transaction does not overwrite custom op', async () => { const transaction = startSpanManual({ name: 'parent', op: 'custom' }, span => span); expect(spanToJSON(transaction!)).toEqual( expect.objectContaining({ op: 'custom', }), ); }); test('transaction start span creates default op', async () => { // TODO: add event listener to spanStart and add default op if not set startSpanManual({ name: 'parent', scope: getCurrentScope() }, () => {}); const span = startSpanManual({ name: 'child', scope: getCurrentScope() }, span => span); expect(spanToJSON(span!)).toEqual( expect.objectContaining({ op: 'default', }), ); }); test('transaction start span keeps custom op', async () => { startSpanManual({ name: 'parent', op: 'custom', scope: getCurrentScope() }, () => {}); const span = startSpanManual({ name: 'child', op: 'custom', scope: getCurrentScope() }, span => span); expect(spanToJSON(span!)).toEqual( expect.objectContaining({ op: 'custom', }), ); }); test('transaction start span passes correct values to the child', async () => { const transaction = startSpanManual({ name: 'parent', op: 'custom', scope: getCurrentScope() }, span => span); const span = startSpanManual({ name: 'child', scope: getCurrentScope() }, span => span); span!.end(); transaction!.end(); await client.flush(); expect(client.event).toEqual( expect.objectContaining({ contexts: expect.objectContaining({ trace: expect.objectContaining({ trace_id: transaction!.spanContext().traceId, }), }), }), ); expect(spanToJSON(span!)).toEqual( expect.objectContaining({ parent_span_id: transaction!.spanContext().spanId, }), ); }); }); ```
/content/code_sandbox/test/tracing/addTracingExtensions.test.ts
xml
2016-11-30T14:45:57
2024-08-16T13:21:38
sentry-react-native
getsentry/sentry-react-native
1,558
570
```xml <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net7.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> </Project> ```
/content/code_sandbox/test/dotnet-new.Tests/Approvals/DotnetCSharpClassTemplatesTest.enum.targetFramework=net7.0.verified/ClassLib.csproj
xml
2016-07-22T21:26:02
2024-08-16T17:23:58
sdk
dotnet/sdk
2,627
55
```xml /** @jsx jsx */ import { Transforms } from 'slate' import { jsx } from '../../..' export const run = editor => { Transforms.insertText(editor, 'a') } export const input = ( <editor> <block> first paragraph <inline> tw <anchor />o </inline> </block> <block> second <focus /> paragraph </block> </editor> ) export const output = ( <editor> <block> first paragraph <inline> twa <cursor /> </inline> paragraph </block> </editor> ) ```
/content/code_sandbox/packages/slate/test/transforms/insertText/selection/block-across-inline-wold.tsx
xml
2016-06-18T01:52:42
2024-08-16T18:43:42
slate
ianstormtaylor/slate
29,492
148
```xml #!/usr/bin/env -S node --no-warnings --loader ts-node/esm /** * Wechaty Chatbot SDK - path_to_url * * @copyright 2016 Huan LI () <path_to_url and * Wechaty Contributors <path_to_url * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ import 'dotenv/config.js' import { log, } from 'wechaty-puppet' import { config, } from '../src/config.js' import { IoClient, IoClientOptions, } from '../src/io-client.js' import { WechatyBuilder } from '../src/wechaty-builder.js' const welcome = ` | __ __ _ _ | \\ \\ / /__ ___| |__ __ _| |_ _ _ | \\ \\ /\\ / / _ \\/ __| '_ \\ / _\` | __| | | | | \\ V V / __/ (__| | | | (_| | |_| |_| | | \\_/\\_/ \\___|\\___|_| |_|\\__,_|\\__|\\__, | | |___/ =============== Powered by Wechaty =============== -------- path_to_url -------- My super power: download cloud bot from www.chatie.io __________________________________________________ ` async function main () { const token = config.token if (!token) { throw new Error('token not found: please set WECHATY_TOKEN in environment before run io-client') } console.info(welcome) log.info('Client', 'Starting for WECHATY_TOKEN: %s', token) const wechaty = WechatyBuilder.build({ name: token }) let port if (process.env['WECHATY_PUPPET_SERVER_PORT']) { port = parseInt(process.env['WECHATY_PUPPET_SERVER_PORT']) } const options: IoClientOptions = { token, wechaty, } if (port) { options.port = port } const client = new IoClient(options) client.start() .catch(onError.bind(client)) } async function onError ( this : IoClient, e : Error, ) { log.error('Client', 'start() fail: %s', e) await this.quit() process.exit(-1) } main() .catch(console.error) ```
/content/code_sandbox/bin/io-client.ts
xml
2016-05-01T14:36:45
2024-08-16T17:27:03
wechaty
wechaty/wechaty
19,828
540
```xml /* eslint-disable @typescript-eslint/naming-convention */ export {}; declare global { var Components: any; var __STORYBOOK_ADDONS_CHANNEL__: { emit: any; on: any; }; var storybookRenderer: string; } ```
/content/code_sandbox/code/core/template/stories/global.d.ts
xml
2016-03-18T04:23:44
2024-08-16T19:22:08
storybook
storybookjs/storybook
83,755
55
```xml /** * A recreation of this demo: path_to_url */ import { Chart } from '@antv/g2'; import { feature, mesh } from 'topojson'; Promise.all([ fetch('path_to_url => res.json(), ), fetch('path_to_url => res.json(), ), ]).then((values) => { const [world, hale] = values; const countries = feature(world, world.objects.countries).features; const coutriesmesh = mesh(world, world.objects.countries); const chart = new Chart({ container: 'container', autoFit: true, }); const geoView = chart.geoView(); geoView .geoPath() .data({ value: countries, transform: [ { type: 'join', join: hale, on: [(d) => d.properties.name, 'name'], select: ['hale'], }, ], }) .scale('color', { type: 'sequential', palette: 'ylGnBu', unknown: '#ccc', }) .encode('color', 'hale'); geoView.geoPath().data([coutriesmesh]).style('stroke', '#fff'); geoView.geoPath().data({ type: 'sphere' }).style('stroke', '#000'); chart.render(); }); ```
/content/code_sandbox/site/examples/geo/geo/demo/choropleth-world.ts
xml
2016-05-26T09:21:04
2024-08-15T16:11:17
G2
antvis/G2
12,060
288
```xml <?xml version="1.0" encoding="utf-8"?> <!-- path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <FrameLayout xmlns:android="path_to_url" style="@style/CommentListItem" android:paddingBottom="5dp" android:paddingTop="0dp" > <include layout="@layout/comment" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/comment_item.xml
xml
2016-04-09T16:05:02
2024-08-08T06:37:18
trugithub
kba7/trugithub
2,055
102
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import signum = require( './index' ); // TESTS // // The function returns a number... { signum( 8.78 ); // $ExpectType number signum( -8 ); // $ExpectType number signum( 0 ); // $ExpectType number } // The compiler throws an error if the function is provided a value other than a number... { signum( true ); // $ExpectError signum( false ); // $ExpectError signum( null ); // $ExpectError signum( undefined ); // $ExpectError signum( '5' ); // $ExpectError signum( [] ); // $ExpectError signum( {} ); // $ExpectError signum( ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided insufficient arguments... { signum(); // $ExpectError } ```
/content/code_sandbox/lib/node_modules/@stdlib/math/base/special/signum/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
244
```xml import styled from 'styled-components'; import { Typography } from '@components'; import { getAssetByUUID, useAssets } from '@services/Store'; import { BREAK_POINTS, COLORS, SPACING } from '@theme'; import { Asset } from '@types'; import { IMembershipConfig } from '../config'; const PlanCard = styled.div` @media screen and (max-width: ${BREAK_POINTS.SCREEN_SM}) { width: 48%; margin-top: ${SPACING.SM}; flex-direction: column; justify-content: flex-start; height: 212px; } display: flex; flex-direction: column; align-items: center; width: 24%; padding: ${SPACING.BASE}; background-color: ${COLORS.WHITE}; border-radius: 6px; box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.07); `; const Description = styled.div` display: flex; flex-direction: column; align-items: center; height: 100%; & > * { padding-top: ${SPACING.SM}; } `; const STypography = styled(Typography)` color: ${COLORS.BLUE_BRIGHT}; font-style: italic; text-align: center; `; export default ({ plan }: { plan: IMembershipConfig }) => { const { assets } = useAssets(); const planAsset = getAssetByUUID(assets)(plan.assetUUID) ?? ({} as Asset); return ( <PlanCard> <img src={plan.icon} /> <Description> <Typography bold={true}>{plan.title}</Typography> <Typography>{`${plan.price} ${planAsset.ticker}`}</Typography> <STypography>{plan.discountNotice}</STypography> </Description> </PlanCard> ); }; ```
/content/code_sandbox/src/features/PurchaseMembership/components/MembershipPlanCard.tsx
xml
2016-12-04T01:35:27
2024-08-14T21:41:58
MyCrypto
MyCryptoHQ/MyCrypto
1,347
404
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import FLOAT16_MIN_SAFE_INTEGER = require( './index' ); // TESTS // // The export is a number... { // eslint-disable-next-line @typescript-eslint/no-unused-expressions FLOAT16_MIN_SAFE_INTEGER; // $ExpectType number } ```
/content/code_sandbox/lib/node_modules/@stdlib/constants/float16/min-safe-integer/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
103
```xml <!-- ~ contributor license agreements. See the NOTICE file distributed with ~ this work for additional information regarding copyright ownership. ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <dataset> <metadata> <column name="pool_id" /> <column name="pool_size" /> <column name="free_buffers" /> <column name="database_pages" /> <column name="old_database_pages" /> <column name="modified_database_pages" /> <column name="pending_decompress" /> <column name="pending_reads" /> <column name="pending_flush_lru" /> <column name="pending_flush_list" /> <column name="pages_made_young" /> <column name="pages_not_made_young" /> <column name="pages_made_young_rate" /> <column name="pages_made_not_young_rate" /> <column name="number_pages_read" /> <column name="number_pages_created" /> <column name="number_pages_written" /> <column name="pages_read_rate" /> <column name="pages_create_rate" /> <column name="pages_written_rate" /> <column name="number_pages_get" /> <column name="hit_rate" /> <column name="young_make_per_thousand_gets" /> <column name="not_young_make_per_thousand_gets" /> <column name="number_pages_read_ahead" /> <column name="number_read_ahead_evicted" /> <column name="read_ahead_rate" /> <column name="read_ahead_evicted_rate" /> <column name="lru_io_total" /> <column name="lru_io_current" /> <column name="uncompress_total" /> <column name="uncompress_current" /> </metadata> </dataset> ```
/content/code_sandbox/test/e2e/sql/src/test/resources/cases/dql/dataset/empty_storage_units/mysql/select_mysql_information_schema_innodb_buffer_pool_stats.xml
xml
2016-01-18T12:49:26
2024-08-16T15:48:11
shardingsphere
apache/shardingsphere
19,707
434
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="path_to_url"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="debug|Win32"> <Configuration>debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="release|Win32"> <Configuration>release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="release-assert|Win32"> <Configuration>release-assert</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup> <BaseIntermediateOutputPath>$(SolutionDir)..\..\..\..\..\bld\msvc\lib\$(SolutionName)\$(ProjectName)</BaseIntermediateOutputPath> </PropertyGroup> <ItemGroup> <!-- reverge_begin cpps --> <ClInclude Include="..\..\test\normalize_q_test.cpp" /> <!-- reverge_end cpps --> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{5D5521C1-3355-7102-73EA-3DD714D62B76}</ProjectGuid> <Keyword>MakeFileProj</Keyword> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release-assert|Win32'" Label="Configuration"> <ConfigurationType>Makefile</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|Win32'" Label="Configuration"> <ConfigurationType>Makefile</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|Win32'" Label="Configuration"> <ConfigurationType>Makefile</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='release-assert|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='release|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> <!-- reverge_begin defines(debug) --> <NMakePreprocessorDefinitions>BOOST_ALL_NO_LIB=1;</NMakePreprocessorDefinitions> <!-- reverge_end defines(debug) --> <!-- reverge_begin includes(debug) --> <NMakeIncludeSearchPath>;$(ProjectDir)..\..\..\..</NMakeIncludeSearchPath> <!-- reverge_end includes(debug) --> <!-- reverge_begin options(debug) --> <AdditionalOptions>-TP -c /EHs /GR /MDd /Ob0 /Od /W3 /Z7 /Zc:forScope /Zc:wchar_t /favor:blend /wd4675 </AdditionalOptions> <!-- reverge_end options(debug) --> <OutDir>$(SolutionDir)..\..\..\..\..\bld\lib\$(SolutionName)\libs\$(SolutionName)\test\$(ProjectName).test\msvc-12.0\$(Configuration)\address-model-64\link-static\threading-multi\</OutDir> <IntDir>$(SolutionDir)..\..\..\..\..\bld\lib\$(SolutionName)\libs\$(SolutionName)\test\$(ProjectName).test\msvc-12.0\$(Configuration)\address-model-64\link-static\threading-multi\</IntDir> <ExecutablePath>$(PATH)</ExecutablePath> <IncludePath /> <ReferencePath /> <LibraryPath /> <LibraryWPath /> <SourcePath /> <ExcludePath /> <NMakeBuildCommandLine>cd $(SolutionDir)..\test &amp;&amp; $(SolutionDir)..\..\..\b2 address-model=64 variant=$(configuration) toolset=msvc-14.0 $(ProjectName)</NMakeBuildCommandLine> <NMakeReBuildCommandLine>cd $(SolutionDir)..\test &amp;&amp; $(SolutionDir)..\..\..\b2 address-model=64 variant=$(configuration) toolset=msvc-14.0 $(ProjectName) -a</NMakeReBuildCommandLine> <NMakeCleanCommandLine>cd $(SolutionDir)..\test &amp;&amp; $(SolutionDir)vcxproj.bat msvc-14.0 $(ProjectPath)</NMakeCleanCommandLine> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> <!-- reverge_begin defines(release) --> <NMakePreprocessorDefinitions>BOOST_ALL_NO_LIB=1;NDEBUG;</NMakePreprocessorDefinitions> <!-- reverge_end defines(release) --> <!-- reverge_begin includes(release) --> <NMakeIncludeSearchPath>;$(ProjectDir)..\..\..\..</NMakeIncludeSearchPath> <!-- reverge_end includes(release) --> <!-- reverge_begin options(release) --> <AdditionalOptions>-TP -c /EHs /GR /MD /O2 /Ob2 /W3 /Zc:forScope /Zc:wchar_t /favor:blend /wd4675 </AdditionalOptions> <!-- reverge_end options(release) --> <OutDir>$(SolutionDir)..\..\..\..\..\bld\lib\$(SolutionName)\libs\$(SolutionName)\test\$(ProjectName).test\msvc-12.0\$(Configuration)\address-model-64\link-static\threading-multi\</OutDir> <IntDir>$(SolutionDir)..\..\..\..\..\bld\lib\$(SolutionName)\libs\$(SolutionName)\test\$(ProjectName).test\msvc-12.0\$(Configuration)\address-model-64\link-static\threading-multi\</IntDir> <ExecutablePath>$(PATH)</ExecutablePath> <IncludePath /> <ReferencePath /> <LibraryPath /> <LibraryWPath /> <SourcePath /> <ExcludePath /> <NMakeBuildCommandLine>cd $(SolutionDir)..\test &amp;&amp; $(SolutionDir)..\..\..\b2 address-model=64 variant=$(configuration) toolset=msvc-14.0 $(ProjectName)</NMakeBuildCommandLine> <NMakeReBuildCommandLine>cd $(SolutionDir)..\test &amp;&amp; $(SolutionDir)..\..\..\b2 address-model=64 variant=$(configuration) toolset=msvc-14.0 $(ProjectName) -a</NMakeReBuildCommandLine> <NMakeCleanCommandLine>cd $(SolutionDir)..\test &amp;&amp; $(SolutionDir)vcxproj.bat msvc-14.0 $(ProjectPath)</NMakeCleanCommandLine> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release-assert|Win32'"> <!-- reverge_begin defines(release-assert) --> <NMakePreprocessorDefinitions>BOOST_ALL_NO_LIB=1;</NMakePreprocessorDefinitions> <!-- reverge_end defines(release-assert) --> <!-- reverge_begin includes(release-assert) --> <NMakeIncludeSearchPath>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt;$(ProjectDir)..\..\..\..\..\boost_1_60_0;$(ProjectDir)..\..\include</NMakeIncludeSearchPath> <!-- reverge_end includes(release-assert) --> <!-- reverge_begin options(release-assert) --> <AdditionalOptions>-FC -TP -c -wd4018 -wd4180 -wd4244 -wd4267 -wd4355 -wd4512 -wd4624 -wd4800 -wd4996 /EHs /GR /MD /O2 /Ob2 /W3 /Z7 /Zc:forScope /Zc:wchar_t /favor:blend /wd4675 </AdditionalOptions> <!-- reverge_end options(release-assert) --> <OutDir>$(SolutionDir)..\..\..\..\..\bld\lib\$(SolutionName)\libs\$(SolutionName)\test\$(ProjectName).test\msvc-12.0\$(Configuration)\address-model-64\link-static\threading-multi\</OutDir> <IntDir>$(SolutionDir)..\..\..\..\..\bld\lib\$(SolutionName)\libs\$(SolutionName)\test\$(ProjectName).test\msvc-12.0\$(Configuration)\address-model-64\link-static\threading-multi\</IntDir> <ExecutablePath>$(PATH)</ExecutablePath> <IncludePath /> <ReferencePath /> <LibraryPath /> <LibraryWPath /> <SourcePath /> <ExcludePath /> <NMakeBuildCommandLine>cd $(SolutionDir)..\test &amp;&amp; $(SolutionDir)..\..\..\b2 address-model=64 variant=$(configuration) toolset=msvc-14.0 $(ProjectName)</NMakeBuildCommandLine> <NMakeReBuildCommandLine>cd $(SolutionDir)..\test &amp;&amp; $(SolutionDir)..\..\..\b2 address-model=64 variant=$(configuration) toolset=msvc-14.0 $(ProjectName) -a</NMakeReBuildCommandLine> <NMakeCleanCommandLine>cd $(SolutionDir)..\test &amp;&amp; $(SolutionDir)vcxproj.bat msvc-14.0 $(ProjectPath)</NMakeCleanCommandLine> </PropertyGroup> <ItemDefinitionGroup> </ItemDefinitionGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project> ```
/content/code_sandbox/deps/boost_1_66_0/libs/qvm/bld/test/normalize_q_test.vcxproj
xml
2016-09-05T10:18:44
2024-08-11T13:21:40
LiquidCore
LiquidPlayer/LiquidCore
1,010
2,466
```xml <?xml version="1.0" encoding="utf-8"?> <inset xmlns:android="path_to_url" android:insetLeft="@dimen/round_button_inset" android:insetTop="@dimen/round_button_inset" android:insetRight="@dimen/round_button_inset" android:insetBottom="@dimen/round_button_inset"> <shape android:shape="rectangle"> <corners android:radius="@dimen/round_button_radius" /> <solid android:color="@color/accent" /> <padding android:left="@dimen/round_button_padding" android:top="@dimen/round_button_padding" android:right="@dimen/round_button_padding" android:bottom="@dimen/round_button_padding" /> </shape> </inset> ```
/content/code_sandbox/app/src/main/res/drawable/round_colored_button_pressed.xml
xml
2016-07-02T10:44:04
2024-08-16T18:55:54
StreetComplete
streetcomplete/StreetComplete
3,781
180
```xml import type { FC } from 'react'; import { Button } from '@proton/atoms/Button'; import { Icon } from '@proton/components/index'; import { CardContent, type CardContentProps } from '@proton/pass/components/Layout/Card/CardContent'; import clsx from '@proton/utils/clsx'; type Props = CardContentProps & { onClick?: () => void }; export const RevisionItem: FC<Props> = ({ onClick, ...cardProps }) => { return ( <Button shape="ghost" fullWidth size="medium" className={clsx( 'bg-weak border-norm flex justify-space-between flex-nowrap items-center rounded-xl', !onClick && 'pointer-events-none cursor-default' )} onClick={onClick} > <CardContent {...cardProps} className="py-1" /> {onClick && <Icon name="chevron-right" size={5} className="color-weak" />} </Button> ); }; ```
/content/code_sandbox/packages/pass/components/Item/History/RevisionItem.tsx
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
208
```xml import { Document, Schema, Model, Connection, Types, HydratedDocument, } from 'mongoose'; import { IModels } from '../index'; import * as _ from 'lodash'; export interface IPermissionGroup { _id: Types.ObjectId; name: string; } export type PermissionGroupDocument = HydratedDocument<IPermissionGroup>; const OMIT_FROM_INPUT = ['_id'] as const; export type PermissionGroupCreateInput = Omit< IPermissionGroup, (typeof OMIT_FROM_INPUT)[number] >; export type PermissionGroupPatchInput = PermissionGroupCreateInput; export interface IPermissionGroupModel extends Model<IPermissionGroup> { findByIdOrThrow(_id: string): Promise<PermissionGroupDocument>; createPermissionGroup( input: PermissionGroupCreateInput, ): Promise<PermissionGroupDocument>; patchPermissionGroup( _id: string, patch: PermissionGroupPatchInput, ): Promise<PermissionGroupDocument>; deletePermissionGroup(_id: string): Promise<PermissionGroupDocument>; } export const permissionGroupSchema = new Schema<IPermissionGroup>({ name: { type: String, required: true, unique: true }, }); export const generatePermissionGroupModel = ( subdomain: string, con: Connection, models: IModels, ): void => { class PermissionGroupModelStatics { public static async findByIdOrThrow( _id: string, ): Promise<PermissionGroupDocument> { const doc = await models.PermissionGroup.findById(_id); if (!doc) { throw new Error(`Permission group with _id=${_id} doesn't exist`); } return doc; } public static async createPermissionGroup( input: PermissionGroupCreateInput, ): Promise<PermissionGroupDocument> { return models.PermissionGroup.create(input); } public static async patchPermissionGroup( _id: string, patch: PermissionGroupPatchInput, ): Promise<PermissionGroupDocument> { const doc = await models.PermissionGroup.findByIdAndUpdate( _id, { $set: patch }, { new: true }, ); if (!doc) { throw new Error(`Permission group with _id=${_id} doesn't exist`); } return doc; } public static async deletePermissionGroup( _id: string, ): Promise<PermissionGroupDocument> { const doc = await models.PermissionGroup.findByIdOrThrow(_id); const session = await con.startSession(); session.startTransaction(); try { await models.PermissionGroupCategoryPermit.deleteMany({ permissionGroupId: _id, }); await models.PermissionGroupUser.deleteMany({ permissionGroupId: _id }); await doc.deleteOne(); await session.commitTransaction(); } catch (e) { await session.abortTransaction(); throw e; } return doc; } } permissionGroupSchema.loadClass(PermissionGroupModelStatics); models.PermissionGroup = con.model<IPermissionGroup, IPermissionGroupModel>( 'forum_permission_groups', permissionGroupSchema, ); }; ```
/content/code_sandbox/packages/plugin-forum-api/src/db/models/permissionGroupModels/permissionGroup.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
657
```xml export * from "./custom-properties"; export * from "./custom-property"; ```
/content/code_sandbox/src/file/custom-properties/index.ts
xml
2016-03-26T23:43:56
2024-08-16T13:02:47
docx
dolanmiu/docx
4,139
15
```xml import { sync as findUpSync } from 'find-up'; import findYarnOrNpmWorkspaceRootUnsafe from 'find-yarn-workspace-root'; import fs from 'fs'; import yaml from 'js-yaml'; import micromatch from 'micromatch'; import path from 'path'; export const NPM_LOCK_FILE = 'package-lock.json'; export const YARN_LOCK_FILE = 'yarn.lock'; export const PNPM_LOCK_FILE = 'pnpm-lock.yaml'; export const PNPM_WORKSPACE_FILE = 'pnpm-workspace.yaml'; export const BUN_LOCK_FILE = 'bun.lockb'; /** Wraps `find-yarn-workspace-root` and guards against having an empty `package.json` file in an upper directory. */ export function findYarnOrNpmWorkspaceRoot(projectRoot: string): string | null { try { return findYarnOrNpmWorkspaceRootUnsafe(projectRoot); } catch (error: any) { if (error.message.includes('Unexpected end of JSON input')) { return null; } throw error; } } /** * Find the `pnpm-workspace.yaml` file that represents the root of the monorepo. * This is a synchronous function based on the original async library. * @see path_to_url */ export function findPnpmWorkspaceRoot(projectRoot: string): string | null { const workspaceEnvName = 'NPM_CONFIG_WORKSPACE_DIR'; const workspaceEnvValue = process.env[workspaceEnvName] ?? process.env[workspaceEnvName.toLowerCase()]; const workspaceFile = workspaceEnvValue ? path.join(workspaceEnvValue, PNPM_WORKSPACE_FILE) : findUpSync(PNPM_WORKSPACE_FILE, { cwd: projectRoot }); if (!workspaceFile || !fs.existsSync(workspaceFile)) { return null; } try { // See: path_to_url const { packages: workspaces } = yaml.load(fs.readFileSync(workspaceFile, 'utf8')); // See: path_to_url#L26-L33 const workspaceRoot = path.dirname(workspaceFile); const relativePath = path.relative(workspaceRoot, projectRoot); if (relativePath === '' || micromatch([relativePath], workspaces).length > 0) { return workspaceRoot; } } catch { // TODO: implement debug logger? return null; } return null; } ```
/content/code_sandbox/packages/@expo/package-manager/src/utils/nodeWorkspaces.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
506
```xml <?xml version="1.0" encoding="utf-8"?> <doc> <assembly> <name>System.Threading</name> </assembly> <members> <member name="T:System.Threading.AbandonedMutexException"> <summary>Exception leve lorsqu'un thread acquiert un objet <see cref="T:System.Threading.Mutex" /> qu'un autre thread a abandonn en se terminant sans le librer.</summary> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.AbandonedMutexException.#ctor"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.AbandonedMutexException" /> avec les valeurs par dfaut.</summary> </member> <member name="M:System.Threading.AbandonedMutexException.#ctor(System.Int32,System.Threading.WaitHandle)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.AbandonedMutexException" /> avec un index spcifi pour le mutex abandonn, le cas chant, et un objet <see cref="T:System.Threading.Mutex" /> qui reprsente le mutex.</summary> <param name="location">Index du mutex abandonn dans le tableau des handles d'attente si l'exception est leve pour la mthode <see cref="Overload:System.Threading.WaitHandle.WaitAny" />, ou -1 si l'exception est leve pour les mthodes <see cref="Overload:System.Threading.WaitHandle.WaitOne" /> ou <see cref="Overload:System.Threading.WaitHandle.WaitAll" />.</param> <param name="handle">Objet <see cref="T:System.Threading.Mutex" /> qui reprsente le mutex abandonn.</param> </member> <member name="M:System.Threading.AbandonedMutexException.#ctor(System.String)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.AbandonedMutexException" /> avec un message d'erreur spcifi.</summary> <param name="message">Message d'erreur qui indique la raison de l'exception.</param> </member> <member name="M:System.Threading.AbandonedMutexException.#ctor(System.String,System.Exception)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.AbandonedMutexException" /> avec un message d'erreur et une exception interne spcifis. </summary> <param name="message">Message d'erreur qui indique la raison de l'exception.</param> <param name="inner">Exception qui constitue la cause de l'exception actuelle.Si le paramtre <paramref name="inner" /> n'est pas null, l'exception en cours est leve dans un bloc catch qui gre l'exception interne.</param> </member> <member name="M:System.Threading.AbandonedMutexException.#ctor(System.String,System.Exception,System.Int32,System.Threading.WaitHandle)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.AbandonedMutexException" /> avec un message d'erreur spcifi, l'exception interne, l'index pour le mutex abandonn, le cas chant, et un objet <see cref="T:System.Threading.Mutex" /> qui reprsente le mutex.</summary> <param name="message">Message d'erreur qui indique la raison de l'exception.</param> <param name="inner">Exception qui constitue la cause de l'exception actuelle.Si le paramtre <paramref name="inner" /> n'est pas null, l'exception en cours est leve dans un bloc catch qui gre l'exception interne.</param> <param name="location">Index du mutex abandonn dans le tableau des handles d'attente si l'exception est leve pour la mthode <see cref="Overload:System.Threading.WaitHandle.WaitAny" />, ou -1 si l'exception est leve pour les mthodes <see cref="Overload:System.Threading.WaitHandle.WaitOne" /> ou <see cref="Overload:System.Threading.WaitHandle.WaitAll" />.</param> <param name="handle">Objet <see cref="T:System.Threading.Mutex" /> qui reprsente le mutex abandonn.</param> </member> <member name="M:System.Threading.AbandonedMutexException.#ctor(System.String,System.Int32,System.Threading.WaitHandle)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.AbandonedMutexException" /> avec un message d'erreur spcifi, l'index du mutex abandonn, le cas chant, et le mutex abandonn. </summary> <param name="message">Message d'erreur qui indique la raison de l'exception.</param> <param name="location">Index du mutex abandonn dans le tableau des handles d'attente si l'exception est leve pour la mthode <see cref="Overload:System.Threading.WaitHandle.WaitAny" />, ou -1 si l'exception est leve pour les mthodes <see cref="Overload:System.Threading.WaitHandle.WaitOne" /> ou <see cref="Overload:System.Threading.WaitHandle.WaitAll" />.</param> <param name="handle">Objet <see cref="T:System.Threading.Mutex" /> qui reprsente le mutex abandonn.</param> </member> <member name="P:System.Threading.AbandonedMutexException.Mutex"> <summary>Obtient le mutex abandonn qui a provoqu l'exception, s'il est connu.</summary> <returns>Objet <see cref="T:System.Threading.Mutex" /> qui reprsente le mutex abandonn ou null si les mutex abandonns n'ont pas pu tre identifis.</returns> <filterpriority>1</filterpriority> </member> <member name="P:System.Threading.AbandonedMutexException.MutexIndex"> <summary>Obtient l'index du mutex abandonn qui a provoqu l'exception, s'il est connu.</summary> <returns>Index, dans le tableau de handles d'attente passs la mthode <see cref="Overload:System.Threading.WaitHandle.WaitAny" />, de l'objet <see cref="T:System.Threading.Mutex" /> qui reprsente le mutex abandonn ou -1 si l'index du mutex abandonn n'a pas pu tre dtermin.</returns> <filterpriority>1</filterpriority> </member> <member name="T:System.Threading.AsyncLocal`1"> <summary>Reprsente les donnes ambiantes qui sont locales un flux de contrle asynchrone donn, par exemple une mthode asynchrone. </summary> <typeparam name="T">Type des donnes ambiantes. </typeparam> </member> <member name="M:System.Threading.AsyncLocal`1.#ctor"> <summary>Instancie une instance de <see cref="T:System.Threading.AsyncLocal`1" /> qui ne reoit pas de notifications de modification. </summary> </member> <member name="M:System.Threading.AsyncLocal`1.#ctor(System.Action{System.Threading.AsyncLocalValueChangedArgs{`0}})"> <summary>Instancie une instance locale de <see cref="T:System.Threading.AsyncLocal`1" /> qui ne reoit pas de notifications de modification. </summary> <param name="valueChangedHandler">Le dlgu est appel chaque modification de la valeur actuelle sur n'importe quel thread. </param> </member> <member name="P:System.Threading.AsyncLocal`1.Value"> <summary>Obtient ou dfinit la valeur des donnes ambiantes. </summary> <returns>Valeur des donnes ambiantes. </returns> </member> <member name="T:System.Threading.AsyncLocalValueChangedArgs`1"> <summary>Classe qui fournit les informations de modification des donnes aux instances de <see cref="T:System.Threading.AsyncLocal`1" /> qui s'inscrivent pour les notifications de modification. </summary> <typeparam name="T">Type des donnes. </typeparam> </member> <member name="P:System.Threading.AsyncLocalValueChangedArgs`1.CurrentValue"> <summary>Obtient la valeur actuelle des donnes. </summary> <returns>Valeur actuelle des donnes. </returns> </member> <member name="P:System.Threading.AsyncLocalValueChangedArgs`1.PreviousValue"> <summary>Obtient la valeur prcdente des donnes.</summary> <returns>Valeur prcdente des donnes. </returns> </member> <member name="P:System.Threading.AsyncLocalValueChangedArgs`1.ThreadContextChanged"> <summary>Retourne une valeur qui indique si la valeur est modifie en raison d'un changement du contexte d'excution. </summary> <returns>true si la valeur est modifie en raison d'un changement du contexte d'excution; sinon, false. </returns> </member> <member name="T:System.Threading.AutoResetEvent"> <summary>Avertit un thread en attente qu'un vnement s'est produit.Cette classe ne peut pas tre hrite.</summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.AutoResetEvent.#ctor(System.Boolean)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.AutoResetEvent" /> avec une valeur boolenne indiquant si l'tat initial doit tre dfini "signal".</summary> <param name="initialState">true pour dfinir l'tat initial "signal"; false pour le dfinir "nonsignal". </param> </member> <member name="T:System.Threading.Barrier"> <summary>Permet plusieurs tches de travailler en parallle de manire cooprative sur un algorithme via plusieurs phases.</summary> </member> <member name="M:System.Threading.Barrier.#ctor(System.Int32)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.Barrier" />.</summary> <param name="participantCount">Nombre de threads participants.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="participantCount" /> est infrieur 0 ou suprieur 32,767.</exception> </member> <member name="M:System.Threading.Barrier.#ctor(System.Int32,System.Action{System.Threading.Barrier})"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.Barrier" />.</summary> <param name="participantCount">Nombre de threads participants.</param> <param name="postPhaseAction"> <see cref="T:System.Action`1" /> excuter aprs chaque phase. null (nothing en Visual Basic) peut tre pass pour indiquer qu'aucune action n'est effectue.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="participantCount" /> est infrieur 0 ou suprieur 32,767.</exception> </member> <member name="M:System.Threading.Barrier.AddParticipant"> <summary>Signale <see cref="T:System.Threading.Barrier" /> qu'il y aura un participant supplmentaire.</summary> <returns>Numro de la phase du cloisonnement laquelle les nouveaux participants participeront en premier.</returns> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.InvalidOperationException">L'ajout d'un participant provoquerait l'augmentation du nombre de participants du cloisonnement au-del de 32767.ouLa mthode a t appele partir d'une action post-phase.</exception> </member> <member name="M:System.Threading.Barrier.AddParticipants(System.Int32)"> <summary>Signale <see cref="T:System.Threading.Barrier" /> qu'il y aura des participants supplmentaires.</summary> <returns>Numro de la phase du cloisonnement laquelle les nouveaux participants participeront en premier.</returns> <param name="participantCount">Nombre de participants supplmentaires ajouter au cloisonnement.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="participantCount" /> est infrieur 0.ouL'ajout de participants (<paramref name="participantCount" />) provoquerait l'augmentation du nombre de participants du cloisonnement au-del de 32767.</exception> <exception cref="T:System.InvalidOperationException">La mthode a t appele partir d'une action post-phase.</exception> </member> <member name="P:System.Threading.Barrier.CurrentPhaseNumber"> <summary>Obtient le numro de la phase actuelle du cloisonnement.</summary> <returns>Retourne le numro de la phase actuelle du cloisonnement.</returns> </member> <member name="M:System.Threading.Barrier.Dispose"> <summary>Libre toutes les ressources utilises par l'instance actuelle de la classe <see cref="T:System.Threading.Barrier" />.</summary> <exception cref="T:System.InvalidOperationException">La mthode a t appele partir d'une action post-phase.</exception> </member> <member name="M:System.Threading.Barrier.Dispose(System.Boolean)"> <summary>Libre les ressources non manages utilises par <see cref="T:System.Threading.Barrier" /> et ventuellement les ressources manages.</summary> <param name="disposing">true pour librer les ressources manages et non manages; false pour librer uniquement les ressources non manages.</param> </member> <member name="P:System.Threading.Barrier.ParticipantCount"> <summary>Obtient le nombre total de participants au cloisonnement.</summary> <returns>Retourne le nombre total de participants au cloisonnement.</returns> </member> <member name="P:System.Threading.Barrier.ParticipantsRemaining"> <summary>Obtient le nombre de participants au cloisonnement qui n'ont pas encore t signals dans la phase actuelle.</summary> <returns>Retourne le nombre de participants au cloisonnement qui n'ont pas encore t signals dans la phase actuelle.</returns> </member> <member name="M:System.Threading.Barrier.RemoveParticipant"> <summary>Signale <see cref="T:System.Threading.Barrier" /> qu'il y aura un participant en moins.</summary> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.InvalidOperationException">La barrire a dj 0participant.ouLa mthode a t appele partir d'une action post-phase.</exception> </member> <member name="M:System.Threading.Barrier.RemoveParticipants(System.Int32)"> <summary>Signale <see cref="T:System.Threading.Barrier" /> qu'il y aura moins de participants.</summary> <param name="participantCount">Nombre de participants supplmentaires supprimer du cloisonnement.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="participantCount" /> est infrieur 0.</exception> <exception cref="T:System.InvalidOperationException">La barrire a dj 0participant.ouLa mthode a t appele partir d'une action post-phase. oule nombre de participant actuel est infrieur au participantCount spcifi</exception> <exception cref="T:System.ArgumentOutOfRangeException">Le nombre total de participants est infrieur au<paramref name=" participantCount" /> spcifi</exception> </member> <member name="M:System.Threading.Barrier.SignalAndWait"> <summary>Signale qu'un participant a atteint le cloisonnement et qu'il attend que tous les autres participants atteignent galement le cloisonnement.</summary> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.InvalidOperationException">La mthode a t appele partir d'une action post-phase, le cloisonnement comporte actuellement 0participants, ou il est signal par un nombre de threads plus important que celui enregistr en tant que participants.</exception> <exception cref="T:System.Threading.BarrierPostPhaseException">Si une exception est leve par l'action de post-phase d'un cloisonnement aprs que tous les threads participants aient appel SignalAndWait, l'exception sera incluse dans un wrapper dans une BarrierPostPhaseException et leve pour tous les threads participants.</exception> </member> <member name="M:System.Threading.Barrier.SignalAndWait(System.Int32)"> <summary>Signale qu'un participant a atteint le cloisonnement et qu'il attend que tous les autres participants atteignent galement le cloisonnement, l'aide d'un entier sign 32bits pour mesurer le dlai d'attente.</summary> <returns>si tous les participants ont atteint le cloisonnement dans le dlai spcifi; sinon false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" />(-1) pour un dlai d'attente infini.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini.</exception> <exception cref="T:System.InvalidOperationException">La mthode a t appele partir d'une action post-phase, le cloisonnement comporte actuellement 0participants, ou il est signal par un nombre de threads plus important que celui enregistr en tant que participants.</exception> <exception cref="T:System.Threading.BarrierPostPhaseException">Si une exception est leve par l'action de post-phase d'un cloisonnement aprs que tous les threads participants aient appel SignalAndWait, l'exception sera incluse dans un wrapper dans une BarrierPostPhaseException et leve pour tous les threads participants.</exception> </member> <member name="M:System.Threading.Barrier.SignalAndWait(System.Int32,System.Threading.CancellationToken)"> <summary>Signale qu'un participant a atteint le cloisonnement et qu'il attend que tous les autres participants atteignent galement le cloisonnement, l'aide d'un entier sign 32bits pour mesurer le dlai d'attente, tout en observant un jeton d'annulation.</summary> <returns>si tous les participants ont atteint le cloisonnement dans le dlai spcifi; sinon false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" />(-1) pour un dlai d'attente infini.</param> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul.</exception> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini.</exception> <exception cref="T:System.InvalidOperationException">La mthode a t appele partir d'une action post-phase, le cloisonnement comporte actuellement 0participants, ou il est signal par un nombre de threads plus important que celui enregistr en tant que participants.</exception> </member> <member name="M:System.Threading.Barrier.SignalAndWait(System.Threading.CancellationToken)"> <summary>Signale qu'un participant a atteint le cloisonnement et qu'il attend que tous les autres participants atteignent galement le cloisonnement, tout en observant un jeton d'annulation.</summary> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul.</exception> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.InvalidOperationException">La mthode a t appele partir d'une action post-phase, le cloisonnement comporte actuellement 0participants, ou il est signal par un nombre de threads plus important que celui enregistr en tant que participants.</exception> </member> <member name="M:System.Threading.Barrier.SignalAndWait(System.TimeSpan)"> <summary>Signale qu'un participant a atteint le cloisonnement et qu'il attend que tous les autres participants atteignent galement le cloisonnement, l'aide d'un objet <see cref="T:System.TimeSpan" /> qui mesure l'intervalle de temps.</summary> <returns>true si tous les autres participants ont atteint le cloisonnement; sinon, false.</returns> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millimes de secondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1 millime de seconde, pour attendre indfiniment.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="timeout" /> est un nombre ngatif autre que -1 milliseconde, qui reprsente un dlai d'attente infini, ou sa valeur est suprieure 32767.</exception> <exception cref="T:System.InvalidOperationException">La mthode a t appele partir d'une action post-phase, le cloisonnement comporte actuellement 0participants, ou il est signal par un nombre de threads plus important que celui enregistr en tant que participants.</exception> </member> <member name="M:System.Threading.Barrier.SignalAndWait(System.TimeSpan,System.Threading.CancellationToken)"> <summary>Signale qu'un participant a atteint le cloisonnement et qu'il attend que tous les autres participants atteignent galement le cloisonnement, l'aide d'un objet <see cref="T:System.TimeSpan" /> qui mesure l'intervalle de temps, tout en observant un jeton d'annulation.</summary> <returns>true si tous les autres participants ont atteint le cloisonnement; sinon, false.</returns> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millimes de secondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1 millime de seconde, pour attendre indfiniment.</param> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul.</exception> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="timeout" /> est un nombre ngatif autre que -1 milliseconde, qui reprsente un dlai d'attente infini.</exception> <exception cref="T:System.InvalidOperationException">La mthode a t appele partir d'une action post-phase, le cloisonnement comporte actuellement 0participants, ou il est signal par un nombre de threads plus important que celui enregistr en tant que participants.</exception> </member> <member name="T:System.Threading.BarrierPostPhaseException"> <summary>L'exception leve lorsque l'action post-phase d'un <see cref="T:System.Threading.Barrier" /> choue.</summary> </member> <member name="M:System.Threading.BarrierPostPhaseException.#ctor"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.BarrierPostPhaseException" /> avec un message systme qui dcrit l'erreur.</summary> </member> <member name="M:System.Threading.BarrierPostPhaseException.#ctor(System.Exception)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.BarrierPostPhaseException" /> avec l'exception interne spcifie.</summary> <param name="innerException">Exception qui constitue la cause de l'exception actuelle.</param> </member> <member name="M:System.Threading.BarrierPostPhaseException.#ctor(System.String)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.BarrierPostPhaseException" /> avec un message spcifi dcrivant l'erreur.</summary> <param name="message">Message qui dcrit l'exception.L'appelant de ce constructeur doit vrifier que cette chane a t localise pour la culture du systme en cours.</param> </member> <member name="M:System.Threading.BarrierPostPhaseException.#ctor(System.String,System.Exception)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.BarrierPostPhaseException" /> avec un message d'erreur spcifi et une rfrence l'exception interne ayant provoqu cette exception.</summary> <param name="message">Message qui dcrit l'exception.L'appelant de ce constructeur doit vrifier que cette chane a t localise pour la culture du systme en cours.</param> <param name="innerException">Exception qui constitue la cause de l'exception actuelle.Si le paramtre <paramref name="innerException" /> n'est pas null, l'exception en cours est leve dans un bloc catch qui gre l'exception interne.</param> </member> <member name="T:System.Threading.ContextCallback"> <summary>Reprsente une mthode appeler dans un nouveau contexte. </summary> <param name="state">Objet contenant les informations que la mthode de rappel doit utiliser chacune de ses excutions.</param> <filterpriority>1</filterpriority> </member> <member name="T:System.Threading.CountdownEvent"> <summary>Reprsente une primitive de synchronisation qui est signale lorsque son dcompte atteint zro.</summary> </member> <member name="M:System.Threading.CountdownEvent.#ctor(System.Int32)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.CountdownEvent" /> l'aide du dcompte spcifi.</summary> <param name="initialCount">Nombre de signaux initialement requis pour dfinir <see cref="T:System.Threading.CountdownEvent" />.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="initialCount" /> est infrieur 0.</exception> </member> <member name="M:System.Threading.CountdownEvent.AddCount"> <summary>Incrmente de un le dcompte actuel de <see cref="T:System.Threading.CountdownEvent" />.</summary> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.InvalidOperationException">L'instance actuelle est dj dfinie.ou<see cref="P:System.Threading.CountdownEvent.CurrentCount" /> est suprieur ou gal <see cref="F:System.Int32.MaxValue" />.</exception> </member> <member name="M:System.Threading.CountdownEvent.AddCount(System.Int32)"> <summary>Incrmente d'une valeur spcifie le dcompte actuel de <see cref="T:System.Threading.CountdownEvent" />.</summary> <param name="signalCount">Valeur d'incrment de <see cref="P:System.Threading.CountdownEvent.CurrentCount" />.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="signalCount" /> est infrieur ou gal 0.</exception> <exception cref="T:System.InvalidOperationException">L'instance actuelle est dj dfinie.ou<see cref="P:System.Threading.CountdownEvent.CurrentCount" /> est gal ou suprieur <see cref="F:System.Int32.MaxValue" /> une fois le nombre t incrment par <paramref name="signalCount." /></exception> </member> <member name="P:System.Threading.CountdownEvent.CurrentCount"> <summary>Obtient le nombre de signaux restants requis pour dfinir l'vnement.</summary> <returns> Nombre de signaux restants requis pour dfinir l'vnement.</returns> </member> <member name="M:System.Threading.CountdownEvent.Dispose"> <summary>Libre toutes les ressources utilises par l'instance actuelle de la classe <see cref="T:System.Threading.CountdownEvent" />.</summary> </member> <member name="M:System.Threading.CountdownEvent.Dispose(System.Boolean)"> <summary>Libre les ressources non manages utilises par <see cref="T:System.Threading.CountdownEvent" /> et ventuellement les ressources manages.</summary> <param name="disposing">true pour librer les ressources manages et non manages; false pour librer uniquement les ressources non manages.</param> </member> <member name="P:System.Threading.CountdownEvent.InitialCount"> <summary>Obtient le nombre de signaux initialement requis pour dfinir l'vnement.</summary> <returns> Nombre de signaux initialement requis pour dfinir l'vnement.</returns> </member> <member name="P:System.Threading.CountdownEvent.IsSet"> <summary>Dtermine si l'vnement est dfini.</summary> <returns>true si l'vnement est dfini; sinon, false.</returns> </member> <member name="M:System.Threading.CountdownEvent.Reset"> <summary>Rinitialise <see cref="P:System.Threading.CountdownEvent.CurrentCount" /> avec la valeur <see cref="P:System.Threading.CountdownEvent.InitialCount" />.</summary> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> </member> <member name="M:System.Threading.CountdownEvent.Reset(System.Int32)"> <summary>Dfinit la proprit <see cref="P:System.Threading.CountdownEvent.InitialCount" /> spcifie sur la valeur indique.</summary> <param name="count">Nombre de signaux requis pour dfinir <see cref="T:System.Threading.CountdownEvent" />.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="count" /> est infrieur 0.</exception> </member> <member name="M:System.Threading.CountdownEvent.Signal"> <summary>Enregistre un signal avec le <see cref="T:System.Threading.CountdownEvent" />, en dcrmentant la valeur de <see cref="P:System.Threading.CountdownEvent.CurrentCount" />.</summary> <returns>true si le dcompte a atteint zro en raison du signal et que l'vnement a t dfini; sinon, false.</returns> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.InvalidOperationException">L'instance actuelle est dj dfinie.</exception> </member> <member name="M:System.Threading.CountdownEvent.Signal(System.Int32)"> <summary>Inscrit plusieurs signaux avec <see cref="T:System.Threading.CountdownEvent" />, en dcrmentant la valeur de <see cref="P:System.Threading.CountdownEvent.CurrentCount" /> selon la valeur spcifie.</summary> <returns>true si le dcompte a atteint zro en raison des signaux et que l'vnement a t dfini; sinon, false.</returns> <param name="signalCount">Nombre de signaux inscrire.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="signalCount" /> est infrieur 1.</exception> <exception cref="T:System.InvalidOperationException">L'instance actuelle est dj dfinie. - ou - Ou <paramref name="signalCount" /> est suprieur <see cref="P:System.Threading.CountdownEvent.CurrentCount" />.</exception> </member> <member name="M:System.Threading.CountdownEvent.TryAddCount"> <summary>Essaie d'incrmenter <see cref="P:System.Threading.CountdownEvent.CurrentCount" /> par un.</summary> <returns>true si l'incrmentation a russi; sinon, false.Si <see cref="P:System.Threading.CountdownEvent.CurrentCount" /> est dj zro, cette mthode retourne la valeur false.</returns> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.InvalidOperationException"> <see cref="P:System.Threading.CountdownEvent.CurrentCount" /> est gal <see cref="F:System.Int32.MaxValue" />.</exception> </member> <member name="M:System.Threading.CountdownEvent.TryAddCount(System.Int32)"> <summary>Essaie d'incrmenter <see cref="P:System.Threading.CountdownEvent.CurrentCount" /> par une valeur spcifie.</summary> <returns>true si l'incrmentation a russi; sinon, false.Si <see cref="P:System.Threading.CountdownEvent.CurrentCount" /> est dj zro, la valeur false est retourne.</returns> <param name="signalCount">Valeur d'incrment de <see cref="P:System.Threading.CountdownEvent.CurrentCount" />.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="signalCount" /> est infrieur ou gal 0.</exception> <exception cref="T:System.InvalidOperationException">L'instance actuelle est dj dfinie.ou<see cref="P:System.Threading.CountdownEvent.CurrentCount" /> + <paramref name="signalCount" /> est suprieur ou gal <see cref="F:System.Int32.MaxValue" />.</exception> </member> <member name="M:System.Threading.CountdownEvent.Wait"> <summary>Bloque le thread actuel jusqu' ce que <see cref="T:System.Threading.CountdownEvent" /> soit dfini.</summary> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> </member> <member name="M:System.Threading.CountdownEvent.Wait(System.Int32)"> <summary>Bloque le thread actuel jusqu' ce que le <see cref="T:System.Threading.CountdownEvent" /> soit dfini, l'aide d'un entier sign 32bits permettant de mesurer le dlai d'attente.</summary> <returns>true si <see cref="T:System.Threading.CountdownEvent" /> a t dfini; sinon, false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" />(-1) pour un dlai d'attente infini.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini.</exception> </member> <member name="M:System.Threading.CountdownEvent.Wait(System.Int32,System.Threading.CancellationToken)"> <summary>Bloque le thread actuel jusqu' ce que <see cref="T:System.Threading.CountdownEvent" /> soit dfini, l'aide d'un entier sign 32bits permettant de mesurer le dlai d'attente, tout en observant un <see cref="T:System.Threading.CancellationToken" />.</summary> <returns>true si <see cref="T:System.Threading.CountdownEvent" /> a t dfini; sinon, false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" />(-1) pour un dlai d'attente infini.</param> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul.</exception> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime. - ou - le <see cref="T:System.Threading.CancellationTokenSource" /> qui a cr <paramref name="cancellationToken" /> a dj t supprim.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini.</exception> </member> <member name="M:System.Threading.CountdownEvent.Wait(System.Threading.CancellationToken)"> <summary>Bloque le thread actuel jusqu' ce que <see cref="T:System.Threading.CountdownEvent" /> soit dfini, tout en observant un <see cref="T:System.Threading.CancellationToken" />.</summary> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul.</exception> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime. - ou - le <see cref="T:System.Threading.CancellationTokenSource" /> qui a cr <paramref name="cancellationToken" /> a dj t supprim.</exception> </member> <member name="M:System.Threading.CountdownEvent.Wait(System.TimeSpan)"> <summary>Bloque le thread actuel jusqu' ce que le <see cref="T:System.Threading.CountdownEvent" /> soit dfini, l'aide d'un <see cref="T:System.TimeSpan" /> permettant de mesurer le dlai d'attente.</summary> <returns>true si <see cref="T:System.Threading.CountdownEvent" /> a t dfini; sinon, false.</returns> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millimes de secondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1 millime de seconde, pour attendre indfiniment.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="timeout" /> est un nombre ngatif autre que -1 millisecondes, qui reprsente un dlai d'expiration infini - ou - le dlai d'attente est suprieur <see cref="F:System.Int32.MaxValue" />.</exception> </member> <member name="M:System.Threading.CountdownEvent.Wait(System.TimeSpan,System.Threading.CancellationToken)"> <summary>Bloque le thread actuel jusqu' ce que le <see cref="T:System.Threading.CountdownEvent" /> soit dfini, l'aide d'un <see cref="T:System.TimeSpan" /> permettant de mesurer le dlai d'attente, tout en observant un <see cref="T:System.Threading.CancellationToken" />.</summary> <returns>true si <see cref="T:System.Threading.CountdownEvent" /> a t dfini; sinon, false.</returns> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millimes de secondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1 millime de seconde, pour attendre indfiniment.</param> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul.</exception> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime. - ou - le <see cref="T:System.Threading.CancellationTokenSource" /> qui a cr <paramref name="cancellationToken" /> a dj t supprim.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="timeout" /> est un nombre ngatif autre que -1 millisecondes, qui reprsente un dlai d'expiration infini - ou - le dlai d'attente est suprieur <see cref="F:System.Int32.MaxValue" />.</exception> </member> <member name="P:System.Threading.CountdownEvent.WaitHandle"> <summary>Obtient un <see cref="T:System.Threading.WaitHandle" /> qui est utilis pour attendre l'vnement dfinir.</summary> <returns> <see cref="T:System.Threading.WaitHandle" /> qui est utilis pour attendre l'vnement dfinir.</returns> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> </member> <member name="T:System.Threading.EventResetMode"> <summary>Indique si un <see cref="T:System.Threading.EventWaitHandle" /> est rinitialis automatiquement ou manuellement aprs la rception d'un signal.</summary> <filterpriority>2</filterpriority> </member> <member name="F:System.Threading.EventResetMode.AutoReset"> <summary>Une fois signal, le <see cref="T:System.Threading.EventWaitHandle" /> se rinitialise automatiquement aprs avoir libr un seul thread.Si aucun thread n'attend, le <see cref="T:System.Threading.EventWaitHandle" /> conserve l'tat signal jusqu' ce qu'un thread se bloque et se rinitialise aprs l'avoir libr.</summary> </member> <member name="F:System.Threading.EventResetMode.ManualReset"> <summary>Lorsqu'il est signal, le <see cref="T:System.Threading.EventWaitHandle" /> libre tous les threads en attente et conserve l'tat signal jusqu' sa rinitialisation manuelle.</summary> </member> <member name="T:System.Threading.EventWaitHandle"> <summary>Reprsente un vnement de synchronisation de threads.</summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.EventWaitHandle.#ctor(System.Boolean,System.Threading.EventResetMode)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.EventWaitHandle" />, en spcifiant si le handle d'attente est signal initialement et s'il se rinitialise automatiquement ou manuellement.</summary> <param name="initialState">true pour dfinir l'tat initial comme tant signal; false pour le dfinir comme tant non signal.</param> <param name="mode">L'une des valeurs <see cref="T:System.Threading.EventResetMode" /> qui dterminent si l'vnement se rinitialise automatiquement ou manuellement.</param> </member> <member name="M:System.Threading.EventWaitHandle.#ctor(System.Boolean,System.Threading.EventResetMode,System.String)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.EventWaitHandle" />, en spcifiant si le handle d'attente est signal initialement s'il a t cr la suite de cet appel, s'il se rinitialise automatiquement ou manuellement, ainsi que le nom d'un vnement de synchronisation du systme.</summary> <param name="initialState">true pour dfinir l'tat initial comme signal si l'vnement nomm est cr en consquence de cet appel; false pour le dfinir comme non signal.</param> <param name="mode">L'une des valeurs <see cref="T:System.Threading.EventResetMode" /> qui dterminent si l'vnement se rinitialise automatiquement ou manuellement.</param> <param name="name">Nom d'un vnement de synchronisation l'chelle du systme.</param> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.UnauthorizedAccessException">L'vnement nomm existe et possde la scurit du contrle d'accs, mais l'utilisateur ne possde pas <see cref="F:System.Security.AccessControl.EventWaitHandleRights.FullControl" />.</exception> <exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">L'vnement nomm ne peut pas tre cr, peut-tre parce qu'un handle d'attente d'un type diffrent possde le mme nom.</exception> <exception cref="T:System.ArgumentException"> <paramref name="name" /> dpasse 260caractres.</exception> </member> <member name="M:System.Threading.EventWaitHandle.#ctor(System.Boolean,System.Threading.EventResetMode,System.String,System.Boolean@)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.EventWaitHandle" />, en spcifiant si le handle d'attente est signal initialement s'il a t cr la suite de cet appel, s'il se rinitialise automatiquement ou manuellement, ainsi que le nom d'un vnement de synchronisation du systme et une variable boolenne dont la valeur aprs l'appel indique si l'vnement systme nomm a t cr.</summary> <param name="initialState">true pour dfinir l'tat initial comme signal si l'vnement nomm est cr en consquence de cet appel; false pour le dfinir comme non signal.</param> <param name="mode">L'une des valeurs <see cref="T:System.Threading.EventResetMode" /> qui dterminent si l'vnement se rinitialise automatiquement ou manuellement.</param> <param name="name">Nom d'un vnement de synchronisation l'chelle du systme.</param> <param name="createdNew">Cette mthode retourne true si un vnement local a t cr (en d'autres termes, si <paramref name="name" /> est null ou une chane vide) ou si l'vnement systme nomm spcifi a t cr; false si l'vnement systme nomm spcifi existait dj.Ce paramtre est pass sans tre initialis.</param> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.UnauthorizedAccessException">L'vnement nomm existe et possde la scurit du contrle d'accs, mais l'utilisateur ne possde pas <see cref="F:System.Security.AccessControl.EventWaitHandleRights.FullControl" />.</exception> <exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">L'vnement nomm ne peut pas tre cr, peut-tre parce qu'un handle d'attente d'un type diffrent possde le mme nom.</exception> <exception cref="T:System.ArgumentException"> <paramref name="name" /> dpasse 260caractres.</exception> </member> <member name="M:System.Threading.EventWaitHandle.OpenExisting(System.String)"> <summary>Ouvre l'vnement de synchronisation nomm spcifi s'il existe dj.</summary> <returns>Objet qui reprsente l'vnement systme nomm.</returns> <param name="name">Nom de l'vnement de synchronisation systme ouvrir.</param> <exception cref="T:System.ArgumentException"> <paramref name="name" /> est une chane vide. ou<paramref name="name" /> dpasse 260caractres.</exception> <exception cref="T:System.ArgumentNullException"> <paramref name="name" /> a la valeur null.</exception> <exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">L'vnement de systme nomm n'existe pas.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.UnauthorizedAccessException">L'vnement nomm existe, mais l'utilisateur ne possde pas l'accs de scurit requis pour l'utiliser.</exception> <filterpriority>1</filterpriority> <PermissionSet> <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" /> </PermissionSet> </member> <member name="M:System.Threading.EventWaitHandle.Reset"> <summary>Dfinit l'tat de l'vnement comme tant non signal, entranant le blocage des threads.</summary> <returns>true si l'opration aboutit; sinon, false.</returns> <exception cref="T:System.ObjectDisposedException">La mthode <see cref="M:System.Threading.EventWaitHandle.Close" /> a t prcdemment appele sur ce <see cref="T:System.Threading.EventWaitHandle" />.</exception> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.EventWaitHandle.Set"> <summary>Dfinit l'tat de l'vnement comme tant signal, ce qui permet un ou plusieurs threads en attente de continuer.</summary> <returns>true si l'opration aboutit; sinon, false.</returns> <exception cref="T:System.ObjectDisposedException">La mthode <see cref="M:System.Threading.EventWaitHandle.Close" /> a t prcdemment appele sur ce <see cref="T:System.Threading.EventWaitHandle" />.</exception> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.EventWaitHandle.TryOpenExisting(System.String,System.Threading.EventWaitHandle@)"> <summary>Ouvre l'vnement de synchronisation nomm spcifi, s'il existe dj, et retourne une valeur indiquant si l'opration a russi.</summary> <returns>true si l'vnement de synchronisation nomm a t ouvert; sinon, false.</returns> <param name="name">Nom de l'vnement de synchronisation systme ouvrir.</param> <param name="result">Lorsque cette mthode est retourne, contient un objet <see cref="T:System.Threading.EventWaitHandle" /> qui reprsente l'vnement de synchronisation nomm si l'appel a russi, ou null si l'appel a chou.Ce paramtre est trait comme non initialis.</param> <exception cref="T:System.ArgumentException"> <paramref name="name" /> est une chane vide.ou<paramref name="name" /> dpasse 260caractres.</exception> <exception cref="T:System.ArgumentNullException"> <paramref name="name" /> a la valeur null.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.UnauthorizedAccessException">L'vnement nomm existe, mais l'utilisateur n'a pas l'accs de scurit voulu.</exception> </member> <member name="T:System.Threading.ExecutionContext"> <summary>Gre le contexte d'excution du thread actuel.Cette classe ne peut pas tre hrite.</summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.ExecutionContext.Capture"> <summary>Capture le contexte d'excution du thread actuel.</summary> <returns>Objet <see cref="T:System.Threading.ExecutionContext" /> capturant le contexte d'excution du thread actuel.</returns> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object)"> <summary>Excute une mthode dans un contexte d'excution spcifi sur le thread actuel.</summary> <param name="executionContext"> <see cref="T:System.Threading.ExecutionContext" /> dfinir.</param> <param name="callback">Dlgu <see cref="T:System.Threading.ContextCallback" /> reprsentant la mthode excuter dans le contexte d'excution fourni.</param> <param name="state">Objet passer la mthode de rappel.</param> <exception cref="T:System.InvalidOperationException"> <paramref name="executionContext" /> a la valeur null.ouLe <paramref name="executionContext" /> n'a pas t acquis l'aide d'une opration de capture. ouLe <paramref name="executionContext" /> a dj t utilis comme argument pour un appel <see cref="M:System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object)" />.</exception> <filterpriority>1</filterpriority> <PermissionSet> <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" /> </PermissionSet> </member> <member name="T:System.Threading.Interlocked"> <summary>Fournit des oprations atomiques pour des variables partages par plusieurs threads. </summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.Interlocked.Add(System.Int32@,System.Int32)"> <summary>Ajoute deux entiers 32bits et remplace le premier entier par la somme, sous la forme d'une opration atomique.</summary> <returns>La nouvelle valeur stocke <paramref name="location1" />.</returns> <param name="location1">Variable qui contient la premire valeur ajouter.La somme des deux valeurs est stocke dans <paramref name="location1" />.</param> <param name="value">Valeur ajouter l'entier <paramref name="location1" />.</param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.Add(System.Int64@,System.Int64)"> <summary>Ajoute deux entiers 64bits et remplace le premier entier par la somme, sous la forme d'une opration atomique.</summary> <returns>La nouvelle valeur stocke <paramref name="location1" />.</returns> <param name="location1">Variable qui contient la premire valeur ajouter.La somme des deux valeurs est stocke dans <paramref name="location1" />.</param> <param name="value">Valeur ajouter l'entier <paramref name="location1" />.</param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.CompareExchange(System.Double@,System.Double,System.Double)"> <summary>Compare deux nombres virgule flottante double prcision et remplace le premier en cas d'galit.</summary> <returns>Valeur d'origine dans <paramref name="location1" />.</returns> <param name="location1">Destination, dont la valeur est compare <paramref name="comparand" /> et qui peut tre remplace. </param> <param name="value">Valeur qui remplace la valeur de destination si la comparaison conclut une galit. </param> <param name="comparand">Valeur compare celle de <paramref name="location1" />. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.CompareExchange(System.Int32@,System.Int32,System.Int32)"> <summary>Compare deux entiers signs de 32bits et remplace la premire valeur en cas d'galit.</summary> <returns>Valeur d'origine dans <paramref name="location1" />.</returns> <param name="location1">Destination, dont la valeur est compare <paramref name="comparand" /> et qui peut tre remplace. </param> <param name="value">Valeur qui remplace la valeur de destination si la comparaison conclut une galit. </param> <param name="comparand">Valeur compare celle de <paramref name="location1" />. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.CompareExchange(System.Int64@,System.Int64,System.Int64)"> <summary>Compare deux entiers signs de 64bits et remplace la premire valeur en cas d'galit.</summary> <returns>Valeur d'origine dans <paramref name="location1" />.</returns> <param name="location1">Destination, dont la valeur est compare <paramref name="comparand" /> et qui peut tre remplace. </param> <param name="value">Valeur qui remplace la valeur de destination si la comparaison conclut une galit. </param> <param name="comparand">Valeur compare celle de <paramref name="location1" />. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.CompareExchange(System.IntPtr@,System.IntPtr,System.IntPtr)"> <summary>Compare deux handles ou pointeurs spcifiques la plateforme et remplace le premier en cas d'galit.</summary> <returns>Valeur d'origine dans <paramref name="location1" />.</returns> <param name="location1"> <see cref="T:System.IntPtr" /> de destination, dont la valeur est compare celle de <paramref name="comparand" /> et qui peut tre remplace par <paramref name="value" />. </param> <param name="value"> <see cref="T:System.IntPtr" /> qui remplace la valeur de destination si la comparaison conclut une galit. </param> <param name="comparand"> <see cref="T:System.IntPtr" /> compare la valeur de <paramref name="location1" />. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.CompareExchange(System.Object@,System.Object,System.Object)"> <summary>Compare deux objets et remplace le premier en cas d'galit des rfrences.</summary> <returns>Valeur d'origine dans <paramref name="location1" />.</returns> <param name="location1">Objet de destination compar <paramref name="comparand" /> et qui peut tre remplac. </param> <param name="value">Objet qui remplace l'objet de destination si la comparaison conclut une galit. </param> <param name="comparand">Objet qui est compar l'objet se trouvant <paramref name="location1" />. </param> <exception cref="T:System.ArgumentNullException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.CompareExchange(System.Single@,System.Single,System.Single)"> <summary>Compare deux nombres virgule flottante simple prcision et remplace le premier en cas d'galit.</summary> <returns>Valeur d'origine dans <paramref name="location1" />.</returns> <param name="location1">Destination, dont la valeur est compare <paramref name="comparand" /> et qui peut tre remplace. </param> <param name="value">Valeur qui remplace la valeur de destination si la comparaison conclut une galit. </param> <param name="comparand">Valeur compare celle de <paramref name="location1" />. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.CompareExchange``1(``0@,``0,``0)"> <summary>Compare deux instances du type rfrence spcifi <paramref name="T" /> et remplace la premire en cas d'galit.</summary> <returns>Valeur d'origine dans <paramref name="location1" />.</returns> <param name="location1">Destination, dont la valeur est compare avec <paramref name="comparand" /> et qui peut tre remplace.C'est un paramtre rfrence (ref en C#, ByRef en Visual Basic).</param> <param name="value">Valeur qui remplace la valeur de destination si la comparaison conclut une galit. </param> <param name="comparand">Valeur compare celle de <paramref name="location1" />. </param> <typeparam name="T">Type utiliser pour <paramref name="location1" />, <paramref name="value" /> et <paramref name="comparand" />.Ce type doit tre un type rfrence.</typeparam> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> </member> <member name="M:System.Threading.Interlocked.Decrement(System.Int32@)"> <summary>Dcrmente une variable spcifie et stocke le rsultat, sous la forme d'une opration atomique.</summary> <returns>Valeur dcrmente.</returns> <param name="location">Variable dont la valeur doit tre dcrmente. </param> <exception cref="T:System.ArgumentNullException">The address of <paramref name="location" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.Decrement(System.Int64@)"> <summary>Dcrmente la variable spcifie et stocke le rsultat sous la forme d'une opration atomique.</summary> <returns>Valeur dcrmente.</returns> <param name="location">Variable dont la valeur doit tre dcrmente. </param> <exception cref="T:System.ArgumentNullException">The address of <paramref name="location" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.Exchange(System.Double@,System.Double)"> <summary>Affecte une valeur spcifie un nombre virgule flottante double prcision, puis retourne la valeur d'origine, sous la forme d'une opration atomique.</summary> <returns>Valeur d'origine de <paramref name="location1" />.</returns> <param name="location1">Variable laquelle affecter la valeur spcifie. </param> <param name="value">Valeur affecte au paramtre <paramref name="location1" />. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.Exchange(System.Int32@,System.Int32)"> <summary>Affecte un entier sign 32bits une valeur spcifie, puis retourne la valeur d'origine, sous la forme d'une opration atomique.</summary> <returns>Valeur d'origine de <paramref name="location1" />.</returns> <param name="location1">Variable laquelle affecter la valeur spcifie. </param> <param name="value">Valeur affecte au paramtre <paramref name="location1" />. </param> <exception cref="T:System.ArgumentNullException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.Exchange(System.Int64@,System.Int64)"> <summary>Affecte une valeur spcifie un entier sign 64bits, puis retourne la valeur d'origine, sous la forme d'une opration atomique.</summary> <returns>Valeur d'origine de <paramref name="location1" />.</returns> <param name="location1">Variable laquelle affecter la valeur spcifie. </param> <param name="value">Valeur affecte au paramtre <paramref name="location1" />. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.Exchange(System.IntPtr@,System.IntPtr)"> <summary>Affecte une valeur spcifie un handle ou un pointeur spcifique la plateforme, puis retourne la valeur d'origine, sous la forme d'une opration atomique.</summary> <returns>Valeur d'origine de <paramref name="location1" />.</returns> <param name="location1">Variable laquelle affecter la valeur spcifie. </param> <param name="value">Valeur affecte au paramtre <paramref name="location1" />. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.Exchange(System.Object@,System.Object)"> <summary>Affecte une valeur spcifie un objet, puis retourne une rfrence l'objet d'origine sous la forme d'une opration atomique.</summary> <returns>Valeur d'origine de <paramref name="location1" />.</returns> <param name="location1">Variable laquelle affecter la valeur spcifie. </param> <param name="value">Valeur affecte au paramtre <paramref name="location1" />. </param> <exception cref="T:System.ArgumentNullException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.Exchange(System.Single@,System.Single)"> <summary>Affecte une valeur spcifie un nombre virgule flottante simple prcision, puis retourne la valeur d'origine, sous la forme d'une opration atomique.</summary> <returns>Valeur d'origine de <paramref name="location1" />.</returns> <param name="location1">Variable laquelle affecter la valeur spcifie. </param> <param name="value">Valeur affecte au paramtre <paramref name="location1" />. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.Exchange``1(``0@,``0)"> <summary>Affecte une valeur spcifie une variable du type <paramref name="T" /> spcifi et retourne la valeur d'origine, sous la forme d'une opration atomique.</summary> <returns>Valeur d'origine de <paramref name="location1" />.</returns> <param name="location1">Variable laquelle affecter la valeur spcifie.C'est un paramtre rfrence (ref en C#, ByRef en Visual Basic).</param> <param name="value">Valeur affecte au paramtre <paramref name="location1" />. </param> <typeparam name="T">Type utiliser pour <paramref name="location1" /> et <paramref name="value" />.Ce type doit tre un type rfrence.</typeparam> <exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a null pointer. </exception> </member> <member name="M:System.Threading.Interlocked.Increment(System.Int32@)"> <summary>Incrmente une variable spcifie et stocke le rsultat sous la forme d'une opration atomique.</summary> <returns>Valeur incrmente.</returns> <param name="location">Variable dont la valeur doit tre incrmente. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.Increment(System.Int64@)"> <summary>Incrmente une variable spcifie et stocke le rsultat sous la forme d'une opration atomique.</summary> <returns>Valeur incrmente.</returns> <param name="location">Variable dont la valeur doit tre incrmente. </param> <exception cref="T:System.NullReferenceException">The address of <paramref name="location" /> is a null pointer. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Interlocked.MemoryBarrier"> <summary>Synchronise l'accs la mmoire comme suit: le processeur qui excute le thread actuel ne peut pas rorganiser les instructions de sorte que les accs la mmoire avant l'appel de <see cref="M:System.Threading.Interlocked.MemoryBarrier" /> s'excutent aprs les accs la mmoire postrieurs l'appel de <see cref="M:System.Threading.Interlocked.MemoryBarrier" />.</summary> </member> <member name="M:System.Threading.Interlocked.Read(System.Int64@)"> <summary>Retourne une valeur 64bits charge sous la forme d'une opration atomique.</summary> <returns>Valeur charge.</returns> <param name="location">Valeur 64bits charger.</param> <filterpriority>1</filterpriority> </member> <member name="T:System.Threading.LazyInitializer"> <summary>Fournit des routines d'initialisation tardives.</summary> </member> <member name="M:System.Threading.LazyInitializer.EnsureInitialized``1(``0@)"> <summary>Initialise un type rfrence cible avec le constructeur pardfaut du type s'il n'a pas dj t initialis.</summary> <returns>Rfrence initialise de type <paramref name="T" />.</returns> <param name="target">Rfrence de type <paramref name="T" /> initialiser si elle ne l'a pas dj t.</param> <typeparam name="T">Type de la rfrence initialiser.</typeparam> <exception cref="T:System.MemberAccessException">Autorisations pour accder au constructeur de type <paramref name="T" /> manquant.</exception> <exception cref="T:System.MissingMemberException">Le type <paramref name="T" /> n'a pas de constructeur par dfaut.</exception> </member> <member name="M:System.Threading.LazyInitializer.EnsureInitialized``1(``0@,System.Boolean@,System.Object@)"> <summary>Initialise un type rfrence cible ou un type valeur avec son constructeur pardfaut s'il n'a pas dj t initialis.</summary> <returns>Valeur initialise de type <paramref name="T" />.</returns> <param name="target">Rfrence ou valeur de type <paramref name="T" /> initialiser si elle ne l'a pas dj t.</param> <param name="initialized">Rfrence une valeur boolenne qui dtermine si la cible a dj t initialise.</param> <param name="syncLock">Rfrence un objet utilis comme verrou mutuellement exclusif pour l'initialisation de <paramref name="target" />.Si <paramref name="syncLock" /> est null null, un nouvel objet est instanci.</param> <typeparam name="T">Type de la rfrence initialiser.</typeparam> <exception cref="T:System.MemberAccessException">Autorisations pour accder au constructeur de type <paramref name="T" /> manquant.</exception> <exception cref="T:System.MissingMemberException">Le type <paramref name="T" /> n'a pas de constructeur par dfaut.</exception> </member> <member name="M:System.Threading.LazyInitializer.EnsureInitialized``1(``0@,System.Boolean@,System.Object@,System.Func{``0})"> <summary>Initialise un type rfrence cible ou un type valeur l'aide d'une fonction spcifie s'il n'a pas dj t initialis.</summary> <returns>Valeur initialise de type <paramref name="T" />.</returns> <param name="target">Rfrence ou valeur de type <paramref name="T" /> initialiser si elle ne l'a pas dj t.</param> <param name="initialized">Rfrence une valeur boolenne qui dtermine si la cible a dj t initialise.</param> <param name="syncLock">Rfrence un objet utilis comme verrou mutuellement exclusif pour l'initialisation de <paramref name="target" />.Si <paramref name="syncLock" /> est null null, un nouvel objet est instanci.</param> <param name="valueFactory">Fonction appele pour initialiser la rfrence ou la valeur.</param> <typeparam name="T">Type de la rfrence initialiser.</typeparam> <exception cref="T:System.MemberAccessException">Autorisations pour accder au constructeur de type <paramref name="T" /> manquant.</exception> <exception cref="T:System.MissingMemberException">Le type <paramref name="T" /> n'a pas de constructeur par dfaut.</exception> </member> <member name="M:System.Threading.LazyInitializer.EnsureInitialized``1(``0@,System.Func{``0})"> <summary>Initialise un type rfrence cible l'aide d'une fonction spcifie s'il n'a pas dj t initialis.</summary> <returns>Valeur initialise de type <paramref name="T" />.</returns> <param name="target">Rfrence de type <paramref name="T" /> initialiser si elle ne l'a pas dj t.</param> <param name="valueFactory">Fonction appele pour initialiser la rfrence.</param> <typeparam name="T">Type rfrence de la rfrence initialiser.</typeparam> <exception cref="T:System.MissingMemberException">Le type <paramref name="T" /> n'a pas de constructeur par dfaut.</exception> <exception cref="T:System.InvalidOperationException"> <paramref name="valueFactory" /> a retourn null (Nothing en Visual Basic).</exception> </member> <member name="T:System.Threading.LockRecursionException"> <summary>L'exception leve lorsque l'entre rcursive dans un verrou n'est pas compatible avec la stratgie de rcurrence pour le verrou.</summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.LockRecursionException.#ctor"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.LockRecursionException" /> avec un message systme qui dcrit l'erreur.</summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.LockRecursionException.#ctor(System.String)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.LockRecursionException" /> avec un message spcifi dcrivant l'erreur.</summary> <param name="message">Message qui dcrit l'exception.L'appelant de ce constructeur doit vrifier que cette chane a t localise pour la culture systme en cours.</param> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.LockRecursionException.#ctor(System.String,System.Exception)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.LockRecursionException" /> avec un message d'erreur spcifi et une rfrence l'exception interne ayant provoqu cette exception.</summary> <param name="message">Message qui dcrit l'exception.L'appelant de ce constructeur doit vrifier que cette chane a t localise pour la culture systme en cours.</param> <param name="innerException">Exception qui a provoqu l'exception actuelle.Si le paramtre <paramref name="innerException" /> n'est pas null, l'exception en cours est leve dans un bloc catch qui gre l'exception interne.</param> <filterpriority>2</filterpriority> </member> <member name="T:System.Threading.LockRecursionPolicy"> <summary>Spcifie si un verrou peut tre entr plusieurs fois par le mme thread.</summary> </member> <member name="F:System.Threading.LockRecursionPolicy.NoRecursion"> <summary>Si un thread essaie d'entrer un verrou de manire rcursive, une exception est leve.Certaines classes peuvent autoriser certaines rcurrences lorsque ce paramtre est appliqu.</summary> </member> <member name="F:System.Threading.LockRecursionPolicy.SupportsRecursion"> <summary>Un thread peut entrer un verrou de manire rcursive.Certaines classes peuvent restreindre cette fonction.</summary> </member> <member name="T:System.Threading.ManualResetEvent"> <summary>Avertit un ou plusieurs threads en attente qu'un vnement s'est produit.Cette classe ne peut pas tre hrite.</summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.ManualResetEvent.#ctor(System.Boolean)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.ManualResetEvent" /> avec une valeur boolenne indiquant si l'tat initial doit tre dfini comme signal.</summary> <param name="initialState">true pour dfinir un tat initial signal; false pour dfinir un tat initial non signal. </param> </member> <member name="T:System.Threading.ManualResetEventSlim"> <summary>Fournit une version allge de <see cref="T:System.Threading.ManualResetEvent" />.</summary> </member> <member name="M:System.Threading.ManualResetEventSlim.#ctor"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.ManualResetEventSlim" /> avec l'tat initial "nonsignal".</summary> </member> <member name="M:System.Threading.ManualResetEventSlim.#ctor(System.Boolean)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.ManualResetEventSlim" /> avec une valeur boolenne indiquant si l'tat initial doit tre dfini "signal".</summary> <param name="initialState">true pour dfinir l'tat initial "signal"; false pour le dfinir "nonsignal".</param> </member> <member name="M:System.Threading.ManualResetEventSlim.#ctor(System.Boolean,System.Int32)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.ManualResetEventSlim" /> avec une valeur boolenne indiquant si l'tat initial doit tre dfini "signal" et un nombre de spins spcifi.</summary> <param name="initialState">true pour dfinir l'tat initial "signal"; false pour le dfinir "nonsignal".</param> <param name="spinCount">Nombre d'attentes de spins qui se produiront avant de revenir une opration d'attente base sur le noyau.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="spinCount" /> is less than 0 or greater than the maximum allowed value.</exception> </member> <member name="M:System.Threading.ManualResetEventSlim.Dispose"> <summary>Libre toutes les ressources utilises par l'instance actuelle de la classe <see cref="T:System.Threading.ManualResetEventSlim" />.</summary> </member> <member name="M:System.Threading.ManualResetEventSlim.Dispose(System.Boolean)"> <summary>Libre les ressources non manages utilises par <see cref="T:System.Threading.ManualResetEventSlim" /> et ventuellement les ressources manages.</summary> <param name="disposing">true pour librer les ressources manages et non manages; false pour librer uniquement les ressources non manages.</param> </member> <member name="P:System.Threading.ManualResetEventSlim.IsSet"> <summary>Obtient une valeur qui indique si l'vnement est dfini.</summary> <returns>true si l'vnement a t dfini; sinon, false.</returns> </member> <member name="M:System.Threading.ManualResetEventSlim.Reset"> <summary>Dfinit l'tat de l'vnement "nonsignal", ce qui entrane le blocage des threads.</summary> <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception> </member> <member name="M:System.Threading.ManualResetEventSlim.Set"> <summary>Dfinit l'tat de l'vnement "signal", ce qui permet un ou plusieurs threads en attente sur l'vnement de continuer s'excuter.</summary> </member> <member name="P:System.Threading.ManualResetEventSlim.SpinCount"> <summary>Obtient le nombre d'attentes de spins qui se produiront avant de revenir une opration d'attente base sur le noyau.</summary> <returns>Retourne le nombre d'attentes de spins qui se produiront avant de revenir une opration d'attente base sur le noyau.</returns> </member> <member name="M:System.Threading.ManualResetEventSlim.Wait"> <summary>Bloque le thread actuel jusqu' ce que le <see cref="T:System.Threading.ManualResetEventSlim" /> actuel soit dfini.</summary> <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded.</exception> <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception> </member> <member name="M:System.Threading.ManualResetEventSlim.Wait(System.Int32)"> <summary>Bloque le thread actuel jusqu' ce que le<see cref="T:System.Threading.ManualResetEventSlim" /> actuel soit dfini, l'aide d'un entier sign 32bits pour mesurer l'intervalle de temps.</summary> <returns>true si <see cref="T:System.Threading.ManualResetEventSlim" /> a t dfini; sinon, false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> is a negative number other than -1, which represents an infinite time-out.</exception> <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded.</exception> <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception> </member> <member name="M:System.Threading.ManualResetEventSlim.Wait(System.Int32,System.Threading.CancellationToken)"> <summary>Bloque le thread actuel jusqu' ce que le <see cref="T:System.Threading.ManualResetEventSlim" /> actuel soit dfini, l'aide d'un entier sign 32bits pour mesurer l'intervalle de temps, tout en observant un <see cref="T:System.Threading.CancellationToken" />.</summary> <returns>true si <see cref="T:System.Threading.ManualResetEventSlim" /> a t dfini; sinon, false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> was canceled.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> is a negative number other than -1, which represents an infinite time-out.</exception> <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded.</exception> <exception cref="T:System.ObjectDisposedException">The object has already been disposed or the <see cref="T:System.Threading.CancellationTokenSource" /> that created <paramref name="cancellationToken" /> has been disposed.</exception> </member> <member name="M:System.Threading.ManualResetEventSlim.Wait(System.Threading.CancellationToken)"> <summary>Bloque le thread actuel jusqu' ce que le <see cref="T:System.Threading.ManualResetEventSlim" /> actuel reoive un signal, tout en observant un <see cref="T:System.Threading.CancellationToken" />.</summary> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded.</exception> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> was canceled.</exception> <exception cref="T:System.ObjectDisposedException">The object has already been disposed or the <see cref="T:System.Threading.CancellationTokenSource" /> that created <paramref name="cancellationToken" /> has been disposed.</exception> </member> <member name="M:System.Threading.ManualResetEventSlim.Wait(System.TimeSpan)"> <summary>Bloque le thread actuel jusqu' ce que le <see cref="T:System.Threading.ManualResetEventSlim" /> actuel soit dfini, l'aide d'un <see cref="T:System.TimeSpan" /> pour mesurer l'intervalle de temps.</summary> <returns>true si <see cref="T:System.Threading.ManualResetEventSlim" /> a t dfini; sinon, false.</returns> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millisecondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1milliseconde pour un dlai d'attente infini.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="timeout" /> is a negative number other than -1 milliseconds, which represents an infinite time-out. -or-The number of milliseconds in <paramref name="timeout" /> is greater than <see cref="F:System.Int32.MaxValue" />. </exception> <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded.</exception> <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception> </member> <member name="M:System.Threading.ManualResetEventSlim.Wait(System.TimeSpan,System.Threading.CancellationToken)"> <summary>Bloque le thread actuel jusqu' ce que le <see cref="T:System.Threading.ManualResetEventSlim" /> actuel soit dfini, l'aide d'un <see cref="T:System.TimeSpan" /> pour mesurer l'intervalle de temps, tout en observant un <see cref="T:System.Threading.CancellationToken" />.</summary> <returns>true si <see cref="T:System.Threading.ManualResetEventSlim" /> a t dfini; sinon, false.</returns> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millisecondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1milliseconde pour un dlai d'attente infini.</param> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> was canceled.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="timeout" /> is a negative number other than -1 milliseconds, which represents an infinite time-out. -or-The number of milliseconds in <paramref name="timeout" /> is greater than <see cref="F:System.Int32.MaxValue" />. </exception> <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded. </exception> <exception cref="T:System.ObjectDisposedException">The object has already been disposed or the <see cref="T:System.Threading.CancellationTokenSource" /> that created <paramref name="cancellationToken" /> has been disposed.</exception> </member> <member name="P:System.Threading.ManualResetEventSlim.WaitHandle"> <summary>Obtient l'objet <see cref="T:System.Threading.WaitHandle" /> sous-jacent pour ce <see cref="T:System.Threading.ManualResetEventSlim" />.</summary> <returns>Objet d'vnement <see cref="T:System.Threading.WaitHandle" /> sous-jacent pour ce <see cref="T:System.Threading.ManualResetEventSlim" />.</returns> </member> <member name="T:System.Threading.Monitor"> <summary>Fournit un mcanisme qui synchronise l'accs aux objets.</summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.Monitor.Enter(System.Object)"> <summary>Acquiert un verrou exclusif sur l'objet spcifi.</summary> <param name="obj">Objet sur lequel acqurir le verrou du moniteur. </param> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Monitor.Enter(System.Object,System.Boolean@)"> <summary>Acquiert un verrou exclusif sur l'objet spcifi et dfinit de manire atomique une valeur qui indique si le verrou a t pris.</summary> <param name="obj">Objet sur lequel attendre. </param> <param name="lockTaken">Rsultat de la tentative d'acquisition du verrou, pass par la rfrence.L'entre doit avoir la valeur false.La sortie a la valeur true si un verrou est acquis; sinon, elle a la valeur false.La sortie est dfinie mme si une exception se produit lors de la tentative d'acquisition du verrou.RemarqueSi aucune exception ne se produit, la sortie de cette mthode est toujours true.</param> <exception cref="T:System.ArgumentException">L'entre du paramtre <paramref name="lockTaken" /> a la valeur true.</exception> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> </member> <member name="M:System.Threading.Monitor.Exit(System.Object)"> <summary>Libre un verrou exclusif sur l'objet spcifi.</summary> <param name="obj">Objet sur lequel librer le verrou. </param> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <exception cref="T:System.Threading.SynchronizationLockException">Le thread en cours ne possde pas le verrou pour l'objet spcifi. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Monitor.IsEntered(System.Object)"> <summary>Dtermine si le thread actuel dtient le verrou sur l'objet spcifi. </summary> <returns>true si le thread actuel dtient le verrou sur <paramref name="obj" />; sinon, false.</returns> <param name="obj">Objet tester. </param> <exception cref="T:System.ArgumentNullException"> <paramref name="obj" /> a la valeur null. </exception> </member> <member name="M:System.Threading.Monitor.Pulse(System.Object)"> <summary>Avertit un thread situ dans la file d'attente en suspens d'un changement d'tat de l'objet verrouill.</summary> <param name="obj">Objet attendu par un thread. </param> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <exception cref="T:System.Threading.SynchronizationLockException">Le thread appelant ne possde pas le verrou pour l'objet spcifi. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Monitor.PulseAll(System.Object)"> <summary>Avertit tous les threads en attente d'un changement d'tat de l'objet.</summary> <param name="obj">Objet qui envoie l'impulsion. </param> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <exception cref="T:System.Threading.SynchronizationLockException">Le thread appelant ne possde pas le verrou pour l'objet spcifi. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Monitor.TryEnter(System.Object)"> <summary>Essaie d'acqurir un verrou exclusif sur l'objet spcifi.</summary> <returns>true si le thread actuel acquiert le verrou; sinon, false.</returns> <param name="obj">Objet sur lequel acqurir le verrou. </param> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Monitor.TryEnter(System.Object,System.Boolean@)"> <summary>Tente d'acqurir un verrou exclusif sur l'objet spcifi et dfinit de manire atomique une valeur qui indique si le verrou a t pris.</summary> <param name="obj">Objet sur lequel acqurir le verrou. </param> <param name="lockTaken">Rsultat de la tentative d'acquisition du verrou, pass par la rfrence.L'entre doit avoir la valeur false.La sortie a la valeur true si un verrou est acquis; sinon, elle a la valeur false.La sortie est dfinie mme si une exception se produit lors de la tentative d'acquisition du verrou.</param> <exception cref="T:System.ArgumentException">L'entre du paramtre <paramref name="lockTaken" /> a la valeur true.</exception> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> </member> <member name="M:System.Threading.Monitor.TryEnter(System.Object,System.Int32)"> <summary>Tentatives d'acquisition d'un verrou exclusif sur l'objet spcifi au cours du nombre spcifi de millisecondes.</summary> <returns>true si le thread actuel acquiert le verrou; sinon, false.</returns> <param name="obj">Objet sur lequel acqurir le verrou. </param> <param name="millisecondsTimeout">Dlai d'attente du verrou en millisecondes. </param> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est ngatif et diffrent de <see cref="F:System.Threading.Timeout.Infinite" />. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Monitor.TryEnter(System.Object,System.Int32,System.Boolean@)"> <summary>Tente, pendant le nombre spcifi de millisecondes, d'acqurir un verrou exclusif sur l'objet spcifi et dfinit de manire atomique une valeur qui indique si le verrou a t pris.</summary> <param name="obj">Objet sur lequel acqurir le verrou. </param> <param name="millisecondsTimeout">Dlai d'attente du verrou en millisecondes. </param> <param name="lockTaken">Rsultat de la tentative d'acquisition du verrou, pass par la rfrence.L'entre doit avoir la valeur false.La sortie a la valeur true si un verrou est acquis; sinon, elle a la valeur false.La sortie est dfinie mme si une exception se produit lors de la tentative d'acquisition du verrou.</param> <exception cref="T:System.ArgumentException">L'entre du paramtre <paramref name="lockTaken" /> a la valeur true.</exception> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est ngatif et diffrent de <see cref="F:System.Threading.Timeout.Infinite" />. </exception> </member> <member name="M:System.Threading.Monitor.TryEnter(System.Object,System.TimeSpan)"> <summary>Tentatives d'acquisition d'un verrou exclusif sur l'objet spcifi au cours de la priode spcifie.</summary> <returns>true si le thread actuel acquiert le verrou; sinon, false.</returns> <param name="obj">Objet sur lequel acqurir le verrou. </param> <param name="timeout"> <see cref="T:System.TimeSpan" /> reprsentant le dlai d'attente du verrou.Une valeur de 1 milliseconde spcifie une attente infinie.</param> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <exception cref="T:System.ArgumentOutOfRangeException">La valeur en millisecondes de <paramref name="timeout" /> est ngative et diffrente de <see cref="F:System.Threading.Timeout.Infinite" /> (1 milliseconde), ou elle est suprieure <see cref="F:System.Int32.MaxValue" />. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Monitor.TryEnter(System.Object,System.TimeSpan,System.Boolean@)"> <summary>Tente, pendant le dlai spcifi, d'acqurir un verrou exclusif sur l'objet spcifi et dfinit de manire atomique une valeur qui indique si le verrou a t pris.</summary> <param name="obj">Objet sur lequel acqurir le verrou. </param> <param name="timeout">Dlai d'attente du verrou.Une valeur de 1 milliseconde spcifie une attente infinie.</param> <param name="lockTaken">Rsultat de la tentative d'acquisition du verrou, pass par la rfrence.L'entre doit avoir la valeur false.La sortie a la valeur true si un verrou est acquis; sinon, elle a la valeur false.La sortie est dfinie mme si une exception se produit lors de la tentative d'acquisition du verrou.</param> <exception cref="T:System.ArgumentException">L'entre du paramtre <paramref name="lockTaken" /> a la valeur true.</exception> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <exception cref="T:System.ArgumentOutOfRangeException">La valeur en millisecondes de <paramref name="timeout" /> est ngative et diffrente de <see cref="F:System.Threading.Timeout.Infinite" /> (1 milliseconde), ou elle est suprieure <see cref="F:System.Int32.MaxValue" />. </exception> </member> <member name="M:System.Threading.Monitor.Wait(System.Object)"> <summary>Libre le verrou d'un objet et bloque le thread actuel jusqu' ce qu'il acquire nouveau le verrou.</summary> <returns>true si l'appel est retourn car l'appelant a de nouveau acquis le verrou pour l'objet spcifi.Cette mthode ne retourne rien si le verrou n'est pas acquis nouveau.</returns> <param name="obj">Objet sur lequel attendre. </param> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <exception cref="T:System.Threading.SynchronizationLockException">Le thread appelant ne possde pas le verrou pour l'objet spcifi. </exception> <exception cref="T:System.Threading.ThreadInterruptedException">Le thread qui appelle Wait quitte ensuite l'tat d'attente.Cela se produit lorsqu'un autre thread appelle la mthode <see cref="M:System.Threading.Thread.Interrupt" /> de ce thread.</exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Monitor.Wait(System.Object,System.Int32)"> <summary>Libre le verrou d'un objet et bloque le thread actuel jusqu' ce qu'il acquire nouveau le verrou.Si le dlai d'attente spcifi est coul, le thread intgre la file d'attente oprationnelle.</summary> <returns>true si le verrou a fait l'objet d'une nouvelle acquisition avant l'expiration du dlai spcifi; false si le verrou a fait l'objet d'une nouvelle acquisition aprs l'expiration du dlai spcifi.La mthode ne retourne pas de valeur tant que le verrou n'est pas acquis nouveau.</returns> <param name="obj">Objet sur lequel attendre. </param> <param name="millisecondsTimeout">Nombre de millisecondes attendre avant que le thread intgre la file d'attente oprationnelle. </param> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <exception cref="T:System.Threading.SynchronizationLockException">Le thread appelant ne possde pas le verrou pour l'objet spcifi. </exception> <exception cref="T:System.Threading.ThreadInterruptedException">Le thread qui appelle Wait quitte ensuite l'tat d'attente.Cela se produit lorsqu'un autre thread appelle la mthode <see cref="M:System.Threading.Thread.Interrupt" /> de ce thread.</exception> <exception cref="T:System.ArgumentOutOfRangeException">La valeur du paramtre <paramref name="millisecondsTimeout" /> est ngative et diffrente de <see cref="F:System.Threading.Timeout.Infinite" />. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Monitor.Wait(System.Object,System.TimeSpan)"> <summary>Libre le verrou d'un objet et bloque le thread actuel jusqu' ce qu'il acquire nouveau le verrou.Si le dlai d'attente spcifi est coul, le thread intgre la file d'attente oprationnelle.</summary> <returns>true si le verrou a fait l'objet d'une nouvelle acquisition avant l'expiration du dlai spcifi; false si le verrou a fait l'objet d'une nouvelle acquisition aprs l'expiration du dlai spcifi.La mthode ne retourne pas de valeur tant que le verrou n'est pas acquis nouveau.</returns> <param name="obj">Objet sur lequel attendre. </param> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le temps attendre avant que le thread n'intgre la file d'attente oprationnelle. </param> <exception cref="T:System.ArgumentNullException">Le paramtre <paramref name="obj" /> a la valeur null. </exception> <exception cref="T:System.Threading.SynchronizationLockException">Le thread appelant ne possde pas le verrou pour l'objet spcifi. </exception> <exception cref="T:System.Threading.ThreadInterruptedException">Le thread qui appelle Wait quitte ensuite l'tat d'attente.Cela se produit lorsqu'un autre thread appelle la mthode <see cref="M:System.Threading.Thread.Interrupt" /> de ce thread.</exception> <exception cref="T:System.ArgumentOutOfRangeException">La valeur en millisecondes du paramtre <paramref name="timeout" /> est ngative et ne reprsente pas <see cref="F:System.Threading.Timeout.Infinite" /> (1 milliseconde) ou est suprieure <see cref="F:System.Int32.MaxValue" />. </exception> <filterpriority>1</filterpriority> </member> <member name="T:System.Threading.Mutex"> <summary>Primitive de synchronisation qui peut galement tre utilise pour la synchronisation entre processus. </summary> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Mutex.#ctor"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.Mutex" /> avec des proprits par dfaut.</summary> </member> <member name="M:System.Threading.Mutex.#ctor(System.Boolean)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.Mutex" /> avec une valeur boolenne qui indique si le thread appelant doit avoir la proprit initiale du mutex.</summary> <param name="initiallyOwned">true pour accorder au thread appelant la proprit initiale du mutex; sinon, false. </param> </member> <member name="M:System.Threading.Mutex.#ctor(System.Boolean,System.String)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.Mutex" /> avec une valeur boolenne qui indique si le thread appelant doit avoir la proprit initiale du mutex, et une chane reprsentant le nom du mutex.</summary> <param name="initiallyOwned">true pour donner au thread appelant la proprit initiale du mutex systme nomm si celui-ci est cr en rponse cet appel; sinon, false. </param> <param name="name">Nom du <see cref="T:System.Threading.Mutex" />.Si cette valeur est null, <see cref="T:System.Threading.Mutex" /> est sans nom.</param> <exception cref="T:System.UnauthorizedAccessException">Le mutex nomm existe et possde la scurit du contrle d'accs, mais l'utilisateur ne possde pas <see cref="F:System.Security.AccessControl.MutexRights.FullControl" />.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">Le mutex nomm ne peut pas tre cr, peut-tre parce qu'un handle d'attente d'un type diffrent possde le mme nom.</exception> <exception cref="T:System.ArgumentException"> <paramref name="name" /> est plus de 260 caractres.</exception> </member> <member name="M:System.Threading.Mutex.#ctor(System.Boolean,System.String,System.Boolean@)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.Mutex" /> avec une valeur boolenne qui indique si le thread appelant doit avoir la proprit initiale du mutex, une chane qui reprsente le nom du mutex et une valeur boolenne qui, quand la mthode retourne son rsultat, indique si la proprit initiale du mutex a t accorde au thread appelant.</summary> <param name="initiallyOwned">true pour donner au thread appelant la proprit initiale du mutex systme nomm si celui-ci est cr en rponse cet appel; sinon, false. </param> <param name="name">Nom du <see cref="T:System.Threading.Mutex" />.Si cette valeur est null, <see cref="T:System.Threading.Mutex" /> est sans nom.</param> <param name="createdNew">Cette mthode retourne une valeur boolenne qui est true si un mutex local a t cr (en d'autres termes, si <paramref name="name" /> est null ou une chane vide) ou si le mutex systme nomm spcifi a t cr; false si le mutex systme nomm spcifi existait dj.Ce paramtre est pass sans tre initialis.</param> <exception cref="T:System.UnauthorizedAccessException">Le mutex nomm existe et possde la scurit du contrle d'accs, mais l'utilisateur ne possde pas <see cref="F:System.Security.AccessControl.MutexRights.FullControl" />.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">Le mutex nomm ne peut pas tre cr, peut-tre parce qu'un handle d'attente d'un type diffrent possde le mme nom.</exception> <exception cref="T:System.ArgumentException"> <paramref name="name" /> est plus de 260 caractres.</exception> </member> <member name="M:System.Threading.Mutex.OpenExisting(System.String)"> <summary>Ouvre le mutex nomm spcifi, s'il existe dj.</summary> <returns>Objet qui reprsente le mutex systme nomm.</returns> <param name="name">Nom du mutex systme ouvrir.</param> <exception cref="T:System.ArgumentException"> <paramref name="name" /> est une chane vide.ou<paramref name="name" /> est plus de 260 caractres.</exception> <exception cref="T:System.ArgumentNullException"> <paramref name="name" /> a la valeur null.</exception> <exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">Le mutex nomm n'existe pas.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.UnauthorizedAccessException">Le mutex nomm existe, mais l'utilisateur ne possde pas l'accs de scurit requis pour l'utiliser.</exception> <filterpriority>1</filterpriority> <PermissionSet> <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" /> </PermissionSet> </member> <member name="M:System.Threading.Mutex.ReleaseMutex"> <summary>Libre l'objet <see cref="T:System.Threading.Mutex" /> une seule fois.</summary> <exception cref="T:System.ApplicationException">Le thread appelant ne possde pas le mutex. </exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Mutex.TryOpenExisting(System.String,System.Threading.Mutex@)"> <summary>Ouvre le mutex nomm spcifi, s'il existe dj, et retourne une valeur indiquant si l'opration a russi.</summary> <returns>true si le mutex nomm a t ouvert; sinon, false.</returns> <param name="name">Nom du mutex systme ouvrir.</param> <param name="result">Quand cette mthode est retourne, contient un objet <see cref="T:System.Threading.Mutex" /> qui reprsente la structure mutex nomme si l'appel a russi, ou null si l'appel a chou.Ce paramtre est trait comme tant non initialis.</param> <exception cref="T:System.ArgumentException"> <paramref name="name" /> est une chane vide.ou<paramref name="name" /> est plus de 260 caractres.</exception> <exception cref="T:System.ArgumentNullException"> <paramref name="name" /> a la valeur null.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.UnauthorizedAccessException">Le mutex nomm existe, mais l'utilisateur ne possde pas l'accs de scurit requis pour l'utiliser.</exception> </member> <member name="T:System.Threading.ReaderWriterLockSlim"> <summary>Reprsente un verrou utilis pour grer l'accs une ressource, en autorisant plusieurs threads pour la lecture ou un accs exclusif en criture.</summary> </member> <member name="M:System.Threading.ReaderWriterLockSlim.#ctor"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.ReaderWriterLockSlim" /> avec des valeurs de proprit par dfaut.</summary> </member> <member name="M:System.Threading.ReaderWriterLockSlim.#ctor(System.Threading.LockRecursionPolicy)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.ReaderWriterLockSlim" />, en spcifiant la stratgie de rcurrence du verrou.</summary> <param name="recursionPolicy">Une des valeurs d'numration qui spcifie la stratgie de rcurrence du verrou. </param> </member> <member name="P:System.Threading.ReaderWriterLockSlim.CurrentReadCount"> <summary>Obtient le nombre total de threads uniques qui ont entr le verrou en mode lecture.</summary> <returns>Nombre de threads uniques qui ont entr le verrou en mode lecture.</returns> </member> <member name="M:System.Threading.ReaderWriterLockSlim.Dispose"> <summary>Libre toutes les ressources utilises par l'instance actuelle de la classe <see cref="T:System.Threading.ReaderWriterLockSlim" />.</summary> <exception cref="T:System.Threading.SynchronizationLockException"> <see cref="P:System.Threading.ReaderWriterLockSlim.WaitingReadCount" /> is greater than zero. -or-<see cref="P:System.Threading.ReaderWriterLockSlim.WaitingUpgradeCount" /> is greater than zero. -or-<see cref="P:System.Threading.ReaderWriterLockSlim.WaitingWriteCount" /> is greater than zero. </exception> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.ReaderWriterLockSlim.EnterReadLock"> <summary>Essaie d'entrer le verrou en mode lecture.</summary> <exception cref="T:System.Threading.LockRecursionException">The <see cref="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy" /> property is <see cref="F:System.Threading.LockRecursionPolicy.NoRecursion" /> and the current thread has already entered read mode. -or-The current thread may not acquire the read lock when it already holds the write lock. -or-The recursion number would exceed the capacity of the counter.This limit is so large that applications should never encounter it.</exception> <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.ReaderWriterLockSlim" /> object has been disposed. </exception> </member> <member name="M:System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock"> <summary>Essaie d'entrer le verrou en mode pouvant tre mis niveau.</summary> <exception cref="T:System.Threading.LockRecursionException">The <see cref="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy" /> property is <see cref="F:System.Threading.LockRecursionPolicy.NoRecursion" /> and the current thread has already entered the lock in any mode. -or-The current thread has entered read mode, so trying to enter upgradeable mode would create the possibility of a deadlock. -or-The recursion number would exceed the capacity of the counter.The limit is so large that applications should never encounter it.</exception> <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.ReaderWriterLockSlim" /> object has been disposed. </exception> </member> <member name="M:System.Threading.ReaderWriterLockSlim.EnterWriteLock"> <summary>Essaie d'entrer le verrou en mode criture.</summary> <exception cref="T:System.Threading.LockRecursionException">The <see cref="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy" /> property is <see cref="F:System.Threading.LockRecursionPolicy.NoRecursion" /> and the current thread has already entered the lock in any mode. -or-The current thread has entered read mode, so trying to enter the lock in write mode would create the possibility of a deadlock. -or-The recursion number would exceed the capacity of the counter.The limit is so large that applications should never encounter it.</exception> <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.ReaderWriterLockSlim" /> object has been disposed. </exception> </member> <member name="M:System.Threading.ReaderWriterLockSlim.ExitReadLock"> <summary>Rduit le nombre de rcurrences pour le mode lecture, et quitte le mode lecture si le nombre rsultant est0 (zro).</summary> <exception cref="T:System.Threading.SynchronizationLockException">The current thread has not entered the lock in read mode. </exception> </member> <member name="M:System.Threading.ReaderWriterLockSlim.ExitUpgradeableReadLock"> <summary>Rduit le nombre de rcurrences pour le mode pouvant tre mis niveau, et quitte le mode pouvant tre mis niveau si le nombre rsultant est0 (zro).</summary> <exception cref="T:System.Threading.SynchronizationLockException">The current thread has not entered the lock in upgradeable mode.</exception> </member> <member name="M:System.Threading.ReaderWriterLockSlim.ExitWriteLock"> <summary>Rduit le nombre de rcurrences pour le mode criture, et quitte le mode criture si le nombre rsultant est0 (zro).</summary> <exception cref="T:System.Threading.SynchronizationLockException">The current thread has not entered the lock in write mode.</exception> </member> <member name="P:System.Threading.ReaderWriterLockSlim.IsReadLockHeld"> <summary>Obtient une valeur qui indique si le thread actuel a entr le verrou en mode lecture.</summary> <returns>true si le thread actuel a entr le verrou en mode lecture; sinon, false.</returns> <filterpriority>2</filterpriority> </member> <member name="P:System.Threading.ReaderWriterLockSlim.IsUpgradeableReadLockHeld"> <summary>Obtient une valeur qui indique si le thread actuel a entr le verrou en mode pouvant tre mis niveau. </summary> <returns>true si le thread actuel a entr le verrou en mode pouvant tre mis niveau; sinon, false.</returns> <filterpriority>2</filterpriority> </member> <member name="P:System.Threading.ReaderWriterLockSlim.IsWriteLockHeld"> <summary>Obtient une valeur qui indique si le thread actuel a entr le verrou en mode criture.</summary> <returns>true si le thread actuel a entr le verrou en mode criture; sinon, false.</returns> <filterpriority>2</filterpriority> </member> <member name="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy"> <summary>Obtient une valeur qui indique la stratgie de rcurrence pour l'objet <see cref="T:System.Threading.ReaderWriterLockSlim" /> actuel.</summary> <returns>Une des valeurs d'numration qui spcifie la stratgie de rcurrence du verrou.</returns> </member> <member name="P:System.Threading.ReaderWriterLockSlim.RecursiveReadCount"> <summary>Obtient le nombre de fois o le thread actuel a entr le verrou en mode lecture, comme une indication de rcurrence.</summary> <returns>0(zro) si le thread actuel n'a pas entr le verrou en mode lecture, 1si le thread a entr le verrou en mode lecture mais pas de faon rcursive, ou n si le thread a entr le verrou de faon rcursive n - 1fois.</returns> <filterpriority>2</filterpriority> </member> <member name="P:System.Threading.ReaderWriterLockSlim.RecursiveUpgradeCount"> <summary>Obtient le nombre de fois o le thread actuel a entr le verrou en mode pouvant tre mis niveau, comme une indication de rcurrence.</summary> <returns>0si le thread actuel n'a pas entr le verrou en mode pouvant tre mis niveau, 1si le thread a entr le verrou en mode pouvant tre mis niveau mais pas de faon rcursive, ou n si le thread a entr le verrou en mode pouvant tre mis niveau de faon rcursive n - 1fois.</returns> <filterpriority>2</filterpriority> </member> <member name="P:System.Threading.ReaderWriterLockSlim.RecursiveWriteCount"> <summary>Obtient le nombre de fois o le thread actuel a entr le verrou en mode criture, comme une indication de rcurrence.</summary> <returns>0si le n si le thread a entr le verrou en mode criture de faon rcursive n - 1fois.</returns> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.ReaderWriterLockSlim.TryEnterReadLock(System.Int32)"> <summary>Essaie d'entrer le verrou en mode lecture, avec un dlai d'attente entier facultatif.</summary> <returns>true si le thread appelant est entr en mode lecture, sinon, false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <exception cref="T:System.Threading.LockRecursionException">The <see cref="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy" /> property is <see cref="F:System.Threading.LockRecursionPolicy.NoRecursion" /> and the current thread has already entered the lock. -or-The recursion number would exceed the capacity of the counter.The limit is so large that applications should never encounter it.</exception> <exception cref="T:System.ArgumentOutOfRangeException">The value of <paramref name="millisecondsTimeout" /> is negative, but it is not equal to <see cref="F:System.Threading.Timeout.Infinite" /> (-1), which is the only negative value allowed. </exception> <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.ReaderWriterLockSlim" /> object has been disposed. </exception> </member> <member name="M:System.Threading.ReaderWriterLockSlim.TryEnterReadLock(System.TimeSpan)"> <summary>Essaie d'entrer le verrou en mode lecture, avec un dlai d'attente facultatif.</summary> <returns>true si le thread appelant est entr en mode lecture, sinon, false.</returns> <param name="timeout">Intervalle d'attente, ou -1milliseconde pour un dlai d'attente infini. </param> <exception cref="T:System.Threading.LockRecursionException">The <see cref="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy" /> property is <see cref="F:System.Threading.LockRecursionPolicy.NoRecursion" /> and the current thread has already entered the lock. -or-The recursion number would exceed the capacity of the counter.The limit is so large that applications should never encounter it.</exception> <exception cref="T:System.ArgumentOutOfRangeException">The value of <paramref name="timeout" /> is negative, but it is not equal to -1 milliseconds, which is the only negative value allowed.-or-The value of <paramref name="timeout" /> is greater than <see cref="F:System.Int32.MaxValue" /> milliseconds. </exception> <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.ReaderWriterLockSlim" /> object has been disposed. </exception> </member> <member name="M:System.Threading.ReaderWriterLockSlim.TryEnterUpgradeableReadLock(System.Int32)"> <summary>Essaie d'entrer le verrou en mode pouvant tre mis niveau, avec un dlai d'attente facultatif.</summary> <returns>true si le thread appelant est entr en mode de mise niveau, sinon, false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <exception cref="T:System.Threading.LockRecursionException">The <see cref="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy" /> property is <see cref="F:System.Threading.LockRecursionPolicy.NoRecursion" /> and the current thread has already entered the lock. -or-The current thread initially entered the lock in read mode, and therefore trying to enter upgradeable mode would create the possibility of a deadlock. -or-The recursion number would exceed the capacity of the counter.The limit is so large that applications should never encounter it.</exception> <exception cref="T:System.ArgumentOutOfRangeException">The value of <paramref name="millisecondsTimeout" /> is negative, but it is not equal to <see cref="F:System.Threading.Timeout.Infinite" /> (-1), which is the only negative value allowed. </exception> <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.ReaderWriterLockSlim" /> object has been disposed. </exception> </member> <member name="M:System.Threading.ReaderWriterLockSlim.TryEnterUpgradeableReadLock(System.TimeSpan)"> <summary>Essaie d'entrer le verrou en mode pouvant tre mis niveau, avec un dlai d'attente facultatif.</summary> <returns>true si le thread appelant est entr en mode de mise niveau, sinon, false.</returns> <param name="timeout">Intervalle d'attente, ou -1milliseconde pour un dlai d'attente infini.</param> <exception cref="T:System.Threading.LockRecursionException">The <see cref="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy" /> property is <see cref="F:System.Threading.LockRecursionPolicy.NoRecursion" /> and the current thread has already entered the lock. -or-The current thread initially entered the lock in read mode, and therefore trying to enter upgradeable mode would create the possibility of a deadlock. -or-The recursion number would exceed the capacity of the counter.The limit is so large that applications should never encounter it.</exception> <exception cref="T:System.ArgumentOutOfRangeException">The value of <paramref name="timeout" /> is negative, but it is not equal to -1 milliseconds, which is the only negative value allowed.-or-The value of <paramref name="timeout" /> is greater than <see cref="F:System.Int32.MaxValue" /> milliseconds. </exception> <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.ReaderWriterLockSlim" /> object has been disposed. </exception> </member> <member name="M:System.Threading.ReaderWriterLockSlim.TryEnterWriteLock(System.Int32)"> <summary>Essaie d'entrer le verrou en mode criture, avec un dlai d'attente facultatif.</summary> <returns>true si le thread appelant est entr en mode criture, sinon, false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <exception cref="T:System.Threading.LockRecursionException">The <see cref="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy" /> property is <see cref="F:System.Threading.LockRecursionPolicy.NoRecursion" /> and the current thread has already entered the lock. -or-The current thread initially entered the lock in read mode, and therefore trying to enter write mode would create the possibility of a deadlock. -or-The recursion number would exceed the capacity of the counter.The limit is so large that applications should never encounter it.</exception> <exception cref="T:System.ArgumentOutOfRangeException">The value of <paramref name="millisecondsTimeout" /> is negative, but it is not equal to <see cref="F:System.Threading.Timeout.Infinite" /> (-1), which is the only negative value allowed. </exception> <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.ReaderWriterLockSlim" /> object has been disposed. </exception> </member> <member name="M:System.Threading.ReaderWriterLockSlim.TryEnterWriteLock(System.TimeSpan)"> <summary>Essaie d'entrer le verrou en mode criture, avec un dlai d'attente facultatif.</summary> <returns>true si le thread appelant est entr en mode criture, sinon, false.</returns> <param name="timeout">Intervalle d'attente, ou -1milliseconde pour un dlai d'attente infini.</param> <exception cref="T:System.Threading.LockRecursionException">The <see cref="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy" /> property is <see cref="F:System.Threading.LockRecursionPolicy.NoRecursion" /> and the current thread has already entered the lock. -or-The current thread initially entered the lock in read mode, and therefore trying to enter write mode would create the possibility of a deadlock. -or-The recursion number would exceed the capacity of the counter.The limit is so large that applications should never encounter it.</exception> <exception cref="T:System.ArgumentOutOfRangeException">The value of <paramref name="timeout" /> is negative, but it is not equal to -1 milliseconds, which is the only negative value allowed.-or-The value of <paramref name="timeout" /> is greater than <see cref="F:System.Int32.MaxValue" /> milliseconds. </exception> <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.ReaderWriterLockSlim" /> object has been disposed. </exception> </member> <member name="P:System.Threading.ReaderWriterLockSlim.WaitingReadCount"> <summary>Obtient le nombre total de threads qui attendent pour entrer le verrou en mode lecture.</summary> <returns>Nombre total de threads qui attendent pour entrer en mode lecture.</returns> <filterpriority>2</filterpriority> </member> <member name="P:System.Threading.ReaderWriterLockSlim.WaitingUpgradeCount"> <summary>Obtient le nombre total de threads qui attendent pour entrer le verrou en mode pouvant tre mis niveau.</summary> <returns>Nombre total de threads qui attendent pour entrer en mode pouvant tre mis niveau.</returns> <filterpriority>2</filterpriority> </member> <member name="P:System.Threading.ReaderWriterLockSlim.WaitingWriteCount"> <summary>Obtient le nombre total de threads qui attendent pour entrer le verrou en mode criture.</summary> <returns>Nombre total de threads qui attendent pour entrer en mode criture.</returns> <filterpriority>2</filterpriority> </member> <member name="T:System.Threading.Semaphore"> <summary>Limite le nombre des threads qui peuvent accder simultanment une ressource ou un pool de ressources. </summary> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Semaphore.#ctor(System.Int32,System.Int32)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.Semaphore" /> en spcifiant le nombre initial d'entres et le nombre maximal d'entres simultanes. </summary> <param name="initialCount">Nombre initial de demandes pour le smaphore qui peuvent tre accordes simultanment. </param> <param name="maximumCount">Nombre maximal de demandes pour le smaphore qui peuvent tre accordes simultanment. </param> <exception cref="T:System.ArgumentException"> <paramref name="initialCount" /> est suprieur <paramref name="maximumCount" />.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="maximumCount" /> est infrieur 1.ou<paramref name="initialCount" /> est infrieur 0.</exception> </member> <member name="M:System.Threading.Semaphore.#ctor(System.Int32,System.Int32,System.String)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.Semaphore" /> en spcifiant le nombre initial d'entres et le nombre maximal d'entres simultanes, et en spcifiant en option le nom d'un objet smaphore systme. </summary> <param name="initialCount">Nombre initial de demandes pour le smaphore qui peuvent tre accordes simultanment. </param> <param name="maximumCount">Nombre maximal de demandes pour le smaphore qui peuvent tre accordes simultanment.</param> <param name="name">Nom d'un objet de smaphore systme nomm.</param> <exception cref="T:System.ArgumentException"> <paramref name="initialCount" /> est suprieur <paramref name="maximumCount" />.ou<paramref name="name" /> est plus de 260 caractres.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="maximumCount" /> est infrieur 1.ou<paramref name="initialCount" /> est infrieur 0.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.UnauthorizedAccessException">Le smaphore nomm existe et possde la scurit du contrle d'accs, et l'utilisateur n'a pas <see cref="F:System.Security.AccessControl.SemaphoreRights.FullControl" />.</exception> <exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">Le smaphore nomm ne peut pas tre cr, peut-tre parce qu'un handle d'attente d'un type diffrent possde le mme nom.</exception> </member> <member name="M:System.Threading.Semaphore.#ctor(System.Int32,System.Int32,System.String,System.Boolean@)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.Semaphore" /> en spcifiant le nombre initial d'entres et le nombre maximal d'entres simultanes, en spcifiant en option le nom d'un objet smaphore systme et en spcifiant une variable qui reoit une valeur indiquant si un smaphore systme a t cr.</summary> <param name="initialCount">Nombre initial de demandes pour le smaphore qui peut tre satisfait simultanment. </param> <param name="maximumCount">Nombre maximal de demandes pour le smaphore qui peut tre satisfait simultanment.</param> <param name="name">Nom d'un objet de smaphore systme nomm.</param> <param name="createdNew">Cette mthode retourne true si un smaphore local a t cr (en d'autres termes, si <paramref name="name" /> est null ou une chane vide) ou si le smaphore systme nomm spcifi a t cr; false si le smaphore systme nomm spcifi existait dj.Ce paramtre est pass sans tre initialis.</param> <exception cref="T:System.ArgumentException"> <paramref name="initialCount" /> est suprieur <paramref name="maximumCount" />. ou<paramref name="name" /> est plus de 260 caractres.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="maximumCount" /> est infrieur 1.ou<paramref name="initialCount" /> est infrieur 0.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.UnauthorizedAccessException">Le smaphore nomm existe et possde la scurit du contrle d'accs, et l'utilisateur n'a pas <see cref="F:System.Security.AccessControl.SemaphoreRights.FullControl" />.</exception> <exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">Le smaphore nomm ne peut pas tre cr, peut-tre parce qu'un handle d'attente d'un type diffrent possde le mme nom.</exception> </member> <member name="M:System.Threading.Semaphore.OpenExisting(System.String)"> <summary>Ouvre le smaphore nomm spcifi s'il existe dj.</summary> <returns>Objet qui reprsente le smaphore systme nomm.</returns> <param name="name">Nom du smaphore systme ouvrir.</param> <exception cref="T:System.ArgumentException"> <paramref name="name" /> est une chane vide.ou<paramref name="name" /> est plus de 260 caractres.</exception> <exception cref="T:System.ArgumentNullException"> <paramref name="name" /> a la valeur null.</exception> <exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">Le smaphore nomm n'existe pas.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.UnauthorizedAccessException">Le smaphore nomm existe, mais l'utilisateur ne possde pas l'accs de scurit requis pour l'utiliser. </exception> <filterpriority>1</filterpriority> <PermissionSet> <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" /> </PermissionSet> </member> <member name="M:System.Threading.Semaphore.Release"> <summary>Quitte le smaphore et retourne le compteur antrieur.</summary> <returns>Compteur du smaphore avant appel de la mthode <see cref="Overload:System.Threading.Semaphore.Release" />. </returns> <exception cref="T:System.Threading.SemaphoreFullException">Le compteur du smaphore est dj la valeur maximale.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite avec un smaphore nomm.</exception> <exception cref="T:System.UnauthorizedAccessException">Le smaphore actuel reprsente un smaphore systme nomm, mais l'utilisateur ne dtient pas de droits <see cref="F:System.Security.AccessControl.SemaphoreRights.Modify" />.ouLe smaphore actuel reprsente un smaphore systme nomm, mais il n'a pas t ouvert avec des droits <see cref="F:System.Security.AccessControl.SemaphoreRights.Modify" />.</exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Semaphore.Release(System.Int32)"> <summary>Quitte le smaphore un nombre spcifi de fois et retourne le compteur prcdent.</summary> <returns>Compteur du smaphore avant appel de la mthode <see cref="Overload:System.Threading.Semaphore.Release" />. </returns> <param name="releaseCount">Nombre de fois o quitter le smaphore.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="releaseCount" /> est infrieur 1.</exception> <exception cref="T:System.Threading.SemaphoreFullException">Le compteur du smaphore est dj la valeur maximale.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite avec un smaphore nomm.</exception> <exception cref="T:System.UnauthorizedAccessException">Le smaphore actuel reprsente un smaphore systme nomm, mais l'utilisateur ne dtient pas de droits <see cref="F:System.Security.AccessControl.SemaphoreRights.Modify" />.ouLe smaphore actuel reprsente un smaphore systme nomm, mais il n'a pas t ouvert avec des droits <see cref="F:System.Security.AccessControl.SemaphoreRights.Modify" />.</exception> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.Semaphore.TryOpenExisting(System.String,System.Threading.Semaphore@)"> <summary>Ouvre le smaphore nomm spcifi, s'il existe dj, et retourne une valeur indiquant si l'opration a russi.</summary> <returns>true si le smaphore nomm a t ouvert; sinon, false.</returns> <param name="name">Nom du smaphore systme ouvrir.</param> <param name="result">Quand cette mthode est retourne, contient un objet <see cref="T:System.Threading.Semaphore" /> qui reprsente le smaphore nomm si l'appel a russi, ou null si l'appel a chou.Ce paramtre est trait comme tant non initialis.</param> <exception cref="T:System.ArgumentException"> <paramref name="name" /> est une chane vide.ou<paramref name="name" /> est plus de 260 caractres.</exception> <exception cref="T:System.ArgumentNullException"> <paramref name="name" /> a la valeur null.</exception> <exception cref="T:System.IO.IOException">Une erreur Win32 s'est produite.</exception> <exception cref="T:System.UnauthorizedAccessException">Le smaphore nomm existe, mais l'utilisateur ne possde pas l'accs de scurit requis pour l'utiliser. </exception> </member> <member name="T:System.Threading.SemaphoreFullException"> <summary>Exception leve lorsque la mthode <see cref="Overload:System.Threading.Semaphore.Release" /> est appele sur un smaphore dont le compteur est dj au maximum. </summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.SemaphoreFullException.#ctor"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.SemaphoreFullException" /> avec les valeurs par dfaut.</summary> </member> <member name="M:System.Threading.SemaphoreFullException.#ctor(System.String)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.SemaphoreFullException" /> avec un message d'erreur spcifi.</summary> <param name="message">Message d'erreur indiquant la raison de l'exception.</param> </member> <member name="M:System.Threading.SemaphoreFullException.#ctor(System.String,System.Exception)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.SemaphoreFullException" /> avec un message d'erreur spcifi et une rfrence l'exception interne ayant provoqu cette exception.</summary> <param name="message">Message d'erreur indiquant la raison de l'exception.</param> <param name="innerException">Exception qui constitue la cause de l'exception actuelle.Si le paramtre <paramref name="innerException" /> n'est pas null, l'exception en cours est leve dans un bloc catch qui gre l'exception interne.</param> </member> <member name="T:System.Threading.SemaphoreSlim"> <summary>Reprsente une alternative lgre <see cref="T:System.Threading.Semaphore" /> qui limite le nombre de threads pouvant accder simultanment une ressource ou un pool de ressources.</summary> </member> <member name="M:System.Threading.SemaphoreSlim.#ctor(System.Int32)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.SemaphoreSlim" />, en spcifiant le nombre initial de demandes qui peuvent tre accordes simultanment.</summary> <param name="initialCount">Nombre initial de demandes pour le smaphore qui peuvent tre accordes simultanment.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="initialCount" /> est infrieur 0.</exception> </member> <member name="M:System.Threading.SemaphoreSlim.#ctor(System.Int32,System.Int32)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.SemaphoreSlim" />, en spcifiant le nombre initial et le nombre maximal de demandes qui peuvent tre accordes simultanment.</summary> <param name="initialCount">Nombre initial de demandes pour le smaphore qui peuvent tre accordes simultanment.</param> <param name="maxCount">Nombre maximal de demandes pour le smaphore qui peuvent tre accordes simultanment.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="initialCount" /> est infrieur 0 ou <paramref name="initialCount" /> est suprieur <paramref name="maxCount" /> ou <paramref name="maxCount" /> est infrieur ou gal 0.</exception> </member> <member name="P:System.Threading.SemaphoreSlim.AvailableWaitHandle"> <summary>Retourne un <see cref="T:System.Threading.WaitHandle" /> qui peut tre utilis pour l'attente sur le smaphore.</summary> <returns> <see cref="T:System.Threading.WaitHandle" /> qui peut tre utilis pour l'attente sur le smaphore.</returns> <exception cref="T:System.ObjectDisposedException"> <see cref="T:System.Threading.SemaphoreSlim" /> a t supprim.</exception> </member> <member name="P:System.Threading.SemaphoreSlim.CurrentCount"> <summary>Obtient le nombre de threads restants qui peuvent accder l'objet <see cref="T:System.Threading.SemaphoreSlim" />. </summary> <returns>Nombre de threads restants qui peuvent accder au smaphore.</returns> </member> <member name="M:System.Threading.SemaphoreSlim.Dispose"> <summary>Libre toutes les ressources utilises par l'instance actuelle de la classe <see cref="T:System.Threading.SemaphoreSlim" />.</summary> </member> <member name="M:System.Threading.SemaphoreSlim.Dispose(System.Boolean)"> <summary>Libre les ressources non manages utilises par le <see cref="T:System.Threading.SemaphoreSlim" />, et libre ventuellement les ressources manages.</summary> <param name="disposing">true pour librer les ressources manages et nonmanages; false pour ne librer que les ressources nonmanages.</param> </member> <member name="M:System.Threading.SemaphoreSlim.Release"> <summary>Libre l'objet <see cref="T:System.Threading.SemaphoreSlim" /> une seule fois.</summary> <returns>Dcompte prcdent de <see cref="T:System.Threading.SemaphoreSlim" />.</returns> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.Threading.SemaphoreFullException">Le <see cref="T:System.Threading.SemaphoreSlim" /> a dj atteint sa taille maximale.</exception> </member> <member name="M:System.Threading.SemaphoreSlim.Release(System.Int32)"> <summary>Libre l'objet <see cref="T:System.Threading.SemaphoreSlim" /> un nombre de fois dtermin.</summary> <returns>Dcompte prcdent de <see cref="T:System.Threading.SemaphoreSlim" />.</returns> <param name="releaseCount">Nombre de fois o quitter le smaphore.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="releaseCount" /> est infrieur 1.</exception> <exception cref="T:System.Threading.SemaphoreFullException">Le <see cref="T:System.Threading.SemaphoreSlim" /> a dj atteint sa taille maximale.</exception> </member> <member name="M:System.Threading.SemaphoreSlim.Wait"> <summary>Bloque le thread actuel jusqu' ce qu'il puisse accder <see cref="T:System.Threading.SemaphoreSlim" />.</summary> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> </member> <member name="M:System.Threading.SemaphoreSlim.Wait(System.Int32)"> <summary>Bloque le thread actuel jusqu' ce qu'il puisse accder <see cref="T:System.Threading.SemaphoreSlim" />, l'aide d'un entier sign 32bits qui spcifie le dlai d'attente.</summary> <returns>true si le thread actuel a accd avec succs <see cref="T:System.Threading.SemaphoreSlim" />; sinon, false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini.</exception> </member> <member name="M:System.Threading.SemaphoreSlim.Wait(System.Int32,System.Threading.CancellationToken)"> <summary>Bloque le thread actuel jusqu' ce qu'il puisse accder <see cref="T:System.Threading.SemaphoreSlim" />, l'aide d'un entier sign 32bits qui spcifie le dlai d'attente, tout en observant un <see cref="T:System.Threading.CancellationToken" />.</summary> <returns>true si le thread actuel a accd avec succs <see cref="T:System.Threading.SemaphoreSlim" />; sinon, false.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini.</exception> <exception cref="T:System.ObjectDisposedException">Le <see cref="T:System.Threading.SemaphoreSlim" /> instance a t supprime, ou <see cref="T:System.Threading.CancellationTokenSource" /> qui cr <paramref name="cancellationToken" /> a t supprim.</exception> </member> <member name="M:System.Threading.SemaphoreSlim.Wait(System.Threading.CancellationToken)"> <summary>Bloque le thread actuel jusqu' ce qu'il puisse accder <see cref="T:System.Threading.SemaphoreSlim" />, tout en observant un <see cref="T:System.Threading.CancellationToken" />.</summary> <param name="cancellationToken">Jeton <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul.</exception> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.ouLes <see cref="T:System.Threading.CancellationTokenSource" /> crs<paramref name=" cancellationToken" /> a dj t supprim.</exception> </member> <member name="M:System.Threading.SemaphoreSlim.Wait(System.TimeSpan)"> <summary>Bloque le thread actuel jusqu' ce qu'il puisse accder <see cref="T:System.Threading.SemaphoreSlim" />, l'aide d'un <see cref="T:System.TimeSpan" /> pour spcifier le dlai d'attente.</summary> <returns>true si le thread actuel a accd avec succs <see cref="T:System.Threading.SemaphoreSlim" />; sinon, false.</returns> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millisecondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1 milliseconde de seconde, pour attendre indfiniment.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="timeout" /> est un nombre ngatif autre que -1 millisecondes, qui reprsente un dlai d'expiration infini - ou - le dlai d'attente est suprieur <see cref="F:System.Int32.MaxValue" />.</exception> <exception cref="T:System.ObjectDisposedException">L'instance de semaphoreSlim a t supprime<paramref name="." /></exception> </member> <member name="M:System.Threading.SemaphoreSlim.Wait(System.TimeSpan,System.Threading.CancellationToken)"> <summary>Bloque le thread actuel jusqu' ce qu'il puisse accder <see cref="T:System.Threading.SemaphoreSlim" />, l'aide d'un <see cref="T:System.TimeSpan" /> qui spcifie le dlai d'attente, tout en observant un <see cref="T:System.Threading.CancellationToken" />.</summary> <returns>true si le thread actuel a accd avec succs <see cref="T:System.Threading.SemaphoreSlim" />; sinon, false.</returns> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millimes de secondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1 millime de seconde, pour attendre indfiniment.</param> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="timeout" /> est un nombre ngatif autre que -1 millisecondes, qui reprsente un dlai d'expiration infini - ou - le dlai d'attente est suprieur <see cref="F:System.Int32.MaxValue" />.</exception> <exception cref="T:System.ObjectDisposedException">L'instance de semaphoreSlim a t supprime<paramref name="." /><paramref name="-or-" />Le <see cref="T:System.Threading.CancellationTokenSource" /> qui a cr <paramref name="cancellationToken" /> a dj t supprim.</exception> </member> <member name="M:System.Threading.SemaphoreSlim.WaitAsync"> <summary>Attend de faon asynchrone avant d'accder <see cref="T:System.Threading.SemaphoreSlim" />. </summary> <returns>Tche qui se termine aprs l'accs au smaphore.</returns> </member> <member name="M:System.Threading.SemaphoreSlim.WaitAsync(System.Int32)"> <summary>Attend de faon asynchrone d'accder <see cref="T:System.Threading.SemaphoreSlim" />, l'aide d'un entier sign 32bits pour mesurer l'intervalle de temps. </summary> <returns>Tche qui se termine avec une valeur true si le thread actuel accde correctement <see cref="T:System.Threading.SemaphoreSlim" />, sinon la valeur false est retourne.</returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini.</exception> </member> <member name="M:System.Threading.SemaphoreSlim.WaitAsync(System.Int32,System.Threading.CancellationToken)"> <summary>Attend de faon asynchrone d'accder <see cref="T:System.Threading.SemaphoreSlim" />, l'aide d'un entier sign 32bits pour mesurer l'intervalle de temps, tout en observant un <see cref="T:System.Threading.CancellationToken" />. </summary> <returns>Tche qui se termine avec une valeur true si le thread actuel accde correctement <see cref="T:System.Threading.SemaphoreSlim" />, sinon la valeur false est retourne. </returns> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <param name="cancellationToken"> <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini. </exception> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime. </exception> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul. </exception> </member> <member name="M:System.Threading.SemaphoreSlim.WaitAsync(System.Threading.CancellationToken)"> <summary>Attend de faon asynchrone d'accder <see cref="T:System.Threading.SemaphoreSlim" />, tout en observant un <see cref="T:System.Threading.CancellationToken" />. </summary> <returns>Tche qui se termine aprs l'accs au smaphore. </returns> <param name="cancellationToken">Jeton <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul. </exception> </member> <member name="M:System.Threading.SemaphoreSlim.WaitAsync(System.TimeSpan)"> <summary>Attend de faon asynchrone d'accder <see cref="T:System.Threading.SemaphoreSlim" />, l'aide d'un <see cref="T:System.TimeSpan" /> pour mesurer l'intervalle de temps.</summary> <returns>Tche qui se termine avec une valeur true si le thread actuel accde correctement <see cref="T:System.Threading.SemaphoreSlim" />, sinon la valeur false est retourne.</returns> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millisecondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1 milliseconde de seconde, pour attendre indfiniment.</param> <exception cref="T:System.ObjectDisposedException">L'instance actuelle a dj t supprime.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini. ou dlai d'attente suprieur <see cref="F:System.Int32.MaxValue" />.</exception> </member> <member name="M:System.Threading.SemaphoreSlim.WaitAsync(System.TimeSpan,System.Threading.CancellationToken)"> <summary>Attend de faon asynchrone d'accder <see cref="T:System.Threading.SemaphoreSlim" />, l'aide d'un <see cref="T:System.TimeSpan" /> pour mesurer l'intervalle de temps, tout en observant un <see cref="T:System.Threading.CancellationToken" />.</summary> <returns>Tche qui se termine avec une valeur true si le thread actuel accde correctement <see cref="T:System.Threading.SemaphoreSlim" />, sinon la valeur false est retourne.</returns> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millimes de secondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1 millime de seconde, pour attendre indfiniment.</param> <param name="cancellationToken">Jeton <see cref="T:System.Threading.CancellationToken" /> observer.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini.oudlai d'attente suprieur <see cref="F:System.Int32.MaxValue" />.</exception> <exception cref="T:System.OperationCanceledException"> <paramref name="cancellationToken" /> a t annul. </exception> </member> <member name="T:System.Threading.SendOrPostCallback"> <summary>Reprsente une mthode appeler lorsqu'un message doit tre distribu un contexte de synchronisation. </summary> <param name="state">Objet pass au dlgu.</param> <filterpriority>2</filterpriority> </member> <member name="T:System.Threading.SpinLock"> <summary>Fournit une primitive de verrou d'exclusion mutuelle o un thread qui tente d'acqurir le verrou attend dans une boucle en vrifiant de manire rpte jusqu' ce que le verrou devienne disponible.</summary> </member> <member name="M:System.Threading.SpinLock.#ctor(System.Boolean)"> <summary>Initialise une nouvelle instance de la structure de <see cref="T:System.Threading.SpinLock" /> avec l'option permettant de suivre les ID de thread afin d'amliorer le dbogage.</summary> <param name="enableThreadOwnerTracking">Indique s'il faut capturer et utiliser des ID de thread des fins de dbogage.</param> </member> <member name="M:System.Threading.SpinLock.Enter(System.Boolean@)"> <summary>Acquiert le verrou de faon fiable, de sorte que mme si une exception se produit dans l'appel de mthode, <paramref name="lockTaken" /> peut tre examin de faon fiable pour dterminer si le verrou a t acquis.</summary> <param name="lockTaken">True si le verrou est acquis; sinon, false.<paramref name="lockTaken" /> doit tre initialis avec la valeur false avant l'appel cette mthode.</param> <exception cref="T:System.ArgumentException">L'argument <paramref name="lockTaken" /> doit tre initialis sur false avant d'appeler ENTRE.</exception> <exception cref="T:System.Threading.LockRecursionException">Le suivi de la proprit du thread est activ et le thread actuel a dj acquis ce verrou.</exception> </member> <member name="M:System.Threading.SpinLock.Exit"> <summary>Libre le verrou.</summary> <exception cref="T:System.Threading.SynchronizationLockException">Le suivi de la proprit du thread est autoris, et le thread actuel n'est pas le propritaire de ce verrou.</exception> </member> <member name="M:System.Threading.SpinLock.Exit(System.Boolean)"> <summary>Libre le verrou.</summary> <param name="useMemoryBarrier">Valeur boolenne qui indique si une barrire mmoire doit tre mise pour publier immdiatement l'opration de sortie sur d'autres threads.</param> <exception cref="T:System.Threading.SynchronizationLockException">Le suivi de la proprit du thread est autoris, et le thread actuel n'est pas le propritaire de ce verrou.</exception> </member> <member name="P:System.Threading.SpinLock.IsHeld"> <summary>Obtient une valeur qui indique si le verrou est actuellement dtenu par un thread.</summary> <returns>True si le verrou est actuellement dtenu par un thread; sinon, false.</returns> </member> <member name="P:System.Threading.SpinLock.IsHeldByCurrentThread"> <summary>Obtient une valeur qui indique si le verrou est dtenu par le thread actuel.</summary> <returns>True si le verrou est dtenu par le thread actuel; sinon, false.</returns> <exception cref="T:System.InvalidOperationException">Le suivi de la proprit du thread est dsactiv.</exception> </member> <member name="P:System.Threading.SpinLock.IsThreadOwnerTrackingEnabled"> <summary>Obtient une valeur qui indique si le suivi de la proprit des threads est activ pour cette instance.</summary> <returns>True si le suivi de la proprit du thread est autoris pour cette instance; sinon, false.</returns> </member> <member name="M:System.Threading.SpinLock.TryEnter(System.Boolean@)"> <summary>Tente d'acqurir le verrou de faon fiable, de sorte que mme si une exception se produit dans l'appel de mthode, <paramref name="lockTaken" /> peut tre examin de faon fiable pour dterminer si le verrou a t acquis.</summary> <param name="lockTaken">True si le verrou est acquis; sinon, false.<paramref name="lockTaken" /> doit tre initialis avec la valeur false avant l'appel cette mthode.</param> <exception cref="T:System.ArgumentException">L'argument <paramref name="lockTaken" /> doit tre initialis sur false avant d'appeler TryEnter.</exception> <exception cref="T:System.Threading.LockRecursionException">Le suivi de la proprit du thread est activ et le thread actuel a dj acquis ce verrou.</exception> </member> <member name="M:System.Threading.SpinLock.TryEnter(System.Int32,System.Boolean@)"> <summary>Tente d'acqurir le verrou de faon fiable, de sorte que mme si une exception se produit dans l'appel de mthode, <paramref name="lockTaken" /> peut tre examin de faon fiable pour dterminer si le verrou a t acquis.</summary> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <param name="lockTaken">True si le verrou est acquis; sinon, false.<paramref name="lockTaken" /> doit tre initialis avec la valeur false avant l'appel cette mthode.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini.</exception> <exception cref="T:System.ArgumentException">L'argument <paramref name="lockTaken" /> doit tre initialis sur false avant d'appeler TryEnter.</exception> <exception cref="T:System.Threading.LockRecursionException">Le suivi de la proprit du thread est activ et le thread actuel a dj acquis ce verrou.</exception> </member> <member name="M:System.Threading.SpinLock.TryEnter(System.TimeSpan,System.Boolean@)"> <summary>Tente d'acqurir le verrou de faon fiable, de sorte que mme si une exception se produit dans l'appel de mthode, <paramref name="lockTaken" /> peut tre examin de faon fiable pour dterminer si le verrou a t acquis.</summary> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millimes de secondes attendre ou <see cref="T:System.TimeSpan" /> qui reprsente -1 millime de seconde, pour attendre indfiniment.</param> <param name="lockTaken">True si le verrou est acquis; sinon, false.<paramref name="lockTaken" /> doit tre initialis avec la valeur false avant l'appel cette mthode.</param> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="timeout" /> est un nombre ngatif autre que -1 milliseconde, qui reprsente un dlai d'attente infini - ou - le dlai d'attente est suprieur <see cref="F:System.Int32.MaxValue" /> millisecondes.</exception> <exception cref="T:System.ArgumentException">L'argument <paramref name="lockTaken" /> doit tre initialis sur false avant d'appeler TryEnter.</exception> <exception cref="T:System.Threading.LockRecursionException">Le suivi de la proprit du thread est activ et le thread actuel a dj acquis ce verrou.</exception> </member> <member name="T:System.Threading.SpinWait"> <summary>Fournit une prise en charge de l'attente base sur les spins.</summary> </member> <member name="P:System.Threading.SpinWait.Count"> <summary>Obtient le nombre de fois o <see cref="M:System.Threading.SpinWait.SpinOnce" /> a t appel sur cette instance.</summary> <returns>Retourne un entier qui reprsente le nombre d'appels de <see cref="M:System.Threading.SpinWait.SpinOnce" /> sur cette instance.</returns> </member> <member name="P:System.Threading.SpinWait.NextSpinWillYield"> <summary>Obtient une valeur qui indique si l'appel suivant <see cref="M:System.Threading.SpinWait.SpinOnce" /> gnrera le processeur, en dclenchant un changement de contexte forc.</summary> <returns>Indique si l'appel suivant <see cref="M:System.Threading.SpinWait.SpinOnce" /> gnrera le processeur, en dclenchant un changement de contexte forc.</returns> </member> <member name="M:System.Threading.SpinWait.Reset"> <summary>Rinitialise le compteur de spins.</summary> </member> <member name="M:System.Threading.SpinWait.SpinOnce"> <summary>Excute un seul spin.</summary> </member> <member name="M:System.Threading.SpinWait.SpinUntil(System.Func{System.Boolean})"> <summary>Effectue des spins jusqu' ce que la condition spcifie soit satisfaite.</summary> <param name="condition">Dlgu excuter de faon rpte jusqu' ce qu'il retourne la valeur true.</param> <exception cref="T:System.ArgumentNullException">L'argument <paramref name="condition" /> a la valeur null.</exception> </member> <member name="M:System.Threading.SpinWait.SpinUntil(System.Func{System.Boolean},System.Int32)"> <summary>Effectue des spins jusqu' ce que la condition spcifie soit satisfaite ou jusqu' ce que le dlai d'attente expire.</summary> <returns>True si la condition est satisfaite dans le dlai d'attente; sinon, false.</returns> <param name="condition">Dlgu excuter de faon rpte jusqu' ce qu'il retourne la valeur true.</param> <param name="millisecondsTimeout">Nombre de millisecondes attendre, ou <see cref="F:System.Threading.Timeout.Infinite" /> (-1) pour un dlai d'attente infini.</param> <exception cref="T:System.ArgumentNullException">L'argument <paramref name="condition" /> a la valeur null.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="millisecondsTimeout" /> est un nombre ngatif autre que -1, qui reprsente un dlai d'attente infini.</exception> </member> <member name="M:System.Threading.SpinWait.SpinUntil(System.Func{System.Boolean},System.TimeSpan)"> <summary>Effectue des spins jusqu' ce que la condition spcifie soit satisfaite ou jusqu' ce que le dlai d'attente expire.</summary> <returns>True si la condition est satisfaite dans le dlai d'attente; sinon, false.</returns> <param name="condition">Dlgu excuter de faon rpte jusqu' ce qu'il retourne la valeur true.</param> <param name="timeout"> <see cref="T:System.TimeSpan" /> qui reprsente le nombre de millimes de secondes attendre, ou TimeSpan qui reprsente -1millime de seconde pour attendre indfiniment.</param> <exception cref="T:System.ArgumentNullException">L'argument <paramref name="condition" /> a la valeur null.</exception> <exception cref="T:System.ArgumentOutOfRangeException"> <paramref name="timeout" /> est un nombre ngatif autre que -1 millisecondes, qui reprsente un dlai d'expiration infini - ou - le dlai d'attente est suprieur <see cref="F:System.Int32.MaxValue" />.</exception> </member> <member name="T:System.Threading.SynchronizationContext"> <summary>Fournit les fonctionnalits de base pour propager un contexte de synchronisation dans plusieurs modles de synchronisation. </summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.SynchronizationContext.#ctor"> <summary>Cre une instance de la classe <see cref="T:System.Threading.SynchronizationContext" />.</summary> </member> <member name="M:System.Threading.SynchronizationContext.CreateCopy"> <summary>En cas de substitution dans une classe drive, cre une copie du contexte de synchronisation. </summary> <returns>Nouvel objet <see cref="T:System.Threading.SynchronizationContext" />.</returns> <filterpriority>2</filterpriority> </member> <member name="P:System.Threading.SynchronizationContext.Current"> <summary>Obtient le contexte de synchronisation du thread actuel.</summary> <returns>Objet <see cref="T:System.Threading.SynchronizationContext" /> reprsentant le contexte de synchronisation actuel.</returns> <filterpriority>1</filterpriority> </member> <member name="M:System.Threading.SynchronizationContext.OperationCompleted"> <summary>Lors d'une substitution dans une classe drive, rpond la notification selon laquelle une opration est termine.</summary> </member> <member name="M:System.Threading.SynchronizationContext.OperationStarted"> <summary>Lors d'une substitution dans une classe drive, rpond la notification selon laquelle une opration est lance.</summary> </member> <member name="M:System.Threading.SynchronizationContext.Post(System.Threading.SendOrPostCallback,System.Object)"> <summary>Lors d'une substitution dans une classe drive, distribue un message asynchrone un contexte de synchronisation.</summary> <param name="d">Dlgu <see cref="T:System.Threading.SendOrPostCallback" /> appeler.</param> <param name="state">Objet pass au dlgu.</param> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.SynchronizationContext.Send(System.Threading.SendOrPostCallback,System.Object)"> <summary>Lors d'une substitution dans une classe drive, distribue un message synchrone un contexte de synchronisation.</summary> <param name="d">Dlgu <see cref="T:System.Threading.SendOrPostCallback" /> appeler.</param> <param name="state">Objet pass au dlgu. </param> <exception cref="T:System.NotSupportedException">The method was called in a Windows Store app.The implementation of <see cref="T:System.Threading.SynchronizationContext" /> for Windows Store apps does not support the <see cref="M:System.Threading.SynchronizationContext.Send(System.Threading.SendOrPostCallback,System.Object)" /> method.</exception> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.SynchronizationContext.SetSynchronizationContext(System.Threading.SynchronizationContext)"> <summary>Dfinit le contexte de synchronisation actuel.</summary> <param name="syncContext">Objet <see cref="T:System.Threading.SynchronizationContext" /> dfinir.</param> <filterpriority>1</filterpriority> <PermissionSet> <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence, ControlPolicy" /> </PermissionSet> </member> <member name="T:System.Threading.SynchronizationLockException"> <summary>Exception leve lorsqu'une mthode exige de l'appelant qu'il possde un verrou sur un objet Monitor donn et que la mthode est appele par un appelant qui ne possde pas ce verrou.</summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.SynchronizationLockException.#ctor"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.SynchronizationLockException" /> avec des proprits par dfaut.</summary> </member> <member name="M:System.Threading.SynchronizationLockException.#ctor(System.String)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.SynchronizationLockException" /> avec un message d'erreur spcifi.</summary> <param name="message">Message d'erreur indiquant la raison de l'exception. </param> </member> <member name="M:System.Threading.SynchronizationLockException.#ctor(System.String,System.Exception)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.SynchronizationLockException" /> avec un message d'erreur spcifi et une rfrence l'exception interne ayant provoqu cette exception.</summary> <param name="message">Message d'erreur indiquant la raison de l'exception. </param> <param name="innerException">Exception qui constitue la cause de l'exception actuelle.Si le paramtre <paramref name="innerException" /> n'est pas null, l'exception en cours est leve dans un bloc catch qui gre l'exception interne.</param> </member> <member name="T:System.Threading.ThreadLocal`1"> <summary>Fournit le stockage local des donnes de thread.</summary> <typeparam name="T">Spcifie le type de donnes stockes par thread.</typeparam> </member> <member name="M:System.Threading.ThreadLocal`1.#ctor"> <summary>Initialise l'instance de <see cref="T:System.Threading.ThreadLocal`1" />.</summary> </member> <member name="M:System.Threading.ThreadLocal`1.#ctor(System.Boolean)"> <summary>Initialise l'instance de <see cref="T:System.Threading.ThreadLocal`1" />.</summary> <param name="trackAllValues">Indique s'il faut suivre toutes les valeurs dfinies dans l'instance et les exposer via la proprit <see cref="P:System.Threading.ThreadLocal`1.Values" />.</param> </member> <member name="M:System.Threading.ThreadLocal`1.#ctor(System.Func{`0})"> <summary>Initialise l'instance de <see cref="T:System.Threading.ThreadLocal`1" /> avec la fonction <paramref name="valueFactory" /> spcifie.</summary> <param name="valueFactory"> <see cref="T:System.Func`1" /> appel pour produire une valeur initialise tardivement lorsqu'une tentative est effectue pour rcuprer <see cref="P:System.Threading.ThreadLocal`1.Value" /> sans qu'il ait t prcdemment initialis.</param> <exception cref="T:System.ArgumentNullException"> <paramref name="valueFactory" /> est une rfrence null (Nothing en Visual Basic).</exception> </member> <member name="M:System.Threading.ThreadLocal`1.#ctor(System.Func{`0},System.Boolean)"> <summary>Initialise l'instance de <see cref="T:System.Threading.ThreadLocal`1" /> avec la fonction <paramref name="valueFactory" /> spcifie.</summary> <param name="valueFactory"> <see cref="T:System.Func`1" /> appel pour produire une valeur initialise tardivement lorsqu'une tentative est effectue pour rcuprer <see cref="P:System.Threading.ThreadLocal`1.Value" /> sans qu'il ait t prcdemment initialis.</param> <param name="trackAllValues">Indique s'il faut suivre toutes les valeurs dfinies dans l'instance et les exposer via la proprit <see cref="P:System.Threading.ThreadLocal`1.Values" />.</param> <exception cref="T:System.ArgumentNullException"> <paramref name="valueFactory" /> est une rfrence null (Nothing en VisualBasic).</exception> </member> <member name="M:System.Threading.ThreadLocal`1.Dispose"> <summary>Libre toutes les ressources utilises par l'instance actuelle de la classe <see cref="T:System.Threading.ThreadLocal`1" />.</summary> </member> <member name="M:System.Threading.ThreadLocal`1.Dispose(System.Boolean)"> <summary>Libre les ressources utilises par cette instance de <see cref="T:System.Threading.ThreadLocal`1" />.</summary> <param name="disposing">Valeur boolenne qui indique si cette mthode est appele en raison d'un appel <see cref="M:System.Threading.ThreadLocal`1.Dispose" />.</param> </member> <member name="M:System.Threading.ThreadLocal`1.Finalize"> <summary>Libre les ressources utilises par cette instance de <see cref="T:System.Threading.ThreadLocal`1" />.</summary> </member> <member name="P:System.Threading.ThreadLocal`1.IsValueCreated"> <summary>Obtient une valeur qui indique si <see cref="P:System.Threading.ThreadLocal`1.Value" /> est initialis sur le thread actuel.</summary> <returns>True si <see cref="P:System.Threading.ThreadLocal`1.Value" /> est initialis sur le thread actuel; sinon, false.</returns> <exception cref="T:System.ObjectDisposedException">L'instance de <see cref="T:System.Threading.ThreadLocal`1" /> a t supprime.</exception> </member> <member name="M:System.Threading.ThreadLocal`1.ToString"> <summary>Cre et retourne une reprsentation sous forme de chane de cette instance pour le thread actuel.</summary> <returns>Rsultat de l'appel <see cref="M:System.Object.ToString" /> sur <see cref="P:System.Threading.ThreadLocal`1.Value" />.</returns> <exception cref="T:System.ObjectDisposedException">L'instance de <see cref="T:System.Threading.ThreadLocal`1" /> a t supprime.</exception> <exception cref="T:System.NullReferenceException">Le <see cref="P:System.Threading.ThreadLocal`1.Value" /> du thread actuel est une rfrence null (Nothing en Visual Basic).</exception> <exception cref="T:System.InvalidOperationException">La fonction d'initialisation a tent de rfrencer <see cref="P:System.Threading.ThreadLocal`1.Value" /> de manire rcursive.</exception> <exception cref="T:System.MissingMemberException">Aucun constructeur par dfaut n'est fourni et aucune fabrique de valeurs n'est fournie.</exception> </member> <member name="P:System.Threading.ThreadLocal`1.Value"> <summary>Obtient ou dfinit la valeur de cette instance pour le thread actuel.</summary> <returns>Retourne une instance de l'objet dont ce ThreadLocal est charg de l'initialisation.</returns> <exception cref="T:System.ObjectDisposedException">L'instance de <see cref="T:System.Threading.ThreadLocal`1" /> a t supprime.</exception> <exception cref="T:System.InvalidOperationException">La fonction d'initialisation a tent de rfrencer <see cref="P:System.Threading.ThreadLocal`1.Value" /> de manire rcursive.</exception> <exception cref="T:System.MissingMemberException">Aucun constructeur par dfaut n'est fourni et aucune fabrique de valeurs n'est fournie.</exception> </member> <member name="P:System.Threading.ThreadLocal`1.Values"> <summary>Obtient une liste de toutes les valeurs actuellement stockes par tous les threads qui ont accs cette instance.</summary> <returns>Liste de toutes les valeurs actuellement stockes par tous les threads qui ont accs cette instance.</returns> <exception cref="T:System.ObjectDisposedException">L'instance de <see cref="T:System.Threading.ThreadLocal`1" /> a t supprime.</exception> </member> <member name="T:System.Threading.Volatile"> <summary>Contient des mthodes permettant d'effectuer des oprations de mmoire volatile.</summary> </member> <member name="M:System.Threading.Volatile.Read(System.Boolean@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.Byte@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.Double@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.Int16@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.Int32@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.Int64@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.IntPtr@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.SByte@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.Single@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.UInt16@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.UInt32@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.UInt64@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read(System.UIntPtr@)"> <summary>Lit la valeur du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Valeur qui a t lue.Il s'agit de la dernire valeur crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> </member> <member name="M:System.Threading.Volatile.Read``1(``0@)"> <summary>Lit la rfrence d'objet partir du champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat aprs cette mthode dans le code, le processeur ne peut pas la dplacer avant cette mthode.</summary> <returns>Rfrence <paramref name="T" /> qui a t lue.Il s'agit de la dernire rfrence crite par un processeur de l'ordinateur, quel que soit le nombre de processeurs ou l'tat du cache de processeur.</returns> <param name="location">Champ lire.</param> <typeparam name="T">Type du champ lire.Il doit s'agir d'un type rfrence, et non d'un type valeur.</typeparam> </member> <member name="M:System.Threading.Volatile.Write(System.Boolean@,System.Boolean)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.Byte@,System.Byte)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.Double@,System.Double)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.Int16@,System.Int16)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.Int32@,System.Int32)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.Int64@,System.Int64)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de mmoire apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.IntPtr@,System.IntPtr)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.SByte@,System.SByte)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.Single@,System.Single)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.UInt16@,System.UInt16)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.UInt32@,System.UInt32)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.UInt64@,System.UInt64)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write(System.UIntPtr@,System.UIntPtr)"> <summary>crit la valeur spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la valeur est crite.</param> <param name="value">Valeur crire.La valeur est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> </member> <member name="M:System.Threading.Volatile.Write``1(``0@,``0)"> <summary>crit la rfrence d'objet spcifie dans le champ spcifi.Sur les systmes le ncessitant, insre une barrire de mmoire qui empche le processeur de rorganiser les oprations de mmoire comme suit: si une opration de lecture ou d'criture apparat avant cette mthode dans le code, le processeur ne peut pas la dplacer aprs cette mthode.</summary> <param name="location">Champ dans lequel la rfrence d'objet est crite.</param> <param name="value">Rfrence d'objet crire.La rfrence est crite immdiatement, de sorte qu'elle est visible pour tous les processeurs de l'ordinateur.</param> <typeparam name="T">Type du champ dans lequel crire.Il doit s'agir d'un type rfrence, et non d'un type valeur.</typeparam> </member> <member name="T:System.Threading.WaitHandleCannotBeOpenedException"> <summary>Exception leve lors d'une tentative d'ouverture d'un mutex systme ou d'un smaphore qui n'existe pas.</summary> <filterpriority>2</filterpriority> </member> <member name="M:System.Threading.WaitHandleCannotBeOpenedException.#ctor"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.WaitHandleCannotBeOpenedException" /> avec les valeurs par dfaut.</summary> </member> <member name="M:System.Threading.WaitHandleCannotBeOpenedException.#ctor(System.String)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.WaitHandleCannotBeOpenedException" /> avec un message d'erreur spcifi.</summary> <param name="message">Message d'erreur indiquant la raison de l'exception.</param> </member> <member name="M:System.Threading.WaitHandleCannotBeOpenedException.#ctor(System.String,System.Exception)"> <summary>Initialise une nouvelle instance de la classe <see cref="T:System.Threading.WaitHandleCannotBeOpenedException" /> avec un message d'erreur spcifi et une rfrence l'exception interne ayant provoqu cette exception.</summary> <param name="message">Message d'erreur indiquant la raison de l'exception.</param> <param name="innerException">Exception qui constitue la cause de l'exception actuelle.Si le paramtre <paramref name="innerException" /> n'est pas null, l'exception en cours est leve dans un bloc catch qui gre l'exception interne.</param> </member> </members> </doc> ```
/content/code_sandbox/packages/System.Threading.4.0.0/ref/netcore50/fr/System.Threading.xml
xml
2016-04-24T09:50:47
2024-08-16T11:45:14
ILRuntime
Ourpalm/ILRuntime
2,976
47,114
```xml import React from 'dom-chef'; import elementReady from 'element-ready'; import * as pageDetect from 'github-url-detection'; import features from '../feature-manager.js'; import {getCleanPathname} from '../github-helpers/index.js'; async function init(): Promise<void> { let commitUrl = '/' + getCleanPathname(); // Avoids a redirection if (pageDetect.isPRCommit()) { commitUrl = commitUrl.replace(/\/pull\/\d+\/commits/, '/commit'); } const commitMeta = await elementReady('.commit-meta'); commitMeta!.classList.remove('no-wrap'); // #5987 commitMeta!.lastElementChild!.append( <span className="sha-block" data-turbo="false"> <a href={`${commitUrl}.patch`} className="sha">patch</a> {' '} <a href={`${commitUrl}.diff`} className="sha">diff</a> </span>, ); } void features.add(import.meta.url, { include: [ pageDetect.isCommit, ], exclude: [ pageDetect.isPRCommit404, ], deduplicate: 'has-rgh-inner', init, }); ```
/content/code_sandbox/source/features/patch-diff-links.tsx
xml
2016-02-15T16:45:02
2024-08-16T18:39:26
refined-github
refined-github/refined-github
24,013
256
```xml export type SpawnOptions = { onProgress?: (data: string) => void env?: Record<string, unknown> } export function spawnProgress(commandLine: string, options: SpawnOptions): Promise<string> { return new Promise((resolve, reject) => { const args = commandLine.split(" ") const spawned = require("cross-spawn")(args.shift(), args, options) const output = [] spawned.stdout.on("data", (data) => { data = data.toString() return options.onProgress ? options.onProgress(data) : output.push(data) }) spawned.stderr.on("data", (data) => output.push(data)) spawned.on("close", (code) => (code === 0 ? resolve(output.join("")) : reject(output.join("")))) spawned.on("error", (err) => reject(err)) }) } ```
/content/code_sandbox/src/tools/spawn.ts
xml
2016-02-10T16:06:07
2024-08-16T19:52:51
ignite
infinitered/ignite
17,196
181
```xml import Button from '@erxes/ui/src/components/Button'; import CollapseContent from '@erxes/ui/src/components/CollapseContent'; import ControlLabel from '@erxes/ui/src/components/form/Label'; import { FormControl } from '@erxes/ui/src/components/form'; import FormGroup from '@erxes/ui/src/components/form/Group'; import { IConfigsMap } from '@erxes/ui-settings/src/general/types'; import Icon from '@erxes/ui/src/components/Icon'; import Info from '@erxes/ui/src/components/Info'; import React from 'react'; import { __ } from '@erxes/ui/src/utils/core'; const KEY_LABELS = { FACEBOOK_APP_ID: 'Facebook App Id', FACEBOOK_APP_SECRET: 'Facebook App Secret', FACEBOOK_VERIFY_TOKEN: 'Facebook Verify Token', FACEBOOK_PERMISSIONS: 'Facebook Permissions', }; type Props = { loading: boolean; updateConfigs: (configsMap: IConfigsMap) => void; configsMap: IConfigsMap; }; type State = { configsMap: IConfigsMap; }; export default class UpdateConfigs extends React.Component<Props, State> { constructor(props: Props) { super(props); this.state = { configsMap: props.configsMap }; } onChangeConfig = (code: string, value) => { const { configsMap } = this.state; configsMap[code] = value; this.setState({ configsMap }); }; onChangeInput = (code: string, e) => { this.onChangeConfig(code, e.target.value); }; renderItem = ( key: string, type?: string, description?: string, defaultValue?: string, label?: string, ) => { const { configsMap } = this.state; return ( <FormGroup> <ControlLabel>{label || KEY_LABELS[key]}</ControlLabel> {description && <p>{__(description)}</p>} <FormControl type={type || 'text'} defaultValue={configsMap[key] || defaultValue} onChange={this.onChangeInput.bind(this, key)} /> </FormGroup> ); }; render() { const onClick = () => { this.props.updateConfigs(this.state.configsMap); }; return ( <CollapseContent beforeTitle={<Icon icon="facebook" />} transparent={true} title="Facebook" > <Info> <a target="_blank" href="path_to_url" rel="noopener noreferrer" > {__('Learn how to set Facebook Integration Variables')} </a> </Info> {this.renderItem('FACEBOOK_APP_ID')} {this.renderItem('FACEBOOK_APP_SECRET')} {this.renderItem('FACEBOOK_VERIFY_TOKEN')} {this.renderItem( 'FACEBOOK_PERMISSIONS', '', '', 'pages_messaging,pages_manage_ads,pages_manage_engagement,pages_manage_metadata,pages_read_user_content', )} <Button onClick={onClick}>{__('Save')}</Button> </CollapseContent> ); } } ```
/content/code_sandbox/packages/plugin-facebook-ui/src/components/UpdateConfigs.tsx
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
644
```xml <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <!--<TargetFramework>netstandard2.0</TargetFramework>--> <!--<TargetFramework>net45</TargetFramework>--> <!--<TargetFramework>net6.0</TargetFramework>--> <TargetFrameworks>net8.0;net6.0;netstandard2.0;net46</TargetFrameworks> <LangVersion>10.0</LangVersion> <Version>5.28.0</Version> <Description>A lightweight and high-performance Object/Relational Mapping(ORM) library.</Description> <PackageId>Chloe</PackageId> <Product>Chloe.ORM</Product> <Authors>Shuxin Qin</Authors> <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> </PropertyGroup> <PropertyGroup> <DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <PropertyGroup Condition="'$(TargetFramework)' == 'net46'"> <DefineConstants>NETFX;NET46</DefineConstants> </PropertyGroup> <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> <DefineConstants>NETCORE;NETSTANDARD2</DefineConstants> </PropertyGroup> <PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'"> <DefineConstants>NETCORE;NET6</DefineConstants> </PropertyGroup> <PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'"> <DefineConstants>NETCORE;NET8</DefineConstants> </PropertyGroup> <ItemGroup Condition="'$(TargetFramework)' == 'net46'"> <PackageReference Include="System.ValueTuple" Version="4.5.0" /> </ItemGroup> <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> <PackageReference Include="System.Reflection.Emit" Version="4.7.0" /> <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" /> <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" /> <PackageReference Include="System.Linq.Async" Version="6.0.1" /> </ItemGroup> <ItemGroup Condition="'$(TargetFramework)' == 'net6.0'"> <PackageReference Include="System.Linq.Async" Version="6.0.1" /> </ItemGroup> <ItemGroup Condition="'$(TargetFramework)' == 'net8.0'"> <PackageReference Include="System.Linq.Async" Version="6.0.1" /> </ItemGroup> </Project> ```
/content/code_sandbox/src/Chloe/Chloe.csproj
xml
2016-03-17T07:06:49
2024-08-16T18:39:39
Chloe
shuxinqin/Chloe
1,514
616
```xml <project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <modelVersion>4.0.0</modelVersion> <groupId>foo.bar</groupId> <artifactId>salut</artifactId> <version>0.0.1-SNAPSHOT</version> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.5.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.5</version> </dependency> </dependencies> </project> ```
/content/code_sandbox/org.eclipse.jdt.ls.tests/projects/maven/salut/pom.xml
xml
2016-06-27T13:06:53
2024-08-16T00:38:32
eclipse.jdt.ls
eclipse-jdtls/eclipse.jdt.ls
1,726
221
```xml import { InternalEventHandlerInterface } from './InternalEventHandlerInterface' import { InternalEventBus } from './InternalEventBus' import { InternalEventPublishStrategy } from './InternalEventPublishStrategy' describe('InternalEventBus', () => { let eventHandler1: InternalEventHandlerInterface let eventHandler2: InternalEventHandlerInterface let eventHandler3: InternalEventHandlerInterface const createEventBus = () => new InternalEventBus() beforeEach(() => { eventHandler1 = {} as jest.Mocked<InternalEventHandlerInterface> eventHandler1.handleEvent = jest.fn() eventHandler2 = {} as jest.Mocked<InternalEventHandlerInterface> eventHandler2.handleEvent = jest.fn() eventHandler3 = {} as jest.Mocked<InternalEventHandlerInterface> eventHandler3.handleEvent = jest.fn() }) it('should trigger appropriate event handlers upon event publishing', () => { const eventBus = createEventBus() eventBus.addEventHandler(eventHandler1, 'test_event_1') eventBus.addEventHandler(eventHandler2, 'test_event_2') eventBus.addEventHandler(eventHandler1, 'test_event_3') eventBus.addEventHandler(eventHandler3, 'test_event_2') eventBus.publish({ type: 'test_event_2', payload: { foo: 'bar' } }) expect(eventHandler1.handleEvent).not.toHaveBeenCalled() expect(eventHandler2.handleEvent).toHaveBeenCalledWith({ type: 'test_event_2', payload: { foo: 'bar' }, }) expect(eventHandler3.handleEvent).toHaveBeenCalledWith({ type: 'test_event_2', payload: { foo: 'bar' }, }) }) it('should do nothing if there are no appropriate event handlers', () => { const eventBus = createEventBus() eventBus.addEventHandler(eventHandler1, 'test_event_1') eventBus.addEventHandler(eventHandler2, 'test_event_2') eventBus.addEventHandler(eventHandler1, 'test_event_3') eventBus.addEventHandler(eventHandler3, 'test_event_2') eventBus.publish({ type: 'test_event_4', payload: { foo: 'bar' } }) expect(eventHandler1.handleEvent).not.toHaveBeenCalled() expect(eventHandler2.handleEvent).not.toHaveBeenCalled() expect(eventHandler3.handleEvent).not.toHaveBeenCalled() }) it('should handle event synchronously in a sequential order', async () => { const eventBus = createEventBus() eventBus.addEventHandler(eventHandler1, 'test_event_1') eventBus.addEventHandler(eventHandler2, 'test_event_2') eventBus.addEventHandler(eventHandler1, 'test_event_3') eventBus.addEventHandler(eventHandler3, 'test_event_2') await eventBus.publishSync({ type: 'test_event_2', payload: { foo: 'bar' } }, InternalEventPublishStrategy.SEQUENCE) expect(eventHandler1.handleEvent).not.toHaveBeenCalled() expect(eventHandler2.handleEvent).toHaveBeenCalledWith({ type: 'test_event_2', payload: { foo: 'bar' }, }) expect(eventHandler3.handleEvent).toHaveBeenCalledWith({ type: 'test_event_2', payload: { foo: 'bar' }, }) }) it('should handle event synchronously in a random order', async () => { const eventBus = createEventBus() eventBus.addEventHandler(eventHandler1, 'test_event_1') eventBus.addEventHandler(eventHandler2, 'test_event_2') eventBus.addEventHandler(eventHandler1, 'test_event_3') eventBus.addEventHandler(eventHandler3, 'test_event_2') await eventBus.publishSync({ type: 'test_event_2', payload: { foo: 'bar' } }, InternalEventPublishStrategy.ASYNC) expect(eventHandler1.handleEvent).not.toHaveBeenCalled() expect(eventHandler2.handleEvent).toHaveBeenCalledWith({ type: 'test_event_2', payload: { foo: 'bar' }, }) expect(eventHandler3.handleEvent).toHaveBeenCalledWith({ type: 'test_event_2', payload: { foo: 'bar' }, }) }) it('should do nothing if there are no appropriate event handlers for synchronous handling', async () => { const eventBus = createEventBus() eventBus.addEventHandler(eventHandler1, 'test_event_1') eventBus.addEventHandler(eventHandler2, 'test_event_2') eventBus.addEventHandler(eventHandler1, 'test_event_3') eventBus.addEventHandler(eventHandler3, 'test_event_2') await eventBus.publishSync({ type: 'test_event_4', payload: { foo: 'bar' } }, InternalEventPublishStrategy.ASYNC) expect(eventHandler1.handleEvent).not.toHaveBeenCalled() expect(eventHandler2.handleEvent).not.toHaveBeenCalled() expect(eventHandler3.handleEvent).not.toHaveBeenCalled() }) it('should clear event observers on deinit', async () => { const eventBus = createEventBus() eventBus.deinit() expect(eventBus['eventHandlers']).toBeUndefined }) }) ```
/content/code_sandbox/packages/services/src/Domain/Internal/InternalEventBus.spec.ts
xml
2016-12-05T23:31:33
2024-08-16T06:51:19
app
standardnotes/app
5,180
1,104
```xml import enGB from 'date-fns/locale/en-GB'; const Calendar = { sunday: 'Su', monday: 'Mo', tuesday: 'Tu', wednesday: 'We', thursday: 'Th', friday: 'Fr', saturday: 'Sa', ok: 'OK', today: 'Today', yesterday: 'Yesterday', hours: 'Hours', minutes: 'Minutes', seconds: 'Seconds', /** * Format of the string is based on Unicode Technical Standard #35: * path_to_url#Date_Field_Symbol_Table **/ formattedMonthPattern: 'MMM yyyy', formattedDayPattern: 'dd MMM yyyy', dateLocale: enGB as any }; export default { common: { loading: 'Loading...', emptyMessage: 'No data found', remove: 'Remove', clear: 'Clear' }, Plaintext: { unfilled: 'Unfilled', notSelected: 'Not selected', notUploaded: 'Not uploaded' }, Pagination: { more: 'More', prev: 'Previous', next: 'Next', first: 'First', last: 'Last', limit: '{0} / page', total: 'Total Rows: {0}', skip: 'Go to{0}' }, Calendar, DatePicker: { ...Calendar }, DateRangePicker: { ...Calendar, last7Days: 'Last 7 Days' }, Picker: { noResultsText: 'No results found', placeholder: 'Select', searchPlaceholder: 'Search', checkAll: 'All' }, InputPicker: { newItem: 'New item', createOption: 'Create option "{0}"' }, Uploader: { inited: 'Initial', progress: 'Uploading', error: 'Error', complete: 'Finished', emptyFile: 'Empty', upload: 'Upload', removeFile: 'Remove file' }, CloseButton: { closeLabel: 'Close' }, Breadcrumb: { expandText: 'Show path' }, Toggle: { on: 'Open', off: 'Close' } }; ```
/content/code_sandbox/src/locales/default.ts
xml
2016-06-06T02:27:46
2024-08-16T16:41:54
rsuite
rsuite/rsuite
8,263
490
```xml import { Types } from '@graphql-codegen/plugin-helpers'; import { buildSchema, parse } from 'graphql'; import { plugin } from '../src/index.js'; describe('TypedDocumentNode', () => { it('Should not output imports when there are no operations at all', async () => { const result = (await plugin(null as any, [], {})) as Types.ComplexPluginOutput; expect(result.content).toBe(''); expect(result.prepend.length).toBe(0); }); describe('addTypenameToSelectionSets', () => { it('Check is add __typename to typed document', async () => { const schema = buildSchema(/* GraphQL */ ` schema { query: Query } type Query { job: Job } type Job { id: ID! } `); const ast = parse(/* GraphQL */ ` query { job { id } } `); const res = (await plugin( schema, [{ location: '', document: ast }], { addTypenameToSelectionSets: true }, { outputFile: '' } )) as Types.ComplexPluginOutput; expect((res.content.match(/__typename/g) || []).length).toBe(1); }); it('Check with __typename in selection set', async () => { const schema = buildSchema(/* GraphQL */ ` schema { query: Query } type Query { job: Job } type Job { id: ID! } `); const ast = parse(/* GraphQL */ ` query { job { id __typename } } `); const res = (await plugin( schema, [{ location: '', document: ast }], { addTypenameToSelectionSets: true }, { outputFile: '' } )) as Types.ComplexPluginOutput; expect((res.content.match(/__typename/g) || []).length).toBe(1); }); }); }); ```
/content/code_sandbox/packages/plugins/typescript/typed-document-node/tests/typed-document-node.spec.ts
xml
2016-12-05T19:15:11
2024-08-15T14:56:08
graphql-code-generator
dotansimha/graphql-code-generator
10,759
428
```xml import { Component, Input, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'storybook-chips-group', template: ` <storybook-chip *ngFor="let chip of chips" class="chip" [displayText]="chip.text" (removeClicked)="removeChipClick.emit(chip.id)" ></storybook-chip> <div *ngIf="chips.length > 1" class="remove-all" (click)="removeAllChipsClick.emit()"> Remove All </div> `, styles: [ ` :host { display: flex; align-content: center; border-radius: 0.5rem; background-color: lightgrey; padding: 0.5rem; width: fit-content; } .chip:not(:first-of-type) { margin-left: 0.5rem; } .remove-all { margin-left: 0.5rem; border: solid 0.1rem #eeeeee; padding: 0.2rem 0.5rem; } .remove-all:hover { background-color: palevioletred; } `, ], }) export class ChipsGroupComponent { @Input() chips?: { id: number; text: string; }[]; @Output() removeChipClick = new EventEmitter<number>(); @Output() removeAllChipsClick = new EventEmitter(); } ```
/content/code_sandbox/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips-group.component.ts
xml
2016-03-18T04:23:44
2024-08-16T19:22:08
storybook
storybookjs/storybook
83,755
306
```xml <vector xmlns:android="path_to_url" android:width="27dp" android:height="27dp" android:viewportWidth="27" android:viewportHeight="27"> <path android:pathData="M13.5,20C13.5,16.41 16.41,13.5 20,13.5C23.59,13.5 26.5,16.41 26.5,20C26.5,23.59 23.59,26.5 20,26.5C16.41,26.5 13.5,23.59 13.5,20ZM20,15.5C20.552,15.5 21,15.948 21,16.5V20C21,20.552 20.552,21 20,21C19.448,21 19,20.552 19,20V16.5C19,15.948 19.448,15.5 20,15.5ZM20,22.5C19.448,22.5 19,22.948 19,23.5C19,24.052 19.448,24.5 20,24.5H20.01C20.562,24.5 21.01,24.052 21.01,23.5C21.01,22.948 20.562,22.5 20.01,22.5H20Z" android:fillColor="#FFCA28" android:fillType="evenOdd"/> <path android:pathData="M11,2C6.029,2 2,6.029 2,11C2,13.38 2.924,15.544 4.432,17.153L13.586,8C14.367,7.219 15.633,7.219 16.414,8L19.915,11.5C19.064,11.509 18.243,11.642 17.469,11.883L15,9.414L5.958,18.456C7.396,19.431 9.132,20 11,20C11.168,20 11.335,19.995 11.5,19.986C11.5,19.991 11.5,19.995 11.5,20C11.5,20.68 11.58,21.342 11.731,21.976C11.489,21.992 11.246,22 11,22C4.925,22 0,17.075 0,11C0,4.925 4.925,0 11,0C17.075,0 22,4.925 22,11C22,11.246 21.992,11.489 21.976,11.731C21.342,11.58 20.68,11.5 20,11.5C19.995,11.5 19.991,11.5 19.986,11.5C19.995,11.335 20,11.168 20,11C20,6.029 15.971,2 11,2ZM7,7C7,6.448 7.448,6 8,6C8.552,6 9,6.448 9,7C9,7.552 8.552,8 8,8C7.448,8 7,7.552 7,7ZM8,4C6.343,4 5,5.343 5,7C5,8.657 6.343,10 8,10C9.657,10 11,8.657 11,7C11,5.343 9.657,4 8,4Z" android:fillColor="#000000" android:fillAlpha="0.87" android:fillType="evenOdd"/> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/ic_cu_status_warning.xml
xml
2016-05-04T11:46:20
2024-08-15T16:29:10
android
meganz/android
1,537
900
```xml import type { WebChatActivity } from 'botframework-webchat-core'; import { StrictStyleOptions } from '../StyleOptions'; import ComponentMiddleware, { ComponentFactory } from './ComponentMiddleware'; type AvatarComponentFactoryArguments = [ { activity: WebChatActivity; fromUser: boolean; styleOptions: StrictStyleOptions; } ]; type AvatarComponentFactory = ComponentFactory<AvatarComponentFactoryArguments, {}>; type AvatarMiddleware = ComponentMiddleware<[], AvatarComponentFactoryArguments, {}>; export default AvatarMiddleware; export type { AvatarComponentFactory }; ```
/content/code_sandbox/packages/api/src/types/AvatarMiddleware.ts
xml
2016-07-07T23:16:57
2024-08-16T00:12:37
BotFramework-WebChat
microsoft/BotFramework-WebChat
1,567
115
```xml <!-- ~ ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <vector xmlns:android="path_to_url" android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path android:fillColor="#FFFFFFFF" android:pathData="M18,4L6,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,6c0,-1.1 -0.9,-2 -2,-2zM18,18L6,18L6,6h12v12z"/> </vector> ```
/content/code_sandbox/demo/src/main/res/drawable/ic_aspect_ratio.xml
xml
2016-08-04T05:22:14
2024-08-08T07:34:11
cameraview
google/cameraview
4,736
214
```xml import { Meta, StoryObj } from "@storybook/angular"; import { ProgressComponent } from "./progress.component"; export default { title: "Component Library/Progress", component: ProgressComponent, parameters: { design: { type: "figma", url: "path_to_url", }, }, args: { showText: true, size: "default", bgColor: "primary", }, } as Meta; type Story = StoryObj<ProgressComponent>; export const Empty: Story = { args: { barWidth: 0, }, }; export const Full: Story = { args: { barWidth: 100, }, }; export const CustomText: Story = { args: { barWidth: 25, text: "Loading...", }, }; ```
/content/code_sandbox/libs/components/src/progress/progress.stories.ts
xml
2016-03-09T23:14:01
2024-08-16T15:07:51
clients
bitwarden/clients
8,877
175
```xml import * as React from 'react'; import ComponentExample from '../../../../components/ComponentDoc/ComponentExample'; import ExampleSection from '../../../../components/ComponentDoc/ExampleSection'; const States = () => ( <ExampleSection title="States"> <ComponentExample title="Disabled" description="A segment can show it is currently unable to be interacted with." examplePath="components/Segment/States/SegmentExampleDisabled" /> </ExampleSection> ); export default States; ```
/content/code_sandbox/packages/fluentui/docs/src/examples/components/Segment/States/index.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
102
```xml export const RABBITMQ_QUEUES = { PUT_LOG: 'putLog', RPC_API_TO_INTEGRATIONS: 'rpc_queue:api_to_integrations', RPC_API_TO_WORKERS: 'rpc_queue:api_to_workers', RPC_API_TO_WEBHOOK_WORKERS: 'rpc_queue:api_to_webhook_workers', WORKERS: 'workers', VISITOR_LOG: 'visitorLog', RPC_VISITOR_LOG: 'rpc_queue:visitorLog', AUTOMATIONS_TRIGGER: 'automations:trigger', LOG_DELETE_OLD: 'log:delete:old' }; export const USER_PROPERTIES_INFO = { email: 'Primary email', username: 'User name', ALL: [ { field: 'email', label: 'Primary email', canHide: false }, { field: 'username', label: 'User name' } ] }; export const MODULE_NAMES = { BRAND: 'brand', PERMISSION: 'permission', USER: 'user', USER_GROUP: 'userGroup' }; ```
/content/code_sandbox/packages/workers/src/data/constants.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
219
```xml import { z } from '@botpress/sdk' const plainTextSchema = z.object({ type: z.literal('plain_text'), text: z.string() }).strict() const markdownSchema = z.object({ type: z.literal('mrkdwn'), text: z.string() }).strict() const plainOrMarkdown = z.discriminatedUnion('type', [markdownSchema, plainTextSchema]) const imageElement = z .object({ type: z.literal('image'), image_url: z.string().describe('The full URL to the image file'), alt_text: z.string().describe('Plain text summary of the image'), }) .strict() .describe('Display an image to a user') const imageBlock = z .object({ type: z.literal('image'), image_url: z.string().describe('The full URL to the image file'), alt_text: z.string().describe('Plain text summary of the image'), title: plainTextSchema.optional(), }) .strict() .describe('Display an image to a user') const buttonSchema = z .object({ type: z.literal('button'), action_id: z.string().describe('A unique identifier for the button'), text: plainTextSchema, url: z.string().optional().describe('An external URL to open when the button is clicked'), value: z.string().optional().describe('The value to send along with the interaction payload'), style: z .enum(['primary', 'danger']) .optional() .describe('Decorates buttons with alternative visual color schemes. Leave empty for default.'), }) .strict() .describe('Button Block. Display a button') const staticSelectSchema = z .object({ type: z.literal('static_select'), placeholder: plainTextSchema, action_id: z.string(), options: z.array( z .object({ text: plainTextSchema, value: z.string(), }) .strict() ), }) .strict() const contextBlock = z .object({ type: z.literal('context'), elements: z.array(z.discriminatedUnion('type', [imageElement, ...plainOrMarkdown.options])).max(10), }) .strict() .describe('Display multiple elements in a group') const dividerBlock = z.object({ type: z.literal('divider') }).describe('A simple divider block') const headerBlock = z .object({ type: z.literal('header'), text: plainTextSchema, }) .strict() .describe( 'A header is a plain-text block that displays in a larger, bold font. Use it to delineate between different groups of content in your app surface' ) const fileBlock = z .object({ type: z.literal('file'), external_id: z.string(), source: z.literal('remote'), }) .strict() .describe('A file block') const radioButtonsSchema = z .object({ type: z.literal('radio_buttons'), options: z.array( z .object({ text: plainTextSchema, value: z.string(), }) .strict() ), action_id: z.string(), }) .strict() .describe('A radio buttons block') const checkboxesSchema = z .object({ type: z.literal('checkboxes'), options: z.array( z.object({ text: plainTextSchema, value: z.string(), }) ), action_id: z.string(), }) .strict() .describe('A checkboxes block') const overflowSchema = z .object({ type: z.literal('overflow'), options: z .array( z .object({ text: plainTextSchema, value: z.string().max(75), description: plainTextSchema.optional(), url: z .string() .optional() .describe( "A URL to load in the user's browser when the option is clicked. The url attribute is only available in overflow menus." ), }) .strict() ) .max(5), action_id: z.string(), }) .strict() .describe('An overflow block') const actionId = z .string() .max(255) .describe( 'An identifier for the input value when the parent modal is submitted. You can use this when you receive a view_submission payload to identify the value of the input element. Should be unique among all other action_ids in the containing block. ' ) const datePickerSchema = z .object({ type: z.literal('datepicker'), action_id: actionId, placeholder: plainTextSchema.optional(), initial_date: z.string().optional(), }) .strict() .describe('A date picker block') const dateTimePickerSchema = z .object({ type: z.literal('datetimepicker'), action_id: actionId, initial_date_time: z .number() .describe( 'The initial date and time that is selected when the element is loaded, represented as a UNUIX timestamp in seconds. This should be in the format of 10 digits, for example 1628633820 represents the date and time August 10th, 2021 at 03:17pm PST' ) .optional(), // confirm: // TODO: focus_on_load: z.boolean().optional(), }) .strict() .describe('A date picker block') const timePickerSchema = z .object({ type: z.literal('timepicker'), action_id: actionId, placeholder: plainTextSchema.optional(), initial_time: z.string().optional(), }) .strict() .describe('A time picker block') const optionSchema = z .object({ text: plainTextSchema, value: z.string(), }) .strict() const optionGroupSchema = z .object({ label: plainTextSchema, options: z.array(optionSchema), }) .strict() const multiSelectStaticMenuSchema = z .object({ type: z.literal('multi_static_select'), placeholder: plainTextSchema, action_id: z.string(), options: z.array(optionSchema).optional(), option_groups: z.array(optionGroupSchema).optional(), }) .strict() .refine((obj) => !!obj.options || !!obj.option_groups, { message: 'At least one of options or option_groups must be provided', }) .describe('A multi-select menu block') const conversationsSelectMenuSchema = z .object({ type: z.literal('conversations_select'), placeholder: plainTextSchema, action_id: z.string(), }) .strict() .describe('A conversations select menu block') const channelsSelectMenuSchema = z .object({ type: z.literal('channels_select'), placeholder: plainTextSchema, action_id: z.string(), }) .strict() .describe('A channels select menu block') const usersSelectMenuSchema = z .object({ type: z.literal('users_select'), placeholder: plainTextSchema, action_id: z.string(), }) .strict() .describe('A users select menu block') const externalSelectMenuSchema = z .object({ type: z.literal('external_select'), placeholder: plainTextSchema, action_id: z.string(), }) .strict() .describe('An external select menu block') const conversationsMultiSelectMenuSchema = z .object({ type: z.literal('conversations_multi_select'), placeholder: plainTextSchema, action_id: z.string(), }) .strict() .describe('A conversations multi-select menu block') const channelsMultiSelectMenuSchema = z .object({ type: z.literal('channels_multi_select'), placeholder: plainTextSchema, action_id: z.string(), }) .strict() .describe('A channels multi-select menu block') const usersMultiSelectMenuSchema = z .object({ type: z.literal('users_multi_select'), placeholder: plainTextSchema, action_id: z.string(), }) .strict() .describe('A users multi-select menu block') const externalMultiSelectMenuSchema = z .object({ type: z.literal('external_multi_select'), placeholder: plainTextSchema, action_id: z.string(), }) .strict() .describe('An external multi-select menu block') const plainTextInput = z .object({ type: z.literal('plain_text_input'), action_id: z .string() .max(255) .describe( 'An identifier for the input value when the parent modal is submitted. You can use this when you receive a view_submission payload to identify the value of the input element. Should be unique among all other action_ids in the containing block.' ), initial_value: z.string().describe('The initial value in the plain-text input when it is loaded.').optional(), multiline: z .boolean() .optional() .describe('Indicates whether the input will be a single line (false) or a larger textarea (true'), min_length: z.number().min(0).max(3000).optional(), max_length: z.number().min(0).max(3000).optional(), focus_on_load: z.boolean().optional(), placeholder: plainTextSchema.optional(), // TODO: dispatch_action_config }) .strict() const multiSelectMenus = z.discriminatedUnion('type', [ multiSelectStaticMenuSchema.sourceType(), externalMultiSelectMenuSchema, usersMultiSelectMenuSchema, conversationsMultiSelectMenuSchema, channelsMultiSelectMenuSchema, ]) const selectMenus = z.discriminatedUnion('type', [ staticSelectSchema, externalSelectMenuSchema, usersSelectMenuSchema, conversationsSelectMenuSchema, channelsSelectMenuSchema, ]) const inputBlock = z .object({ type: z.literal('input'), label: plainTextSchema, element: z.discriminatedUnion('type', [ plainTextInput, checkboxesSchema, radioButtonsSchema, ...selectMenus.options, ...multiSelectMenus.options, datePickerSchema, ]), dispatch_action: z.boolean().optional(), block_id: z.string().max(255).optional(), hint: plainTextSchema.optional(), optional: z.boolean().optional(), }) .strict() .describe('An input block') const sectionSchema = z .object({ type: z.literal('section'), text: plainOrMarkdown.optional(), fields: z.array(plainOrMarkdown).min(1).max(10).optional(), accessory: z .discriminatedUnion('type', [ buttonSchema, checkboxesSchema, datePickerSchema, imageElement, overflowSchema, radioButtonsSchema, ...multiSelectMenus.options, ...selectMenus.options, timePickerSchema, ]) .optional(), }) .strict() .describe('Show a message using markdown') const actionsBlock = z .object({ type: z.literal('actions'), elements: z .array( z.discriminatedUnion('type', [ buttonSchema, checkboxesSchema, datePickerSchema, dateTimePickerSchema, overflowSchema, radioButtonsSchema, ...selectMenus.options, timePickerSchema, ]) ) .max(5), }) .describe('Display multiple elements in a group') .strict() const blocks = z.discriminatedUnion('type', [ actionsBlock, contextBlock, dividerBlock, fileBlock, headerBlock, imageBlock, inputBlock, sectionSchema, // video // TODO: ]) export const textSchema = z .object({ text: z .string() .describe( 'Field text must be defined but it is ignored if blocks are provided. In this situation, the text must be provided in the blocks array' ) .optional(), blocks: z .array(blocks) .max(50) .optional() .describe( 'Multiple blocks can be added to this array. If a block is provided, the text field is ignored and the text must be added as a block' ), }) .strict() ```
/content/code_sandbox/integrations/slack/src/definitions/schemas.ts
xml
2016-11-16T21:57:59
2024-08-16T18:45:35
botpress
botpress/botpress
12,401
2,681
```xml <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/white" android:fillViewport="true"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:focusable="true" android:focusableInTouchMode="true"> <LinearLayout android:id="@+id/wrapper_settings" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginBottom="@dimen/activity_vertical_margin" android:layout_marginLeft="@dimen/activity_horizontal_margin" android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_marginTop="@dimen/activity_vertical_margin" android:background="@drawable/bg_rounded_rectangle" android:orientation="vertical" android:padding="10dp"> <TextView android:id="@+id/logo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="@string/app_name" android:textColor="@color/colorAccent" android:textSize="42sp" android:textStyle="bold" /> <Button android:id="@+id/button_crop" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/button_pick_amp_crop" android:textAllCaps="true" android:textAppearance="?android:textAppearanceMedium" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/button_random_image" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/button_crop_random_image" android:textAllCaps="true" android:textAppearance="?android:textAppearanceMedium" android:textColor="@android:color/white" android:textStyle="bold" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_margin="5dp" android:background="@color/colorAccent" /> <RadioGroup android:id="@+id/radio_group_aspect_ratio" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="@string/label_aspect_ratio" android:textAppearance="?android:textAppearanceSmall" /> <CheckBox android:id="@+id/checkbox_freestyle_crop" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/label_freestyle_crop" android:textAppearance="?android:textAppearanceMedium" /> <RadioButton android:id="@+id/radio_dynamic" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/label_dynamic" android:textAppearance="?android:textAppearanceMedium" tools:checked="true" /> <RadioButton android:id="@+id/radio_origin" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/label_image_source" android:textAppearance="?android:textAppearanceMedium" /> <RadioButton android:id="@+id/radio_square" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/label_square" android:textAppearance="?android:textAppearanceMedium" /> <LinearLayout android:layout_width="140dp" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:id="@+id/edit_text_ratio_x" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:hint="x" android:inputType="numberDecimal" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="to" tools:ignore="HardcodedText" /> <EditText android:id="@+id/edit_text_ratio_y" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:hint="y" android:inputType="numberDecimal" /> </LinearLayout> </RadioGroup> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_margin="5dp" android:background="@color/colorAccent" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="@string/label_max_cropped_image_size" android:textAppearance="?android:textAppearanceSmall" /> <CheckBox android:id="@+id/checkbox_max_size" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/label_resize_image_to_max_size" android:textAppearance="?android:textAppearanceMedium" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:id="@+id/edit_text_max_width" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:maxLength="9" android:gravity="center" android:hint="@string/label_width" android:inputType="number" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="x" tools:ignore="HardcodedText" /> <EditText android:id="@+id/edit_text_max_height" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:maxLength="9" android:gravity="center" android:hint="@string/label_height" android:inputType="number" /> </LinearLayout> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_margin="5dp" android:background="@color/colorAccent" /> <RadioGroup android:id="@+id/radio_group_compression_settings" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="@string/label_compression_settings" android:textAppearance="?android:textAppearanceSmall" /> <RadioButton android:id="@+id/radio_jpeg" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="JPEG" android:textAppearance="?android:textAppearanceMedium" tools:checked="true" tools:ignore="HardcodedText" /> <RadioButton android:id="@+id/radio_png" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="PNG" android:textAppearance="?android:textAppearanceMedium" tools:ignore="HardcodedText" /> <TextView android:id="@+id/text_view_quality" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:textAppearance="?android:textAppearanceSmall" tools:text="Quality: 90" /> <SeekBar android:id="@+id/seekbar_quality" android:layout_width="match_parent" android:layout_height="wrap_content" tools:progress="90" /> </RadioGroup> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_margin="5dp" android:background="@color/colorAccent" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="@string/label_ui" android:textAppearance="?android:textAppearanceSmall" /> <CheckBox android:id="@+id/checkbox_hide_bottom_controls" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/label_hide_bottom_ui_controls" android:textAppearance="?android:textAppearanceMedium" /> </LinearLayout> </FrameLayout> </ScrollView> ```
/content/code_sandbox/sample/src/main/res/layout/include_settings.xml
xml
2016-01-05T13:41:06
2024-08-16T11:17:20
uCrop
Yalantis/uCrop
11,830
1,905
```xml <?xml version="1.0" encoding="utf-8"?> <!-- path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <View xmlns:android="path_to_url" android:id="@+id/my_custom_alternate_tab" android:layout_width="match_parent" android:layout_height="match_parent" /> ```
/content/code_sandbox/testing/java/com/google/android/material/testapp/res/layout/design_tab_item_custom_alternate.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
91
```xml import React from 'react' import type { ComponentStackFrame } from '../../helpers/parse-component-stack' import { useOpenInEditor } from '../../helpers/use-open-in-editor' import { HotlinkedText } from '../../components/hot-linked-text' function EditorLink({ children, componentStackFrame: { file, column, lineNumber }, }: { children: React.ReactNode componentStackFrame: ComponentStackFrame }) { const open = useOpenInEditor({ file, column, lineNumber, }) return ( <div tabIndex={10} // match CallStackFrame role={'link'} onClick={open} title={'Click to open in your editor'} > {children} <svg xmlns="path_to_url" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" > <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path> <polyline points="15 3 21 3 21 9"></polyline> <line x1="10" y1="14" x2="21" y2="3"></line> </svg> </div> ) } function formatLineNumber(lineNumber: number, column: number | undefined) { if (!column) { return lineNumber } return `${lineNumber}:${column}` } function LocationLine({ componentStackFrame, }: { componentStackFrame: ComponentStackFrame }) { const { file, lineNumber, column } = componentStackFrame return ( <> {file} {lineNumber ? `(${formatLineNumber(lineNumber, column)})` : ''} </> ) } function SourceLocation({ componentStackFrame, }: { componentStackFrame: ComponentStackFrame }) { const { file, canOpenInEditor } = componentStackFrame if (file && canOpenInEditor) { return ( <EditorLink componentStackFrame={componentStackFrame}> <span> <LocationLine componentStackFrame={componentStackFrame} /> </span> </EditorLink> ) } return ( <div> <LocationLine componentStackFrame={componentStackFrame} /> </div> ) } export function ComponentStackFrameRow({ componentStackFrame, }: { componentStackFrame: ComponentStackFrame }) { const { component } = componentStackFrame return ( <div data-nextjs-component-stack-frame> <h3> <HotlinkedText text={component} /> </h3> <SourceLocation componentStackFrame={componentStackFrame} /> </div> ) } ```
/content/code_sandbox/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/ComponentStackFrameRow.tsx
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
633
```xml import { G2Spec } from '../../../src'; import { seriesTooltipSteps } from './utils'; export function oneElementLine(): G2Spec { return { width: 800, type: 'line', data: { value: [ { date: '2007-04-23T00:00:00.000Z', close: 93.24, }, ], }, encode: { x: 'date', y: 'close', size: 10, }, tooltip: { title: 'date', items: ['close'], }, }; } oneElementLine.steps = seriesTooltipSteps([200, 200]); ```
/content/code_sandbox/__tests__/plots/tooltip/one-element-line.ts
xml
2016-05-26T09:21:04
2024-08-15T16:11:17
G2
antvis/G2
12,060
149
```xml path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ==============================================================================*/ import {Example2D} from "./dataset"; import * as d3 from 'd3'; export interface HeatMapSettings { [key: string]: any; showAxes?: boolean; noSvg?: boolean; } /** Number of different shades (colors) when drawing a gradient heatmap */ const NUM_SHADES = 30; /** * Draws a heatmap using canvas. Used for showing the learned decision * boundary of the classification algorithm. Can also draw data points * using an svg overlayed on top of the canvas heatmap. */ export class HeatMap { private settings: HeatMapSettings = { showAxes: false, noSvg: false }; private xScale; private yScale; private numSamples: number; private color; private canvas; private svg; constructor( width: number, numSamples: number, xDomain: [number, number], yDomain: [number, number], container, userSettings?: HeatMapSettings) { this.numSamples = numSamples; let height = width; let padding = userSettings.showAxes ? 20 : 0; if (userSettings != null) { // overwrite the defaults with the user-specified settings. for (let prop in userSettings) { this.settings[prop] = userSettings[prop]; } } this.xScale = d3.scale.linear() .domain(xDomain) .range([0, width - 2 * padding]); this.yScale = d3.scale.linear() .domain(yDomain) .range([height - 2 * padding, 0]); // Get a range of colors. let tmpScale = d3.scale.linear<string, number>() .domain([0, .5, 1]) .range(["#f59322", "#e8eaeb", "#0877bd"]) .clamp(true); // Due to numerical error, we need to specify // d3.range(0, end + small_epsilon, step) // in order to guarantee that we will have end/step entries with // the last element being equal to end. let colors = d3.range(0, 1 + 1E-9, 1 / NUM_SHADES).map(a => { return tmpScale(a); }); this.color = d3.scale.quantize() .domain([-1, 1]) .range(colors); container = container.append("div") .style({ width: `${width}px`, height: `${height}px`, position: "relative", top: `-${padding}px`, left: `-${padding}px` }); this.canvas = container.append("canvas") .attr("width", numSamples) .attr("height", numSamples) .style("width", (width - 2 * padding) + "px") .style("height", (height - 2 * padding) + "px") .style("position", "absolute") .style("top", `${padding}px`) .style("left", `${padding}px`); if (!this.settings.noSvg) { this.svg = container.append("svg").attr({ "width": width, "height": height }).style({ // Overlay the svg on top of the canvas. "position": "absolute", "left": "0", "top": "0" }).append("g") .attr("transform", `translate(${padding},${padding})`); this.svg.append("g").attr("class", "train"); this.svg.append("g").attr("class", "test"); } if (this.settings.showAxes) { let xAxis = d3.svg.axis() .scale(this.xScale) .orient("bottom"); let yAxis = d3.svg.axis() .scale(this.yScale) .orient("right"); this.svg.append("g") .attr("class", "x axis") .attr("transform", `translate(0,${height - 2 * padding})`) .call(xAxis); this.svg.append("g") .attr("class", "y axis") .attr("transform", "translate(" + (width - 2 * padding) + ",0)") .call(yAxis); } } updateTestPoints(points: Example2D[]): void { if (this.settings.noSvg) { throw Error("Can't add points since noSvg=true"); } this.updateCircles(this.svg.select("g.test"), points); } updatePoints(points: Example2D[]): void { if (this.settings.noSvg) { throw Error("Can't add points since noSvg=true"); } this.updateCircles(this.svg.select("g.train"), points); } updateBackground(data: number[][], discretize: boolean): void { let dx = data[0].length; let dy = data.length; if (dx !== this.numSamples || dy !== this.numSamples) { throw new Error( "The provided data matrix must be of size " + "numSamples X numSamples"); } // Compute the pixel colors; scaled by CSS. let context = (this.canvas.node() as HTMLCanvasElement).getContext("2d"); let image = context.createImageData(dx, dy); for (let y = 0, p = -1; y < dy; ++y) { for (let x = 0; x < dx; ++x) { let value = data[x][y]; if (discretize) { value = (value >= 0 ? 1 : -1); } let c = d3.rgb(this.color(value)); image.data[++p] = c.r; image.data[++p] = c.g; image.data[++p] = c.b; image.data[++p] = 160; } } context.putImageData(image, 0, 0); } private updateCircles(container, points: Example2D[]) { // Keep only points that are inside the bounds. let xDomain = this.xScale.domain(); let yDomain = this.yScale.domain(); points = points.filter(p => { return p.x >= xDomain[0] && p.x <= xDomain[1] && p.y >= yDomain[0] && p.y <= yDomain[1]; }); // Attach data to initially empty selection. let selection = container.selectAll("circle").data(points); // Insert elements to match length of points array. selection.enter().append("circle").attr("r", 3); // Update points to be in the correct position. selection .attr({ cx: (d: Example2D) => this.xScale(d.x), cy: (d: Example2D) => this.yScale(d.y), }) .style("fill", d => this.color(d.label)); // Remove points if the length has gone down. selection.exit().remove(); } } // Close class HeatMap. export function reduceMatrix(matrix: number[][], factor: number): number[][] { if (matrix.length !== matrix[0].length) { throw new Error("The provided matrix must be a square matrix"); } if (matrix.length % factor !== 0) { throw new Error("The width/height of the matrix must be divisible by " + "the reduction factor"); } let result: number[][] = new Array(matrix.length / factor); for (let i = 0; i < matrix.length; i += factor) { result[i / factor] = new Array(matrix.length / factor); for (let j = 0; j < matrix.length; j += factor) { let avg = 0; // Sum all the values in the neighborhood. for (let k = 0; k < factor; k++) { for (let l = 0; l < factor; l++) { avg += matrix[i + k][j + l]; } } avg /= (factor * factor); result[i / factor][j / factor] = avg; } } return result; } ```
/content/code_sandbox/src/heatmap.ts
xml
2016-04-04T18:18:40
2024-08-16T18:38:00
playground
tensorflow/playground
11,896
1,797
```xml /* * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import type { CreatedData } from "cypress/support/testing.data"; describe("CDN edit/creation page", () => { beforeEach(() => { cy.login(); }); it("Edits an existing CDN", () => { cy.fixture("test.data").then( (data: CreatedData) => { const {cdn} = data; cy.visit(`/core/cdns/${cdn.id}`); cy.get("mat-card").find("input[name=name]").should("be.enabled").should("have.value", cdn.name); cy.get("mat-card").find("input[name=id]").should("be.disabled").should("have.value", cdn.id); cy.get("mat-card").find("input[name=lastUpdated]").should("be.disabled"); cy.get("mat-card").find("button").contains("Save").should("not.be.disabled"); } ); }); it("Creates new CDNs", () => { cy.visit("/core/cdns/new"); cy.get("mat-card").find("input[name=name]").should("be.enabled").should("have.value", ""); cy.get("mat-card").find("input[name=id]").should("not.exist"); cy.get("mat-card").find("input[name=lastUpdated]").should("not.exist"); cy.get("mat-card").find("button").contains("Save").should("not.be.disabled"); }); }); ```
/content/code_sandbox/experimental/traffic-portal/cypress/e2e/cdns/detail.cy.ts
xml
2016-09-02T07:00:06
2024-08-16T03:50:21
trafficcontrol
apache/trafficcontrol
1,043
344
```xml // expression statemnt of "as" expression hardly ever makes sense, but it's still valid. const [type, x] = [0, 0]; (type) as unknown; x as unknown; ```
/content/code_sandbox/tests/format/typescript/as/expression-statement.ts
xml
2016-11-29T17:13:37
2024-08-16T17:29:57
prettier
prettier/prettier
48,913
44
```xml import { StrictStyleOptions } from 'botframework-webchat-api'; import CustomPropertyNames from '../CustomPropertyNames'; export default function createCSSCustomPropertiesStyle({ accent, bubbleImageMaxHeight, bubbleImageMinHeight, bubbleMaxWidth, bubbleMinHeight, fontSizeSmall, markdownExternalLinkIconImage, paddingRegular, primaryFont, subtle, timestampColor }: StrictStyleOptions) { return { '&.webchat__css-custom-properties': { display: 'contents', // TODO: Should we register the CSS property for inheritance, type checking, and initial value? // Registrations need to be done on global level, and duplicate registration will throw. // path_to_url // TODO: This is ongoing work. We are slowly adding CSS variables to ease calculations and stuff. // // We need to build a story to let web devs override these CSS variables. // // Candy points: // - They should be able to override CSS variables for certain things (say, padding of popover) without affecting much. // // House rules: // - We should put styling varibles here, e.g. paddingRegular // - We MUST NOT put runtime variables here, e.g. sendTimeout // - This is because we cannot programmatically know when the sendTimeout change [CustomPropertyNames.ColorAccent]: accent, [CustomPropertyNames.ColorSubtle]: subtle, [CustomPropertyNames.ColorTimestamp]: timestampColor || subtle, // Maybe we should not need this if we allow web devs to override CSS variables for certain components. [CustomPropertyNames.FontPrimary]: primaryFont, [CustomPropertyNames.FontSizeSmall]: fontSizeSmall, [CustomPropertyNames.IconURLExternalLink]: markdownExternalLinkIconImage, [CustomPropertyNames.MaxWidthBubble]: bubbleMaxWidth + 'px', [CustomPropertyNames.MinHeightBubble]: bubbleMinHeight + 'px', [CustomPropertyNames.PaddingRegular]: paddingRegular + 'px', [CustomPropertyNames.MaxHeightImageBubble]: bubbleImageMaxHeight === Infinity ? undefined : bubbleImageMaxHeight + 'px', [CustomPropertyNames.MinHeightImageBubble]: bubbleImageMinHeight + 'px' } }; } ```
/content/code_sandbox/packages/component/src/Styles/StyleSet/CSSCustomProperties.ts
xml
2016-07-07T23:16:57
2024-08-16T00:12:37
BotFramework-WebChat
microsoft/BotFramework-WebChat
1,567
484
```xml <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="path_to_url" android:shareInterpolator="false"> <translate android:fromXDelta="-100%" android:toXDelta="0%" android:fromYDelta="0%" android:toYDelta="0%" android:duration="500"/> </set> ```
/content/code_sandbox/Xamarin.Forms.ControlGallery.Android/Resources/anim/enter_from_left.xml
xml
2016-03-18T15:52:03
2024-08-16T16:25:43
Xamarin.Forms
xamarin/Xamarin.Forms
5,637
81
```xml import { EntityMetadata } from "../../metadata/EntityMetadata" import { ObjectLiteral } from "../../common/ObjectLiteral" import { EmbeddedMetadata } from "../../metadata/EmbeddedMetadata" /** * Transforms raw document into entity object. * Entity is constructed based on its entity metadata. */ export class DocumentToEntityTransformer { // your_sha256_hash--------- // Constructor // your_sha256_hash--------- constructor( // private selectionMap: AliasMap, // private joinMappings: JoinMapping[], // private relationCountMetas: RelationCountAttribute[], private enableRelationIdValues: boolean = false, ) {} // your_sha256_hash--------- // Public Methods // your_sha256_hash--------- transformAll(documents: ObjectLiteral[], metadata: EntityMetadata) { return documents.map((document) => this.transform(document, metadata)) } transform(document: any, metadata: EntityMetadata) { const entity: any = metadata.create(undefined, { fromDeserializer: true, }) let hasData = false // handle _id property the special way if (metadata.objectIdColumn) { // todo: we can't use driver in this class // do we really need prepare hydrated value here? If no then no problem. If yes then think maybe prepareHydratedValue process should be extracted out of driver class? // entity[metadata.ObjectIdColumn.propertyName] = this.driver.prepareHydratedValue(document[metadata.ObjectIdColumn.name"], metadata.ObjectIdColumn); const { databaseNameWithoutPrefixes, propertyName } = metadata.objectIdColumn const documentIdWithoutPrefixes = document[databaseNameWithoutPrefixes] const documentIdWithPropertyName = document[propertyName] if (documentIdWithoutPrefixes) { entity[propertyName] = documentIdWithoutPrefixes hasData = true } else if (documentIdWithPropertyName) { entity[propertyName] = documentIdWithPropertyName hasData = true } } // add special columns that contains relation ids if (this.enableRelationIdValues) { metadata.columns .filter((column) => !!column.relationMetadata) .forEach((column) => { const valueInObject = document[column.databaseNameWithoutPrefixes] if ( valueInObject !== undefined && valueInObject !== null && column.propertyName ) { // todo: we can't use driver in this class // const value = this.driver.prepareHydratedValue(valueInObject, column); entity[column.propertyName] = valueInObject hasData = true } }) } /*this.joinMappings .filter(joinMapping => joinMapping.parentName === alias.name && !joinMapping.alias.relationOwnerSelection && joinMapping.alias.target) .map(joinMapping => { const relatedEntities = this.transformRawResultsGroup(rawSqlResults, joinMapping.alias); const isResultArray = joinMapping.isMany; const result = !isResultArray ? relatedEntities[0] : relatedEntities; if (result && (!isResultArray || result.length > 0)) { entity[joinMapping.propertyName] = result; hasData = true; } });*/ // get value from columns selections and put them into object metadata.ownColumns.forEach((column) => { const valueInObject = document[column.databaseNameWithoutPrefixes] if ( valueInObject !== undefined && column.propertyName && !column.isVirtual ) { // const value = this.driver.prepareHydratedValue(valueInObject, column); entity[column.propertyName] = valueInObject hasData = true } }) const addEmbeddedValuesRecursively = ( entity: any, document: any, embeddeds: EmbeddedMetadata[], ) => { embeddeds.forEach((embedded) => { if (!document[embedded.prefix]) return if (embedded.isArray) { entity[embedded.propertyName] = ( document[embedded.prefix] as any[] ).map((subValue: any, index: number) => { const newItem = embedded.create({ fromDeserializer: true, }) embedded.columns.forEach((column) => { newItem[column.propertyName] = subValue[column.databaseNameWithoutPrefixes] }) addEmbeddedValuesRecursively( newItem, document[embedded.prefix][index], embedded.embeddeds, ) return newItem }) } else { if ( embedded.embeddeds.length && !entity[embedded.propertyName] ) entity[embedded.propertyName] = embedded.create({ fromDeserializer: true, }) embedded.columns.forEach((column) => { const value = document[embedded.prefix][ column.databaseNameWithoutPrefixes ] if (value === undefined) return if (!entity[embedded.propertyName]) entity[embedded.propertyName] = embedded.create({ fromDeserializer: true, }) entity[embedded.propertyName][column.propertyName] = value }) addEmbeddedValuesRecursively( entity[embedded.propertyName], document[embedded.prefix], embedded.embeddeds, ) } }) } addEmbeddedValuesRecursively(entity, document, metadata.embeddeds) // if relation is loaded then go into it recursively and transform its values too /*metadata.relations.forEach(relation => { const relationAlias = this.selectionMap.findSelectionByParent(alias.name, relation.propertyName); if (relationAlias) { const joinMapping = this.joinMappings.find(joinMapping => joinMapping.type === "join" && joinMapping.alias === relationAlias); const relatedEntities = this.transformRawResultsGroup(rawSqlResults, relationAlias); const isResultArray = relation.isManyToMany || relation.isOneToMany; const result = !isResultArray ? relatedEntities[0] : relatedEntities; if (result) { let propertyName = relation.propertyName; if (joinMapping) { propertyName = joinMapping.propertyName; } if (relation.isLazy) { entity["__" + propertyName + "__"] = result; } else { entity[propertyName] = result; } if (!isResultArray || result.length > 0) hasData = true; } } // if relation has id field then relation id/ids to that field. if (relation.isManyToMany) { if (relationAlias) { const ids: any[] = []; const joinMapping = this.joinMappings.find(joinMapping => joinMapping.type === "relationId" && joinMapping.alias === relationAlias); if (relation.idField || joinMapping) { const propertyName = joinMapping ? joinMapping.propertyName : relation.idField as string; const junctionMetadata = relation.junctionEntityMetadata; const columnName = relation.isOwning ? junctionMetadata.columns[1].name : junctionMetadata.columns[0].name; rawSqlResults.forEach(results => { if (relationAlias) { const resultsKey = relationAlias.name + "_" + columnName; const value = this.driver.prepareHydratedValue(results[resultsKey], relation.referencedColumn); if (value !== undefined && value !== null) ids.push(value); } }); if (ids && ids.length) entity[propertyName] = ids; } } } else if (relation.idField) { const relationName = relation.name; entity[relation.idField] = this.driver.prepareHydratedValue(rawSqlResults[0][alias.name + "_" + relationName], relation.referencedColumn); } // if relation counter this.relationCountMetas.forEach(joinMeta => { if (joinMeta.alias === relationAlias) { // console.log("relation count was found for relation: ", relation); // joinMeta.entity = entity; joinMeta.entities.push({ entity: entity, metadata: metadata }); // console.log(joinMeta); // console.log("---------------------"); } }); });*/ return hasData ? entity : null } } ```
/content/code_sandbox/src/query-builder/transformer/DocumentToEntityTransformer.ts
xml
2016-02-29T07:41:14
2024-08-16T18:28:52
typeorm
typeorm/typeorm
33,875
1,726
```xml <project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <modelVersion>4.0.0</modelVersion> <groupId>com.journaldev</groupId> <artifactId>Primefaces-Command-Confirm-FileDownload-Sample</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>Primefaces-Command-Confirm-FileDownload-Sample Maven Webapp</name> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> <finalName>${project.artifactId}</finalName> </build> <url>path_to_url <repositories> <repository> <id>prime-repo</id> <name>PrimeFaces Maven Repository</name> <url>path_to_url <layout>default</layout> </repository> </repositories> <dependencies> <!-- Servlet --> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <!-- Faces Implementation --> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-impl</artifactId> <version>2.2.4</version> </dependency> <!-- Faces Library --> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.2.4</version> </dependency> <!-- Primefaces Version 5 --> <dependency> <groupId>org.primefaces</groupId> <artifactId>primefaces</artifactId> <version>5.0</version> </dependency> <!-- JSP Library --> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>javax.servlet.jsp-api</artifactId> <version>2.3.1</version> </dependency> <!-- JSTL Library --> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.1.2</version> </dependency> <!-- Primefaces Theme Library --> <dependency> <groupId>org.primefaces.themes</groupId> <artifactId>blitzer</artifactId> <version>1.0.10</version> </dependency> </dependencies> </project> ```
/content/code_sandbox/PrimeFaces/Primefaces-Command-Confirm-FileDownload-Sample/pom.xml
xml
2016-05-02T05:43:21
2024-08-16T06:51:39
journaldev
WebJournal/journaldev
1,314
671
```xml export const resizeKeepingCenter = ( bounds: Electron.Rectangle, newSize: {width: number; height: number} ): Electron.Rectangle => { const cx = Math.round(bounds.x + (bounds.width / 2)); const cy = Math.round(bounds.y + (bounds.height / 2)); return { x: Math.round(cx - (newSize.width / 2)), y: Math.round(cy - (newSize.height / 2)), width: newSize.width, height: newSize.height }; }; ```
/content/code_sandbox/renderer/utils/window.ts
xml
2016-08-10T19:37:08
2024-08-16T07:01:58
Kap
wulkano/Kap
17,864
113
```xml export { useCustomDomains, useGetCustomDomains } from '@proton/account/domains/hooks'; ```
/content/code_sandbox/packages/components/hooks/useCustomDomains.ts
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
21
```xml /* * Wire * * This program is free software: you can redistribute it and/or modify * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * along with this program. If not, see path_to_url * */ import {TIME_IN_MILLIS} from 'Util/TimeUtil'; export * from './TypingIndicator'; export {useTypingIndicatorState} from './TypingIndicator.state'; export const TYPING_TIMEOUT = TIME_IN_MILLIS.SECOND * 10; ```
/content/code_sandbox/src/script/components/InputBar/components/TypingIndicator/index.ts
xml
2016-07-21T15:34:05
2024-08-16T11:40:13
wire-webapp
wireapp/wire-webapp
1,125
144
```xml import { any, MockProxy } from "jest-mock-extended"; import { StateDefinitionLike, MigrationHelper } from "../migration-helper"; import { mockMigrationHelper } from "../migration-helper.spec"; import { DomainSettingsMigrator } from "./34-move-domain-settings-to-state-providers"; const mockNeverDomains = { "bitwarden.test": null, locahost: null, "www.example.com": null } as { [key: string]: null; }; function exampleJSON() { return { global: { otherStuff: "otherStuff1", neverDomains: mockNeverDomains, }, authenticatedAccounts: ["user-1", "user-2", "user-3"], "user-1": { settings: { defaultUriMatch: 3, settings: { equivalentDomains: [] as string[][], }, otherStuff: "otherStuff2", }, otherStuff: "otherStuff3", }, "user-2": { settings: { settings: { equivalentDomains: [["apple.com", "icloud.com"]], }, otherStuff: "otherStuff4", }, otherStuff: "otherStuff5", }, "user-3": { settings: { defaultUriMatch: 1, otherStuff: "otherStuff6", }, otherStuff: "otherStuff7", }, "user-4": { settings: { otherStuff: "otherStuff8", }, otherStuff: "otherStuff9", }, }; } function rollbackJSON() { return { global_domainSettings_neverDomains: mockNeverDomains, "user_user-1_domainSettings_defaultUriMatchStrategy": 3, "user_user-1_domainSettings_equivalentDomains": [] as string[][], "user_user-2_domainSettings_equivalentDomains": [["apple.com", "icloud.com"]], "user_user-3_domainSettings_defaultUriMatchStrategy": 1, global: { otherStuff: "otherStuff1", }, authenticatedAccounts: ["user-1", "user-2", "user-3"], "user-1": { settings: { otherStuff: "otherStuff2", }, otherStuff: "otherStuff3", }, "user-2": { settings: { otherStuff: "otherStuff4", }, otherStuff: "otherStuff5", }, "user-3": { settings: { otherStuff: "otherStuff6", }, otherStuff: "otherStuff7", }, "user-4": { settings: { otherStuff: "otherStuff8", }, otherStuff: "otherStuff9", }, }; } const domainSettingsStateDefinition: { stateDefinition: StateDefinitionLike; } = { stateDefinition: { name: "domainSettings", }, }; describe("DomainSettingsMigrator", () => { let helper: MockProxy<MigrationHelper>; let sut: DomainSettingsMigrator; describe("migrate", () => { beforeEach(() => { helper = mockMigrationHelper(exampleJSON(), 33); sut = new DomainSettingsMigrator(33, 34); }); it("should remove global neverDomains and defaultUriMatch and equivalentDomains settings from all accounts", async () => { await sut.migrate(helper); expect(helper.set).toHaveBeenCalledTimes(4); expect(helper.set).toHaveBeenCalledWith("global", { otherStuff: "otherStuff1", }); expect(helper.set).toHaveBeenCalledWith("user-1", { settings: { otherStuff: "otherStuff2", }, otherStuff: "otherStuff3", }); expect(helper.set).toHaveBeenCalledWith("user-1", { settings: { otherStuff: "otherStuff2", }, otherStuff: "otherStuff3", }); expect(helper.set).toHaveBeenCalledWith("user-2", { settings: { otherStuff: "otherStuff4", }, otherStuff: "otherStuff5", }); expect(helper.set).toHaveBeenCalledWith("user-3", { settings: { otherStuff: "otherStuff6", }, otherStuff: "otherStuff7", }); }); it("should set global neverDomains and defaultUriMatchStrategy and equivalentDomains setting values for each account", async () => { await sut.migrate(helper); expect(helper.setToGlobal).toHaveBeenCalledTimes(1); expect(helper.setToGlobal).toHaveBeenCalledWith( { ...domainSettingsStateDefinition, key: "neverDomains" }, mockNeverDomains, ); expect(helper.setToUser).toHaveBeenCalledTimes(4); expect(helper.setToUser).toHaveBeenCalledWith( "user-1", { ...domainSettingsStateDefinition, key: "defaultUriMatchStrategy" }, 3, ); expect(helper.setToUser).toHaveBeenCalledWith( "user-1", { ...domainSettingsStateDefinition, key: "equivalentDomains" }, [], ); expect(helper.setToUser).toHaveBeenCalledWith( "user-2", { ...domainSettingsStateDefinition, key: "equivalentDomains" }, [["apple.com", "icloud.com"]], ); expect(helper.setToUser).toHaveBeenCalledWith( "user-3", { ...domainSettingsStateDefinition, key: "defaultUriMatchStrategy" }, 1, ); }); }); describe("rollback", () => { beforeEach(() => { helper = mockMigrationHelper(rollbackJSON(), 34); sut = new DomainSettingsMigrator(33, 34); }); it("should null out new values globally and for each account", async () => { await sut.rollback(helper); expect(helper.setToGlobal).toHaveBeenCalledTimes(1); expect(helper.setToGlobal).toHaveBeenCalledWith( { ...domainSettingsStateDefinition, key: "neverDomains" }, null, ); expect(helper.setToUser).toHaveBeenCalledTimes(4); expect(helper.setToUser).toHaveBeenCalledWith( "user-1", { ...domainSettingsStateDefinition, key: "defaultUriMatchStrategy" }, null, ); expect(helper.setToUser).toHaveBeenCalledWith( "user-1", { ...domainSettingsStateDefinition, key: "equivalentDomains" }, null, ); expect(helper.setToUser).toHaveBeenCalledWith( "user-2", { ...domainSettingsStateDefinition, key: "equivalentDomains" }, null, ); expect(helper.setToUser).toHaveBeenCalledWith( "user-3", { ...domainSettingsStateDefinition, key: "defaultUriMatchStrategy" }, null, ); }); it("should add explicit value back to accounts", async () => { await sut.rollback(helper); expect(helper.set).toHaveBeenCalledTimes(4); expect(helper.set).toHaveBeenCalledWith("global", { neverDomains: mockNeverDomains, otherStuff: "otherStuff1", }); expect(helper.set).toHaveBeenCalledWith("user-1", { settings: { defaultUriMatch: 3, settings: { equivalentDomains: [] as string[][], }, otherStuff: "otherStuff2", }, otherStuff: "otherStuff3", }); expect(helper.set).toHaveBeenCalledWith("user-2", { settings: { settings: { equivalentDomains: [["apple.com", "icloud.com"]], }, otherStuff: "otherStuff4", }, otherStuff: "otherStuff5", }); expect(helper.set).toHaveBeenCalledWith("user-3", { settings: { defaultUriMatch: 1, otherStuff: "otherStuff6", }, otherStuff: "otherStuff7", }); }); it("should not try to restore values to missing accounts", async () => { await sut.rollback(helper); expect(helper.set).not.toHaveBeenCalledWith("user-4", any()); }); }); }); ```
/content/code_sandbox/libs/common/src/state-migrations/migrations/34-move-domain-settings-to-state-providers.spec.ts
xml
2016-03-09T23:14:01
2024-08-16T15:07:51
clients
bitwarden/clients
8,877
1,681
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "path_to_url"> <mapper namespace="com.jsh.erp.datasource.mappers.FunctionMapper"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Function"> <id column="id" jdbcType="BIGINT" property="id" /> <result column="number" jdbcType="VARCHAR" property="number" /> <result column="name" jdbcType="VARCHAR" property="name" /> <result column="parent_number" jdbcType="VARCHAR" property="parentNumber" /> <result column="url" jdbcType="VARCHAR" property="url" /> <result column="component" jdbcType="VARCHAR" property="component" /> <result column="state" jdbcType="BIT" property="state" /> <result column="sort" jdbcType="VARCHAR" property="sort" /> <result column="enabled" jdbcType="BIT" property="enabled" /> <result column="type" jdbcType="VARCHAR" property="type" /> <result column="push_btn" jdbcType="VARCHAR" property="pushBtn" /> <result column="icon" jdbcType="VARCHAR" property="icon" /> <result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" /> </resultMap> <sql id="Example_Where_Clause"> <where> <foreach collection="oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause"> <where> <foreach collection="example.oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List"> id, number, name, parent_number, url, component, state, sort, enabled, type, push_btn, icon, delete_flag </sql> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.FunctionExample" resultMap="BaseResultMap"> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from jsh_function <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from jsh_function where id = #{id,jdbcType=BIGINT} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> delete from jsh_function where id = #{id,jdbcType=BIGINT} </delete> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.FunctionExample"> delete from jsh_function <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.Function"> insert into jsh_function (id, number, name, parent_number, url, component, state, sort, enabled, type, push_btn, icon, delete_flag ) values (#{id,jdbcType=BIGINT}, #{number,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{parentNumber,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{component,jdbcType=VARCHAR}, #{state,jdbcType=BIT}, #{sort,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}, #{type,jdbcType=VARCHAR}, #{pushBtn,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR} ) </insert> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Function"> insert into jsh_function <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="number != null"> number, </if> <if test="name != null"> name, </if> <if test="parentNumber != null"> parent_number, </if> <if test="url != null"> url, </if> <if test="component != null"> component, </if> <if test="state != null"> state, </if> <if test="sort != null"> sort, </if> <if test="enabled != null"> enabled, </if> <if test="type != null"> type, </if> <if test="pushBtn != null"> push_btn, </if> <if test="icon != null"> icon, </if> <if test="deleteFlag != null"> delete_flag, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=BIGINT}, </if> <if test="number != null"> #{number,jdbcType=VARCHAR}, </if> <if test="name != null"> #{name,jdbcType=VARCHAR}, </if> <if test="parentNumber != null"> #{parentNumber,jdbcType=VARCHAR}, </if> <if test="url != null"> #{url,jdbcType=VARCHAR}, </if> <if test="component != null"> #{component,jdbcType=VARCHAR}, </if> <if test="state != null"> #{state,jdbcType=BIT}, </if> <if test="sort != null"> #{sort,jdbcType=VARCHAR}, </if> <if test="enabled != null"> #{enabled,jdbcType=BIT}, </if> <if test="type != null"> #{type,jdbcType=VARCHAR}, </if> <if test="pushBtn != null"> #{pushBtn,jdbcType=VARCHAR}, </if> <if test="icon != null"> #{icon,jdbcType=VARCHAR}, </if> <if test="deleteFlag != null"> #{deleteFlag,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.FunctionExample" resultType="java.lang.Long"> select count(*) from jsh_function <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map"> update jsh_function <set> <if test="record.id != null"> id = #{record.id,jdbcType=BIGINT}, </if> <if test="record.number != null"> number = #{record.number,jdbcType=VARCHAR}, </if> <if test="record.name != null"> name = #{record.name,jdbcType=VARCHAR}, </if> <if test="record.parentNumber != null"> parent_number = #{record.parentNumber,jdbcType=VARCHAR}, </if> <if test="record.url != null"> url = #{record.url,jdbcType=VARCHAR}, </if> <if test="record.component != null"> component = #{record.component,jdbcType=VARCHAR}, </if> <if test="record.state != null"> state = #{record.state,jdbcType=BIT}, </if> <if test="record.sort != null"> sort = #{record.sort,jdbcType=VARCHAR}, </if> <if test="record.enabled != null"> enabled = #{record.enabled,jdbcType=BIT}, </if> <if test="record.type != null"> type = #{record.type,jdbcType=VARCHAR}, </if> <if test="record.pushBtn != null"> push_btn = #{record.pushBtn,jdbcType=VARCHAR}, </if> <if test="record.icon != null"> icon = #{record.icon,jdbcType=VARCHAR}, </if> <if test="record.deleteFlag != null"> delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}, </if> </set> <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map"> update jsh_function set id = #{record.id,jdbcType=BIGINT}, number = #{record.number,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR}, parent_number = #{record.parentNumber,jdbcType=VARCHAR}, url = #{record.url,jdbcType=VARCHAR}, component = #{record.component,jdbcType=VARCHAR}, state = #{record.state,jdbcType=BIT}, sort = #{record.sort,jdbcType=VARCHAR}, enabled = #{record.enabled,jdbcType=BIT}, type = #{record.type,jdbcType=VARCHAR}, push_btn = #{record.pushBtn,jdbcType=VARCHAR}, icon = #{record.icon,jdbcType=VARCHAR}, delete_flag = #{record.deleteFlag,jdbcType=VARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Function"> update jsh_function <set> <if test="number != null"> number = #{number,jdbcType=VARCHAR}, </if> <if test="name != null"> name = #{name,jdbcType=VARCHAR}, </if> <if test="parentNumber != null"> parent_number = #{parentNumber,jdbcType=VARCHAR}, </if> <if test="url != null"> url = #{url,jdbcType=VARCHAR}, </if> <if test="component != null"> component = #{component,jdbcType=VARCHAR}, </if> <if test="state != null"> state = #{state,jdbcType=BIT}, </if> <if test="sort != null"> sort = #{sort,jdbcType=VARCHAR}, </if> <if test="enabled != null"> enabled = #{enabled,jdbcType=BIT}, </if> <if test="type != null"> type = #{type,jdbcType=VARCHAR}, </if> <if test="pushBtn != null"> push_btn = #{pushBtn,jdbcType=VARCHAR}, </if> <if test="icon != null"> icon = #{icon,jdbcType=VARCHAR}, </if> <if test="deleteFlag != null"> delete_flag = #{deleteFlag,jdbcType=VARCHAR}, </if> </set> where id = #{id,jdbcType=BIGINT} </update> <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Function"> update jsh_function set number = #{number,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR}, parent_number = #{parentNumber,jdbcType=VARCHAR}, url = #{url,jdbcType=VARCHAR}, component = #{component,jdbcType=VARCHAR}, state = #{state,jdbcType=BIT}, sort = #{sort,jdbcType=VARCHAR}, enabled = #{enabled,jdbcType=BIT}, type = #{type,jdbcType=VARCHAR}, push_btn = #{pushBtn,jdbcType=VARCHAR}, icon = #{icon,jdbcType=VARCHAR}, delete_flag = #{deleteFlag,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} </update> </mapper> ```
/content/code_sandbox/jshERP-boot/src/main/resources/mapper_xml/FunctionMapper.xml
xml
2016-09-20T04:51:39
2024-08-16T16:42:52
jshERP
jishenghua/jshERP
3,107
3,071
```xml import * as React from 'react' import { IAutocompletionProvider } from './index' import { IssuesStore, IIssueHit } from '../../lib/stores/issues-store' import { Dispatcher } from '../dispatcher' import { GitHubRepository } from '../../models/github-repository' import { ThrottledScheduler } from '../lib/throttled-scheduler' /** The interval we should use to throttle the issues update. */ const UpdateIssuesThrottleInterval = 1000 * 60 /** The autocompletion provider for issues in a GitHub repository. */ export class IssuesAutocompletionProvider implements IAutocompletionProvider<IIssueHit> { public readonly kind = 'issue' private readonly issuesStore: IssuesStore private readonly repository: GitHubRepository private readonly dispatcher: Dispatcher /** * The scheduler used to throttle calls to update the issues for * autocompletion. */ private readonly updateIssuesScheduler = new ThrottledScheduler( UpdateIssuesThrottleInterval ) public constructor( issuesStore: IssuesStore, repository: GitHubRepository, dispatcher: Dispatcher ) { this.issuesStore = issuesStore this.repository = repository this.dispatcher = dispatcher } public getRegExp(): RegExp { return /(?:^|\n| )(?:#)([a-z\d\\+-][a-z\d_]*)?/g } public getAutocompletionItems( text: string ): Promise<ReadonlyArray<IIssueHit>> { this.updateIssuesScheduler.queue(() => { this.dispatcher.refreshIssues(this.repository) }) return this.issuesStore.getIssuesMatching(this.repository, text) } public renderItem(item: IIssueHit): JSX.Element { return ( <div className="issue" key={item.number}> <span className="number">#{item.number}</span>&nbsp; <span className="title">{item.title}</span> </div> ) } public getCompletionText(item: IIssueHit): string { return `#${item.number}` } } ```
/content/code_sandbox/app/src/ui/autocompletion/issues-autocompletion-provider.tsx
xml
2016-05-11T15:59:00
2024-08-16T17:00:41
desktop
desktop/desktop
19,544
445
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="path_to_url"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{82D466F6-A1E5-EF93-C2FA-1D697DE4F4A7}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>bindings_modules_v8_generated_init_partial</RootNamespace> <IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename> <PreferredToolArchitecture>x64</PreferredToolArchitecture> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/> <PropertyGroup Label="Configuration"> <CharacterSet>Unicode</CharacterSet> <ConfigurationType>Utility</ConfigurationType> </PropertyGroup> <PropertyGroup Label="Locals"> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/> <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props"/> <ImportGroup Label="ExtensionSettings"/> <ImportGroup Label="PropertySheets"> <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/> </ImportGroup> <PropertyGroup Label="UserMacros"/> <PropertyGroup> <ExecutablePath>$(ExecutablePath);$(MSBuildProjectDirectory)\.\bin\;$(MSBuildProjectDirectory)\.\bin\</ExecutablePath> <OutDir>..\..\..\..\..\..\..\..\out\$(Configuration)\</OutDir> <IntDir>$(OutDir)obj\$(ProjectName)\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> <TargetName>$(ProjectName)</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <AdditionalIncludeDirectories>$(OutDir)gen;..\..\..\..\..\..\third_party\wtl\include;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/MP /bigobj %(AdditionalOptions)</AdditionalOptions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BufferSecurityCheck>true</BufferSecurityCheck> <CompileAsWinRT>false</CompileAsWinRT> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4091;4127;4351;4355;4503;4611;4100;4121;4244;4481;4505;4510;4512;4610;4838;4996;4456;4457;4458;4459;4702;4800;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> <ExceptionHandling>false</ExceptionHandling> <FunctionLevelLinking>true</FunctionLevelLinking> <MinimalRebuild>false</MinimalRebuild> <Optimization>Disabled</Optimization> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PreprocessorDefinitions>_DEBUG;V8_DEPRECATION_WARNINGS;_WIN32_WINNT=0x0603;WINVER=0x0603;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=239674-1;COMPONENT_BUILD;USE_AURA=1;USE_ASH=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_PRE_SYNC_BACKUP;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_CONFIGURATION_POLICY;ENABLE_NOTIFICATIONS;ENABLE_HIDPI=1;ENABLE_TOPCHROME_MD=1;DONT_EMBED_BUILD_METADATA;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x06030000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_AUTOFILL_DIALOG=1;ENABLE_BACKGROUND=1;ENABLE_GOOGLE_NOW=1;CLD_VERSION=2;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_APP_LIST=1;ENABLE_SETTINGS_APP=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;ENABLE_WIFI_BOOTSTRAPPING=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;SAFE_BROWSING_SERVICE;USE_LIBPCI=1;USE_OPENSSL=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeTypeInfo>false</RuntimeTypeInfo> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level3</WarningLevel> </ClCompile> <Lib> <AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions> <TargetMachine>MachineX86</TargetMachine> </Lib> <Link> <AdditionalDependencies>wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;credui.lib;netapi32.lib</AdditionalDependencies> <AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalOptions>/maxilksize:0x7ff00000 /safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat /largeaddressaware %(AdditionalOptions)</AdditionalOptions> <DelayLoadDLLs>dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <FixedBaseAddress>false</FixedBaseAddress> <GenerateDebugInformation>true</GenerateDebugInformation> <ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary> <MapFileName>$(OutDir)$(TargetName).map</MapFileName> <MinimumRequiredVersion>5.01</MinimumRequiredVersion> <RandomizedBaseAddress>false</RandomizedBaseAddress> <SubSystem>Console</SubSystem> <TargetMachine>MachineX86</TargetMachine> </Link> <Midl> <AdditionalIncludeDirectories>C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <DllDataFileName>%(Filename).dlldata.c</DllDataFileName> <GenerateStublessProxies>true</GenerateStublessProxies> <HeaderFileName>%(Filename).h</HeaderFileName> <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName> <OutputDirectory>$(IntDir)</OutputDirectory> <ProxyFileName>%(Filename)_p.c</ProxyFileName> <TypeLibraryName>%(Filename).tlb</TypeLibraryName> </Midl> <ResourceCompile> <AdditionalIncludeDirectories>../../../../../..;$(OutDir)gen;$(OutDir)gen;..\..\..\..\..\..\third_party\wtl\include;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <Culture>0x0409</Culture> <PreprocessorDefinitions>_DEBUG;V8_DEPRECATION_WARNINGS;_WIN32_WINNT=0x0603;WINVER=0x0603;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=239674-1;COMPONENT_BUILD;USE_AURA=1;USE_ASH=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_PRE_SYNC_BACKUP;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_CONFIGURATION_POLICY;ENABLE_NOTIFICATIONS;ENABLE_HIDPI=1;ENABLE_TOPCHROME_MD=1;DONT_EMBED_BUILD_METADATA;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x06030000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_AUTOFILL_DIALOG=1;ENABLE_BACKGROUND=1;ENABLE_GOOGLE_NOW=1;CLD_VERSION=2;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_APP_LIST=1;ENABLE_SETTINGS_APP=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;ENABLE_WIFI_BOOTSTRAPPING=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;SAFE_BROWSING_SERVICE;USE_LIBPCI=1;USE_OPENSSL=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <AdditionalIncludeDirectories>$(OutDir)gen;..\..\..\..\..\..\third_party\wtl\include;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/MP /bigobj %(AdditionalOptions)</AdditionalOptions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BufferSecurityCheck>true</BufferSecurityCheck> <CompileAsWinRT>false</CompileAsWinRT> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4091;4127;4351;4355;4503;4611;4100;4121;4244;4481;4505;4510;4512;4610;4838;4996;4456;4457;4458;4459;4702;4800;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> <ExceptionHandling>false</ExceptionHandling> <FunctionLevelLinking>true</FunctionLevelLinking> <MinimalRebuild>false</MinimalRebuild> <Optimization>Disabled</Optimization> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PreprocessorDefinitions>_DEBUG;V8_DEPRECATION_WARNINGS;_WIN32_WINNT=0x0603;WINVER=0x0603;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=239674-1;COMPONENT_BUILD;USE_AURA=1;USE_ASH=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_PRE_SYNC_BACKUP;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_CONFIGURATION_POLICY;ENABLE_NOTIFICATIONS;ENABLE_HIDPI=1;ENABLE_TOPCHROME_MD=1;DONT_EMBED_BUILD_METADATA;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x06030000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_AUTOFILL_DIALOG=1;ENABLE_BACKGROUND=1;ENABLE_GOOGLE_NOW=1;CLD_VERSION=2;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_APP_LIST=1;ENABLE_SETTINGS_APP=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;ENABLE_WIFI_BOOTSTRAPPING=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;SAFE_BROWSING_SERVICE;USE_LIBPCI=1;USE_OPENSSL=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeTypeInfo>false</RuntimeTypeInfo> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level3</WarningLevel> </ClCompile> <Lib> <AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions> <TargetMachine>MachineX64</TargetMachine> </Lib> <Link> <AdditionalDependencies>wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;credui.lib;netapi32.lib</AdditionalDependencies> <AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalOptions>/maxilksize:0x7ff00000 /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)</AdditionalOptions> <DelayLoadDLLs>dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <FixedBaseAddress>false</FixedBaseAddress> <GenerateDebugInformation>true</GenerateDebugInformation> <IgnoreSpecificDefaultLibraries>olepro32.lib</IgnoreSpecificDefaultLibraries> <ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary> <MapFileName>$(OutDir)$(TargetName).map</MapFileName> <MinimumRequiredVersion>5.02</MinimumRequiredVersion> <RandomizedBaseAddress>false</RandomizedBaseAddress> <SubSystem>Console</SubSystem> <TargetMachine>MachineX64</TargetMachine> </Link> <Midl> <AdditionalIncludeDirectories>C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <DllDataFileName>%(Filename).dlldata.c</DllDataFileName> <GenerateStublessProxies>true</GenerateStublessProxies> <HeaderFileName>%(Filename).h</HeaderFileName> <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName> <OutputDirectory>$(IntDir)</OutputDirectory> <ProxyFileName>%(Filename)_p.c</ProxyFileName> <TypeLibraryName>%(Filename).tlb</TypeLibraryName> </Midl> <ResourceCompile> <AdditionalIncludeDirectories>../../../../../..;$(OutDir)gen;$(OutDir)gen;..\..\..\..\..\..\third_party\wtl\include;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <Culture>0x0409</Culture> <PreprocessorDefinitions>_DEBUG;V8_DEPRECATION_WARNINGS;_WIN32_WINNT=0x0603;WINVER=0x0603;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=239674-1;COMPONENT_BUILD;USE_AURA=1;USE_ASH=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_PRE_SYNC_BACKUP;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_CONFIGURATION_POLICY;ENABLE_NOTIFICATIONS;ENABLE_HIDPI=1;ENABLE_TOPCHROME_MD=1;DONT_EMBED_BUILD_METADATA;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x06030000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_AUTOFILL_DIALOG=1;ENABLE_BACKGROUND=1;ENABLE_GOOGLE_NOW=1;CLD_VERSION=2;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_APP_LIST=1;ENABLE_SETTINGS_APP=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;ENABLE_WIFI_BOOTSTRAPPING=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;SAFE_BROWSING_SERVICE;USE_LIBPCI=1;USE_OPENSSL=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <AdditionalIncludeDirectories>$(OutDir)gen;..\..\..\..\..\..\third_party\wtl\include;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/MP /bigobj /d2Zi+ /Zc:inline /Oy- /Gw %(AdditionalOptions)</AdditionalOptions> <BufferSecurityCheck>true</BufferSecurityCheck> <CompileAsWinRT>false</CompileAsWinRT> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4091;4127;4351;4355;4503;4611;4100;4121;4244;4481;4505;4510;4512;4610;4838;4996;4456;4457;4458;4459;4702;4800;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> <ExceptionHandling>false</ExceptionHandling> <FunctionLevelLinking>true</FunctionLevelLinking> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <MinimalRebuild>false</MinimalRebuild> <OmitFramePointers>false</OmitFramePointers> <Optimization>MaxSpeed</Optimization> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PreprocessorDefinitions>V8_DEPRECATION_WARNINGS;_WIN32_WINNT=0x0603;WINVER=0x0603;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=239674-1;COMPONENT_BUILD;USE_AURA=1;USE_ASH=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_PRE_SYNC_BACKUP;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_CONFIGURATION_POLICY;ENABLE_NOTIFICATIONS;ENABLE_HIDPI=1;ENABLE_TOPCHROME_MD=1;DONT_EMBED_BUILD_METADATA;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x06030000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_AUTOFILL_DIALOG=1;ENABLE_BACKGROUND=1;ENABLE_GOOGLE_NOW=1;CLD_VERSION=2;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_APP_LIST=1;ENABLE_SETTINGS_APP=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;ENABLE_WIFI_BOOTSTRAPPING=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;SAFE_BROWSING_SERVICE;USE_LIBPCI=1;USE_OPENSSL=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeTypeInfo>false</RuntimeTypeInfo> <StringPooling>true</StringPooling> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level3</WarningLevel> </ClCompile> <Lib> <AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions> <TargetMachine>MachineX86</TargetMachine> </Lib> <Link> <AdditionalDependencies>wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;credui.lib;netapi32.lib</AdditionalDependencies> <AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalOptions>/maxilksize:0x7ff00000 /safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat /largeaddressaware %(AdditionalOptions)</AdditionalOptions> <DelayLoadDLLs>dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <EnableCOMDATFolding>true</EnableCOMDATFolding> <FixedBaseAddress>false</FixedBaseAddress> <GenerateDebugInformation>true</GenerateDebugInformation> <ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary> <MapFileName>$(OutDir)$(TargetName).map</MapFileName> <MinimumRequiredVersion>5.01</MinimumRequiredVersion> <OptimizeReferences>true</OptimizeReferences> <Profile>true</Profile> <SubSystem>Console</SubSystem> <TargetMachine>MachineX86</TargetMachine> </Link> <Midl> <AdditionalIncludeDirectories>C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <DllDataFileName>%(Filename).dlldata.c</DllDataFileName> <GenerateStublessProxies>true</GenerateStublessProxies> <HeaderFileName>%(Filename).h</HeaderFileName> <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName> <OutputDirectory>$(IntDir)</OutputDirectory> <ProxyFileName>%(Filename)_p.c</ProxyFileName> <TypeLibraryName>%(Filename).tlb</TypeLibraryName> </Midl> <ResourceCompile> <AdditionalIncludeDirectories>../../../../../..;$(OutDir)gen;$(OutDir)gen;..\..\..\..\..\..\third_party\wtl\include;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <Culture>0x0409</Culture> <PreprocessorDefinitions>V8_DEPRECATION_WARNINGS;_WIN32_WINNT=0x0603;WINVER=0x0603;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=239674-1;COMPONENT_BUILD;USE_AURA=1;USE_ASH=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_PRE_SYNC_BACKUP;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_CONFIGURATION_POLICY;ENABLE_NOTIFICATIONS;ENABLE_HIDPI=1;ENABLE_TOPCHROME_MD=1;DONT_EMBED_BUILD_METADATA;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x06030000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_AUTOFILL_DIALOG=1;ENABLE_BACKGROUND=1;ENABLE_GOOGLE_NOW=1;CLD_VERSION=2;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_APP_LIST=1;ENABLE_SETTINGS_APP=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;ENABLE_WIFI_BOOTSTRAPPING=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;SAFE_BROWSING_SERVICE;USE_LIBPCI=1;USE_OPENSSL=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <AdditionalIncludeDirectories>$(OutDir)gen;..\..\..\..\..\..\third_party\wtl\include;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/MP /bigobj /d2Zi+ /Zc:inline /Oy- /Gw %(AdditionalOptions)</AdditionalOptions> <BufferSecurityCheck>true</BufferSecurityCheck> <CompileAsWinRT>false</CompileAsWinRT> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4091;4127;4351;4355;4503;4611;4100;4121;4244;4481;4505;4510;4512;4610;4838;4996;4456;4457;4458;4459;4702;4800;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> <ExceptionHandling>false</ExceptionHandling> <FunctionLevelLinking>true</FunctionLevelLinking> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <MinimalRebuild>false</MinimalRebuild> <OmitFramePointers>false</OmitFramePointers> <Optimization>MaxSpeed</Optimization> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PreprocessorDefinitions>V8_DEPRECATION_WARNINGS;_WIN32_WINNT=0x0603;WINVER=0x0603;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=239674-1;COMPONENT_BUILD;USE_AURA=1;USE_ASH=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_PRE_SYNC_BACKUP;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_CONFIGURATION_POLICY;ENABLE_NOTIFICATIONS;ENABLE_HIDPI=1;ENABLE_TOPCHROME_MD=1;DONT_EMBED_BUILD_METADATA;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x06030000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_AUTOFILL_DIALOG=1;ENABLE_BACKGROUND=1;ENABLE_GOOGLE_NOW=1;CLD_VERSION=2;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_APP_LIST=1;ENABLE_SETTINGS_APP=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;ENABLE_WIFI_BOOTSTRAPPING=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;SAFE_BROWSING_SERVICE;USE_LIBPCI=1;USE_OPENSSL=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeTypeInfo>false</RuntimeTypeInfo> <StringPooling>true</StringPooling> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level3</WarningLevel> </ClCompile> <Lib> <AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions> <TargetMachine>MachineX64</TargetMachine> </Lib> <Link> <AdditionalDependencies>wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;credui.lib;netapi32.lib</AdditionalDependencies> <AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalOptions>/maxilksize:0x7ff00000 /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)</AdditionalOptions> <DelayLoadDLLs>dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <EnableCOMDATFolding>true</EnableCOMDATFolding> <FixedBaseAddress>false</FixedBaseAddress> <GenerateDebugInformation>true</GenerateDebugInformation> <IgnoreSpecificDefaultLibraries>olepro32.lib</IgnoreSpecificDefaultLibraries> <ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary> <MapFileName>$(OutDir)$(TargetName).map</MapFileName> <MinimumRequiredVersion>5.02</MinimumRequiredVersion> <OptimizeReferences>true</OptimizeReferences> <Profile>true</Profile> <SubSystem>Console</SubSystem> <TargetMachine>MachineX64</TargetMachine> </Link> <Midl> <AdditionalIncludeDirectories>C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <DllDataFileName>%(Filename).dlldata.c</DllDataFileName> <GenerateStublessProxies>true</GenerateStublessProxies> <HeaderFileName>%(Filename).h</HeaderFileName> <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName> <OutputDirectory>$(IntDir)</OutputDirectory> <ProxyFileName>%(Filename)_p.c</ProxyFileName> <TypeLibraryName>%(Filename).tlb</TypeLibraryName> </Midl> <ResourceCompile> <AdditionalIncludeDirectories>../../../../../..;$(OutDir)gen;$(OutDir)gen;..\..\..\..\..\..\third_party\wtl\include;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\winrt;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <Culture>0x0409</Culture> <PreprocessorDefinitions>V8_DEPRECATION_WARNINGS;_WIN32_WINNT=0x0603;WINVER=0x0603;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_SECURE_ATL;_HAS_EXCEPTIONS=0;_WINSOCK_DEPRECATED_NO_WARNINGS;CHROMIUM_BUILD;CR_CLANG_REVISION=239674-1;COMPONENT_BUILD;USE_AURA=1;USE_ASH=1;USE_DEFAULT_RENDER_THEME=1;USE_LIBJPEG_TURBO=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_PRE_SYNC_BACKUP;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_MEDIA_ROUTER=1;ENABLE_PEPPER_CDMS;ENABLE_CONFIGURATION_POLICY;ENABLE_NOTIFICATIONS;ENABLE_HIDPI=1;ENABLE_TOPCHROME_MD=1;DONT_EMBED_BUILD_METADATA;NO_TCMALLOC;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;NTDDI_VERSION=0x06030000;_USING_V110_SDK71_;ENABLE_TASK_MANAGER=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PLUGINS=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_AUTOFILL_DIALOG=1;ENABLE_BACKGROUND=1;ENABLE_GOOGLE_NOW=1;CLD_VERSION=2;ENABLE_PRINTING=1;ENABLE_BASIC_PRINTING=1;ENABLE_PRINT_PREVIEW=1;ENABLE_SPELLCHECK=1;ENABLE_CAPTIVE_PORTAL_DETECTION=1;ENABLE_APP_LIST=1;ENABLE_SETTINGS_APP=1;ENABLE_SUPERVISED_USERS=1;ENABLE_MDNS=1;ENABLE_SERVICE_DISCOVERY=1;ENABLE_WIFI_BOOTSTRAPPING=1;V8_USE_EXTERNAL_STARTUP_DATA;FULL_SAFE_BROWSING;SAFE_BROWSING_CSD;SAFE_BROWSING_DB_LOCAL;SAFE_BROWSING_SERVICE;USE_LIBPCI=1;USE_OPENSSL=1;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> <ItemGroup> <None Include="generated.gyp"/> <None Include="..\..\scripts\generate_init_partial_interfaces.py"/> <None Include="core_idl_with_modules_dependency_files_list.tmp"/> <None Include="$(OutDir)gen\blink\bindings\modules\InterfacesInfoOverall.pickle"/> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/> <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets"/> <ImportGroup Label="ExtensionTargets"/> <Target Name="Build"> <Exec Command="call ninja.exe -C $(OutDir) $(ProjectName)"/> </Target> <Target Name="Clean"> <Exec Command="call ninja.exe -C $(OutDir) -tclean $(ProjectName)"/> </Target> </Project> ```
/content/code_sandbox/third_party/WebKit/Source/bindings/modules/v8/bindings_modules_v8_generated_init_partial.vcxproj
xml
2016-09-27T03:41:10
2024-08-16T10:42:57
miniblink49
weolar/miniblink49
7,069
9,564
```xml <androidx.drawerlayout.widget.DrawerLayout xmlns:android="path_to_url" xmlns:tools="path_to_url" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.eveningoutpost.dexdrip.Home"> <RelativeLayout xmlns:android="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.eveningoutpost.dexdrip.NightscoutBackfillActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/backfillTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_weight="1" android:text="Choose the date for the oldest record to send to Nightscout. Use with care!" android:textAlignment="center" android:textSize="18sp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="horizontal"> <Button android:id="@+id/backfillDateButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_marginBottom="20dp" android:layout_marginTop="20dp" android:layout_weight="1" android:onClick="backfillPick" android:text="Backfill Date" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="horizontal"> <Button android:id="@+id/startbackfill" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="20dp" android:layout_weight="1" android:onClick="backfillRun" android:text="Do it!" /> <Button android:id="@+id/backfillcancel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="20dp" android:layout_weight="1" android:onClick="backfillCancel" android:text="Cancel" /> </LinearLayout> </LinearLayout> </RelativeLayout> <fragment android:id="@+id/navigation_drawer" android:name="com.eveningoutpost.dexdrip.NavigationDrawerFragment" android:layout_width="@dimen/navigation_drawer_width" android:layout_height="match_parent" android:layout_gravity="start" tools:layout="@layout/fragment_navigation_drawer" /> </androidx.drawerlayout.widget.DrawerLayout> ```
/content/code_sandbox/app/src/main/res/layout/activity_nightscout_backfill.xml
xml
2016-09-23T13:33:17
2024-08-15T09:51:19
xDrip
NightscoutFoundation/xDrip
1,365
721
```xml import { revalidateTag, unstable_cache } from 'next/cache' import { RevalidateButton } from '../revalidate-button' export const dynamic = 'force-dynamic' export default async function Page() { async function revalidate() { 'use server' await revalidateTag('random-value-data') } const cachedData = await unstable_cache( async () => { return { random: Math.random(), } }, ['random-value'], { tags: ['random-value-data'], } )() return ( <div> <p>random: {Math.random()}</p> <p id="cached-data">cachedData: {cachedData.random}</p> <RevalidateButton onClick={revalidate} /> </div> ) } ```
/content/code_sandbox/test/e2e/app-dir/app-static/app/unstable-cache/dynamic/page.tsx
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
169
```xml import { SerializedWorkspace } from '../../../../interfaces/db/workspace' import { generateMockId, getCurrentTime, MockDbMap, MockDbSetMap, } from '../utils' export type MockWorkspace = Omit< SerializedWorkspace, 'team' | 'owner' | 'permissions' | 'positions' > const workspaceMap = new MockDbMap<SerializedWorkspace>('mock:workspaceMap') const teamWorkspaceSetMap = new MockDbSetMap<string>('mock:teamWorkspaceSetMap') export function resetMockWorkspaces() { workspaceMap.reset() teamWorkspaceSetMap.reset() } interface CreateMockWorkspaceParams { teamId: string ownerId?: string name: string personal?: boolean default?: boolean public: boolean } export function createMockWorkspace({ teamId, ownerId, name, personal = false, default: defaultWorkspace = false, public: publicWorkspace = true, }: CreateMockWorkspaceParams) { const id = generateMockId() const now = getCurrentTime() const newWorkspace = { id, name, teamId, personal, default: defaultWorkspace, public: publicWorkspace, ownerId, createdAt: now, updatedAt: now, } workspaceMap.set(id, newWorkspace) teamWorkspaceSetMap.addValue(teamId, id) return newWorkspace } export function removeMockWorkspace(id: string) { const workspace = getMockWorkspaceById(id) if (workspace == null) { return } workspaceMap.delete(id) teamWorkspaceSetMap.removeValue(workspace.teamId, id) } export function getMockWorkspaceById(id: string) { return workspaceMap.get(id) } export function getMockWorkspacesByTeamId(teamId: string) { const workspaceIdList = [...teamWorkspaceSetMap.getSet(teamId)] return workspaceIdList.reduce<MockWorkspace[]>((list, workspaceId) => { const workspace = getMockWorkspaceById(workspaceId) if (workspace != null) { list.push(workspace) } return list }, []) } ```
/content/code_sandbox/src/cloud/api/mock/db/mockEntities/workspaces.ts
xml
2016-11-19T14:30:34
2024-08-16T03:13:45
BoostNote-App
BoostIO/BoostNote-App
3,745
450
```xml <?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="path_to_url" android:duration="300" android:fromYDelta="0" android:toYDelta="100%p" /> ```
/content/code_sandbox/app/src/main/res/anim/out_to_bottom.xml
xml
2016-08-08T08:52:10
2024-08-12T19:24:13
AndroidAnimationExercise
REBOOTERS/AndroidAnimationExercise
1,868
52
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url"> <plist version="1.0"> <dict> <key>AD_UNIT_ID_FOR_BANNER_TEST</key> <string>ca-app-pub-3940256099942544/2934735716</string> <key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key> <string>ca-app-pub-3940256099942544/4411468910</string> <key>API_KEY</key> <string>AIzaSyAzlj4APqi5S58nFtE52Da0fYBOHA2MhaY</string> <key>BUNDLE_ID</key> <string>com.google.firebase.quickstart.DynamiclinksExample</string> <key>CLIENT_ID</key> <string>123456789000-hjugbg6ud799v4c49dim8ce2usclthar.apps.googleusercontent.com</string> <key>DATABASE_URL</key> <string>path_to_url <key>GCM_SENDER_ID</key> <string>123456789000</string> <key>GOOGLE_APP_ID</key> <string>1:123456789000:ios:f1bf012572b04063</string> <key>IS_ADS_ENABLED</key> <true/> <key>IS_ANALYTICS_ENABLED</key> <true/> <key>IS_APPINVITE_ENABLED</key> <true/> <key>IS_GCM_ENABLED</key> <true/> <key>IS_SIGNIN_ENABLED</key> <true/> <key>PLIST_VERSION</key> <string>1</string> <key>PROJECT_ID</key> <string>mockproject-1234</string> <key>REVERSED_CLIENT_ID</key> <string>com.googleusercontent.apps.123456789000-hjugbg6ud799v4c49dim8ce2usclthar</string> <key>STORAGE_BUCKET</key> <string>mockproject-1234.appspot.com</string> </dict> </plist> ```
/content/code_sandbox/dynamiclinks/GoogleService-Info.plist
xml
2016-04-26T17:13:37
2024-08-15T05:40:16
quickstart-ios
firebase/quickstart-ios
2,773
484
```xml /* * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import { TestbedHarnessEnvironment } from "@angular/cdk/testing/testbed"; import { HttpClientModule } from "@angular/common/http"; import { ComponentFixture, fakeAsync, TestBed, tick } from "@angular/core/testing"; import { MatDialog, MatDialogModule, MatDialogRef } from "@angular/material/dialog"; import { MatDialogHarness } from "@angular/material/dialog/testing"; import { NoopAnimationsModule } from "@angular/platform-browser/animations"; import { ActivatedRoute } from "@angular/router"; import { RouterTestingModule } from "@angular/router/testing"; import { of, ReplaySubject } from "rxjs"; import { APITestingModule } from "src/app/api/testing"; import { NavigationService } from "src/app/shared/navigation/navigation.service"; import { ChangeLogsComponent } from "./change-logs.component"; const testCLEntry = { id: 1, lastUpdated: new Date(), level: "APICHANGE" as const, longTime: "", message: "testquest", relativeTime: "3 seconds ago", ticketNum: null, user: "admin" }; describe("ChangeLogsComponent", () => { let component: ChangeLogsComponent; let fixture: ComponentFixture<ChangeLogsComponent>; beforeEach(async () => { const navSvc = jasmine.createSpyObj([],{headerHidden: new ReplaySubject<boolean>(), headerTitle: new ReplaySubject<string>()}); await TestBed.configureTestingModule({ declarations: [ChangeLogsComponent], imports: [ APITestingModule, HttpClientModule, RouterTestingModule, NoopAnimationsModule, MatDialogModule ], providers: [ { provide: NavigationService, useValue: navSvc }, ] }).compileComponents(); fixture = TestBed.createComponent(ChangeLogsComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it("should create", () => { expect(component).toBeTruthy(); }); it("handles unknown actions", async () => { await expectAsync(component.handleContextMenu({action: "something unknown", data: []})).toBeResolvedTo(undefined); await expectAsync(component.handleTitleButton("something unknown")).toBeResolvedTo(undefined); }); it("updates the fuzzy search output", fakeAsync(() => { let called = false; const text = "testquest"; const spy = jasmine.createSpy("subscriber", (txt: string): void =>{ if (!called) { expect(txt).toBe(""); called = true; } else { expect(txt).toBe(text); } }); component.fuzzySubj.subscribe(spy); tick(); expect(spy).toHaveBeenCalled(); component.searchText = text; component.updateURL(); tick(); expect(spy).toHaveBeenCalledTimes(2); })); it("sets the fuzzy search subject based on the search query param", fakeAsync(() => { const router = TestBed.inject(ActivatedRoute); const searchString = "testquest"; spyOnProperty(router, "queryParamMap").and.returnValue(of(new Map([["search", searchString]]))); let searchValue = "not the right string"; component.fuzzySubj.subscribe( s => searchValue = s ); component.ngOnInit(); tick(); expect(searchValue).toBe(searchString); })); it("opens a dialog to view changelog item details (array data)", fakeAsync(async () => { const asyncExpectation = expectAsync( component.handleContextMenu({action: "viewChangeLog", data: [testCLEntry]}) ).toBeResolvedTo(undefined); tick(); const loader = TestbedHarnessEnvironment.documentRootLoader(fixture); const dialogs = await loader.getAllHarnesses(MatDialogHarness); if (dialogs.length !== 1) { return fail(`expected exactly one dialog to be opened; got: ${dialogs.length}`); } await dialogs[0].close(); await asyncExpectation; })); it("opens a dialog to view changelog item details (single object data)", fakeAsync(async () => { const asyncExpectation = expectAsync( component.handleContextMenu({action: "viewChangeLog", data: testCLEntry}) ).toBeResolvedTo(undefined); tick(); const loader = TestbedHarnessEnvironment.documentRootLoader(fixture); const dialogs = await loader.getAllHarnesses(MatDialogHarness); if (dialogs.length !== 1) { return fail(`expected exactly one dialog to be opened; got: ${dialogs.length}`); } await dialogs[0].close(); await asyncExpectation; })); it("opens a dialog to set the number of days to which to filter the changelogs", fakeAsync(async () => { const numDays = 5; component.lastDays = numDays + 1; const dialogService = TestBed.inject(MatDialog); const openSpy = spyOn(dialogService, "open").and.returnValue({ afterClosed: () => of(numDays) } as MatDialogRef<unknown>); expect(openSpy).not.toHaveBeenCalled(); const asyncExpectation = expectAsync(component.handleTitleButton("lastDays")).toBeResolvedTo(undefined); tick(); await asyncExpectation; expect(openSpy).toHaveBeenCalled(); expect(component.lastDays).toBe(numDays); })); }); ```
/content/code_sandbox/experimental/traffic-portal/src/app/core/change-logs/change-logs.component.spec.ts
xml
2016-09-02T07:00:06
2024-08-16T03:50:21
trafficcontrol
apache/trafficcontrol
1,043
1,144
```xml <?xml version="1.0" encoding="utf-8"?> <schema targetNamespace="path_to_url" xmlns:doc="path_to_url" xmlns:maml="path_to_url" xmlns:dev="path_to_url" xmlns:managed="path_to_url" xmlns="path_to_url" elementFormDefault="qualified" attributeFormDefault="unqualified" blockDefault="#all" xml:lang="en"> <!-- Schema documentation --> <annotation> <documentation>This schema describes MAML (Microsoft Assistance Markup Language). MAML is intended for software documentation. In particular, MAML is intended to accommodate the needs of Microsoft documentation.</documentation> <documentation>The schema is broken into three main areas: end user, developer and IT Pro. These areas represent the main categories of Microsoft documentation.</documentation> <documentation>The namespace uri for this version of MAML is: path_to_url <documentation>Each backwards-incompatible revision to MAML will require that the date fields be appropriately incremented in uri of the updated version of the MAML schema.</documentation> </annotation> <annotation> <documentation>This portion of the schema was created by chains in Dec 2004.</documentation> </annotation> <import schemaLocation="maml.xsd" namespace="path_to_url"/> <import schemaLocation="developer.xsd" namespace="path_to_url"/> <!-- Managed Developer Page Types --> <!-- Managed Class --> <complexType name="methodType"> <sequence> <element ref="maml:title"/> <element ref="maml:introduction"/> <element ref="dev:parameters"/> <element ref="dev:returnValue"/> <element ref="dev:exceptions" minOccurs="0"/> <element ref="managed:security" minOccurs="0"/> <element ref="dev:remarks" minOccurs="0"/> <element ref="dev:examples" minOccurs="0"/> <element ref="dev:threadSafety" minOccurs="0"/> <element ref="dev:appliesTo"/> <element ref="dev:requirements" minOccurs="0"/> <element ref="maml:relatedLinks" minOccurs="0"/> </sequence> </complexType> <element name="method" type="managed:methodType"> <annotation> <documentation>Root element of managedMethod page type.</documentation> </annotation> </element> </schema> ```
/content/code_sandbox/src/Schemas/PSMaml/developerManagedMethod.xsd
xml
2016-01-13T23:41:35
2024-08-16T19:59:07
PowerShell
PowerShell/PowerShell
44,388
501
```xml // *** WARNING: this file was generated by test. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; import * as utilities from "./utilities"; /** * Response for all the Bastion Shareable Link endpoints. * API Version: 2020-11-01. */ export function getBastionShareableLink(args: GetBastionShareableLinkArgs, opts?: pulumi.InvokeOptions): Promise<GetBastionShareableLinkResult> { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("mypkg::getBastionShareableLink", { "bastionHostName": args.bastionHostName, "resourceGroupName": args.resourceGroupName, "vms": args.vms, }, opts); } export interface GetBastionShareableLinkArgs { /** * The name of the Bastion Host. */ bastionHostName: string; /** * The name of the resource group. */ resourceGroupName: string; /** * List of VM references. */ vms?: inputs.BastionShareableLink[]; } /** * Response for all the Bastion Shareable Link endpoints. */ export interface GetBastionShareableLinkResult { /** * The URL to get the next set of results. */ readonly nextLink?: string; } /** * Response for all the Bastion Shareable Link endpoints. * API Version: 2020-11-01. */ export function getBastionShareableLinkOutput(args: GetBastionShareableLinkOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetBastionShareableLinkResult> { return pulumi.output(args).apply((a: any) => getBastionShareableLink(a, opts)) } export interface GetBastionShareableLinkOutputArgs { /** * The name of the Bastion Host. */ bastionHostName: pulumi.Input<string>; /** * The name of the resource group. */ resourceGroupName: pulumi.Input<string>; /** * List of VM references. */ vms?: pulumi.Input<pulumi.Input<inputs.BastionShareableLinkArgs>[]>; } ```
/content/code_sandbox/tests/testdata/codegen/output-funcs/nodejs/getBastionShareableLink.ts
xml
2016-10-31T21:02:47
2024-08-16T19:47:04
pulumi
pulumi/pulumi
20,743
506
```xml import type { Mock } from 'vitest'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import { SNIPPET_RENDERED } from 'storybook/internal/docs-tools'; import { addons, useEffect } from 'storybook/internal/preview-api'; import type { StoryContext } from '../types'; import { sourceDecorator } from './sourceDecorator'; vi.mock('storybook/internal/preview-api'); const mockedAddons = vi.mocked(addons); const mockedUseEffect = vi.mocked(useEffect); expect.addSnapshotSerializer({ print: (val: any) => val, test: (val) => typeof val === 'string', }); const tick = () => new Promise((r) => setTimeout(r, 0)); const makeContext = (name: string, parameters: any, args: any, extra?: object): StoryContext => // @ts-expect-error haven't added unmapped args to StoryContext yet ({ id: `html-test--${name}`, kind: 'js-text', name, parameters, componentId: '', title: '', story: '', unmappedArgs: args, args, argTypes: {}, globals: {}, initialArgs: {}, ...extra, }) as StoryContext; describe('sourceDecorator', () => { let mockChannel: { on: Mock; emit?: Mock }; beforeEach(() => { mockedAddons.getChannel.mockReset(); mockedUseEffect.mockImplementation((cb) => setTimeout(() => cb(), 0)); mockChannel = { on: vi.fn(), emit: vi.fn() }; mockedAddons.getChannel.mockReturnValue(mockChannel as any); }); it('should render dynamically for args stories', async () => { const storyFn = (args: any) => `<div>args story</div>`; const context = makeContext('args', { __isArgsStory: true }, {}); sourceDecorator(storyFn, context); await tick(); expect(mockChannel.emit).toHaveBeenCalledWith(SNIPPET_RENDERED, { id: 'html-test--args', args: {}, source: '<div>args story</div>', }); }); it('should skip dynamic rendering for no-args stories', async () => { const storyFn = () => `<div>classic story</div>`; const context = makeContext('classic', {}, {}); sourceDecorator(storyFn, context); await tick(); expect(mockChannel.emit).not.toHaveBeenCalled(); }); it('should use the originalStoryFn if excludeDecorators is set', async () => { const storyFn = (args: any) => `<div>args story</div>`; const decoratedStoryFn = (args: any) => ` <div style="padding: 25px; border: 3px solid red;">${storyFn(args)}</div> `; const context = makeContext( 'args', { __isArgsStory: true, docs: { source: { excludeDecorators: true, }, }, }, {}, { originalStoryFn: storyFn } ); sourceDecorator(decoratedStoryFn, context); await tick(); expect(mockChannel.emit).toHaveBeenCalledWith(SNIPPET_RENDERED, { id: 'html-test--args', args: {}, source: '<div>args story</div>', }); }); }); ```
/content/code_sandbox/code/renderers/html/src/docs/sourceDecorator.test.ts
xml
2016-03-18T04:23:44
2024-08-16T19:22:08
storybook
storybookjs/storybook
83,755
723
```xml import { calculateTotalPublishedCommentCount } from "coral-server/models/comment"; import { Story } from "coral-server/models/story"; import { GQLCommentCountsTypeResolver } from "coral-server/graph/schema/__generated__/types"; export type CommentCountsInput = Pick<Story, "commentCounts" | "id">; export const CommentCounts: GQLCommentCountsTypeResolver<CommentCountsInput> = { totalPublished: ({ commentCounts }) => calculateTotalPublishedCommentCount(commentCounts.status), statuses: ({ commentCounts }) => commentCounts.status, tags: (s, input, ctx) => ctx.loaders.Comments.tagCounts.load(s.id), }; ```
/content/code_sandbox/server/src/core/server/graph/resolvers/CommentCounts.ts
xml
2016-10-31T16:14:05
2024-08-06T16:15:57
talk
coralproject/talk
1,881
140
```xml import os from 'os' import path from 'path' import { existsSync, promises as fs, rmSync } from 'fs' import treeKill from 'tree-kill' import type { NextConfig } from 'next' import { FileRef, isNextDeploy } from '../e2e-utils' import { ChildProcess } from 'child_process' import { createNextInstall } from '../create-next-install' import { Span } from 'next/dist/trace' import webdriver from '../next-webdriver' import { renderViaHTTP, fetchViaHTTP, findPort } from 'next-test-utils' import cheerio from 'cheerio' import { once } from 'events' import { BrowserInterface } from '../browsers/base' import escapeStringRegexp from 'escape-string-regexp' type Event = 'stdout' | 'stderr' | 'error' | 'destroy' export type InstallCommand = | string | ((ctx: { dependencies: { [key: string]: string } }) => string) export type PackageJson = { dependencies?: { [key: string]: string } [key: string]: unknown } export interface NextInstanceOpts { files: FileRef | string | { [filename: string]: string | FileRef } dependencies?: { [name: string]: string } resolutions?: { [name: string]: string } packageJson?: PackageJson nextConfig?: NextConfig installCommand?: InstallCommand buildCommand?: string startCommand?: string env?: Record<string, string> dirSuffix?: string turbo?: boolean forcedPort?: string serverReadyPattern?: RegExp } /** * Omit the first argument of a function */ type OmitFirstArgument<F> = F extends ( firstArgument: any, ...args: infer P ) => infer R ? (...args: P) => R : never export class NextInstance { protected files: FileRef | { [filename: string]: string | FileRef } protected nextConfig?: NextConfig protected installCommand?: InstallCommand protected buildCommand?: string protected startCommand?: string protected dependencies?: PackageJson['dependencies'] = {} protected resolutions?: PackageJson['resolutions'] protected events: { [eventName: string]: Set<any> } = {} public testDir: string protected isStopping: boolean = false protected isDestroyed: boolean = false protected childProcess?: ChildProcess protected _url: string protected _parsedUrl: URL protected packageJson?: PackageJson = {} protected basePath?: string public env: Record<string, string> public forcedPort?: string public dirSuffix: string = '' public serverReadyPattern?: RegExp = / Ready in / constructor(opts: NextInstanceOpts) { this.env = {} Object.assign(this, opts) require('console').log('packageJson??', this.packageJson) if (!isNextDeploy) { this.env = { ...this.env, // remove node_modules/.bin repo path from env // to match CI $PATH value and isolate further PATH: process.env.PATH.split(path.delimiter) .filter((part) => { return !part.includes(path.join('node_modules', '.bin')) }) .join(path.delimiter), } } } protected async writeInitialFiles() { // Handle case where files is a directory string const files = typeof this.files === 'string' ? new FileRef(this.files) : this.files if (files instanceof FileRef) { // if a FileRef is passed directly to `files` we copy the // entire folder to the test directory const stats = await fs.stat(files.fsPath) if (!stats.isDirectory()) { throw new Error( `FileRef passed to "files" in "createNext" is not a directory ${files.fsPath}` ) } await fs.cp(files.fsPath, this.testDir, { recursive: true, filter(source) { // we don't copy a package.json as it's manually written // via the createNextInstall process if (path.relative(files.fsPath, source) === 'package.json') { return false } return true }, }) } else { for (const filename of Object.keys(files)) { const item = files[filename] const outputFilename = path.join(this.testDir, filename) if (typeof item === 'string') { await fs.mkdir(path.dirname(outputFilename), { recursive: true }) await fs.writeFile(outputFilename, item) } else { await fs.cp(item.fsPath, outputFilename, { recursive: true }) } } } } protected async createTestDir({ skipInstall = false, parentSpan, }: { skipInstall?: boolean parentSpan: Span }) { if (this.isDestroyed) { throw new Error('next instance already destroyed') } await parentSpan .traceChild('createTestDir') .traceAsyncFn(async (rootSpan) => { const skipIsolatedNext = !!process.env.NEXT_SKIP_ISOLATE if (!skipIsolatedNext) { require('console').log( `Creating test directory with isolated next... (use NEXT_SKIP_ISOLATE=1 to opt-out)` ) } const tmpDir = skipIsolatedNext ? path.join(__dirname, '../../tmp') : process.env.NEXT_TEST_DIR || (await fs.realpath(os.tmpdir())) this.testDir = path.join( tmpDir, `next-test-${Date.now()}-${(Math.random() * 1000) | 0}${ this.dirSuffix }` ) const reactVersion = process.env.NEXT_TEST_REACT_VERSION || '19.0.0-rc-1eaccd82-20240816' const finalDependencies = { react: reactVersion, 'react-dom': reactVersion, '@types/react': 'latest', '@types/react-dom': 'latest', typescript: 'latest', '@types/node': 'latest', ...this.dependencies, ...this.packageJson?.dependencies, } if (skipInstall || skipIsolatedNext) { const pkgScripts = (this.packageJson['scripts'] as {}) || {} await fs.mkdir(this.testDir, { recursive: true }) await fs.writeFile( path.join(this.testDir, 'package.json'), JSON.stringify( { ...this.packageJson, dependencies: { ...finalDependencies, next: process.env.NEXT_TEST_VERSION || require('next/package.json').version, }, ...(this.resolutions ? { resolutions: this.resolutions } : {}), scripts: { // since we can't get the build id as a build artifact, make it // available under the static files 'post-build': 'cp .next/BUILD_ID .next/static/__BUILD_ID', ...pkgScripts, build: (pkgScripts['build'] || this.buildCommand || 'next build') + ' && pnpm post-build', }, }, null, 2 ) ) } else { if ( process.env.NEXT_TEST_STARTER && !this.dependencies && !this.installCommand && !this.packageJson && !isNextDeploy ) { await fs.cp(process.env.NEXT_TEST_STARTER, this.testDir, { recursive: true, }) } else { const { installDir } = await createNextInstall({ parentSpan: rootSpan, dependencies: finalDependencies, resolutions: this.resolutions ?? null, installCommand: this.installCommand, packageJson: this.packageJson, dirSuffix: this.dirSuffix, keepRepoDir: Boolean(process.env.NEXT_TEST_SKIP_CLEANUP), }) this.testDir = installDir } require('console').log('created next.js install, writing test files') } await rootSpan .traceChild('writeInitialFiles') .traceAsyncFn(async () => { await this.writeInitialFiles() }) const testDirFiles = await fs.readdir(this.testDir) let nextConfigFile = testDirFiles.find((file) => file.startsWith('next.config.') ) if (nextConfigFile && this.nextConfig) { throw new Error( `nextConfig provided on "createNext()" and as a file "${nextConfigFile}", use one or the other to continue` ) } if (this.nextConfig || (isNextDeploy && !nextConfigFile)) { const functions = [] const exportDeclare = this.packageJson?.type === 'module' ? 'export default' : 'module.exports = ' await fs.writeFile( path.join(this.testDir, 'next.config.js'), exportDeclare + JSON.stringify( { ...this.nextConfig, } as NextConfig, (key, val) => { if (typeof val === 'function') { functions.push( val .toString() .replace( new RegExp(`${val.name}[\\s]{0,}\\(`), 'function(' ) ) return `__func_${functions.length - 1}` } return val }, 2 ).replace(/"__func_[\d]{1,}"/g, function (str) { return functions.shift() }) ) } if (isNextDeploy) { const fileName = path.join( this.testDir, nextConfigFile || 'next.config.js' ) const content = await fs.readFile(fileName, 'utf8') if (content.includes('basePath')) { this.basePath = content.match(/['"`]?basePath['"`]?:.*?['"`](.*?)['"`]/)?.[1] || '' } await fs.writeFile( fileName, `${content}\n` + ` // alias __NEXT_TEST_MODE for next-deploy as "_" is not a valid // env variable during deploy if (process.env.NEXT_PRIVATE_TEST_MODE) { process.env.__NEXT_TEST_MODE = process.env.NEXT_PRIVATE_TEST_MODE } ` ) if ( testDirFiles.includes('node_modules') && !testDirFiles.includes('vercel.json') ) { // Tests that include a patched node_modules dir won't automatically be uploaded to Vercel. // We need to ensure node_modules is not excluded from the deploy files, and tweak the // start + build commands to handle copying the patched node modules into the final. // To be extra safe, we only do this if the test directory doesn't already have a custom vercel.json require('console').log( 'Detected node_modules in the test directory, writing `vercel.json` and `.vercelignore` to ensure its included.' ) await fs.writeFile( path.join(this.testDir, 'vercel.json'), JSON.stringify({ installCommand: 'mv node_modules node_modules.bak && npm i && cp -r node_modules.bak/* node_modules', }) ) await fs.writeFile( path.join(this.testDir, '.vercelignore'), '!node_modules' ) } } }) } protected setServerReadyTimeout( reject: (reason?: unknown) => void, ms = 10_000 ): NodeJS.Timeout { return setTimeout(() => { reject( new Error( `Failed to start server after ${ms}ms, waiting for this log pattern: ${this.serverReadyPattern}` ) ) }, ms) } // normalize snapshots or stack traces being tested // to a consistent test dir value since it's random public normalizeTestDirContent(content) { content = content.replace( new RegExp(escapeStringRegexp(this.testDir), 'g'), 'TEST_DIR' ) return content } public async clean() { if (this.childProcess) { throw new Error(`stop() must be called before cleaning`) } const keptFiles = [ 'node_modules', 'package.json', 'yarn.lock', 'pnpm-lock.yaml', ] for (const file of await fs.readdir(this.testDir)) { if (!keptFiles.includes(file)) { await fs.rm(path.join(this.testDir, file), { recursive: true, force: true, }) } } await this.writeInitialFiles() } public async build(): Promise<{ exitCode?: number; cliOutput?: string }> { throw new Error('Not implemented') } public async setup(parentSpan: Span): Promise<void> { if (this.forcedPort === 'random') { this.forcedPort = (await findPort()) + '' console.log('Forced random port:', this.forcedPort) } } public async start(useDirArg: boolean = false): Promise<void> {} public async stop(): Promise<void> { if (this.childProcess) { this.isStopping = true const closePromise = once(this.childProcess, 'close') await new Promise<void>((resolve) => { treeKill(this.childProcess.pid, 'SIGKILL', (err) => { if (err) { require('console').error('tree-kill', err) } resolve() }) }) this.childProcess.kill('SIGKILL') await closePromise this.childProcess = undefined this.isStopping = false require('console').log(`Stopped next server`) } } public async destroy(): Promise<void> { try { require('console').time('destroyed next instance') if (this.isDestroyed) { throw new Error(`next instance already destroyed`) } this.isDestroyed = true this.emit('destroy', []) await this.stop().catch(console.error) if (process.env.TRACE_PLAYWRIGHT) { await fs .cp( path.join(this.testDir, '.next/trace'), path.join( __dirname, '../../traces', `${path .relative( path.join(__dirname, '../../'), process.env.TEST_FILE_PATH ) .replace(/\//g, '-')}`, `next-trace` ), { recursive: true } ) .catch((e) => { require('console').error(e) }) } if (!process.env.NEXT_TEST_SKIP_CLEANUP) { // Faster than `await fs.rm`. Benchmark before change. rmSync(this.testDir, { recursive: true, force: true }) } require('console').timeEnd(`destroyed next instance`) } catch (err) { require('console').error('Error while destroying', err) } } public get url() { return this._url } public get appPort() { return this._parsedUrl.port } public get buildId(): string { return '' } public get cliOutput(): string { return '' } // TODO: block these in deploy mode public async hasFile(filename: string) { return existsSync(path.join(this.testDir, filename)) } public async readFile(filename: string) { return fs.readFile(path.join(this.testDir, filename), 'utf8') } public async readJSON(filename: string) { return JSON.parse( await fs.readFile(path.join(this.testDir, filename), 'utf-8') ) } public async patchFile( filename: string, content: string | ((content: string) => string), runWithTempContent?: (context: { newFile: boolean }) => Promise<void> ): Promise<{ newFile: boolean }> { const outputPath = path.join(this.testDir, filename) const newFile = !existsSync(outputPath) await fs.mkdir(path.dirname(outputPath), { recursive: true }) const previousContent = newFile ? undefined : await this.readFile(filename) await fs.writeFile( outputPath, typeof content === 'function' ? content(previousContent) : content ) if (runWithTempContent) { try { await runWithTempContent({ newFile }) } finally { if (previousContent === undefined) { await fs.rm(outputPath) } else { await fs.writeFile(outputPath, previousContent) } } } return { newFile } } public async patchFileFast(filename: string, content: string) { const outputPath = path.join(this.testDir, filename) await fs.writeFile(outputPath, content) } public async renameFile(filename: string, newFilename: string) { await fs.rename( path.join(this.testDir, filename), path.join(this.testDir, newFilename) ) } public async renameFolder(foldername: string, newFoldername: string) { await fs.rename( path.join(this.testDir, foldername), path.join(this.testDir, newFoldername) ) } public async deleteFile(filename: string) { await fs.rm(path.join(this.testDir, filename), { recursive: true, force: true, }) } /** * Create new browser window for the Next.js app. */ public async browser( ...args: Parameters<OmitFirstArgument<typeof webdriver>> ): Promise<BrowserInterface> { return webdriver(this.url, ...args) } /** * Fetch the HTML for the provided page. This is a shortcut for `renderViaHTTP().then(html => cheerio.load(html))`. */ public async render$( ...args: Parameters<OmitFirstArgument<typeof renderViaHTTP>> ): Promise<ReturnType<typeof cheerio.load>> { const html = await renderViaHTTP(this.url, ...args) return cheerio.load(html) } /** * Fetch the HTML for the provided page. This is a shortcut for `fetchViaHTTP().then(res => res.text())`. */ public async render( ...args: Parameters<OmitFirstArgument<typeof renderViaHTTP>> ) { return renderViaHTTP(this.url, ...args) } /** * Performs a fetch request to the NextInstance with the options provided. * * @param pathname the pathname on the NextInstance to fetch * @param opts the optional options to pass to the underlying fetch * @returns the fetch response */ public async fetch( pathname: string, opts?: import('node-fetch').RequestInit ) { return fetchViaHTTP(this.url, pathname, null, opts) } public on(event: Event, cb: (...args: any[]) => any) { if (!this.events[event]) { this.events[event] = new Set() } this.events[event].add(cb) } public off(event: Event, cb: (...args: any[]) => any) { this.events[event]?.delete(cb) } protected emit(event: Event, args: any[]) { this.events[event]?.forEach((cb) => { cb(...args) }) } } ```
/content/code_sandbox/test/lib/next-modes/base.ts
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
4,143
```xml import "@tsed/ajv"; import {BodyParams, Configuration, Controller, Get, PlatformTest} from "@tsed/common"; import {JsonMapperSettings} from "@tsed/json-mapper"; import {PlatformExpress} from "@tsed/platform-express"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {getSpec, Groups, Post, Property, Required, Returns, SpecTypes} from "@tsed/schema"; import bodyParser from "body-parser"; import compress from "compression"; import cookieParser from "cookie-parser"; import methodOverride from "method-override"; import SuperTest from "supertest"; const rootDir = __dirname; // automatically replaced by import.meta.dirname on build class MyModel { @Groups("!creation") id: string; @Groups("group.summary") @Required() prop1: string; @Groups("group.extended") @Required() prop2: string; @Property() @Required() prop3: string; constructor(opts: Partial<MyModel>) { Object.assign(this, opts); } } @Controller("/groups") class GroupsIntegrationController { @Get("/scenario-1") @Returns(200, MyModel) scenario1() { return new MyModel({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }); } @Get("/scenario-2") @Returns(200, MyModel).Groups("summary") scenario2() { return new MyModel({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }); } @Get("/scenario-3") @Returns(200, MyModel).Groups("creation") scenario3() { return new MyModel({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }); } @Post("/scenario-4") scenario4(@BodyParams() model: MyModel) { return {...model}; } @Post("/scenario-5") scenario5(@BodyParams() @Groups("group.summary") model: MyModel) { return {...model}; } @Post("/scenario-6") @Returns(201, MyModel) scenario6(@BodyParams() model: MyModel) { return model; } } @Configuration({ port: 8081, middlewares: [cookieParser(), compress({}), methodOverride(), bodyParser.json()], mount: { "/rest": [GroupsIntegrationController] } }) export class Server {} const utils = PlatformTestSdk.create({ rootDir, platform: PlatformExpress, server: Server, logger: { level: "off" } }); describe("Groups", () => { let request: SuperTest.Agent; describe("jsonMapper.strictGroups = false", () => { beforeEach( utils.bootstrap({ jsonMapper: { disableUnsecureConstructor: true } }) ); beforeEach(() => { request = SuperTest(PlatformTest.callback()); }); afterEach(utils.reset); describe("OS3", () => { it("should return open spec", () => { const response = getSpec(GroupsIntegrationController, {specType: SpecTypes.OPENAPI}); expect(response).toEqual({ components: { schemas: { MyModel: { properties: { id: { type: "string" }, prop3: { minLength: 1, type: "string" } }, required: ["prop3"], type: "object" }, MyModelCreation: { properties: { prop3: { minLength: 1, type: "string" } }, required: ["prop3"], type: "object" }, MyModelGroupSummary: { properties: { id: { type: "string" }, prop1: { minLength: 1, type: "string" }, prop3: { minLength: 1, type: "string" } }, required: ["prop1", "prop3"], type: "object" }, MyModelSummary: { properties: { id: { type: "string" }, prop3: { minLength: 1, type: "string" } }, required: ["prop3"], type: "object" } } }, paths: { "/groups/scenario-1": { get: { operationId: "groupsIntegrationControllerScenario1", parameters: [], responses: { "200": { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModel" } } }, description: "Success" } }, tags: ["GroupsIntegrationController"] } }, "/groups/scenario-2": { get: { operationId: "groupsIntegrationControllerScenario2", parameters: [], responses: { "200": { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModelSummary" } } }, description: "Success" } }, tags: ["GroupsIntegrationController"] } }, "/groups/scenario-3": { get: { operationId: "groupsIntegrationControllerScenario3", parameters: [], responses: { "200": { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModelCreation" } } }, description: "Success" } }, tags: ["GroupsIntegrationController"] } }, "/groups/scenario-4": { post: { operationId: "groupsIntegrationControllerScenario4", parameters: [], requestBody: { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModel" } } }, required: false }, responses: { "200": { description: "Success" } }, tags: ["GroupsIntegrationController"] } }, "/groups/scenario-5": { post: { operationId: "groupsIntegrationControllerScenario5", parameters: [], requestBody: { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModelGroupSummary" } } }, required: false }, responses: { "200": { description: "Success" } }, tags: ["GroupsIntegrationController"] } }, "/groups/scenario-6": { post: { operationId: "groupsIntegrationControllerScenario6", parameters: [], requestBody: { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModel" } } }, required: false }, responses: { "201": { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModel" } } }, description: "Created" } }, tags: ["GroupsIntegrationController"] } } }, tags: [ { name: "GroupsIntegrationController" } ] }); }); }); describe("scenario: 1", () => { it("should returns only props that not decorated by Groups or Groups with negative rule)", async () => { const response = await request.get(`/rest/groups/scenario-1`).expect(200); expect(response.body).toEqual({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }); }); }); describe("scenario: 2", () => { it("should returns only props that match the groups rules", async () => { const response = await request.get(`/rest/groups/scenario-2`).expect(200); expect(response.body).toEqual({ id: "id", prop3: "prop3" }); }); }); describe("scenario: 3", () => { it("should returns only props that match the groups (negative condition)", async () => { const response = await request.get(`/rest/groups/scenario-3`).expect(200); expect(response.body).toEqual({ prop3: "prop3" }); }); }); describe("scenario: 4", () => { it("should post data with all field", async () => { const response = await request .post(`/rest/groups/scenario-4`) .send({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }) .expect(200); expect(response.body).toEqual({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }); }); }); describe("scenario: 5", () => { it("should post data with defined groups rules", async () => { const response = await request .post(`/rest/groups/scenario-5`) .send({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }) .expect(200); expect(response.body).toEqual({ id: "id", prop1: "prop1", prop3: "prop3" }); }); }); describe("scenario: 6", () => { it("should post data with default groups rules", async () => { const response = await request .post(`/rest/groups/scenario-6`) .send({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }) .expect(201); expect(response.body).toEqual({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }); }); }); }); describe("jsonMapper.strictGroups = true", () => { beforeEach( utils.bootstrap({ jsonMapper: { disableUnsecureConstructor: true, strictGroups: true } }) ); beforeEach(() => { request = SuperTest(PlatformTest.callback()); }); afterEach(utils.reset); afterEach(() => { JsonMapperSettings.strictGroups = false; }); describe("OS3", () => { it("should return open spec", () => { const response = getSpec(GroupsIntegrationController, {specType: SpecTypes.OPENAPI}); expect(response).toEqual({ components: { schemas: { MyModel: { properties: { id: { type: "string" }, prop3: { minLength: 1, type: "string" } }, required: ["prop3"], type: "object" }, MyModelCreation: { properties: { prop3: { minLength: 1, type: "string" } }, required: ["prop3"], type: "object" }, MyModelGroupSummary: { properties: { id: { type: "string" }, prop1: { minLength: 1, type: "string" }, prop3: { minLength: 1, type: "string" } }, required: ["prop1", "prop3"], type: "object" }, MyModelSummary: { properties: { id: { type: "string" }, prop3: { minLength: 1, type: "string" } }, required: ["prop3"], type: "object" } } }, paths: { "/groups/scenario-1": { get: { operationId: "groupsIntegrationControllerScenario1", parameters: [], responses: { "200": { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModel" } } }, description: "Success" } }, tags: ["GroupsIntegrationController"] } }, "/groups/scenario-2": { get: { operationId: "groupsIntegrationControllerScenario2", parameters: [], responses: { "200": { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModelSummary" } } }, description: "Success" } }, tags: ["GroupsIntegrationController"] } }, "/groups/scenario-3": { get: { operationId: "groupsIntegrationControllerScenario3", parameters: [], responses: { "200": { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModelCreation" } } }, description: "Success" } }, tags: ["GroupsIntegrationController"] } }, "/groups/scenario-4": { post: { operationId: "groupsIntegrationControllerScenario4", parameters: [], requestBody: { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModel" } } }, required: false }, responses: { "200": { description: "Success" } }, tags: ["GroupsIntegrationController"] } }, "/groups/scenario-5": { post: { operationId: "groupsIntegrationControllerScenario5", parameters: [], requestBody: { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModelGroupSummary" } } }, required: false }, responses: { "200": { description: "Success" } }, tags: ["GroupsIntegrationController"] } }, "/groups/scenario-6": { post: { operationId: "groupsIntegrationControllerScenario6", parameters: [], requestBody: { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModel" } } }, required: false }, responses: { "201": { content: { "application/json": { schema: { $ref: "#/components/schemas/MyModel" } } }, description: "Created" } }, tags: ["GroupsIntegrationController"] } } }, tags: [ { name: "GroupsIntegrationController" } ] }); }); }); describe("scenario: 1", () => { it("should returns only props that not decorated by Groups or Groups with negative rule)", async () => { const response = await request.get(`/rest/groups/scenario-1`).expect(200); expect(response.body).toEqual({ id: "id", prop3: "prop3" }); }); }); describe("scenario: 2", () => { it("should returns only props that match the groups rules", async () => { const response = await request.get(`/rest/groups/scenario-2`).expect(200); expect(response.body).toEqual({ id: "id", prop3: "prop3" }); }); }); describe("scenario: 3", () => { it("should returns only props that match the groups (negative condition)", async () => { const response = await request.get(`/rest/groups/scenario-3`).expect(200); expect(response.body).toEqual({ prop3: "prop3" }); }); }); describe("scenario: 4", () => { it("should post data with all field", async () => { const response = await request .post(`/rest/groups/scenario-4`) .send({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }) .expect(200); expect(response.body).toEqual({ id: "id", prop3: "prop3" }); }); }); describe("scenario: 5", () => { it("should post data with defined groups rules", async () => { const response = await request .post(`/rest/groups/scenario-5`) .send({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }) .expect(200); expect(response.body).toEqual({ id: "id", prop1: "prop1", prop3: "prop3" }); }); }); describe("scenario: 6", () => { it("should post data with default groups rules", async () => { const response = await request .post(`/rest/groups/scenario-6`) .send({ id: "id", prop1: "prop1", prop2: "prop2", prop3: "prop3" }) .expect(201); expect(response.body).toEqual({ id: "id", prop3: "prop3" }); }); }); }); }); ```
/content/code_sandbox/packages/platform/common/test/integration/groups.spec.ts
xml
2016-02-21T18:38:47
2024-08-14T21:19:48
tsed
tsedio/tsed
2,817
3,872
```xml import { bind } from 'decko'; import * as R from 'ramda'; import { ApolloClient, gql } from 'apollo-boost'; import * as graphqlGlobalTypes from 'graphql-types/graphql-global-types'; import { ISearchSettings, Entities, ExperimentResult, ExperimentRunResult, ProjectResult, DatasetResult, EntitiesBySearchFields, IResult, getEntitiesBySearchFields, filterMapEntitiesBySearchFields, RepositoryResult, } from 'shared/models/HighLevelSearch'; import { BaseDataService } from 'services/BaseDataService'; import { IPaginationSettings, DataWithPagination, IPagination, } from 'shared/models/Pagination'; import { ProjectDataService } from 'services/projects'; import { IWorkspace } from 'shared/models/Workspace'; import { makeDefaultTagFilter, IStringFilterData, makeDefaultNameFilter, } from 'shared/models/Filters'; import { ExperimentRunsDataService } from 'services/experimentRuns'; import { ExperimentsDataService } from 'services/experiments'; import { exhaustiveCheck } from 'shared/utils/exhaustiveCheck'; import { RecordFromUnion, RecordValues } from 'shared/utils/types'; import { DatasetsDataService } from 'services/datasets'; import { ISorting } from 'shared/models/Sorting'; import matchType from 'shared/utils/matchType'; import { getServerFilterOperator } from 'services/serverModel/Filters/Filters'; import * as graphqlTypes from './graphql-types/RepositoriesResult'; import { paginationSettings } from 'features/highLevelSearch/constants'; export type ILoadEntitiesByTypeResult = RecordValues< RecordFromUnion< Entities, { projects: { type: 'projects'; data: EntitiesBySearchFields<ProjectResult>; }; experiments: { type: 'experiments'; data: EntitiesBySearchFields<ExperimentResult>; }; experimentRuns: { type: 'experimentRuns'; data: EntitiesBySearchFields<ExperimentRunResult>; }; datasets: { type: 'datasets'; data: EntitiesBySearchFields<DatasetResult>; }; repositories: { type: 'repositories'; data: EntitiesBySearchFields<RepositoryResult>; }; } > >; export default class HighLevelSearchService extends BaseDataService { private apolloClient: ApolloClient<any>; constructor(apolloClient: ApolloClient<any>) { super(); this.apolloClient = apolloClient; } @bind public async loadFullEntitiesByType( settings: ILoadEntitiesSettings ): Promise<ILoadEntitiesByTypeResult> { const type = settings.searchSettings.type; switch (type) { case 'projects': { const data = await this.loadProjectsBySearchFields(settings); const res: ILoadEntitiesByTypeResult = { type, data, }; return res; } case 'experimentRuns': { const experimentRunsBySearchFields = await this.loadExperimentRunsBySearchFields( settings ); const projectsOfRunsPromise = new ProjectDataService().loadShortProjectsByIds( settings.workspaceName, R.uniq( getEntitiesBySearchFields(experimentRunsBySearchFields).map( ({ projectId }) => projectId ) ) ); const experimentsOfRunsPromise = new ExperimentsDataService().loadExperimentsByIdsAndWorkspace( settings.workspaceName, R.uniq( getEntitiesBySearchFields(experimentRunsBySearchFields).map( ({ experimentId }) => experimentId ) ) ); const [projectsOfRuns, experimentsOfRuns] = await Promise.all([ projectsOfRunsPromise, experimentsOfRunsPromise, ]); const experimentRunsResults = filterMapEntitiesBySearchFields( expRun => { const project = projectsOfRuns.find(p => p.id === expRun.projectId); const experiment = experimentsOfRuns.find( e => e.id === expRun.experimentId ); if (project && experiment) { const res: ExperimentRunResult = { entityType: 'experimentRun', ...expRun, experiment, project, }; return res; } return undefined; }, experimentRunsBySearchFields ); const res: ILoadEntitiesByTypeResult = { type, data: experimentRunsResults, }; return res; } case 'experiments': { const experimentsBySearchFields = await this.loadExperimentsBySeachFields( settings ); const projectsOfRuns = await new ProjectDataService().loadShortProjectsByIds( settings.workspaceName, R.uniq( getEntitiesBySearchFields(experimentsBySearchFields).map( ({ projectId }) => projectId ) ) ); const experimentResults = filterMapEntitiesBySearchFields( experiment => { const project = projectsOfRuns.find( p => p.id === experiment.projectId ); if (project) { const res: ExperimentResult = { entityType: 'experiment', ...experiment, project, }; return res; } return undefined; }, experimentsBySearchFields ); const res: ILoadEntitiesByTypeResult = { type, data: experimentResults, }; return res; } case 'datasets': { const datasets = await this.loadDatasetsBySearchFields(settings); const res: ILoadEntitiesByTypeResult = { type, data: datasets, }; return res; } case 'repositories': { const repositories = await this.loadRepositoriesBySearchFields( settings ); const res: ILoadEntitiesByTypeResult = { type: 'repositories', data: repositories, }; return res; } default: return exhaustiveCheck(type, ''); } } @bind public async loadFullEntitiesByTypeAndUpdateOthersCounts( handlers: { onSuccess: (res: ILoadEntitiesByTypeResult) => void; onError: (error: Error) => void; }, settings: ILoadEntitiesSettings, isEnableRepositories: boolean ) { const entitiesCountLoaders: { [K in Entities]: ( settings: ILoadEntitiesSettings ) => Promise<{ totalCount: number }> } = { projects: this.loadProjectsBySearchFields, experiments: this.loadExperimentsBySeachFields, datasets: this.loadDatasetsBySearchFields, repositories: this.loadRepositoriesBySearchFields, experimentRuns: this.loadExperimentRunsBySearchFields, }; const promises = moveFirstItem( ([entityType]) => settings.searchSettings.type === entityType, 0, Object.entries(entitiesCountLoaders) ) .filter(([entityType, loadEntitiesCount]) => isEnableRepositories ? true : entityType !== 'repositories' ) .map(([entityType, loadEntitiesCount]) => { return entityType === settings.searchSettings.type ? this.loadFullEntitiesByType(settings) .then(({ type, data }) => handlers.onSuccess({ type, data } as ILoadEntitiesByTypeResult) ) .catch(handlers.onError) : loadEntitiesCount(settings) .then(data => handlers.onSuccess({ type: entityType, data, } as ILoadEntitiesByTypeResult) ) .catch(handlers.onError); }); await Promise.all(promises); } private loadProjectsBySearchFields = this.makeLoadEntitiesBySearchFields( 'project', (filters, pagination, workspaceName, sorting) => new ProjectDataService().loadProjects( filters, pagination, workspaceName, sorting ) ); private loadExperimentsBySeachFields = this.makeLoadEntitiesBySearchFields( 'experiment', (filters, pagination, workspaceName, sorting) => new ExperimentsDataService().loadExperimentsByWorkspace( filters, pagination, workspaceName, sorting ) ); private loadExperimentRunsBySearchFields = this.makeLoadEntitiesBySearchFields( 'experimentRun', (filters, pagination, workspaceName, sorting) => new ExperimentRunsDataService().loadExperimentRunsByWorkspace( workspaceName, filters, pagination, sorting, false ) ); private loadDatasetsBySearchFields = this.makeLoadEntitiesBySearchFields( 'dataset', (filters, pagination, workspaceName) => new DatasetsDataService().loadDatasets(filters, pagination, workspaceName) ); private loadRepositoriesBySearchFields = this.makeLoadEntitiesBySearchFields( 'repository', async (filters, pagination, workspaceName) => { const convertFilters = ( filters: IStringFilterData[] ): graphqlGlobalTypes.StringPredicate[] => { return filters.map(filter => { const res: graphqlGlobalTypes.StringPredicate = { key: filter.name === 'tags' ? 'labels' : filter.name, operator: (getServerFilterOperator( filter ) as any) as graphqlGlobalTypes.StringPredicate['operator'], value: filter.value, }; return res; }); }; const response = await this.apolloClient.query< graphqlTypes.RepositoriesResult, graphqlTypes.RepositoriesResultVariables >({ query: REPOSITORIES_RESULT, fetchPolicy: 'network-only', variables: { workspaceName, filters: convertFilters(filters), pagination: { limit: pagination.pageSize, page: pagination.currentPage, }, }, }); if (!response.data.workspace || (response.errors || []).length > 0) { return { totalCount: 0, data: [] }; } return { data: response.data.workspace.repositories.repositories.map( repository => ({ ...repository, entityType: 'repository' as const, dateCreated: new Date(Number(repository.dateCreated)), dateUpdated: new Date(Number(repository.dateUpdated)), }) ), totalCount: response.data.workspace.repositories.pagination.totalRecords, }; } ); private makeLoadEntitiesBySearchFields< E extends IResult['entityType'], T extends { id: string } >( entityType: E, f: ( filters: IStringFilterData[], pagination: IPagination, workspaceName: IWorkspace['name'], sorting: ISorting | undefined ) => Promise<DataWithPagination<T>> ) { return async ( settings: ILoadEntitiesSettings ): Promise<Required<EntitiesBySearchFields<T & { entityType: E }>>> => { const entitiesByTypes = await this.loadEntitiesBySearchFields( f, settings ); return this.getDisplayedEntitiesBySearchFields({ entityType, ...entitiesByTypes, }); }; } private async loadEntitiesBySearchFields<T extends { id: string }>( f: ( filters: IStringFilterData[], pagination: IPagination, workspaceName: IWorkspace['name'], sorting: ISorting | undefined ) => Promise<DataWithPagination<T>>, settings: ILoadEntitiesSettings ) { const pagination = { ...settings.pagination, totalCount: 0 }; const sorting = settings.searchSettings.sorting ? { direction: settings.searchSettings.sorting.direction, columnName: undefined, fieldName: matchType( { dateCreated: () => 'date_created', dateUpdated: () => 'date_updated', }, settings.searchSettings.sorting.field ), } : undefined; const entitiesByNamesPromise = f( settings.searchSettings.nameOrTag ? [makeDefaultNameFilter(settings.searchSettings.nameOrTag, 'LIKE')] : [], pagination, settings.workspaceName, sorting ).catch(() => ({ totalCount: 0, data: [] as T[] })); const entitiesByTagsPromise = settings.searchSettings.nameOrTag ? f( settings.searchSettings.nameOrTag ? [makeDefaultTagFilter(settings.searchSettings.nameOrTag, 'LIKE')] : [], pagination, settings.workspaceName, sorting ).catch(() => ({ totalCount: 0, data: [] as T[] })) : Promise.resolve({ totalCount: 0, data: [] as T[] }); const [entitiesByNames, entitiesByTags] = await Promise.all([ entitiesByNamesPromise, entitiesByTagsPromise, ]); return { entitiesByNames, entitiesByTags, }; } private getDisplayedEntitiesBySearchFields< T extends { id: string }, E extends IResult['entityType'] >({ entityType, entitiesByNames, entitiesByTags, }: { entityType: E; entitiesByNames: DataWithPagination<T>; entitiesByTags: DataWithPagination<T>; }) { if ( Math.max(entitiesByNames.totalCount, entitiesByTags.totalCount) <= paginationSettings.pageSize ) { const entitiesByNameWithoutEntityByTag = entitiesByNames.data .filter(x => entitiesByTags.data.every(entityByTag => entityByTag.id !== x.id) ) .map(x => ({ ...x, entityType })); const res = { totalCount: entitiesByNameWithoutEntityByTag.length + entitiesByTags.totalCount, data: { tag: entitiesByTags.data.map(x => ({ ...x, entityType })), name: entitiesByNameWithoutEntityByTag, }, }; return res; } const res = { totalCount: entitiesByNames.totalCount + entitiesByTags.totalCount, data: { name: entitiesByNames.data.map(x => ({ ...x, entityType })), tag: entitiesByTags.data.map(x => ({ ...x, entityType })), }, }; return res; } } const REPOSITORIES_RESULT = gql` query RepositoriesResult( $workspaceName: String! $filters: [StringPredicate!]! $pagination: PaginationQuery! ) { workspace(name: $workspaceName) { name repositories( query: { stringPredicates: $filters, pagination: $pagination } ) { repositories { id name owner { username } dateCreated dateUpdated labels } pagination { totalRecords } } } } `; export interface ILoadEntitiesSettings { workspaceName: IWorkspace['name']; pagination: IPaginationSettings; searchSettings: ISearchSettings; } const moveFirstItem = <T>( pred: (item: T) => Boolean, to: number, items: T[] ): T[] => { const targetItemIndex = items.findIndex(pred); return R.move(targetItemIndex, to, items); }; ```
/content/code_sandbox/webapp/client/src/services/highLevelSearch/HighLevelSearchService.ts
xml
2016-10-19T01:07:26
2024-08-14T03:53:55
modeldb
VertaAI/modeldb
1,689
3,160
```xml /// /// /// /// path_to_url /// /// Unless required by applicable law or agreed to in writing, software /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// import { Injectable } from '@angular/core'; import { defaultHttpOptionsFromConfig, RequestConfig } from './http-utils'; import { forkJoin, Observable, of } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { EntityId } from '@shared/models/id/entity-id'; import { AttributeData, AttributeScope, DataSortOrder, TimeseriesData } from '@shared/models/telemetry/telemetry.models'; import { isDefinedAndNotNull } from '@core/utils'; import { AggregationType } from '@shared/models/time/time.models'; @Injectable({ providedIn: 'root' }) export class AttributeService { constructor( private http: HttpClient ) { } public getEntityAttributes(entityId: EntityId, attributeScope?: AttributeScope, keys?: Array<string>, config?: RequestConfig): Observable<Array<AttributeData>> { let url = `/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/values/attributes`; if (attributeScope) { url += `/${attributeScope}`; } if (keys && keys.length) { url += `?keys=${keys.join(',')}`; } return this.http.get<Array<AttributeData>>(url, defaultHttpOptionsFromConfig(config)); } public deleteEntityAttributes(entityId: EntityId, attributeScope: AttributeScope, attributes: Array<AttributeData>, config?: RequestConfig): Observable<any> { const keys = attributes.map(attribute => encodeURIComponent(attribute.key)).join(','); return this.http.delete(`/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/${attributeScope}` + `?keys=${keys}`, defaultHttpOptionsFromConfig(config)); } public deleteEntityTimeseries(entityId: EntityId, timeseries: Array<AttributeData>, deleteAllDataForKeys = false, startTs?: number, endTs?: number, rewriteLatestIfDeleted = false, deleteLatest = true, config?: RequestConfig): Observable<any> { const keys = timeseries.map(attribute => encodeURIComponent(attribute.key)).join(','); let url = `/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/timeseries/delete?keys=${keys}`; if (isDefinedAndNotNull(deleteAllDataForKeys)) { url += `&deleteAllDataForKeys=${deleteAllDataForKeys}`; } if (isDefinedAndNotNull(rewriteLatestIfDeleted)) { url += `&rewriteLatestIfDeleted=${rewriteLatestIfDeleted}`; } if (isDefinedAndNotNull(deleteLatest)) { url += `&deleteLatest=${deleteLatest}`; } if (isDefinedAndNotNull(startTs)) { url += `&startTs=${startTs}`; } if (isDefinedAndNotNull(endTs)) { url += `&endTs=${endTs}`; } return this.http.delete(url, defaultHttpOptionsFromConfig(config)); } public saveEntityAttributes(entityId: EntityId, attributeScope: AttributeScope, attributes: Array<AttributeData>, config?: RequestConfig): Observable<any> { const attributesData: {[key: string]: any} = {}; const deleteAttributes: AttributeData[] = []; attributes.forEach((attribute) => { if (isDefinedAndNotNull(attribute.value)) { attributesData[attribute.key] = attribute.value; } else { deleteAttributes.push(attribute); } }); let deleteEntityAttributesObservable: Observable<any>; if (deleteAttributes.length) { deleteEntityAttributesObservable = this.deleteEntityAttributes(entityId, attributeScope, deleteAttributes, config); } else { deleteEntityAttributesObservable = of(null); } let saveEntityAttributesObservable: Observable<any>; if (Object.keys(attributesData).length) { saveEntityAttributesObservable = this.http.post(`/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/${attributeScope}`, attributesData, defaultHttpOptionsFromConfig(config)); } else { saveEntityAttributesObservable = of(null); } return forkJoin([saveEntityAttributesObservable, deleteEntityAttributesObservable]); } public saveEntityTimeseries(entityId: EntityId, timeseriesScope: string, timeseries: Array<AttributeData>, config?: RequestConfig): Observable<any> { const timeseriesData: {[key: string]: any} = {}; const deleteTimeseries: AttributeData[] = []; timeseries.forEach((attribute) => { if (isDefinedAndNotNull(attribute.value)) { timeseriesData[attribute.key] = attribute.value; } else { deleteTimeseries.push(attribute); } }); let deleteEntityTimeseriesObservable: Observable<any>; if (deleteTimeseries.length) { deleteEntityTimeseriesObservable = this.deleteEntityTimeseries(entityId, deleteTimeseries, true, null, null, false, true, config); } else { deleteEntityTimeseriesObservable = of(null); } let saveEntityTimeseriesObservable: Observable<any>; if (Object.keys(timeseriesData).length) { saveEntityTimeseriesObservable = this.http.post(`/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/timeseries/${timeseriesScope}`, timeseriesData, defaultHttpOptionsFromConfig(config)); } else { saveEntityTimeseriesObservable = of(null); } return forkJoin([saveEntityTimeseriesObservable, deleteEntityTimeseriesObservable]); } public getEntityTimeseries(entityId: EntityId, keys: Array<string>, startTs: number, endTs: number, limit: number = 100, agg: AggregationType = AggregationType.NONE, interval?: number, orderBy: DataSortOrder = DataSortOrder.DESC, useStrictDataTypes: boolean = false, config?: RequestConfig): Observable<TimeseriesData> { let url = `/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/values/timeseries?keys=${keys.join(',')}&startTs=${startTs}&endTs=${endTs}`; if (isDefinedAndNotNull(limit)) { url += `&limit=${limit}`; } if (isDefinedAndNotNull(agg)) { url += `&agg=${agg}`; } if (isDefinedAndNotNull(interval)) { url += `&interval=${interval}`; } if (isDefinedAndNotNull(orderBy)) { url += `&orderBy=${orderBy}`; } if (isDefinedAndNotNull(useStrictDataTypes)) { url += `&useStrictDataTypes=${useStrictDataTypes}`; } return this.http.get<TimeseriesData>(url, defaultHttpOptionsFromConfig(config)); } public getEntityTimeseriesLatest(entityId: EntityId, keys?: Array<string>, useStrictDataTypes = false, config?: RequestConfig): Observable<TimeseriesData> { let url = `/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/values/timeseries?useStrictDataTypes=${useStrictDataTypes}`; if (isDefinedAndNotNull(keys) && keys.length) { url += `&keys=${keys.join(',')}`; } return this.http.get<TimeseriesData>(url, defaultHttpOptionsFromConfig(config)); } } ```
/content/code_sandbox/ui-ngx/src/app/core/http/attribute.service.ts
xml
2016-12-01T09:33:30
2024-08-16T19:58:25
thingsboard
thingsboard/thingsboard
16,820
1,562
```xml // @ts-nocheck /* eslint-disable */ // Vue // import Vue from 'vue' // Directives // import Color from '../' // Utilities import { mount, Wrapper, } from '@vue/test-utils' describe.skip('color.ts', () => { let mountFunction: () => Wrapper<Vue> beforeEach(() => { mountFunction = (directive = {}) => { return mount(Vue.component('test', { directives: { Color }, data: () => ({ color: '', }), render (h) { return h('div', { directives: [{ ...directive, value: this.color, }], }) }, }), { mocks: { $vuetify: { theme: { currentTheme: { primary: '#1976d2', }, }, }, }, }) } }) it('should set background color', async () => { const wrapper = mountFunction({ name: 'color', }) wrapper.setData({ color: '#01f' }) expect(wrapper.element.style.backgroundColor).toEqual('rgb(0, 17, 255)') expect(wrapper.element.style.borderColor).toEqual('#01f') wrapper.setData({ color: 'rgb(255, 255, 0)' }) expect(wrapper.element.style.backgroundColor).toEqual('rgb(255, 255, 0)') expect(wrapper.element.style.borderColor).toEqual('rgb(255, 255, 0)') wrapper.setData({ color: 'red' }) expect(wrapper.element.style.backgroundColor).toEqual('rgb(244, 67, 54)') expect(wrapper.element.style.borderColor).toEqual('#f44336') wrapper.setData({ color: 'red lighten-1' }) expect(wrapper.element.style.backgroundColor).toEqual('rgb(239, 83, 80)') expect(wrapper.element.style.borderColor).toEqual('#ef5350') wrapper.setData({ color: 'primary' }) expect(wrapper.element.style.backgroundColor).toEqual('rgb(25, 118, 210)') expect(wrapper.element.style.borderColor).toEqual('#1976d2') }) it('should set text color', async () => { const wrapper = mountFunction({ name: 'color', arg: 'text', }) wrapper.setData({ color: '#01f' }) expect(wrapper.element.style.color).toEqual('rgb(0, 17, 255)') expect(wrapper.element.style.caretColor).toEqual('#01f') wrapper.setData({ color: 'rgba(0, 1, 2, 0.5)' }) expect(wrapper.element.style.color).toEqual('rgba(0, 1, 2, 0.5)') expect(wrapper.element.style.caretColor).toEqual('rgba(0, 1, 2, 0.5)') wrapper.setData({ color: 'red' }) expect(wrapper.element.style.color).toEqual('rgb(244, 67, 54)') expect(wrapper.element.style.caretColor).toEqual('#f44336') wrapper.setData({ color: 'red lighten-1' }) expect(wrapper.element.style.color).toEqual('rgb(239, 83, 80)') expect(wrapper.element.style.caretColor).toEqual('#ef5350') wrapper.setData({ color: 'primary' }) expect(wrapper.element.style.color).toEqual('rgb(25, 118, 210)') expect(wrapper.element.style.caretColor).toEqual('#1976d2') }) it('should set border color', async () => { const wrapper = mountFunction({ name: 'color', arg: 'border', }) wrapper.setData({ color: '#01f' }) expect(wrapper.element.style.borderColor).toEqual('#01f') wrapper.setData({ color: 'rgb(255, 255, 0)' }) expect(wrapper.element.style.borderColor).toEqual('rgb(255, 255, 0)') wrapper.setData({ color: 'red' }) expect(wrapper.element.style.borderColor).toEqual('#f44336') wrapper.setData({ color: 'red lighten-1' }) expect(wrapper.element.style.borderColor).toEqual('#ef5350') wrapper.setData({ color: 'primary' }) expect(wrapper.element.style.borderColor).toEqual('#1976d2') }) it('should respect border sides modifiers', async () => { const wrapper = mountFunction({ name: 'color', arg: 'border', modifiers: { top: true, right: true, left: true }, }) wrapper.setData({ color: '#fff' }) expect(wrapper.element.style.borderTopColor).toEqual('#fff') expect(wrapper.element.style.borderRightColor).toEqual('#fff') expect(wrapper.element.style.borderLeftColor).toEqual('#fff') expect(wrapper.element.style.borderBottomColor).toEqual('') expect(wrapper.element.style.borderColor).toEqual('') }) }) ```
/content/code_sandbox/packages/vuetify/src/directives/color/__tests__/color.spec.ts
xml
2016-09-12T00:39:35
2024-08-16T20:06:39
vuetify
vuetifyjs/vuetify
39,539
1,029
```xml <?xml version="1.0" encoding="UTF-8"?> <definitions id="processDefinitions" xmlns="path_to_url" xmlns:activiti="path_to_url" targetNamespace="processDefinitions"> <process id="waiter"> <startEvent id="start"/> <sequenceFlow id="flow1" sourceRef="start" targetRef="service1"/> <scriptTask id="service1" scriptFormat="groovy" > <script> println 'customerId='+ customerId </script> </scriptTask> <sequenceFlow id="flow2" sourceRef="service1" targetRef="theTask"/> <userTask name="Test task" id="theTask"></userTask> <sequenceFlow id="flow3" sourceRef="theTask" targetRef="end"/> <endEvent id="end"/> </process> </definitions> ```
/content/code_sandbox/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-actuator/src/main/resources/processes/waiter.bpmn20.xml
xml
2016-10-13T07:21:43
2024-08-16T15:23:14
flowable-engine
flowable/flowable-engine
7,715
192
```xml <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="path_to_url"> <ItemGroup> </ItemGroup> <ItemGroup> </ItemGroup> </Project> ```
/content/code_sandbox/deps/boost_1_66_0/libs/qvm/bld/test/swizzle2_fail2.vcxproj.filters
xml
2016-09-05T10:18:44
2024-08-11T13:21:40
LiquidCore
LiquidPlayer/LiquidCore
1,010
52
```xml <?xml version="1.0" encoding="utf-8"?> <!--EXPORTED BY TOOL, DON'T MODIFY IT!--> <!--Source File: SelectBT.xml--> <behavior name="SelectBT" agenttype="FirstAgent" version="5"> <node class="Sequence" id="3"> <node class="Assignment" id="4"> <property CastRight="false" /> <property Opl="int Self.FirstAgent::p1" /> <property Opr="const int 6" /> </node> <node class="Selector" id="1"> <node class="Condition" id="2"> <property Operator="Greater" /> <property Opl="int Self.FirstAgent::p1" /> <property Opr="const int 8" /> </node> <node class="Action" id="0"> <property Method="Self.FirstAgent::SayHello()" /> <property ResultOption="BT_SUCCESS" /> </node> </node> </node> </behavior> ```
/content/code_sandbox/tutorials/tutorial_2/cs/exported/SelectBT.xml
xml
2016-11-21T05:08:08
2024-08-16T07:18:30
behaviac
Tencent/behaviac
2,831
222
```xml import { Cpu, HardDrive } from 'lucide-react'; import { KubernetesSnapshot } from '@/react/portainer/environments/types'; import { humanize } from '@/portainer/filters/filters'; import { addPlural } from '@/portainer/helpers/strings'; import Memory from '@/assets/ico/memory.svg?c'; import { StatsItem } from '@@/StatsItem'; interface Props { snapshot?: KubernetesSnapshot; } export function EnvironmentStatsKubernetes({ snapshot }: Props) { if (!snapshot) { return <>No snapshot available</>; } return ( <> <StatsItem icon={Cpu} value={`${snapshot.TotalCPU} CPU`} /> <StatsItem icon={Memory} value={`${humanize(snapshot.TotalMemory)} RAM`} /> <StatsItem value={addPlural(snapshot.NodeCount, 'node')} icon={HardDrive} /> </> ); } ```
/content/code_sandbox/app/react/portainer/HomeView/EnvironmentList/EnvironmentItem/EnvironmentStatsKubernetes.tsx
xml
2016-05-19T20:15:28
2024-08-16T19:15:14
portainer
portainer/portainer
30,083
197
```xml import { html } from 'lit'; import { customElement, property } from 'lit/decorators.js'; import { booleanConverter } from '@mdui/shared/helpers/decorator.js'; import { componentStyle } from '@mdui/shared/lit-styles/component-style.js'; import { ScrollBehaviorMixin } from '@mdui/shared/mixins/scrollBehavior.js'; import { LayoutItemBase } from '../layout/layout-item-base.js'; import { style } from './style.js'; import type { LayoutPlacement } from '../layout/helper.js'; import type { ScrollPaddingPosition } from '@mdui/shared/mixins/scrollBehavior.js'; import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit'; /** * @summary * * ```html * <mdui-bottom-app-bar> * ..<mdui-button-icon icon="check_box--outlined"></mdui-button-icon> * ..<mdui-button-icon icon="edit--outlined"></mdui-button-icon> * ..<mdui-button-icon icon="mic_none--outlined"></mdui-button-icon> * ..<mdui-button-icon icon="image--outlined"></mdui-button-icon> * ..<div style="flex-grow: 1"></div> * ..<mdui-fab icon="add"></mdui-fab> * </mdui-bottom-app-bar> * ``` * * @event show - `event.preventDefault()` * @event shown - * @event hide - `event.preventDefault()` * @event hidden - * * @slot - * * @cssprop --shape-corner - [](/docs/2/styles/design-tokens#shape-corner) * @cssprop --z-index - CSS `z-index` */ @customElement('mdui-bottom-app-bar') export class BottomAppBar extends ScrollBehaviorMixin( LayoutItemBase, )<BottomAppBarEventMap> { public static override styles: CSSResultGroup = [componentStyle, style]; /** * */ @property({ type: Boolean, reflect: true, converter: booleanConverter, }) public hide = false; /** * [`<mdui-fab>`](/docs/2/components/fab) `true`[`<mdui-fab>`](/docs/2/components/fab) */ @property({ type: Boolean, reflect: true, converter: booleanConverter, attribute: 'fab-detach', }) public fabDetach = false; /** * * * * `hide` */ @property({ reflect: true, attribute: 'scroll-behavior' }) public scrollBehavior?: 'hide'; protected get scrollPaddingPosition(): ScrollPaddingPosition { return 'bottom'; } protected override get layoutPlacement(): LayoutPlacement { return 'bottom'; } protected override firstUpdated(_changedProperties: PropertyValues) { super.firstUpdated(_changedProperties); this.addEventListener('transitionend', (event: TransitionEvent) => { if (event.target === this) { this.emit(this.hide ? 'hidden' : 'shown'); } }); } protected override render(): TemplateResult { return html`<slot></slot>`; } /** * * hide */ protected runScrollThreshold(isScrollingUp: boolean) { // if (!isScrollingUp && !this.hide) { const eventProceeded = this.emit('hide', { cancelable: true }); if (eventProceeded) { this.hide = true; } } // if (isScrollingUp && this.hide) { const eventProceeded = this.emit('show', { cancelable: true }); if (eventProceeded) { this.hide = false; } } } } export interface BottomAppBarEventMap { show: CustomEvent<void>; shown: CustomEvent<void>; hide: CustomEvent<void>; hidden: CustomEvent<void>; } declare global { interface HTMLElementTagNameMap { 'mdui-bottom-app-bar': BottomAppBar; } } ```
/content/code_sandbox/packages/mdui/src/components/bottom-app-bar/index.ts
xml
2016-07-11T17:39:02
2024-08-16T07:12:34
mdui
zdhxiong/mdui
4,077
889
```xml import { QueryResponse } from "../types" interface IStructureCommon { _id: string title: string code: string supervisorId: string supervisor: IUser } export interface IOnboardingHistory { _id: string userId: string isCompleted?: boolean completedSteps: string[] } export interface IEmailSignature { brandId?: string signature?: string } export interface IUserDetailsC { avatar?: string fullName?: string shortName?: string description?: string birthDate?: Date position?: string workStartedDate?: Date location?: string operatorPhone?: string firstName?: string middleName?: string lastName?: string } export interface IUserLinksC { facebook?: string twitter?: string linkedIn?: string youtube?: string github?: string website?: string } export interface IUserConversationC { list: any[] totalCount: number } export interface IUserDocC { createdAt?: Date username: string email: string isActive?: boolean details?: IUserDetails isOwner?: boolean status?: string links?: IUserLinks getNotificationByEmail?: boolean participatedConversations?: IUserConversation[] permissionActions?: any configs?: any configsConstants?: any score?: number branchIds: string[] departmentIds: string[] employeeId?: string } export interface IBrand { _id: string code: string name?: string createdAt: string description?: string emailConfig: { type: string; template: string } } export interface IBranch { _id: string title?: string address?: string } export interface IUserC extends IUserDoc { _id: string brands?: IBrand[] branches?: IBranch[] emailSignatures?: IEmailSignature[] onboardingHistory?: IOnboardingHistory branchIds: string[] departmentIds: string[] customFieldsData?: { [key: string]: any } isShowNotification?: boolean isSubscribed?: boolean details: any } export type AllUsersQueryResponse = { allUsers: IUser[] } & QueryResponse export type UsersQueryResponse = { users: IUser[] } & QueryResponse export type UserDetailQueryResponse = { userDetail: IUser } & QueryResponse export interface IDepartment extends IStructureCommon { description: string parentId?: string | null order: string userIds: string[] userCount: number users: IUser } export type IUser = IUserC & { isSubscribed?: boolean isAdmin?: boolean departments?: IDepartment[] } & { isShowNotification?: boolean } & { customFieldsData?: { [key: string]: any } } export interface IExmAppearance { bodyColor: string footerColor: string headerColor: string primaryColor: string secondaryColor: string } export interface IExmFeature { _id: string contentId: string contentType: string description: string icon: string name: string subContentId: string } export type IExm = { _id: string appearance: IExmAppearance createdAt: Date createdBy: string description: string favicon: JSON features: [IExmFeature] logo: JSON name: string structure: string url: string vision: string webDescription: string webName: string knowledgeBaseLabel?: string knowledgeBaseTopicId?: string ticketLabel?: string ticketPipelineId?: string ticketBoardId?: string } export type IUserDetails = IUserDetailsC export type IUserLinks = IUserLinksC export type IUserConversation = IUserConversationC export type IUserDoc = IUserDocC export interface IOwner { email: string password: string firstName: string lastName?: string purpose: string subscribeEmail?: boolean } export type ForgotPasswordMutationVariables = { email: string callback: (e: Error) => void } export type ForgotPasswordMutationResponse = { forgotPasswordMutation: (params: { variables: ForgotPasswordMutationVariables }) => Promise<any> } export type ResetPasswordMutationVariables = { newPassword: string token: string } export type ResetPasswordMutationResponse = { resetPasswordMutation: (params: { variables: ResetPasswordMutationVariables }) => Promise<any> } export type LoginMutationVariables = { email: string password: string } export type LoginMutationResponse = { loginMutation: (params: { variables: LoginMutationVariables }) => Promise<any> } export type CurrentUserQueryResponse = { currentUser: IUser loading: boolean } export type CreateOwnerMutationResponse = { createOwnerMutation: (params: { variables: IOwner }) => Promise<any> } ```
/content/code_sandbox/exm-web/modules/auth/types.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
1,121
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <androidx.cardview.widget.CardView xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:clickable="true" android:focusable="true" android:foreground="?attr/selectableItemBackground" android:padding="8dp" app:cardElevation="2dp" > <TextView android:id="@+id/demo_title" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:minHeight="96dp" android:textAppearance="@style/TextAppearance.AppCompat.Headline" /> </androidx.cardview.widget.CardView> ```
/content/code_sandbox/app/src/main/res/layout/view_holder_intro_button.xml
xml
2016-01-31T15:45:41
2024-08-14T02:52:55
toro
eneim/toro
1,414
234
```xml /** * @file Disqus API * @module utils/disqus * @author Surmon <path_to_url */ import axios from 'axios' const AUTHORIZE_URL = 'path_to_url const ACCESS_TOKEN_URL = 'path_to_url const getApiURL = (resource: string) => `path_to_url{resource}.json` const normalizeAxiosError = (error: any) => { return error?.response?.data?.response || error?.response?.data || error?.toJSON() || error?.message || error } const resourcesRequiringPost = [ 'blacklists/add', 'blacklists/remove', 'categories/create', 'exports/exportForum', 'forums/addModerator', 'forums/create', 'forums/removeModerator', 'posts/approve', 'posts/create', 'posts/highlight', 'posts/remove', 'posts/report', 'posts/restore', 'posts/spam', 'posts/unhighlight', 'posts/update', 'posts/vote', 'reactions/remove', 'reactions/restore', 'threads/close', 'threads/create', 'threads/open', 'threads/remove', 'threads/restore', 'threads/subscribe', 'threads/unsubscribe', 'threads/update', 'threads/vote', 'users/checkUsername', 'users/follow', 'users/unfollow', 'whitelists/add', 'whitelists/remove' ] // path_to_url // path_to_url // path_to_url export const DISQUS_PUBKEY = `your_sha256_hash` export interface AccessToken { username: string user_id: number access_token: string /** seconds */ expires_in: number token_type: string state: any scope: string refresh_token: string } export interface RequestParams { access_token?: string [key: string]: any } export interface DisqusConfig { apiKey: string apiSecret: string } // fork form: path_to_url export class Disqus { private config: DisqusConfig constructor(config: DisqusConfig) { this.config = config } // Disqus API v3.0 path_to_url public request<T = any>(resource: string, params: RequestParams = {}, usePublic = false) { const api = getApiURL(resource) const queryParams = { ...params } // path_to_url#L342 if (usePublic) { queryParams.api_key = DISQUS_PUBKEY } else { queryParams.api_key = this.config.apiKey queryParams.api_secret = this.config.apiSecret } const requester = resourcesRequiringPost.includes(resource) ? axios.post<{ code: number; response: T }>(api, null, { params: queryParams }) : axios.get<{ code: number; response: T }>(api, { params: queryParams }) return requester .then((response) => { return response.data.code !== 0 ? Promise.reject(response.data) : Promise.resolve(response.data) }) .catch((error) => { // path_to_url return error?.response?.data?.response ? Promise.reject(`[code=${error.response.data.code}] ${error.response.data.response}`) : Promise.reject(normalizeAxiosError(error)) }) } // path_to_url public getAuthorizeURL(type = 'code', scope: string, uri: string) { const url = new URL(AUTHORIZE_URL) url.searchParams.set('client_id', this.config.apiKey) url.searchParams.set('response_type', type) url.searchParams.set('scope', scope) url.searchParams.set('redirect_uri', uri) return url.href } public getOAuthAccessToken(code: string, uri: string) { const config = { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } const formData = new URLSearchParams() formData.append('code', code) formData.append('grant_type', 'authorization_code') formData.append('client_id', this.config.apiKey) formData.append('client_secret', this.config.apiSecret) formData.append('redirect_uri', uri) return axios .post<AccessToken>(ACCESS_TOKEN_URL, formData.toString(), config) .then((response) => response.data) .catch((error) => Promise.reject(normalizeAxiosError(error))) } public refreshOAuthAccessToken<T = any>(refreshToken: string) { const url = new URL(ACCESS_TOKEN_URL) url.searchParams.set('grant_type', 'refresh_token') url.searchParams.set('refresh_token', refreshToken) url.searchParams.set('client_id', this.config.apiKey) url.searchParams.set('client_secret', this.config.apiSecret) return axios .get<T>(url.href) .then((response) => response.data) .catch((error) => Promise.reject(normalizeAxiosError(error))) } } ```
/content/code_sandbox/src/utils/disqus.ts
xml
2016-02-13T08:16:02
2024-08-12T08:34:20
nodepress
surmon-china/nodepress
1,421
1,078
```xml <vector xmlns:android="path_to_url" android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path android:fillColor="#FFF" android:pathData="M10,18h4v-2h-4v2zM3,6v2h18L21,6L3,6zM6,13h12v-2L6,11v2z"/> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/ic_filter.xml
xml
2016-01-07T17:24:12
2024-08-16T06:55:33
LeafPic
UnevenSoftware/LeafPic
3,258
113
```xml import { KubernetesPodNodeAffinityNodeSelectorRequirementOperators } from '../pod/models'; export function nodeAffinityValues( values: string | string[], operator: KubernetesPodNodeAffinityNodeSelectorRequirementOperators ) { if ( operator === KubernetesPodNodeAffinityNodeSelectorRequirementOperators.IN || operator === KubernetesPodNodeAffinityNodeSelectorRequirementOperators.NOT_IN ) { return values; } if ( operator === KubernetesPodNodeAffinityNodeSelectorRequirementOperators.EXISTS || operator === KubernetesPodNodeAffinityNodeSelectorRequirementOperators.DOES_NOT_EXIST ) { return ''; } if ( operator === KubernetesPodNodeAffinityNodeSelectorRequirementOperators.GREATER_THAN || operator === KubernetesPodNodeAffinityNodeSelectorRequirementOperators.LOWER_THAN ) { return values[0]; } return ''; } ```
/content/code_sandbox/app/kubernetes/filters/application.ts
xml
2016-05-19T20:15:28
2024-08-16T19:15:14
portainer
portainer/portainer
30,083
192
```xml "use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import styles from "../styles/layout.module.css"; export const Nav = () => { const pathname = usePathname(); return ( <nav className={styles.nav}> <Link className={`${styles.link} ${pathname === "/" ? styles.active : ""}`} href="/" > Home </Link> <Link className={`${styles.link} ${ pathname === "/verify" ? styles.active : "" }`} href="/verify" > Verify </Link> <Link className={`${styles.link} ${ pathname === "/quotes" ? styles.active : "" }`} href="/quotes" > Quotes </Link> </nav> ); }; ```
/content/code_sandbox/examples/with-redux/app/components/Nav.tsx
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
175
```xml <?xml version="1.0" encoding="UTF-8"?> <Configuration status="INFO" monitorInterval="5"> <Properties> <Property name="root.log.level">INFO</Property> </Properties> <Appenders> <Console name="Console" target="SYSTEM_OUT"> <PatternLayout alwaysWriteExceptions="false" pattern='{"timestamp":"%d{ISO8601}","container":"${hostName}","level":"%level","thread":"%t","class":"%c{1}","message":"%msg","throwable":"%enc{%throwable}{JSON}"}%n'/> </Console> <RollingFile name="RollingFile" fileName="/tmp/besu/besu-${env:HOSTNAME}.log" filePattern="/tmp/besu/besu-${env:HOSTNAME}_%d{yyyy-MM-dd}_%i.log.gz" > <PatternLayout alwaysWriteExceptions="false" pattern='{"timestamp":"%d{ISO8601}","container":"${hostName}","level":"%level","thread":"%t","class":"%c{1}","message":"%msg","throwable":"%enc{%throwable}{JSON}"}%n'/> <Policies> <SizeBasedTriggeringPolicy size="10 MB" /> </Policies> <DefaultRolloverStrategy max="5" /> </RollingFile> </Appenders> <Loggers> <Root level="${sys:root.log.level}"> <AppenderRef ref="RollingFile" /> <AppenderRef ref="Console" /> </Root> </Loggers> </Configuration> ```
/content/code_sandbox/integration-tests/src/test/resources/quorum-test-network/config/besu/log-config.xml
xml
2016-09-04T05:48:49
2024-08-16T16:12:18
web3j
hyperledger/web3j
5,043
357
```xml import { PnpmError } from '@pnpm/error' export interface NodeSpecifier { releaseChannel: string useNodeVersion: string } const isStableVersion = (version: string) => /^[0-9]+\.[0-9]+\.[0-9]+$/.test(version) const STABLE_RELEASE_ERROR_HINT = 'The correct syntax for stable release is strictly X.Y.Z or release/X.Y.Z' export function parseNodeSpecifier (specifier: string): NodeSpecifier { if (specifier.includes('/')) { const [releaseChannel, useNodeVersion] = specifier.split('/') if (releaseChannel === 'release') { if (!isStableVersion(useNodeVersion)) { throw new PnpmError('INVALID_NODE_VERSION', `"${specifier}" is not a valid Node.js version`, { hint: STABLE_RELEASE_ERROR_HINT, }) } } else if (!useNodeVersion.includes(releaseChannel)) { throw new PnpmError('MISMATCHED_RELEASE_CHANNEL', `Node.js version (${useNodeVersion}) must contain the release channel (${releaseChannel})`) } return { releaseChannel, useNodeVersion } } const prereleaseMatch = specifier.match(/^[0-9]+\.[0-9]+\.[0-9]+-(nightly|rc|test|v8-canary)(\..+)$/) if (prereleaseMatch != null) { return { releaseChannel: prereleaseMatch[1], useNodeVersion: specifier } } if (isStableVersion(specifier)) { return { releaseChannel: 'release', useNodeVersion: specifier } } let hint: string | undefined if (['nightly', 'rc', 'test', 'v8-canary'].includes(specifier)) { hint = `The correct syntax for ${specifier} release is strictly X.Y.Z-${specifier}.W` } else if (/^[0-9]+\.[0-9]+$/.test(specifier) || /^[0-9]+$/.test(specifier) || ['release', 'stable', 'latest'].includes(specifier)) { hint = STABLE_RELEASE_ERROR_HINT } throw new PnpmError('INVALID_NODE_VERSION', `"${specifier}" is not a valid Node.js version`, { hint }) } ```
/content/code_sandbox/env/plugin-commands-env/src/parseNodeSpecifier.ts
xml
2016-01-28T07:40:43
2024-08-16T12:38:47
pnpm
pnpm/pnpm
28,869
482
```xml /** * @license * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import {verifyDefaultAdapter} from '../../../testing/helpers/foundation'; import {setUpFoundationTest} from '../../../testing/helpers/setup'; import {cssClasses, numbers, strings} from '../constants'; import {MDCTopAppBarBaseFoundation} from '../foundation'; describe('MDCTopAppBarBaseFoundation', () => { it('exports strings', () => { expect('strings' in MDCTopAppBarBaseFoundation).toBe(true); expect(MDCTopAppBarBaseFoundation.strings).toEqual(strings); }); it('exports cssClasses', () => { expect('cssClasses' in MDCTopAppBarBaseFoundation).toBe(true); expect(MDCTopAppBarBaseFoundation.cssClasses).toEqual(cssClasses); }); it('exports numbers', () => { expect('numbers' in MDCTopAppBarBaseFoundation).toBe(true); expect(MDCTopAppBarBaseFoundation.numbers).toEqual(numbers); }); it('defaultAdapter returns a complete adapter implementation', () => { verifyDefaultAdapter(MDCTopAppBarBaseFoundation, [ 'hasClass', 'addClass', 'removeClass', 'setStyle', 'getTopAppBarHeight', 'notifyNavigationIconClicked', 'getViewportScrollY', 'getTotalActionItems', ]); }); const setupTest = () => { const {foundation, mockAdapter} = setUpFoundationTest(MDCTopAppBarBaseFoundation); return {foundation, mockAdapter}; }; it('#handleNavigationClick emits a navigation event', () => { const {foundation, mockAdapter} = setupTest(); foundation.handleNavigationClick(); expect(mockAdapter.notifyNavigationIconClicked).toHaveBeenCalledTimes(1); }); }); ```
/content/code_sandbox/packages/mdc-top-app-bar/test/foundation.test.ts
xml
2016-12-05T16:04:09
2024-08-16T15:42:22
material-components-web
material-components/material-components-web
17,119
581
```xml <?xml version="1.0" encoding="utf-8"?> <Behavior Version="5"> <Node Class="Behaviac.Design.Nodes.Behavior" AgentType="AgentNodeTest" Domains="" Enable="true" HasOwnPrefabData="false" Id="-1" PrefabName="" PrefabNodeId="-1"> <Comment Background="NoColor" Text="" /> <DescriptorRefs value="0:" /> <Connector Identifier="GenericChildren"> <Node Class="PluginBehaviac.Nodes.Parallel" ChildFinishPolicy="CHILDFINISH_LOOP" Enable="true" ExitPolicy="EXIT_ABORT_RUNNINGSIBLINGS" FailurePolicy="FAIL_ON_ONE" HasOwnPrefabData="false" Id="0" PrefabName="" PrefabNodeId="-1" SuccessPolicy="SUCCEED_ON_ALL"> <Comment Background="NoColor" Text="" /> <Attachment Class="PluginBehaviac.Events.Precondition" BinaryOperator="And" Enable="true" Id="1" Operator="Equal" Opl="Self.AgentNodeTest::enter_action_1(0)" Opr1="&quot;&quot;" Opr2="const bool true" Phase="Enter" PrefabAttachmentId="-1" /> <Attachment Class="PluginBehaviac.Events.Effector" Enable="true" Id="2" Operator="Invalid" Opl="Self.AgentNodeTest::exit_action_1(0)" Opr1="&quot;&quot;" Opr2="&quot;&quot;" Phase="Success" PrefabAttachmentId="-1" /> <Connector Identifier="GenericChildren"> <Node Class="PluginBehaviac.Nodes.WaitforSignal" Enable="true" HasOwnPrefabData="false" Id="3" PrefabName="" PrefabNodeId="-1"> <Comment Background="NoColor" Text="" /> <Attachment Class="PluginBehaviac.Events.Precondition" BinaryOperator="And" Enable="true" Id="4" Operator="Equal" Opl="Self.AgentNodeTest::enter_action_2(3,&quot;hello&quot;)" Opr1="&quot;&quot;" Opr2="const bool true" Phase="Enter" PrefabAttachmentId="-1" /> <Attachment Class="PluginBehaviac.Events.Effector" Enable="true" Id="5" Operator="Invalid" Opl="Self.AgentNodeTest::exit_action_2(5,&quot;world&quot;)" Opr1="&quot;&quot;" Opr2="&quot;&quot;" Phase="Success" PrefabAttachmentId="-1" /> <Connector Identifier="_custom_condition"> <Node Class="PluginBehaviac.Nodes.Condition" Enable="true" HasOwnPrefabData="false" Id="6" Operator="Equal" Opl="int Self.AgentNodeTest::testVar_0" Opr="const int 0" PrefabName="" PrefabNodeId="-1"> <Comment Background="NoColor" Text="" /> </Node> </Connector> </Node> <Node Class="PluginBehaviac.Nodes.True" Enable="true" HasOwnPrefabData="false" Id="7" PrefabName="" PrefabNodeId="-1"> <Comment Background="NoColor" Text="" /> </Node> </Connector> </Node> </Connector> </Node> </Behavior> ```
/content/code_sandbox/integration/unity/Assets/behaviac/workspace/behaviors/node_test/enter_exit_action_ut_1.xml
xml
2016-11-21T05:08:08
2024-08-16T07:18:30
behaviac
Tencent/behaviac
2,831
702
```xml import type { HTMLAttributes } from 'react'; import { useRef } from 'react'; import { c } from 'ttag'; import { Input } from '@proton/atoms'; import { MemoizedIconRow as IconRow, Notifications, TextAreaTwo, useModalStateObject } from '@proton/components'; import CalendarSelectIcon from '@proton/components/components/calendarSelect/CalendarSelectIcon'; import NotificationsInDrawer from '@proton/components/containers/calendar/notifications/NotificationsInDrawer'; import type { VIEWS } from '@proton/shared/lib/calendar/constants'; import { CALENDAR_INPUT_ID, DESCRIPTION_INPUT_ID, FREQUENCY, FREQUENCY_INPUT_ID, LOCATION_INPUT_ID, MAX_CHARS_API, MAX_NOTIFICATIONS, NOTIFICATION_INPUT_ID, PARTICIPANTS_INPUT_ID, TITLE_INPUT_ID, } from '@proton/shared/lib/calendar/constants'; import { getIsProtonUID } from '@proton/shared/lib/calendar/helper'; import type { WeekStartsOn } from '@proton/shared/lib/date-fns-utc/interface'; import type { Address } from '@proton/shared/lib/interfaces'; import type { AttendeeModel, EventModel, EventModelErrors, FrequencyModel, NotificationModel, } from '@proton/shared/lib/interfaces/calendar'; import { useFlag } from '@proton/unleash'; import clsx from '@proton/utils/clsx'; import { getCanChangeCalendarOfEvent } from '../../helpers/event'; import BusySlotsSpotlight from './BusySlotsSpotlight'; import createHandlers from './eventForm/createPropFactory'; import { getOrganizerAndSelfAddressModel } from './eventForm/state'; import CreateEventCalendarSelect from './inputs/CreateEventCalendarSelect'; import CustomFrequencyModal from './inputs/CustomFrequencyModal'; import CustomFrequencySelector from './inputs/CustomFrequencySelector'; import EventColorSelect from './inputs/EventColorSelect'; import FrequencyInput from './inputs/FrequencyInput'; import ParticipantsInput from './inputs/ParticipantsInput'; import DateTimeRow from './rows/DateTimeRow'; import MiniDateTimeRows from './rows/MiniDateTimeRows'; export interface EventFormProps { isSubmitted: boolean; displayWeekNumbers: boolean; weekStartsOn: WeekStartsOn; addresses: Address[]; errors: EventModelErrors; model: EventModel; setModel: (value: EventModel) => void; tzid?: string; canEditSharedEventData?: boolean; isMinimal?: boolean; isCreateEvent: boolean; isInvitation: boolean; setParticipantError?: (value: boolean) => void; isOwnedCalendar?: boolean; isCalendarWritable?: boolean; isDrawerApp?: boolean; isSmallViewport: boolean; onDisplayBusySlots?: () => void; view: VIEWS; } const EventForm = ({ isSubmitted, displayWeekNumbers, weekStartsOn, addresses, errors, model, setModel, tzid, isMinimal, canEditSharedEventData = true, isCreateEvent, isInvitation, setParticipantError, isOwnedCalendar = true, isCalendarWritable = true, isDrawerApp, isSmallViewport, onDisplayBusySlots, view, ...props }: EventFormProps & HTMLAttributes<HTMLDivElement>) => { const isColorPerEventEnabled = useFlag('ColorPerEventWeb'); const isOrganizerOfInvitationRef = useRef(!isCreateEvent && !!model.isOrganizer); const isOrganizerOfInvitation = isOrganizerOfInvitationRef.current; const { uid, frequencyModel, start, isAllDay, isAttendee, isOrganizer, fullDayNotifications, defaultFullDayNotification, partDayNotifications, defaultPartDayNotification, calendars, } = model; const isSingleEdit = !!model.rest?.['recurrence-id']; const isImportedEvent = uid && !getIsProtonUID(uid); const isCustomFrequencySet = frequencyModel.type === FREQUENCY.CUSTOM; const canChangeCalendar = getCanChangeCalendarOfEvent({ isCreateEvent, isOwnedCalendar, isCalendarWritable, isSingleEdit, isInvitation, isAttendee, isOrganizer, }); const notifications = isAllDay ? fullDayNotifications : partDayNotifications; const canAddNotifications = notifications.length < MAX_NOTIFICATIONS; const showNotifications = canAddNotifications || notifications.length; const customModal = useModalStateObject(); const previousFrequencyRef = useRef<FrequencyModel>(); const dateRow = isMinimal ? ( <MiniDateTimeRows model={model} setModel={setModel} endError={errors.end} displayWeekNumbers={displayWeekNumbers} weekStartsOn={weekStartsOn} > <div className="color-weak hover:color-norm"> <FrequencyInput className="w-full relative inline-flex flex-nowrap gap-1 text-left sm:text-right items-center rounded" id={FREQUENCY_INPUT_ID} frequencyInputType="dropdown" data-testid="event-modal/frequency:select" value={frequencyModel.type} onChange={(type) => { if (type === FREQUENCY.CUSTOM) { customModal.openModal(true); previousFrequencyRef.current = frequencyModel; } setModel({ ...model, frequencyModel: { ...frequencyModel, type }, hasTouchedRrule: true, }); }} title={c('Title').t`Select event frequency`} /> </div> {customModal.render && ( <CustomFrequencyModal modalProps={{ ...customModal.modalProps, onClose: () => { customModal.modalProps.onClose(); const frequencyModel = previousFrequencyRef.current; if (frequencyModel) { setModel({ ...model, frequencyModel: frequencyModel }); } }, }} frequencyModel={frequencyModel} start={start} displayWeekNumbers={displayWeekNumbers} weekStartsOn={weekStartsOn} errors={errors} isSubmitted={isSubmitted} onChange={(frequencyModel) => { setModel({ ...model, frequencyModel, hasTouchedRrule: true }); customModal.modalProps.onClose(); }} /> )} </MiniDateTimeRows> ) : ( <DateTimeRow model={model} setModel={setModel} endError={errors.end} displayWeekNumbers={displayWeekNumbers} weekStartsOn={weekStartsOn} tzid={tzid!} /> ); const titleRow = ( <IconRow icon="text-title" id={TITLE_INPUT_ID} title={c('Label').t`Event title`}> <Input id={TITLE_INPUT_ID} placeholder={c('Placeholder').t`Add title`} title={c('Title').t`Add event title`} autoFocus maxLength={MAX_CHARS_API.TITLE} {...createHandlers({ model, setModel, field: 'title' }).native} /> </IconRow> ); const frequencyRow = ( <IconRow icon="arrows-rotate" title={c('Label').t`Frequency`} id={FREQUENCY_INPUT_ID}> <FrequencyInput className={clsx([isCustomFrequencySet && 'mb-2', 'w-full'])} id={FREQUENCY_INPUT_ID} data-testid="event-modal/frequency:select" value={frequencyModel.type} onChange={(type) => setModel({ ...model, frequencyModel: { ...frequencyModel, type }, hasTouchedRrule: true, }) } title={c('Title').t`Select event frequency`} /> {isCustomFrequencySet && ( <CustomFrequencySelector frequencyModel={frequencyModel} start={start} displayWeekNumbers={displayWeekNumbers} weekStartsOn={weekStartsOn} errors={errors} isSubmitted={isSubmitted} onChange={(frequencyModel) => setModel({ ...model, frequencyModel, hasTouchedRrule: true })} /> )} </IconRow> ); const locationRow = ( <IconRow icon="map-pin" title={c('Label').t`Location`} id={LOCATION_INPUT_ID}> <Input id={LOCATION_INPUT_ID} placeholder={c('Placeholder').t`Add location`} maxLength={MAX_CHARS_API.LOCATION} title={c('Title').t`Add event location`} {...createHandlers({ model, setModel, field: 'location' }).native} /> </IconRow> ); const descriptionRow = ( <IconRow icon="text-align-left" iconClassName="rtl:mirror" title={c('Label').t`Description`} id={DESCRIPTION_INPUT_ID} > <TextAreaTwo id={DESCRIPTION_INPUT_ID} minRows={2} autoGrow placeholder={c('Placeholder').t`Add description`} maxLength={MAX_CHARS_API.EVENT_DESCRIPTION} className="max-h-custom" title={c('Title').t`Add more information related to this event`} {...createHandlers({ model, setModel, field: 'description' }).native} /> </IconRow> ); // temporary code; remove when proper design available const allDayNotificationsRow = isDrawerApp ? ( <NotificationsInDrawer id={NOTIFICATION_INPUT_ID} hasType {...{ errors, canAdd: canAddNotifications, notifications: fullDayNotifications, defaultNotification: defaultFullDayNotification, onChange: (notifications: NotificationModel[]) => { setModel({ ...model, hasDefaultNotifications: false, fullDayNotifications: notifications, hasFullDayDefaultNotifications: false, }); }, }} /> ) : ( <Notifications id={NOTIFICATION_INPUT_ID} hasType {...{ errors, canAdd: canAddNotifications, notifications: fullDayNotifications, defaultNotification: defaultFullDayNotification, onChange: (notifications: NotificationModel[]) => { setModel({ ...model, hasDefaultNotifications: false, fullDayNotifications: notifications, hasFullDayDefaultNotifications: false, }); }, }} /> ); const partDayNotificationsRow = isDrawerApp ? ( <NotificationsInDrawer id={NOTIFICATION_INPUT_ID} hasType {...{ errors, canAdd: canAddNotifications, notifications: partDayNotifications, defaultNotification: defaultPartDayNotification, onChange: (notifications: NotificationModel[]) => { setModel({ ...model, hasDefaultNotifications: false, partDayNotifications: notifications, hasPartDayDefaultNotifications: false, }); }, }} /> ) : ( <Notifications id={NOTIFICATION_INPUT_ID} hasType {...{ errors, canAdd: canAddNotifications, notifications: partDayNotifications, defaultNotification: defaultPartDayNotification, onChange: (notifications: NotificationModel[]) => { setModel({ ...model, hasDefaultNotifications: false, partDayNotifications: notifications, hasPartDayDefaultNotifications: false, }); }, }} /> ); const notificationsRow = ( <IconRow id={NOTIFICATION_INPUT_ID} icon="bell" title={c('Label').t`Notifications`} labelClassName={isDrawerApp ? '' : 'pb-2 mt-2 md:mt-0'} > {isAllDay ? allDayNotificationsRow : partDayNotificationsRow} </IconRow> ); const handleChangeAttendees = (value: AttendeeModel[]) => { const { organizer: newOrganizer, selfAddress: newSelfAddress } = getOrganizerAndSelfAddressModel({ attendees: value, addressID: model.member.addressID, addresses, isAttendee: false, }); setModel({ ...model, attendees: value, isOrganizer: isOrganizerOfInvitation ? true : !!value.length, organizer: isOrganizerOfInvitation ? model.organizer : newOrganizer, selfAddress: isOrganizerOfInvitation ? model.selfAddress : newSelfAddress, }); }; const participantsRow = ( <BusySlotsSpotlight view={view} isDisplayedInPopover={!!isMinimal}> <IconRow icon="users" title={c('Label').t`Participants`} id={PARTICIPANTS_INPUT_ID}> <ParticipantsInput placeholder={c('Placeholder').t`Add participants`} id={PARTICIPANTS_INPUT_ID} value={model.attendees} isOwnedCalendar={model.calendar.isOwned} onChange={handleChangeAttendees} organizer={model.organizer} addresses={addresses} collapsible={!isMinimal} setParticipantError={setParticipantError} onDisplayBusySlots={onDisplayBusySlots} displayBusySlots={!!isMinimal} view={view} /> </IconRow> </BusySlotsSpotlight> ); const getCalendarIcon = () => { if (isColorPerEventEnabled) { return 'calendar-grid'; } if (calendars.length === 1) { return <CalendarSelectIcon className="mt-1" color={calendars[0].color} />; } if (!canChangeCalendar) { return <CalendarSelectIcon className="mt-1" color={model.calendar.color} />; } return 'calendar-grid'; }; const calendarRow = ( <IconRow icon={getCalendarIcon()} title={c('Label').t`Calendar`} id={CALENDAR_INPUT_ID} className="flex flex-nowrap flex-1 grow" containerClassName={clsx(isMinimal && !isColorPerEventEnabled && 'eventpopover-calendar-select')} > <CreateEventCalendarSelect id={CALENDAR_INPUT_ID} className="w-full flex-1" title={c('Title').t`Select which calendar to add this event to`} frozen={!canChangeCalendar} model={model} setModel={setModel} isCreateEvent={isCreateEvent} isColorPerEventEnabled={isColorPerEventEnabled} /> {isColorPerEventEnabled && ( <EventColorSelect model={model} setModel={setModel} isSmallViewport={isSmallViewport} isDrawerApp={isDrawerApp} /> )} </IconRow> ); return ( <div className="mt-2" {...props}> {canEditSharedEventData && titleRow} {canEditSharedEventData && dateRow} {canEditSharedEventData && !isMinimal && frequencyRow} {calendars.length > 0 && calendarRow} {canEditSharedEventData && !isImportedEvent && participantsRow} {canEditSharedEventData && locationRow} {!isMinimal && showNotifications && notificationsRow} {canEditSharedEventData && descriptionRow} </div> ); }; export default EventForm; ```
/content/code_sandbox/applications/calendar/src/app/components/eventModal/EventForm.tsx
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
3,268
```xml import { ComponentFixture, TestBed } from '@angular/core/testing'; import { WorkerListComponent } from './worker-list.component'; import { of } from 'rxjs'; import { delay } from 'rxjs/operators'; import { SharedTestingModule } from '../../../../shared/shared.module'; import { JobserviceService } from '../../../../../../ng-swagger-gen/services/jobservice.service'; import { Worker, WorkerPool } from 'ng-swagger-gen/models'; import { ScheduleListResponse } from '../job-service-dashboard.interface'; import { JobServiceDashboardSharedDataService } from '../job-service-dashboard-shared-data.service'; describe('WorkerListComponent', () => { let component: WorkerListComponent; let fixture: ComponentFixture<WorkerListComponent>; const mockedWorkers: Worker[] = [ { id: '1', job_id: '1', job_name: 'test1', pool_id: '1' }, { id: '2', job_id: '2', job_name: 'test2', pool_id: '1' }, ]; const mockedPools: WorkerPool[] = [ { pid: 1, concurrency: 10, worker_pool_id: '1' }, ]; const fakedJobserviceService = { getWorkerPools() { return of(mockedPools).pipe(delay(0)); }, }; const fakedJobServiceDashboardSharedDataService = { _allWorkers: mockedWorkers, getAllWorkers(): ScheduleListResponse { return this._allWorkers; }, retrieveAllWorkers() { return of([]); }, }; beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [WorkerListComponent], imports: [SharedTestingModule], providers: [ { provide: JobserviceService, useValue: fakedJobserviceService, }, { provide: JobServiceDashboardSharedDataService, useValue: fakedJobServiceDashboardSharedDataService, }, ], }).compileComponents(); fixture = TestBed.createComponent(WorkerListComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); it('should render worker list', async () => { await fixture.whenStable(); component.loadingPools = false; component.loadingWorkers = false; component.selectedPool = mockedPools[0]; fixture.detectChanges(); await fixture.whenStable(); const rows = fixture.nativeElement.querySelectorAll('clr-dg-row'); expect(rows.length).toEqual(3); // 1 + 2 }); }); ```
/content/code_sandbox/src/portal/src/app/base/left-side-nav/job-service-dashboard/worker-list/worker-list.component.spec.ts
xml
2016-01-28T21:10:28
2024-08-16T15:28:34
harbor
goharbor/harbor
23,335
528