/// <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();
        }
Ejemplo n.º 3
0
		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;
		}
Ejemplo n.º 4
0
 public SourceLocations Add(ISource source)
 {
     if (!m_sourcesByName.ContainsKey(source.SourceName)) {
         m_sourcesByName.Add(source.SourceName,source);
     }
     return this;
 }
Ejemplo n.º 5
0
 public static void AddToSourceLocations(Object obj,ISource location)
 {
     var source = GetOrSet(obj);
     if (source != null) {
         source.Add(location);
     }
 }
Ejemplo n.º 6
0
 /// <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>();
 }
Ejemplo n.º 7
0
        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;
        }
Ejemplo n.º 8
0
		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);
 }
Ejemplo n.º 10
0
 /// <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 );
 }
Ejemplo n.º 11
0
		public Convert(LIRMethod parent, ISource source, LIRType sourceType, IDestination dest, LIRType destType) : base(parent, LIROpCode.Convert)
		{
			Source = source;
			SourceType = sourceType;
			Destination = dest;
			DestinationType = destType;
		}
Ejemplo n.º 12
0
		public Unary(LIRMethod parent, ISource src, IDestination dest, UnaryOperation op, LIRType argType) : base(parent, LIROpCode.Unary)
		{
			Source = src;
			Destination = dest;
			Operation = op;
			ArgumentType = argType;
		}
Ejemplo n.º 13
0
		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;
		}
Ejemplo n.º 14
0
 internal LexicalAnalyzer(ISource source)
 {
     _source = source;
     _tokens = new List<Token>();
     _buffer = new List<char>();
     _tokenLineStart = 1;
     _tokenColumnStart = 1;
 }
Ejemplo n.º 15
0
		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;
		}
Ejemplo n.º 16
0
 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;
 }
Ejemplo n.º 17
0
 /// <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" );
 }
Ejemplo n.º 18
0
		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;
		}
Ejemplo n.º 19
0
 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();
 }
Ejemplo n.º 21
0
 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;
 }
Ejemplo n.º 23
0
        public TupleValue(DataReference reference, int index)
        {
            var list = reference.Dereference();

            Source = list as ISource;

            Index = index;
        }
Ejemplo n.º 24
0
        /// <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;
        }
Ejemplo n.º 25
0
        public BuildServiceManager(ISource source, ILightFactory lightFactory)
        {
            _lightFactory = lightFactory;
            _light = _lightFactory.CreateLight();

            _buildStatusSource = source;

            UnPause();
        }
Ejemplo n.º 26
0
 public static NoteInfoList NoteFetchInfoList(ISource source)
 {
     return NoteService.NoteFetchInfoList(
         new NoteCriteria
         {
             SourceType = source.SourceType,
             SourceId = new[] { source.SourceId }
         });
 }
Ejemplo n.º 27
0
 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 );
 }
Ejemplo n.º 29
0
 public static AttachmentInfoList AttachmentFetchInfoList(ISource source)
 {
     return AttachmentService.AttachmentFetchInfoList(
         new AttachmentCriteria
         {
             SourceType = source.SourceType,
             SourceId = source.SourceId
         });
 }
Ejemplo n.º 30
0
        /// <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
        }
Ejemplo n.º 31
0
        /// <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);
        }
Ejemplo n.º 32
0
 /// <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;
 }
Ejemplo n.º 33
0
 /// <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;
 }
Ejemplo n.º 34
0
 public string GetTemplateFile(ISource source, IInputData input, OutputData outputData)
 {
     return(WebRazorUtil.GetTemplateFile(fConfig.TemplateFile));
 }
Ejemplo n.º 35
0
 /// <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;
 }
Ejemplo n.º 36
0
 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)
 {
 }
Ejemplo n.º 38
0
        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);
        }
Ejemplo n.º 39
0
 public void PutFrom(ISource s)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 40
0
 public DefaultScanner(ISource source, Uri uri) : base(source, uri)
 {
 }
Ejemplo n.º 41
0
 public static IJoin Join(this ISource left, ITableSource right, IConstraint condition, JoinType joinType = JoinType.Inner)
 {
     return(QueryFactory.Instance.Join(left, right, condition, joinType));
 }
Ejemplo n.º 42
0
 public static IJoin Join(this ISource left, ITableSource right, IRefProperty leftToRight)
 {
     return(QueryFactory.Instance.Join(left, right, leftToRight));
 }
Ejemplo n.º 43
0
 public CoordinateList(ISource source, int capacity, int width, int height) : base(capacity)
 {
     _source = source;
     _width  = width;
     _height = height;
 }
Ejemplo n.º 44
0
 public Adapter2(ISource source)
 {
     Source = source;
 }
Ejemplo n.º 45
0
 /// <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>());
 }
Ejemplo n.º 46
0
 public static bool RewindEol(this ISource source) => Rewind(source, Environment.NewLine);
Ejemplo n.º 47
0
 /// <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)
 {
 }
Ejemplo n.º 49
0
 public Copier(ISource source, IDestination destination)
 {
     // TODO: implement
 }
 public bool SetSource(ISource source)
 {
     return(true);
 }
Ejemplo n.º 51
0
 public LocationProperty(Guid id, ISource source)
     : base(id, source, "Location", new Uri("file:///"))
 {
 }
Ejemplo n.º 52
0
 /// <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);
 }
Ejemplo n.º 53
0
 public LexerContext(ISource source, int index, ILexemeCache?cache)
 {
     currentIndex = index;
     this.source  = source;
     this.cache   = cache ?? NoCache.Instance;
 }
Ejemplo n.º 54
0
 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);
 }
Ejemplo n.º 56
0
 public static void Write(this ISource source, IEnumerable <int> data, int destination)
 {
     source.Write(data.Select(d => unchecked ((byte)d)).ToArray(), destination);
 }
Ejemplo n.º 57
0
 public JoinStatement(ISource source, ICondition condition, JoinOperator joinOperator = JoinOperator.Inner)
     : base(source)
 {
     JoinOperator = joinOperator;
     Condition    = condition;
 }
Ejemplo n.º 58
0
        /// <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);
 }
Ejemplo n.º 60
0
 public string GetEngineName(ISource source, IInputData input, OutputData outputData)
 {
     return(fConfig.RazorEngine);
 }