/// <summary> /// Loads a waves.bin file /// </summary> public override object Load( ISource source, LoadParameters parameters ) { using ( Stream stream = ( ( IStreamSource )source ).Open( ) ) { return WaveAnimation.Load( stream ); } }
public FeedPropertiesDialog(ISource f) : base(WindowType.Toplevel) { feed = f; Title = "\""+feed.Name+"\" Properties"; Icon = feed.Favicon; BorderWidth = 5; DeleteEvent += OnClose; vbox = new VBox(); vbox.Spacing = 6; Add(vbox); notebook = new Notebook(); vbox.PackStart(notebook, false, false, 0); bbox = new HButtonBox(); bbox.Layout = ButtonBoxStyle.End; vbox.PackStart(bbox, false, false, 0); AddGeneralTab(); AddTagsTab(); AddCloseButton(); }
public CallIndirect(LIRMethod parent, ISource targetMethod, IEnumerable<ISource> sources = null, IDestination returnValueDest = null) : base(parent, LIROpCode.CallIndirect) { this.TargetMethod = targetMethod; if (sources != null) Sources.AddRange(sources); this.ReturnValueDestination = returnValueDest; }
public SourceLocations Add(ISource source) { if (!m_sourcesByName.ContainsKey(source.SourceName)) { m_sourcesByName.Add(source.SourceName,source); } return this; }
public static void AddToSourceLocations(Object obj,ISource location) { var source = GetOrSet(obj); if (source != null) { source.Add(location); } }
/// <summary> /// Generates a list of commands used to modify the source. If it does not exist prior, the /// commands will create the source from scratch. Otherwise the commands will only add new /// fields, tables, etc. It does not delete old fields. /// </summary> /// <param name="DesiredStructure">Desired source structure</param> /// <param name="Source">Source to use</param> /// <returns>List of commands generated</returns> public IEnumerable<string> GenerateSchema(ISource DesiredStructure, ISourceInfo Source) { Contract.Requires<ArgumentNullException>(Source != null, "Source"); return SchemaGenerators.ContainsKey(Source.SourceType) ? SchemaGenerators[Source.SourceType].GenerateSchema(DesiredStructure, Source) : new List<string>(); }
public IEnumerable<ISection> GetSections(ISource source) { var context = new Context { CurrentSource = source, CurrentState = State.WhiteSpace, CurrentPosition = SourcePosition.InitialPosition(), CurrentText = string.Empty }; char? prev = null; ISection section = null; foreach (var c in source.GetChars()) { if (!prev.HasValue) { prev = c; continue; } section = Analyze(prev, c, context); if (section != null) yield return section; prev = c; } section = Analyze(prev, null, context); if (section != null) yield return section; section = EndOfFileActions(context); if (section != null) yield return section; }
public bool HasAuthorization(ISource aDoc) { //Check if user isn't set, or if he isn't creator or collaborator. if (Context.Current.User == null || (!IsCreator(aDoc) && !IsCollaborator(aDoc))) return false; return true; }
public virtual void Dispose() { EndTemplateEditing(true); this.source = null; this.vsExpansion = null; this.view = null; GC.SuppressFinalize(this); }
/// <summary> /// Initializing constructor /// </summary> /// <param name="contained">Tracker source object whose calls are to be logged</param> /// <param name="logWriter">TextWriter which will receive log output</param> /// <param name="config">Configuration object for the LoggingSourceDecorator</param> public LoggingSourceDecorator( ISource contained, TextWriter logWriter, LoggingSourceConfig config ) : base( contained ) { _logWriter = logWriter; _config = new LoggingSourceConfig( config ); }
public Convert(LIRMethod parent, ISource source, LIRType sourceType, IDestination dest, LIRType destType) : base(parent, LIROpCode.Convert) { Source = source; SourceType = sourceType; Destination = dest; DestinationType = destType; }
public Unary(LIRMethod parent, ISource src, IDestination dest, UnaryOperation op, LIRType argType) : base(parent, LIROpCode.Unary) { Source = src; Destination = dest; Operation = op; ArgumentType = argType; }
public Compare(LIRMethod parent, ISource sourceA, ISource sourceB, IDestination destination, LIRType type, CompareCondition condition) : base(parent, LIROpCode.Compare) { this.SourceA = sourceA; this.SourceB = sourceB; this.Destination = destination; this.Type = type; this.Condition = condition; }
internal LexicalAnalyzer(ISource source) { _source = source; _tokens = new List<Token>(); _buffer = new List<char>(); _tokenLineStart = 1; _tokenColumnStart = 1; }
public Result<ISource> Update(string aSourceId, string rev, ISource aDoc, Result<ISource> aResult) { ArgCheck.NotNullNorEmpty("aSourceId", aSourceId); ArgCheck.NotNull("aSource", aDoc); Coroutine.Invoke(UpdateHelper, aSourceId, rev, aDoc, aResult); return aResult; }
protected ModifierBase(string type, PhaseCode startPhase, ISource source, ICardInPlay target, TimeScope duration, int value) : base("Modifier", GetText(target, type, value), source) { this.StartPhase = startPhase; this.Target = target; this.Duration = duration; this.Value = value; }
/// <summary> /// Returns true if the specified source can be loaded /// </summary> public override bool CanLoad( ISource source ) { if ( source is IFolder ) { return ( ( IFolder )source ).Contains( "*.md3" ); } return source.HasExtension( "md3" ); }
public Math(LIRMethod parent, ISource srcA, ISource srcB, IDestination dest, MathOperation op, LIRType argType) : base(parent, LIROpCode.Math) { SourceA = srcA; SourceB = srcB; Destination = dest; Operation = op; ArgumentType = argType; }
public bool Equals(ISource other) { if (other == null) return false; if (other == this) return true; var ot = other as TextSource; if (ot != null) { return ot.Content == this.Content; } return false; }
public override byte[] GetNextFrame(ISource source, uint timeoutMsec) { if (timeoutMsec > 0) { Thread.Sleep((int)timeoutMsec); } return source.GetNextFrame(); }
public bool Equals(ISource other) { if (other == null) return false; if (other == this) return true; var ot = other as FileSource; if (ot != null) { return ot.Filename.ToLower() == this.Filename.ToLower(); } return false; }
public LocationTreeNode( LocationTreeFolder parent, ISource source, string name, int image, int selectedImage ) { m_Parent = parent; m_Source = source; m_Name = name; m_Image = image; m_SelectedImage = selectedImage; }
public TupleValue(DataReference reference, int index) { var list = reference.Dereference(); Source = list as ISource; Index = index; }
/// <summary> /// Loads code from a source /// </summary> public override object Load( ISource source, LoadParameters parameters ) { string typeToInstance = DynamicProperties.GetProperty< string >( parameters.Properties, InstanceTypeName, null ); IEnumerable< string > assemblies = DynamicProperties.GetProperty< IEnumerable< string > >( parameters.Properties, ReferencesName, new string[] { } ); using ( Stream stream = OpenStream( source ) ) { StreamReader reader = new StreamReader( stream ); string allLines = reader.ReadToEnd( ); CodeDomProvider provider = new CSharpCodeProvider( ); CompilerParameters compilerParams = new CompilerParameters( ); compilerParams.GenerateInMemory = true; #if DEBUG compilerParams.IncludeDebugInformation = true; #endif // Add referenced assemblies to compiler parameters foreach ( string assembly in assemblies ) { compilerParams.ReferencedAssemblies.Add( assembly ); } CompilerResults results = provider.CompileAssemblyFromSource( compilerParams, allLines ); if ( results.Errors.Count > 0 ) { // Failed to compile assembly - dump foreach ( CompilerError error in results.Errors ) { Entry entry = new Entry( AssetsLog.GetSource( error.IsWarning ? Severity.Warning : Severity.Error ), error.ErrorText ); entry.Locate( error.FileName, error.Line, error.Column, "" ); Source.HandleEntry( entry ); } return null; } // If the caller requested the instance of a specific type, then find that type in the // compiled assembly, and create an instance of it if ( typeToInstance != null ) { Type instanceType = results.CompiledAssembly.GetType( typeToInstance ); return Activator.CreateInstance( instanceType ); } // Find a type that implements IBuilder, instance it, then use the IBuilder.CreateInstance() // to create our required type foreach ( Type type in results.CompiledAssembly.GetTypes( ) ) { if ( typeof( IBuilder ).IsAssignableFrom( type ) ) { IBuilder builder = ( IBuilder )Activator.CreateInstance( type ); return builder.CreateInstance( type ); } } } return null; }
public BuildServiceManager(ISource source, ILightFactory lightFactory) { _lightFactory = lightFactory; _light = _lightFactory.CreateLight(); _buildStatusSource = source; UnPause(); }
public static NoteInfoList NoteFetchInfoList(ISource source) { return NoteService.NoteFetchInfoList( new NoteCriteria { SourceType = source.SourceType, SourceId = new[] { source.SourceId } }); }
public static Source FromSource(ISource Source) { Source t = Source == null ? null : new Source { Name = Source.Name, CreatedOn = Source.CreatedOn, }; return t; }
/// <summary> /// Loads a resource from a stream /// </summary> public override object Load( ISource source, LoadParameters parameters ) { if ( m_Context == IntPtr.Zero ) { CreateContext( ); } parameters.CanCache = true; return new CgEffect( m_Context, ( IStreamSource )source ); }
public static AttachmentInfoList AttachmentFetchInfoList(ISource source) { return AttachmentService.AttachmentFetchInfoList( new AttachmentCriteria { SourceType = source.SourceType, SourceId = source.SourceId }); }
/// <summary> /// The CodeWindowManager is constructed by the base LanguageService class when VS calls /// the IVsLanguageInfo.GetCodeWindowManager method. You can override CreateCodeWindowManager /// on your LanguageService if you want to plug in a different CodeWindowManager. /// </summary> internal CodeWindowManager(LanguageService service, IVsCodeWindow codeWindow, ISource source) { this.service = service; this.codeWindow = codeWindow; this.viewFilters = new ArrayList(); this.source = source; #if DOCUMENT_PROPERTIES this.properties = service.CreateDocumentProperties(this); #endif }
/// <summary> /// Gets the scope embedding the provided one. /// </summary> /// <param name="source">The scope.</param> public static IList <IScopeHolder> EmbeddingScope(ISource source) { ISource ChildSource = source; ISource ParentSource = source.ParentSource; IList <IScopeHolder> Result = null; do { bool IsHandled = false; switch (ParentSource) { case IScope AsScope: case IContinuation AsContinuation: case IConditional AsConditional: case IAttachment AsAttachment: case IInstruction AsInstruction: case IEffectiveBody AsEffectiveBody: case ICommandOverload AsCommandOverload: case IQueryOverload AsQueryOverload: Result = ((IScopeHolder)ParentSource).InnerScopes; IsHandled = true; break; case IPropertyFeature AsPropertyFeature: if (AsPropertyFeature.GetterBody.IsAssigned && AsPropertyFeature.GetterBody.Item == ChildSource) { Result = AsPropertyFeature.InnerGetScopes; IsHandled = true; } else if (AsPropertyFeature.SetterBody.IsAssigned && AsPropertyFeature.SetterBody.Item == ChildSource) { Result = AsPropertyFeature.InnerSetScopes; IsHandled = true; } break; case IIndexerFeature AsIndexerFeature: if (AsIndexerFeature.GetterBody.IsAssigned && AsIndexerFeature.GetterBody.Item == ChildSource) { Result = AsIndexerFeature.InnerGetScopes; IsHandled = true; } else if (AsIndexerFeature.SetterBody.IsAssigned && AsIndexerFeature.SetterBody.Item == ChildSource) { Result = AsIndexerFeature.InnerSetScopes; IsHandled = true; } break; default: ParentSource = ParentSource.ParentSource; IsHandled = true; break; } Debug.Assert(IsHandled); }while (ParentSource != null && Result == null); return(Result); }
/// <summary> /// Initializes a new instance of the <see cref="ErrorArgumentNameMismatch"/> class. /// </summary> /// <param name="source">The error location.</param> /// <param name="argumentName">The argument name.</param> public ErrorArgumentNameMismatch(ISource source, string argumentName) : base(source) { ArgumentName = argumentName; }
/// <summary> /// Constructor /// </summary> /// <param name="Name">Name</param> /// <param name="Definition">Definition</param> /// <param name="Source">Source</param> public Function(string Name, string Definition, ISource Source) { this.Name = Name; this.Definition = Definition; this.Source = Source; }
public string GetTemplateFile(ISource source, IInputData input, OutputData outputData) { return(WebRazorUtil.GetTemplateFile(fConfig.TemplateFile)); }
/// <summary> /// Called after the <see cref="Source"/> value has changed. /// </summary> /// <param name="oldValue">The previous value of <see cref="Source"/></param> /// <param name="newValue">The new value of <see cref="Source"/></param> protected virtual void OnSourceChanged(ISource oldValue, ISource newValue) { _source = Source; _source.SourceEvent += _source_SourceEvent; _source.SourcePropertyChangedEvent += _source_SourcePropertyChangedEvent; }
public GraphqlAstResolver(ISource source, bool invertNonNull) { this.Source = source; this.invertNonNull = invertNonNull; }
/// <summary> /// Initializes a new instance of the <see cref="ErrorNonConformingType"/> class. /// </summary> /// <param name="source">The error location.</param> public ErrorNonConformingType(ISource source) : base(source) { }
public ModifiableNintendoSubmissionPackageArchive(IReadableSink outSink, NintendoSubmissionPackageReader nspReader, ISource inSource, string targetEntryPath, string descFilePath, KeyConfiguration keyConfig) { this.m_KeyConfig = keyConfig; NintendoSubmissionPackageFileSystemInfo replacedNspInfo = ArchiveReconstructionUtils.GetReplacedNspInfo(nspReader, inSource, targetEntryPath, descFilePath, this.m_KeyConfig); this.ConnectionList = new List <Connection>((IEnumerable <Connection>) new NintendoSubmissionPackageArchive(outSink, replacedNspInfo, this.m_KeyConfig).ConnectionList); }
public void PutFrom(ISource s) { throw new NotImplementedException(); }
public DefaultScanner(ISource source, Uri uri) : base(source, uri) { }
public static IJoin Join(this ISource left, ITableSource right, IConstraint condition, JoinType joinType = JoinType.Inner) { return(QueryFactory.Instance.Join(left, right, condition, joinType)); }
public static IJoin Join(this ISource left, ITableSource right, IRefProperty leftToRight) { return(QueryFactory.Instance.Join(left, right, leftToRight)); }
public CoordinateList(ISource source, int capacity, int width, int height) : base(capacity) { _source = source; _width = width; _height = height; }
public Adapter2(ISource source) { Source = source; }
/// <summary> /// Generates a list of commands used to modify the source. If it does not exist prior, the /// commands will create the source from scratch. Otherwise the commands will only add new /// fields, tables, etc. It does not delete old fields. /// </summary> /// <param name="DesiredStructure">Desired source structure</param> /// <param name="Source">Source to use</param> /// <returns>List of commands generated</returns> public IEnumerable <string> GenerateSchema(ISource DesiredStructure, ISourceInfo Source) { return(new List <string>()); }
public static bool RewindEol(this ISource source) => Rewind(source, Environment.NewLine);
/// <summary> /// Initializes a new instance of the <see cref="ErrorAncestorConformance"/> class. /// </summary> /// <param name="source">The error location.</param> /// <param name="derivedType">The derived type</param> /// <param name="baseType">The base type.</param> public ErrorAncestorConformance(ISource source, ICompiledType derivedType, ICompiledType baseType) : base(source) { DerivedType = derivedType; BaseType = baseType; }
protected ReadWriteCache(ISource <byte[], Value> source) : base(source) { }
public Copier(ISource source, IDestination destination) { // TODO: implement }
public bool SetSource(ISource source) { return(true); }
public LocationProperty(Guid id, ISource source) : base(id, source, "Location", new Uri("file:///")) { }
/// <summary> /// Coerces the value of <see cref="Source"/> when a new value is applied. /// </summary> /// <param name="value">The value that was set on <see cref="Source"/></param> /// <returns>The adjusted value of <see cref="Source"/></returns> protected virtual ISource OnCoerceSource(ISource value) { return(value); }
public LexerContext(ISource source, int index, ILexemeCache?cache) { currentIndex = index; this.source = source; this.cache = cache ?? NoCache.Instance; }
public void Put(string name, ISource v) { }
public Aes128XtsEncryptedSource(ISource source, IXtsModeEncryptor encryptor) { this.m_crypto = encryptor; this.BlockSize = 512; this.m_source = (ISource) new AlignedSource(source, this.BlockSize); }
public static void Write(this ISource source, IEnumerable <int> data, int destination) { source.Write(data.Select(d => unchecked ((byte)d)).ToArray(), destination); }
public JoinStatement(ISource source, ICondition condition, JoinOperator joinOperator = JoinOperator.Inner) : base(source) { JoinOperator = joinOperator; Condition = condition; }
/// <summary> /// Finds all single class attributes in conflict with others already defined in embedding scopes. /// </summary> /// <param name="scope">The scope where the check is performed.</param> /// <param name="innerScopeList">The list of inner scopes.</param> /// <param name="assignedSingleClassList">The list of assigned single class attributes.</param> /// <param name="source">The location where to report errors.</param> /// <param name="errorList">The list of errors found.</param> public static bool HasConflictingSingleAttributes(ISealableDictionary <string, IScopeAttributeFeature> scope, IList <IScopeHolder> innerScopeList, IList <IClass> assignedSingleClassList, ISource source, IErrorList errorList) { bool IsAssigned = false; foreach (KeyValuePair <string, IScopeAttributeFeature> ScopeNameItem in scope) { IsAssigned |= ScopeNameItem.Value.IsGroupAssigned(assignedSingleClassList, source, errorList); } foreach (IScopeHolder Item in innerScopeList) { IsAssigned |= HasConflictingSingleAttributes(scope, Item.InnerScopes, assignedSingleClassList, source, errorList); } return(IsAssigned); }
public ReadWriteCache(ISource <byte[], Value> src, WriteCache <Value> .CacheType cacheType) : base(src) { this.Add(this.writeCache = new WriteCache <Value>(src, cacheType)); this.Add(this.readCache = new ReadCache <Value>(this.writeCache)); this.readCache.SetFlushSource(true); }
public string GetEngineName(ISource source, IInputData input, OutputData outputData) { return(fConfig.RazorEngine); }